mirror of
https://github.com/decompals/wibo.git
synced 2025-12-14 23:56:16 +00:00
get a lil farther (segfaulting again lol)
This commit is contained in:
@@ -915,6 +915,11 @@ namespace kernel32 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned short WIN_FUNC GetUserDefaultUILanguage(){
|
||||||
|
DEBUG_LOG("STUB GetUserDefaultUILanguage\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int WIN_FUNC WriteFile(void *hFile, const void *lpBuffer, unsigned int nNumberOfBytesToWrite, unsigned int *lpNumberOfBytesWritten, void *lpOverlapped) {
|
unsigned int WIN_FUNC WriteFile(void *hFile, const void *lpBuffer, unsigned int nNumberOfBytesToWrite, unsigned int *lpNumberOfBytesWritten, void *lpOverlapped) {
|
||||||
DEBUG_LOG("WriteFile(%p, %d)\n", hFile, nNumberOfBytesToWrite);
|
DEBUG_LOG("WriteFile(%p, %d)\n", hFile, nNumberOfBytesToWrite);
|
||||||
assert(!lpOverlapped);
|
assert(!lpOverlapped);
|
||||||
@@ -1367,6 +1372,11 @@ namespace kernel32 {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int WIN_FUNC GetConsoleOutputCP(){
|
||||||
|
DEBUG_LOG("GetConsoleOutputCP\n");
|
||||||
|
return 65001; // UTF-8
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int WIN_FUNC SetConsoleCtrlHandler(void *HandlerRoutine, unsigned int Add) {
|
unsigned int WIN_FUNC SetConsoleCtrlHandler(void *HandlerRoutine, unsigned int Add) {
|
||||||
DEBUG_LOG("STUB SetConsoleCtrlHandler\n");
|
DEBUG_LOG("STUB SetConsoleCtrlHandler\n");
|
||||||
// This is a function that gets called when doing ^C
|
// This is a function that gets called when doing ^C
|
||||||
@@ -1588,6 +1598,11 @@ namespace kernel32 {
|
|||||||
return (void*)0x100002;
|
return (void*)0x100002;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void* WIN_FUNC FindResourceW(void* hModule, const wchar_t* lpName, const wchar_t* lpType) {
|
||||||
|
DEBUG_LOG("FindResourceW\n");
|
||||||
|
return (void*)0x100002;
|
||||||
|
}
|
||||||
|
|
||||||
void* WIN_FUNC LoadResource(void* hModule, void* res) {
|
void* WIN_FUNC LoadResource(void* hModule, void* res) {
|
||||||
DEBUG_LOG("LoadResource %p %p\n", hModule, res);
|
DEBUG_LOG("LoadResource %p %p\n", hModule, res);
|
||||||
return (void*)0x100003;
|
return (void*)0x100003;
|
||||||
@@ -2374,6 +2389,7 @@ static void *resolveByName(const char *name) {
|
|||||||
|
|
||||||
// winnls.h
|
// winnls.h
|
||||||
if (strcmp(name, "GetSystemDefaultLangID") == 0) return (void *) kernel32::GetSystemDefaultLangID;
|
if (strcmp(name, "GetSystemDefaultLangID") == 0) return (void *) kernel32::GetSystemDefaultLangID;
|
||||||
|
if (strcmp(name, "GetUserDefaultUILanguage") == 0) return (void *) kernel32::GetUserDefaultUILanguage;
|
||||||
if (strcmp(name, "GetACP") == 0) return (void *) kernel32::GetACP;
|
if (strcmp(name, "GetACP") == 0) return (void *) kernel32::GetACP;
|
||||||
if (strcmp(name, "GetCPInfo") == 0) return (void *) kernel32::GetCPInfo;
|
if (strcmp(name, "GetCPInfo") == 0) return (void *) kernel32::GetCPInfo;
|
||||||
if (strcmp(name, "CompareStringA") == 0) return (void *) kernel32::CompareStringA;
|
if (strcmp(name, "CompareStringA") == 0) return (void *) kernel32::CompareStringA;
|
||||||
@@ -2411,6 +2427,7 @@ static void *resolveByName(const char *name) {
|
|||||||
if (strcmp(name, "GetCurrentDirectoryA") == 0) return (void *) kernel32::GetCurrentDirectoryA;
|
if (strcmp(name, "GetCurrentDirectoryA") == 0) return (void *) kernel32::GetCurrentDirectoryA;
|
||||||
if (strcmp(name, "GetCurrentDirectoryW") == 0) return (void *) kernel32::GetCurrentDirectoryW;
|
if (strcmp(name, "GetCurrentDirectoryW") == 0) return (void *) kernel32::GetCurrentDirectoryW;
|
||||||
if (strcmp(name, "FindResourceA") == 0) return (void *) kernel32::FindResourceA;
|
if (strcmp(name, "FindResourceA") == 0) return (void *) kernel32::FindResourceA;
|
||||||
|
if (strcmp(name, "FindResourceW") == 0) return (void *) kernel32::FindResourceW;
|
||||||
if (strcmp(name, "SetHandleCount") == 0) return (void *) kernel32::SetHandleCount;
|
if (strcmp(name, "SetHandleCount") == 0) return (void *) kernel32::SetHandleCount;
|
||||||
if (strcmp(name, "FormatMessageA") == 0) return (void *) kernel32::FormatMessageA;
|
if (strcmp(name, "FormatMessageA") == 0) return (void *) kernel32::FormatMessageA;
|
||||||
if (strcmp(name, "GetComputerNameA") == 0) return (void *) kernel32::GetComputerNameA;
|
if (strcmp(name, "GetComputerNameA") == 0) return (void *) kernel32::GetComputerNameA;
|
||||||
@@ -2438,6 +2455,7 @@ static void *resolveByName(const char *name) {
|
|||||||
if (strcmp(name, "SetConsoleCtrlHandler") == 0) return (void *) kernel32::SetConsoleCtrlHandler;
|
if (strcmp(name, "SetConsoleCtrlHandler") == 0) return (void *) kernel32::SetConsoleCtrlHandler;
|
||||||
if (strcmp(name, "GetConsoleScreenBufferInfo") == 0) return (void *) kernel32::GetConsoleScreenBufferInfo;
|
if (strcmp(name, "GetConsoleScreenBufferInfo") == 0) return (void *) kernel32::GetConsoleScreenBufferInfo;
|
||||||
if (strcmp(name, "WriteConsoleW") == 0) return (void *) kernel32::WriteConsoleW;
|
if (strcmp(name, "WriteConsoleW") == 0) return (void *) kernel32::WriteConsoleW;
|
||||||
|
if (strcmp(name, "GetConsoleOutputCP") == 0) return (void *) kernel32::GetConsoleOutputCP;
|
||||||
|
|
||||||
// fileapi.h
|
// fileapi.h
|
||||||
if (strcmp(name, "GetFullPathNameA") == 0) return (void *) kernel32::GetFullPathNameA;
|
if (strcmp(name, "GetFullPathNameA") == 0) return (void *) kernel32::GetFullPathNameA;
|
||||||
|
|||||||
@@ -306,6 +306,20 @@ namespace msvcrt {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int WIN_ENTRY _itow_s(int value, wchar_t *buffer, size_t size, int radix){
|
||||||
|
DEBUG_LOG("STUB: _itow_s\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int WIN_ENTRY _wtoi(const wchar_t* str) {
|
||||||
|
return (int)wcstol(str, nullptr, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
int WIN_ENTRY wcscpy_s(wchar_t *dest, size_t dest_size, const wchar_t *src){
|
||||||
|
DEBUG_LOG("STUB: wcscpy_s\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -331,6 +345,9 @@ static void *resolveByName(const char *name) {
|
|||||||
if (strcmp(name, "memset") == 0) return (void*)msvcrt::memset;
|
if (strcmp(name, "memset") == 0) return (void*)msvcrt::memset;
|
||||||
if (strcmp(name, "wcsncpy_s") == 0) return (void*)msvcrt::wcsncpy_s;
|
if (strcmp(name, "wcsncpy_s") == 0) return (void*)msvcrt::wcsncpy_s;
|
||||||
if (strcmp(name, "wcsncat_s") == 0) return (void*)msvcrt::wcsncat_s;
|
if (strcmp(name, "wcsncat_s") == 0) return (void*)msvcrt::wcsncat_s;
|
||||||
|
if (strcmp(name, "_itow_s") == 0) return (void*)msvcrt::_itow_s;
|
||||||
|
if (strcmp(name, "_wtoi") == 0) return (void*)msvcrt::_wtoi;
|
||||||
|
if (strcmp(name, "wcscpy_s") == 0) return (void*)msvcrt::wcscpy_s;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user