diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2026-07-13 17:11:20 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2026-07-13 17:11:20 +0200 |
| commit | 0f0ff9e1b91b64d2fe5d35a8f7f30f427905f66e (patch) | |
| tree | b2d4f41af4dcb44c17a56b99f542870e0a28800d /include | |
| parent | cee4c6d1c8cbf898d6aa9ad555d8dfcece4c7d96 (diff) | |
Fix function loader, it used to load function name that partially
matches
Add checks in open_pdb
Diffstat (limited to 'include')
| -rw-r--r-- | include/funcs.h | 9 | ||||
| -rw-r--r-- | include/utils.h | 2 | ||||
| -rw-r--r-- | include/win_funcs.h | 13 |
3 files changed, 19 insertions, 5 deletions
diff --git a/include/funcs.h b/include/funcs.h index 8ed5cf1..d15cdc7 100644 --- a/include/funcs.h +++ b/include/funcs.h @@ -10,6 +10,7 @@ KERNEL32(GetThreadContext) KERNEL32(SetThreadContext) KERNEL32(CreateFileA) +KERNEL32(GetFileSizeEx) KERNEL32(ReadFile) KERNEL32(WriteFile) KERNEL32(SetFilePointer) @@ -20,10 +21,10 @@ KERNEL32(SetConsoleMode) KERNEL32(ReadConsoleA) KERNEL32(WriteConsoleA) -KERNEL32(ReadProcessMemory) -KERNEL32(OutputDebugStringA) -KERNEL32(ContinueDebugEvent) -KERNEL32(WaitForDebugEventEx) +KERNEL_BASE(ReadProcessMemory) +KERNEL_BASE(OutputDebugStringA) +KERNEL_BASE(ContinueDebugEvent) +KERNEL_BASE(WaitForDebugEventEx) KERNEL32(WideCharToMultiByte) KERNEL32(GetFinalPathNameByHandleA) diff --git a/include/utils.h b/include/utils.h index e84653f..30a5612 100644 --- a/include/utils.h +++ b/include/utils.h @@ -2,7 +2,7 @@ #include "types.h" -#if defined (_DEBUG) +#if defined (DEBUG) #define assert(x) if (!(x)) __debugbreak(); #else #define assert(x) ((void)((x) ? 1 : 0)) diff --git a/include/win_funcs.h b/include/win_funcs.h index 59f395d..3d053bb 100644 --- a/include/win_funcs.h +++ b/include/win_funcs.h @@ -347,6 +347,18 @@ typedef struct __declspec(align(16)) _CONTEXT { } CONTEXT, *PCONTEXT; typedef PCONTEXT LPCONTEXT; +typedef union _LARGE_INTEGER { + struct { + u32 LowPart; + i32 HighPart; + }; + struct { + u32 LowPart; + i32 HighPart; + } u; + i64 QuadPart; +} LARGE_INTEGER, *PLARGE_INTEGER; + // ======================= // ====== Funcs PFN ====== // ======================= @@ -362,6 +374,7 @@ typedef i32(*PFN_GetThreadContext)(void*, LPCONTEXT); typedef i32(*PFN_SetThreadContext)(void*, const CONTEXT*); typedef void*(*PFN_CreateFileA)(const i8*, u32, u32, LPSECURITY_ATTRIBUTES, u32, u32, void*); +typedef i32(*PFN_GetFileSizeEx)(void*, PLARGE_INTEGER); typedef i32(*PFN_ReadFile)(void*, void*, u32, u32*, LPOVERLAPPED); typedef u32(*PFN_SetFilePointer)(void*, i32, i32*, u32); typedef i32(*PFN_WriteFile)(void*, const void*, u32, u32*, LPOVERLAPPED); |
