mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-30 16:11:01 +00:00
enable refactored api_set for windows platform
This commit is contained in:
@@ -550,6 +550,13 @@ typedef struct _TEB64
|
|||||||
ARRAY_CONTAINER<ULONG, 2> Rcu;
|
ARRAY_CONTAINER<ULONG, 2> Rcu;
|
||||||
} TEB64, *PTEB64;
|
} TEB64, *PTEB64;
|
||||||
|
|
||||||
|
#ifdef OS_WINDOWS
|
||||||
|
inline TEB64* NtCurrentTeb64(VOID)
|
||||||
|
{
|
||||||
|
return (TEB64*)__readgsqword(FIELD_OFFSET(EMU_NT_TIB64, Self));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#pragma pack(push, 4)
|
#pragma pack(push, 4)
|
||||||
typedef struct _KSYSTEM_TIME
|
typedef struct _KSYSTEM_TIME
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -144,10 +144,12 @@ namespace
|
|||||||
emulator_object<API_SET_NAMESPACE> build_api_set_map(x64_emulator& emu, emulator_allocator& allocator)
|
emulator_object<API_SET_NAMESPACE> build_api_set_map(x64_emulator& emu, emulator_allocator& allocator)
|
||||||
{
|
{
|
||||||
// TODO: fix
|
// TODO: fix
|
||||||
// const auto& orig_api_set_map = *NtCurrentTeb()->ProcessEnvironmentBlock->ApiSetMap;
|
#ifdef OS_WINDOWS
|
||||||
// return clone_api_set_map(emu, allocator, orig_api_set_map);
|
const auto& orig_api_set_map = *NtCurrentTeb64()->ProcessEnvironmentBlock->ApiSetMap;
|
||||||
|
return clone_api_set_map(emu, allocator, orig_api_set_map);
|
||||||
|
#else
|
||||||
return clone_api_set_map(emu, allocator, {});
|
return clone_api_set_map(emu, allocator, {});
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
emulator_allocator create_allocator(emulator& emu, const size_t size)
|
emulator_allocator create_allocator(emulator& emu, const size_t size)
|
||||||
|
|||||||
Reference in New Issue
Block a user