Skip to content

Commit 0ffe735

Browse files
committed
add new stuff to obfus.h
1 parent a2f0aa4 commit 0ffe735

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

include/obfus.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ static const char *FAKE_DONGLE[] = {"skeydrv.dll", "HASPDOSDRV",
159159
"SSIVDDP.DLL", "WIBUKEY",
160160
"\\\\.\\WIZZKEYRL",
161161
"\\\\.\\NVKEY"};
162+
static const char FAKE_MACROMIX_1[] SECTION_ATTRIBUTE("MacroMix") = {0};
162163

163164
#else
164165

@@ -1092,6 +1093,15 @@ char *getFwriteName_proxy() {
10921093
}
10931094
#define fwrite(...) ((size_t(*)())GetProcAddress(LoadLibraryA_proxy(getStdLibName_proxy()), getFwriteName_proxy()))(__VA_ARGS__)
10941095

1096+
// fflush
1097+
char *getFflushName_proxy() {
1098+
BREAK_STACK_1;
1099+
FAKE_CPUID;
1100+
return "fflush";
1101+
// return ({ char result[32]; sprintf(result, getCharMask(_6), _f, _f, _l, _u, _s, _h); result; });
1102+
}
1103+
#define fflush(...) ((size_t(*)())GetProcAddress(LoadLibraryA_proxy(getStdLibName_proxy()), getFflushName_proxy()))(__VA_ARGS__)
1104+
10951105
// exit
10961106
char *getExitName_proxy() {
10971107
BREAK_STACK_1;
@@ -1354,6 +1364,24 @@ int toupper_proxy(int c) OBFH_SECTION_ATTRIBUTE {
13541364
#define ResetEvent(hEvent) \
13551365
ResetEvent(obfh_int_proxy(hEvent))
13561366

1367+
#define EnterCriticalSection(lpCriticalSection) \
1368+
EnterCriticalSection(obfh_int_proxy(lpCriticalSection))
1369+
1370+
#define LeaveCriticalSection(lpCriticalSection) \
1371+
LeaveCriticalSection(obfh_int_proxy(lpCriticalSection))
1372+
1373+
#define DeleteCriticalSection(lpCriticalSection) \
1374+
DeleteCriticalSection(obfh_int_proxy(lpCriticalSection))
1375+
1376+
#define RegCloseKey(hKey) \
1377+
RegCloseKey(obfh_int_proxy(hKey))
1378+
1379+
#define RegOpenKeyA(hKey, lpSubKey, phkResult) \
1380+
RegOpenKeyA(obfh_int_proxy(hKey), obfh_int_proxy(lpSubKey), obfh_int_proxy(phkResult))
1381+
1382+
#define RegCreateKeyA(hKey, lpSubKey, phkResult) \
1383+
RegCreateKeyA(obfh_int_proxy(hKey), obfh_int_proxy(lpSubKey), obfh_int_proxy(phkResult))
1384+
13571385
#define WaitForMultipleObjects(nCount, lpHandles, bWaitAll, dwMilliseconds) WaitForMultipleObjects(obfh_int_proxy(nCount), obfh_int_proxy(lpHandles), obfh_int_proxy(bWaitAll), obfh_int_proxy(dwMilliseconds))
13581386

13591387
#define memmove(_Dst, _Src, _Size) memmove(_Dst, _Src, obfh_int_proxy(_Size *(TRUE + FALSE)))

0 commit comments

Comments
 (0)