HyperDbg Debugger
|
Script engine functions implementations. More...
#include "pch.h"
Functions | |
UINT64 | GetValue (PGUEST_REGS GuestRegs, PACTION_BUFFER ActionBuffer, SCRIPT_ENGINE_VARIABLES_LIST *VariablesList, PSYMBOL Symbol, BOOLEAN ReturnReference, SYMBOL_BUFFER *StackBuffer, UINT64 *StackIndx, UINT64 *StackBaseIndx, UINT64 *ReturnValue) |
BOOLEAN | ScriptEngineFunctionEq (UINT64 Address, QWORD Value, BOOL *HasError) |
Implementation of eq function. | |
BOOLEAN | ScriptEngineFunctionEd (UINT64 Address, DWORD Value, BOOL *HasError) |
Implementation of ed function. | |
BOOLEAN | ScriptEngineFunctionEb (UINT64 Address, BYTE Value, BOOL *HasError) |
Implementation of eb function. | |
BOOLEAN | ScriptEngineFunctionCheckAddress (UINT64 Address, UINT32 Length) |
Check whether the address is valid or not. | |
VOID | ScriptEngineFunctionMemcpy (UINT64 Destination, UINT64 Source, UINT32 Num, BOOL *HasError) |
A VMX-compatible equivalent of memcpy function in C. | |
UINT64 | ScriptEngineFunctionVirtualToPhysical (UINT64 Address) |
UINT64 | ScriptEngineFunctionPhysicalToVirtual (UINT64 Address) |
Convert physical address to virtual address. | |
VOID | ScriptEngineFunctionPrint (UINT64 Tag, BOOLEAN ImmediateMessagePassing, UINT64 Value) |
Implementation of print function. | |
VOID | ScriptEngineFunctionTestStatement (UINT64 Tag, BOOLEAN ImmediateMessagePassing, UINT64 Value) |
Implementation of test_statement function. | |
VOID | ScriptEngineFunctionSpinlockLock (volatile LONG *Lock, BOOL *HasError) |
Implementation of spinlock_lock function. | |
VOID | ScriptEngineFunctionSpinlockUnlock (volatile LONG *Lock, BOOL *HasError) |
Implementation of spinlock_unlock function. | |
VOID | ScriptEngineFunctionSpinlockLockCustomWait (volatile long *Lock, unsigned MaxWait, BOOL *HasError) |
Implementation of spinlock_lock_custom_wait function. | |
UINT64 | ScriptEngineFunctionStrlen (const char *Address) |
Implementation of strlen function. | |
UINT64 | ScriptEngineFunctionDisassembleLen (PVOID Address, BOOLEAN Is32Bit) |
Implementation of disassemble_len function. | |
UINT64 | ScriptEngineFunctionWcslen (const wchar_t *Address) |
Implementation of wcslen function. | |
long long | ScriptEngineFunctionInterlockedExchange (long long volatile *Target, long long Value, BOOL *HasError) |
Implementation of interlocked_exchange function. | |
long long | ScriptEngineFunctionInterlockedExchangeAdd (long long volatile *Addend, long long Value, BOOL *HasError) |
Implementation of interlocked_exchange_add function. | |
long long | ScriptEngineFunctionInterlockedIncrement (long long volatile *Addend, BOOL *HasError) |
Implementation of interlocked_exchange_increment function. | |
long long | ScriptEngineFunctionInterlockedDecrement (long long volatile *Addend, BOOL *HasError) |
Implementation of interlocked_exchange_decrement function. | |
long long | ScriptEngineFunctionInterlockedCompareExchange (long long volatile *Destination, long long ExChange, long long Comperand, BOOL *HasError) |
Implementation of interlocked_compare_exchange function. | |
VOID | ScriptEngineFunctionEventEnable (UINT64 EventId) |
Implementation of event_enable function. | |
VOID | ScriptEngineFunctionEventDisable (UINT64 EventId) |
Implementation of event_disable function. | |
VOID | ScriptEngineFunctionEventClear (UINT64 EventId) |
Implementation of event_clear function. | |
VOID | ScriptEngineFunctionPause (ACTION_BUFFER *ActionDetail, PGUEST_REGS GuestRegs) |
Implementation of pause function. | |
VOID | ScriptEngineFunctionFlush () |
Implementation of flush function. | |
VOID | ScriptEngineFunctionShortCircuitingEvent (UINT64 State, ACTION_BUFFER *ActionDetail) |
Implementation of event_ignore function. | |
VOID | ScriptEngineFunctionFormats (UINT64 Tag, BOOLEAN ImmediateMessagePassing, UINT64 Value) |
Implementation of formats function. | |
UINT32 | CustomStrlen (UINT64 StrAddr, BOOLEAN IsWstring) |
Custom VMX-root compatible strlen. | |
BOOLEAN | CheckIfStringIsSafe (UINT64 StrAddr, BOOLEAN IsWstring) |
Check if string is safe to be accessed or not (in vmx-root mode) | |
VOID | ApplyFormatSpecifier (const CHAR *CurrentSpecifier, CHAR *FinalBuffer, PUINT32 CurrentProcessedPositionFromStartOfFormat, PUINT32 CurrentPositionInFinalBuffer, UINT64 Val, UINT32 SizeOfFinalBuffer) |
Apply format specifiers (d, x, llx, etc.) | |
size_t | WcharToChar (const wchar_t *src, char *dest, size_t dest_len) |
Convert WCHAR* to CHAR*. | |
BOOLEAN | ApplyStringFormatSpecifier (const CHAR *CurrentSpecifier, CHAR *FinalBuffer, PUINT32 CurrentProcessedPositionFromStartOfFormat, PUINT32 CurrentPositionInFinalBuffer, UINT64 Val, BOOLEAN IsWstring, UINT32 SizeOfFinalBuffer) |
Apply string format specifiers (s, ws, etc.) | |
VOID | ScriptEngineFunctionPrintf (PGUEST_REGS GuestRegs, ACTION_BUFFER *ActionDetail, SCRIPT_ENGINE_VARIABLES_LIST *VariablesList, UINT64 Tag, BOOLEAN ImmediateMessagePassing, char *Format, UINT64 ArgCount, PSYMBOL FirstArg, BOOLEAN *HasError, SYMBOL_BUFFER *StackBuffer, UINT64 *StackIndx, UINT64 *StackBaseIndx, UINT64 *ReturnValue) |
Implementation of printf function. | |
VOID | ScriptEngineFunctionEventInject (UINT32 InterruptionType, UINT32 Vector, BOOL *HasError) |
Implementation of event_inject function. | |
VOID | ScriptEngineFunctionEventInjectErrorCode (UINT32 InterruptionType, UINT32 Vector, UINT32 ErrorCode, BOOL *HasError) |
Implementation of event_inject_error_code function. | |
UINT64 | ScriptEngineFunctionStrcmp (const char *Address1, const char *Address2) |
Implementation of strcmp function. | |
UINT64 | ScriptEngineFunctionStrncmp (const char *Address1, const char *Address2, size_t Num) |
Implementation of strcmp function. | |
UINT64 | ScriptEngineFunctionWcscmp (const wchar_t *Address1, const wchar_t *Address2) |
Implementation of wcscmp function. | |
UINT64 | ScriptEngineFunctionWcsncmp (const wchar_t *Address1, const wchar_t *Address2, size_t Num) |
Implementation of wcsncmp function. | |
UINT64 | ScriptEngineFunctionMemcmp (const char *Address1, const char *Address2, size_t Count) |
Implementation of memcmp function. | |
VOID | ScriptEngineFunctionEventTraceInstrumentationStep () |
Implementation of event_trace_instrumentation_step function. | |
VOID | ScriptEngineFunctionEventTraceStepIn () |
Implementation of event_trace_step_in function. | |
Script engine functions implementations.
VOID ApplyFormatSpecifier | ( | const CHAR * | CurrentSpecifier, |
CHAR * | FinalBuffer, | ||
PUINT32 | CurrentProcessedPositionFromStartOfFormat, | ||
PUINT32 | CurrentPositionInFinalBuffer, | ||
UINT64 | Val, | ||
UINT32 | SizeOfFinalBuffer ) |
Apply format specifiers (d, x, llx, etc.)
CurrentSpecifier | |
FinalBuffer | |
CurrentProcessedPositionFromStartOfFormat | |
CurrentPositionInFinalBuffer | |
Val | |
SizeOfFinalBuffer |
BOOLEAN ApplyStringFormatSpecifier | ( | const CHAR * | CurrentSpecifier, |
CHAR * | FinalBuffer, | ||
PUINT32 | CurrentProcessedPositionFromStartOfFormat, | ||
PUINT32 | CurrentPositionInFinalBuffer, | ||
UINT64 | Val, | ||
BOOLEAN | IsWstring, | ||
UINT32 | SizeOfFinalBuffer ) |
Apply string format specifiers (s, ws, etc.)
CurrentSpecifier | |
FinalBuffer | |
CurrentProcessedPositionFromStartOfFormat | |
CurrentPositionInFinalBuffer | |
Val | |
IsWstring | |
SizeOfFinalBuffer |
Check if string is safe to be accessed or not (in vmx-root mode)
StrAddr | |
IsWstring |
Custom VMX-root compatible strlen.
StrAddr | |
IsWstring |
UINT64 GetValue | ( | PGUEST_REGS | GuestRegs, |
PACTION_BUFFER | ActionBuffer, | ||
SCRIPT_ENGINE_VARIABLES_LIST * | VariablesList, | ||
PSYMBOL | Symbol, | ||
BOOLEAN | ReturnReference, | ||
SYMBOL_BUFFER * | StackBuffer, | ||
UINT64 * | StackIndx, | ||
UINT64 * | StackBaseIndx, | ||
UINT64 * | ReturnValue ) |
Check whether the address is valid or not.
Address | |
Length |
Implementation of disassemble_len function.
Address | |
Is32Bit |
Implementation of eb function.
Address | |
Value | |
HasError |
Implementation of ed function.
Address | |
Value | |
HasError |
Implementation of eq function.
Address | |
Value | |
HasError |
Implementation of event_clear function.
EventId |
Implementation of event_disable function.
EventId |
Implementation of event_enable function.
EventId |
Implementation of event_inject function.
InterruptionType | |
Vector | |
HasError |
VOID ScriptEngineFunctionEventInjectErrorCode | ( | UINT32 | InterruptionType, |
UINT32 | Vector, | ||
UINT32 | ErrorCode, | ||
BOOL * | HasError ) |
Implementation of event_inject_error_code function.
InterruptionType | |
Vector | |
ErrorCode | |
HasError |
VOID ScriptEngineFunctionEventTraceInstrumentationStep | ( | ) |
Implementation of event_trace_instrumentation_step function.
VOID ScriptEngineFunctionEventTraceStepIn | ( | ) |
Implementation of event_trace_step_in function.
VOID ScriptEngineFunctionFlush | ( | ) |
Implementation of flush function.
Implementation of formats function.
Tag | |
ImmediateMessagePassing | |
Value |
long long ScriptEngineFunctionInterlockedCompareExchange | ( | long long volatile * | Destination, |
long long | ExChange, | ||
long long | Comperand, | ||
BOOL * | HasError ) |
Implementation of interlocked_compare_exchange function.
Destination | |
ExChange | |
Comperand | |
HasError |
long long ScriptEngineFunctionInterlockedDecrement | ( | long long volatile * | Addend, |
BOOL * | HasError ) |
Implementation of interlocked_exchange_decrement function.
Addend | |
HasError |
long long ScriptEngineFunctionInterlockedExchange | ( | long long volatile * | Target, |
long long | Value, | ||
BOOL * | HasError ) |
Implementation of interlocked_exchange function.
Target | |
Value | |
HasError |
long long ScriptEngineFunctionInterlockedExchangeAdd | ( | long long volatile * | Addend, |
long long | Value, | ||
BOOL * | HasError ) |
Implementation of interlocked_exchange_add function.
Addend | |
Value | |
HasError |
long long ScriptEngineFunctionInterlockedIncrement | ( | long long volatile * | Addend, |
BOOL * | HasError ) |
Implementation of interlocked_exchange_increment function.
Addend | |
HasError |
UINT64 ScriptEngineFunctionMemcmp | ( | const char * | Address1, |
const char * | Address2, | ||
size_t | Count ) |
Implementation of memcmp function.
Address1 | |
Address2 | |
Count |
A VMX-compatible equivalent of memcpy function in C.
Destination | |
Source | |
Num | |
HasError |
VOID ScriptEngineFunctionPause | ( | ACTION_BUFFER * | ActionDetail, |
PGUEST_REGS | GuestRegs ) |
Implementation of pause function.
ActionDetail | |
GuestRegs |
Convert physical address to virtual address.
Address |
Implementation of print function.
Tag | |
ImmediateMessagePassing | |
Value |
VOID ScriptEngineFunctionPrintf | ( | PGUEST_REGS | GuestRegs, |
ACTION_BUFFER * | ActionDetail, | ||
SCRIPT_ENGINE_VARIABLES_LIST * | VariablesList, | ||
UINT64 | Tag, | ||
BOOLEAN | ImmediateMessagePassing, | ||
char * | Format, | ||
UINT64 | ArgCount, | ||
PSYMBOL | FirstArg, | ||
BOOLEAN * | HasError, | ||
SYMBOL_BUFFER * | StackBuffer, | ||
UINT64 * | StackIndx, | ||
UINT64 * | StackBaseIndx, | ||
UINT64 * | ReturnValue ) |
Implementation of printf function.
GuestRegs | |
ActionDetail | |
VariablesList | |
Tag | |
ImmediateMessagePassing | |
Format | |
ArgCount | |
FirstArg | |
HasError |
VOID ScriptEngineFunctionShortCircuitingEvent | ( | UINT64 | State, |
ACTION_BUFFER * | ActionDetail ) |
Implementation of event_ignore function.
State | |
ActionDetail |
Implementation of spinlock_lock function.
Lock | |
HasError |
VOID ScriptEngineFunctionSpinlockLockCustomWait | ( | volatile long * | Lock, |
unsigned | MaxWait, | ||
BOOL * | HasError ) |
Implementation of spinlock_lock_custom_wait function.
Lock | |
MaxWait | |
HasError |
Implementation of spinlock_unlock function.
Lock | |
HasError |
UINT64 ScriptEngineFunctionStrcmp | ( | const char * | Address1, |
const char * | Address2 ) |
Implementation of strcmp function.
Address1 | |
Address2 |
UINT64 ScriptEngineFunctionStrlen | ( | const char * | Address | ) |
Implementation of strlen function.
Address |
UINT64 ScriptEngineFunctionStrncmp | ( | const char * | Address1, |
const char * | Address2, | ||
size_t | Num ) |
Implementation of strcmp function.
Address1 | |
Address2 | |
Num |
VOID ScriptEngineFunctionTestStatement | ( | UINT64 | Tag, |
BOOLEAN | ImmediateMessagePassing, | ||
UINT64 | Value ) |
Implementation of test_statement function.
Tag | |
ImmediateMessagePassing | |
Value |
UINT64 ScriptEngineFunctionWcscmp | ( | const wchar_t * | Address1, |
const wchar_t * | Address2 ) |
Implementation of wcscmp function.
Address1 | |
Address2 |
UINT64 ScriptEngineFunctionWcslen | ( | const wchar_t * | Address | ) |
Implementation of wcslen function.
Address |
UINT64 ScriptEngineFunctionWcsncmp | ( | const wchar_t * | Address1, |
const wchar_t * | Address2, | ||
size_t | Num ) |
Implementation of wcsncmp function.
Address1 | |
Address2 | |
Num |
size_t WcharToChar | ( | const wchar_t * | src, |
char * | dest, | ||
size_t | dest_len ) |
Convert WCHAR* to CHAR*.
src | |
dest | |
dest_len |