const KERNEL32: &[u8] = b"kernel32.dll";
const MSVCRT: &[u8] = b"msvcrt.dll";
const TABLE: &[(&[u8], &[u8])] = &[
(b"CloseHandle", KERNEL32),
(b"CreateFileA", KERNEL32),
(b"CreateFileW", KERNEL32),
(b"CreateThread", KERNEL32),
(b"ExitProcess", KERNEL32),
(b"ExitThread", KERNEL32),
(b"FreeLibrary", KERNEL32),
(b"GetACP", KERNEL32),
(b"GetCommandLineA", KERNEL32),
(b"GetCommandLineW", KERNEL32),
(b"GetConsoleMode", KERNEL32),
(b"GetConsoleOutputCP", KERNEL32),
(b"GetCurrentProcess", KERNEL32),
(b"GetCurrentProcessId", KERNEL32),
(b"GetCurrentThreadId", KERNEL32),
(b"GetEnvironmentVariableA", KERNEL32),
(b"GetEnvironmentVariableW", KERNEL32),
(b"GetExitCodeProcess", KERNEL32),
(b"GetFileType", KERNEL32),
(b"GetLastError", KERNEL32),
(b"GetModuleHandleA", KERNEL32),
(b"GetModuleHandleW", KERNEL32),
(b"GetProcAddress", KERNEL32),
(b"GetExitCodeThread", KERNEL32),
(b"GetProcessHeap", KERNEL32),
(b"GetStdHandle", KERNEL32),
(b"GetSystemTimeAsFileTime", KERNEL32),
(b"HeapAlloc", KERNEL32),
(b"HeapCreate", KERNEL32),
(b"HeapFree", KERNEL32),
(b"HeapReAlloc", KERNEL32),
(b"HeapSize", KERNEL32),
(b"InitializeCriticalSection", KERNEL32),
(b"LoadLibraryA", KERNEL32),
(b"LoadLibraryW", KERNEL32),
(b"MultiByteToWideChar", KERNEL32),
(b"QueryPerformanceCounter", KERNEL32),
(b"ReadFile", KERNEL32),
(b"SetConsoleCtrlHandler", KERNEL32),
(b"SetFilePointerEx", KERNEL32),
(b"SetLastError", KERNEL32),
(b"SetUnhandledExceptionFilter", KERNEL32),
(b"Sleep", KERNEL32),
(b"VirtualAlloc", KERNEL32),
(b"VirtualFree", KERNEL32),
(b"VirtualProtect", KERNEL32),
(b"WaitForSingleObject", KERNEL32),
(b"WideCharToMultiByte", KERNEL32),
(b"WriteConsoleA", KERNEL32),
(b"WriteConsoleW", KERNEL32),
(b"WriteFile", KERNEL32),
(b"abort", MSVCRT),
(b"abs", MSVCRT),
(b"atexit", MSVCRT),
(b"atoi", MSVCRT),
(b"calloc", MSVCRT),
(b"exit", MSVCRT),
(b"fclose", MSVCRT),
(b"fflush", MSVCRT),
(b"fopen", MSVCRT),
(b"fprintf", MSVCRT),
(b"fputc", MSVCRT),
(b"fputs", MSVCRT),
(b"fread", MSVCRT),
(b"free", MSVCRT),
(b"fwrite", MSVCRT),
(b"getenv", MSVCRT),
(b"malloc", MSVCRT),
(b"memcmp", MSVCRT),
(b"memcpy", MSVCRT),
(b"memmove", MSVCRT),
(b"memset", MSVCRT),
(b"printf", MSVCRT),
(b"putc", MSVCRT),
(b"putchar", MSVCRT),
(b"puts", MSVCRT),
(b"qsort", MSVCRT),
(b"rand", MSVCRT),
(b"realloc", MSVCRT),
(b"snprintf", MSVCRT),
(b"sprintf", MSVCRT),
(b"srand", MSVCRT),
(b"sscanf", MSVCRT),
(b"strcat", MSVCRT),
(b"strchr", MSVCRT),
(b"strcmp", MSVCRT),
(b"strcpy", MSVCRT),
(b"strlen", MSVCRT),
(b"strncmp", MSVCRT),
(b"strncpy", MSVCRT),
(b"strstr", MSVCRT),
(b"system", MSVCRT),
(b"time", MSVCRT),
(b"tolower", MSVCRT),
(b"toupper", MSVCRT),
(b"vsnprintf", MSVCRT),
(b"vsprintf", MSVCRT),
];
pub fn resolve(func: &[u8]) -> Option<&'static [u8]> {
TABLE
.iter()
.find(|(name, _)| *name == func)
.map(|(_, d)| *d)
}