Function at 0x40aa70
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4427ea
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x45a024]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, 0x4658b8
xor ebx, ebx
push 0x18
mov dword [ebp - 0x288], edi
mov dword [0x4658b8], 0x450ec8
mov dword [0x4658c4], ebx
call fcn.0041b5db
add esp, 4
cmp eax, ebx
je 0x40aee3
mov dword [0x4658c0], eax
mov dword [eax], eax
mov eax, dword [0x4658c0]
mov dword [eax + 4], eax
mov eax, dword [0x4658c0]
mov dword [eax + 8], eax
mov eax, dword [0x4658c0]
mov byte [eax + 0x14], 1
mov ecx, dword [0x4658c0]
mov byte [ecx + 0x15], 1
mov dword [ebp - 4], ebx
push 0x18
mov dword [0x4658d4], ebx
call fcn.0041b5db
add esp, 4
cmp eax, ebx
je 0x40aeb0
mov dword [0x4658d0], eax
mov dword [eax], eax
mov eax, dword [0x4658d0]
mov dword [eax + 4], eax
mov eax, dword [0x4658d0]
mov dword [eax + 8], eax
mov edx, dword [0x4658d0]
mov byte [edx + 0x14], 1
mov eax, dword [0x4658d0]
mov byte [eax + 0x15], 1
mov byte [ebp - 4], 1
push 0x18
mov dword [0x4658e4], ebx
call fcn.0041b5db
add esp, 4
cmp eax, ebx
je 0x40ae7d
mov dword [0x4658e0], eax
mov dword [eax], eax
mov eax, dword [0x4658e0]
mov dword [eax + 4], eax
mov eax, dword [0x4658e0]
mov dword [eax + 8], eax
mov ecx, dword [0x4658e0]
mov byte [ecx + 0x14], 1
mov edx, dword [0x4658e0]
mov byte [edx + 0x15], 1
mov byte [ebp - 4], 2
push 0x18
mov dword [0x4658f4], ebx
call fcn.0041b5db
add esp, 4
cmp eax, ebx
je 0x40ae4a
mov dword [0x4658f0], eax
mov dword [eax], eax
mov eax, dword [0x4658f0]
mov dword [eax + 4], eax
mov eax, dword [0x4658f0]
mov dword [eax + 8], eax
mov eax, dword [0x4658f0]
mov byte [eax + 0x14], 1
mov ecx, dword [0x4658f0]
mov byte [ecx + 0x15], 1
mov dword [0x4658fc], ebx
mov dword [0x465900], ebx
mov dword [0x465904], ebx
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x46590c
call esi
push 0x465924
call esi
push 0x46593c
call esi
mov byte [ebp - 4], 8
mov esi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x46593c
mov dword [0x465960], ebx
mov dword [0x465964], ebx
mov dword [0x465968], ebx
call esi
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x46595c], eax
cmp eax, 0xffffffff
jne 0x40acb5
push 0x46593c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x228]
call fcn.0041afe5
mov dword [ebp - method.Win32xx::CWinException.virtual_0], vtable.Win32xx::CWinException.0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1fe
lea edx, [ebp - 0x214]
push ebx
push edx
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x218], str.CWinApp::CWinApp__Failed_to_allocate_TLS_Index
call fcn.004212c0
mov eax, dword [ebp - 0x21c]
add esp, 0xc
cmp eax, ebx
je 0x40aca4
push ebx
push 0xfe
lea ecx, [ebp - 0x214]
push ecx
push 0x400
push eax
push ebx
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push 0x452ed8
lea edx, [ebp - 0x228]
push edx
call fcn.0041d166
or eax, 0xffffffff
cmp eax, edi
jne 0x40acc4
mov dword [0x4612ac], ebx
jmp 0x40acd2
cmp dword [0x4612ac], ebx
jne 0x40acd2
mov dword [0x4612ac], edi
push 0x46593c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
push 0x1c
lea ecx, [ebp - 0x250]
push ecx
push 0x402120
mov dword [ebp - 0x250], ebx
mov dword [ebp - 0x24c], eax
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x238], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov eax, dword [ebp - 0x24c]
mov dword [0x465954], eax
mov dword [0x465958], eax
call fcn.0040b670
push 0x46590c
call esi
lea edi, [ebp - 0x230]
mov esi, 0x4658ec
mov dword [ebp - 0x230], ebx
mov dword [ebp - vtable.Win32xx::CWnd.0], 0x45d540
call fcn.00405a30
push eax
push esi
lea esi, [ebp - 0x230]
call fcn.00417ed0
lea edi, [ebp - 0x230]
mov esi, 0x4658ec
mov dword [ebp - 0x230], 0xffffffff
mov dword [ebp - vtable.Win32xx::CWnd.0], 0x45d560
call fcn.00405a30
push eax
push esi
lea esi, [ebp - 0x230]
call fcn.00417ed0
lea edi, [ebp - 0x230]
mov esi, 0x4658ec
mov dword [ebp - 0x230], 0xfffffffe
mov dword [ebp - vtable.Win32xx::CWnd.0], 0x45d5a0
call fcn.00405a30
push eax
push esi
lea esi, [ebp - 0x230]
call fcn.00417ed0
lea edi, [ebp - 0x230]
mov esi, 0x4658ec
mov dword [ebp - 0x230], 1
mov dword [ebp - vtable.Win32xx::CWnd.0], 0x45d580
call fcn.00405a30
push eax
push esi
lea esi, [ebp - 0x230]
call fcn.00417ed0
mov eax, dword [0x4612ac]
cmp eax, ebx
jne 0x40ae09
xor eax, eax
mov dword [0x4612ac], eax
add eax, 0x54
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x4658b8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041af7a
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x234]
push ecx
lea ecx, [ebp - 0x25c]
mov dword [ebp - 0x234], ebx
call fcn.0041b07e
push 0x452ea0
lea edx, [ebp - 0x25c]
push edx
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::bad_alloc.0
call fcn.0041d166
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x274]
mov dword [ebp - 0x22c], ebx
call fcn.0041b07e
push 0x452ea0
lea ecx, [ebp - 0x274]
push ecx
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::bad_alloc.0
call fcn.0041d166
lea edx, [ebp - 0x234]
push edx
lea ecx, [ebp - 0x284]
mov dword [ebp - 0x234], ebx
call fcn.0041b07e
push 0x452ea0
lea eax, [ebp - 0x284]
push eax
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::bad_alloc.0
call fcn.0041d166
lea ecx, [ebp - 0x22c]
push ecx
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x22c], ebx
call fcn.0041b07e
push 0x452ea0
lea edx, [ebp - 0x268]
push edx
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::bad_alloc.0
call fcn.0041d166
int3