Function at 0x403660
Capabilities:
Access peb ldr_data
Allocate thread local storage

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x485918
mov eax, dword fs:[0]
push eax
push ecx
push ebx
sub esp, 0x250
mov eax, dword [0x4ae078]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x3c], edi
lea esi, [edi + 4]
mov dword [edi], vtable.Win32xx::CWinApp.0
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x44], edi
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.0040f5e0
mov dword [esi], eax
mov dword [ebp - 4], 0
lea esi, [edi + 0xc]
mov dword [ebp - 0x3c], esi
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.0040f5e0
mov dword [esi], eax
mov byte [ebp - 4], 1
lea esi, [edi + 0x14]
mov dword [ebp - 0x3c], esi
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.0040f5e0
mov dword [esi], eax
mov byte [ebp - 4], 2
lea esi, [edi + 0x1c]
mov dword [ebp - 0x3c], esi
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.0040f5e0
mov dword [esi], eax
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
mov dword [edi + 0x2c], 0
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [edi + 0x30]
push eax
call esi
lea eax, [edi + 0x48]
push eax
call esi
lea eax, [edi + 0x60]
push eax
call esi
lea esi, [edi + 0x60]
mov dword [edi + 0x84], 0
push esi
mov dword [edi + 0x88], 0
mov dword [edi + 0x8c], 0
mov byte [ebp - 4], 8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [edi + 0x80], eax
cmp eax, 0xffffffff
jne 0x40381c
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xorps xmm0, xmm0
mov dword [ebp - method.Win32xx::CWinException.virtual_0], vtable.Win32xx::CWinException.0
movq qword [ebp - 0x25c], xmm0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1fe
mov dword [ebp - 0x254], eax
lea eax, [ebp - 0x24c]
push 0
push eax
mov dword [ebp - 0x250], str.CWinApp::CWinApp__Failed_to_allocate_TLS_Index
call fcn.00464810
mov eax, dword [ebp - 0x254]
add esp, 0xc
test eax, eax
je 0x40380b
push 0
push 0xfe
lea ecx, [ebp - 0x24c]
push ecx
push 0x400
push eax
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push 0x4ab4b0
lea eax, [ebp - 0x260]
push eax
call fcn.00464794
cmp edi, 0xffffffff
jne 0x40382d
mov dword [0x4b35f0], 0
jmp 0x40383c
mov eax, dword [0x4b35f0]
test eax, eax
cmove eax, edi
mov dword [0x4b35f0], eax
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x1c
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 0
xorps xmm0, xmm0
push eax
push 0x404530
movups xmmword [ebp - 0x34], xmm0
movq qword [ebp - 0x24], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov eax, dword [ebp - 0x34]
mov ecx, edi
mov dword [edi + 0x78], eax
mov dword [edi + 0x7c], eax
call fcn.00404490
lea eax, [edi + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0
push eax
lea ecx, [edi + 0x1c]
mov dword [ebp - 0x3c], 0x4aeb48
call fcn.00411d20
push eax
add eax, 0x10
push eax
push ecx
lea eax, [ebp - 0x40]
push eax
lea ecx, [edi + 0x1c]
call fcn.00411d50
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0xffffffff
push eax
lea ecx, [edi + 0x1c]
mov dword [ebp - 0x3c], 0x4aeae8
call fcn.00411d20
push eax
add eax, 0x10
push eax
push ecx
lea eax, [ebp - 0x40]
push eax
lea ecx, [edi + 0x1c]
call fcn.00411d50
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0xfffffffe
push eax
lea ecx, [edi + 0x1c]
mov dword [ebp - 0x3c], 0x4aeb28
call fcn.00411d20
push eax
add eax, 0x10
push eax
push ecx
lea eax, [ebp - 0x40]
push eax
lea ecx, [edi + 0x1c]
call fcn.00411d50
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 1
push eax
lea ecx, [edi + 0x1c]
mov dword [ebp - 0x3c], 0x4aeb08
call fcn.00411d20
push eax
add eax, 0x10
push eax
push ecx
lea eax, [ebp - 0x40]
push eax
lea ecx, [edi + 0x1c]
call fcn.00411d50
mov ecx, dword [0x4b35f0]
add ecx, 0x30
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00448ea0
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret