Function at 0x509adb
Capabilities:
Access peb ldr_data
Check for peb ntglobalflag flag
Get ntdll base address
Get number of processors
Get process heap flags
Get process heap force flags

Disassembly:
mov ecx, 0x6a09c8
jmp 0x509ad0
mov eax, 0x57d394
call fcn.00570e3c
push ecx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
lea ecx, [esi + 8]
call sub.MFC42.DLL_CString::CString_4
xor edi, edi
lea ecx, [esi + 0xc]
mov dword [ebp - 4], edi
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x10]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x14]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x18]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x1c]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x20]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x24]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x28]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x2c]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x30]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x34]
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x38]
mov byte [ebp - 4], 0xb
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x3c]
mov byte [ebp - 4], 0xc
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x40]
mov byte [ebp - 4], 0xd
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x44]
mov byte [ebp - 4], 0xe
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x48]
mov byte [ebp - 4], 0xf
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x4c]
mov byte [ebp - 4], 0x10
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x50]
mov byte [ebp - 4], 0x11
call sub.MFC42.DLL_CString::CString_4
mov byte [ebp - 4], 0x12
lea ecx, [esi + 0x54]
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x58]
mov byte [ebp - 4], 0x13
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x5c]
mov byte [ebp - 4], 0x14
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x60]
mov byte [ebp - 4], 0x15
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x64]
mov byte [ebp - 4], 0x16
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x68]
mov byte [ebp - 4], 0x17
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x6c]
mov byte [ebp - 4], 0x18
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x70]
mov byte [ebp - 4], 0x19
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x74]
mov byte [ebp - 4], 0x1a
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x78]
mov byte [ebp - 4], 0x1b
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x7c]
mov byte [ebp - 4], 0x1c
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esi + 0x80]
mov byte [ebp - 4], 0x1d
call sub.MFC42.DLL_CString::CString_4
push 0xa
lea ecx, [esi + 0xc0]
mov byte [ebp - 4], 0x1e
call fcn.004eb2cc
push 0xa
lea ecx, [esi + 0xdc]
mov byte [ebp - 4], 0x1f
call fcn.00570ad0
push 0xa
lea ecx, [esi + 0x158]
mov byte [ebp - 4], 0x20
call fcn.004eb2cc
push 0x44
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 0x98], edi
mov dword [esi + 0xb0], edi
mov dword [esi + 0xb4], edi
mov dword [esi + 0xb8], edi
mov dword [esi + 0xbc], edi
mov dword [esi + 0x9c], edi
mov dword [esi + 0xa0], edi
mov dword [esi + 0xa4], edi
mov dword [esi + 0xfc], edi
mov dword [esi + 0x100], edi
mov dword [esi + 0x104], edi
mov dword [esi + 0x108], edi
mov dword [esi + 0x10c], edi
mov dword [esi + 0xa8], 1
mov dword [esi + 0xac], edi
mov dword [esi + 0xf8], edi
push edi
lea eax, [esi + 0x110]
push eax
call sub.MSVCRT.dll_memset
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
leave
ret