Function at 0x403a70
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48595e
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x4ae078]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x1c], ebx
mov dword [ebx], vtable.Win32xx::CWinApp.0
mov esi, dword [ebx + 0x24]
cmp esi, dword [ebx + 0x28]
jae 0x403b09
nop
mov edi, dword [esi]
push dword [ebp - 0x18]
push ecx
mov edx, dword [edi + 0x10]
mov ecx, dword [edi + 0xc]
call fcn.004119f0
mov eax, dword [edi + 0xc]
add esp, 8
mov dword [edi + 0x10], eax
mov edi, dword [esi]
mov dword [ebp - 4], 0
lea ecx, [edi + 0x30]
push dword [edi + 0x34]
push dword [edi + 0x30]
call fcn.0040c100
mov eax, dword [edi + 0x30]
push dword [ebp - 0x18]
mov dword [edi + 0x34], eax
mov edi, dword [esi]
push ecx
mov edx, dword [edi + 0x28]
mov ecx, dword [edi + 0x24]
call fcn.004119f0
mov eax, dword [edi + 0x24]
add esi, 8
add esp, 8
mov dword [edi + 0x28], eax
cmp esi, dword [ebx + 0x28]
jb 0x403ab0
mov eax, dword [ebx + 0x1c]
lea edi, [ebx + 0x1c]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
cmp eax, dword [edi]
je 0x403b44
nop dword [eax + eax]
mov esi, dword [eax + 0x10]
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x403b35
push esi
call dword [sym.imp.USER32.dll_DestroyWindow]
lea ecx, [ebp - 0x14]
call fcn.0040d720
mov eax, dword [ebp - 0x14]
cmp eax, dword [edi]
jne 0x403b20
mov dword [ebp - 4], 1
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov esi, eax
cmp byte [eax + 0xd], 0
jne 0x403b80
mov ebx, eax
nop word [eax + eax]
push dword [esi + 8]
mov ecx, edi
call fcn.0040c060
mov esi, dword [esi]
push ebx
call fcn.0044946b
add esp, 4
mov ebx, esi
cmp byte [esi + 0xd], 0
je 0x403b60
mov ebx, dword [ebp - 0x1c]
mov eax, dword [edi]
lea ecx, [ebx + 0xc]
mov dword [ebp - 0x14], ecx
mov dword [eax + 4], eax
mov eax, dword [edi]
mov dword [eax], eax
mov eax, dword [edi]
mov dword [eax + 8], eax
mov dword [edi + 4], 0
mov dword [ebp - 4], 2
mov eax, dword [ecx]
mov eax, dword [eax + 4]
mov esi, eax
mov dword [ebp - 0x18], eax
cmp byte [eax + 0xd], 0
jne 0x403bdc
mov edi, eax
mov ebx, ecx
push dword [esi + 8]
mov ecx, ebx
call fcn.0040c060
mov esi, dword [esi]
push edi
call fcn.0044946b
add esp, 4
mov edi, esi
cmp byte [esi + 0xd], 0
je 0x403bb6
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
lea edi, [ebx + 0x1c]
mov eax, dword [ecx]
mov dword [eax + 4], eax
mov eax, dword [ecx]
mov dword [eax], eax
mov eax, dword [ecx]
mov dword [eax + 8], eax
mov dword [ecx + 4], 0
lea ecx, [ebx + 4]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], 3
mov eax, dword [ecx]
mov eax, dword [eax + 4]
mov esi, eax
mov dword [ebp - 0x18], eax
cmp byte [eax + 0xd], 0
jne 0x403c38
mov edi, eax
mov ebx, ecx
push dword [esi + 8]
mov ecx, ebx
call fcn.0040c060
mov esi, dword [esi]
push edi
call fcn.0044946b
add esp, 4
mov edi, esi
cmp byte [esi + 0xd], 0
je 0x403c12
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
lea edi, [ebx + 0x1c]
mov eax, dword [ecx]
mov dword [eax + 4], eax
mov eax, dword [ecx]
mov dword [eax], eax
mov eax, dword [ecx]
mov dword [eax + 8], eax
mov dword [ecx + 4], 0
lea ecx, [ebx + 0x14]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], 4
mov eax, dword [ecx]
mov eax, dword [eax + 4]
mov esi, eax
mov dword [ebp - 0x18], eax
cmp byte [eax + 0xd], 0
jne 0x403c96
mov edi, eax
mov ebx, ecx
nop
push dword [esi + 8]
mov ecx, ebx
call fcn.0040c060
mov esi, dword [esi]
push edi
call fcn.0044946b
add esp, 4
mov edi, esi
cmp byte [esi + 0xd], 0
je 0x403c70
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
lea edi, [ebx + 0x1c]
mov eax, dword [ecx]
mov dword [eax + 4], eax
mov eax, dword [ecx]
mov dword [eax], eax
mov eax, dword [ecx]
mov dword [eax + 8], eax
mov dword [ecx + 4], 0
mov eax, dword [ebx + 0x80]
cmp eax, 0xffffffff
je 0x403ccb
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [ebx + 0x80]
call dword [sym.imp.KERNEL32.dll_TlsFree]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea eax, [ebx + 0x60]
push eax
mov dword [0x4b35f0], 0
call esi
lea eax, [ebx + 0x48]
push eax
call esi
lea eax, [ebx + 0x30]
push eax
call esi
mov ecx, dword [ebx + 0x24]
test ecx, ecx
je 0x403d2a
push dword [ebp - 0x18]
mov edx, dword [ebx + 0x28]
push ecx
call fcn.00411b20
mov ecx, dword [ebx + 0x24]
add esp, 8
mov eax, dword [ebx + 0x2c]
sub eax, ecx
sar eax, 3
push eax
push ecx
call fcn.0040d6c0
mov dword [ebx + 0x24], 0
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x2c], 0
mov eax, dword [edi]
mov ecx, edi
push eax
push dword [eax]
lea eax, [ebp - 0x18]
push eax
call fcn.0040d840
push dword [edi]
call fcn.0044946b
mov eax, dword [ebx + 0x14]
lea ecx, [ebx + 0x14]
add esp, 4
push eax
push dword [eax]
lea eax, [ebp - 0x18]
push eax
call fcn.0040d840
push dword [ebx + 0x14]
call fcn.0044946b
mov eax, dword [ebx + 0xc]
lea ecx, [ebx + 0xc]
add esp, 4
push eax
push dword [eax]
lea eax, [ebp - 0x18]
push eax
call fcn.0040d8b0
push dword [ebx + 0xc]
call fcn.0044946b
mov eax, dword [ebx + 4]
lea ecx, [ebx + 4]
add esp, 4
push eax
push dword [eax]
lea eax, [ebp - 0x18]
push eax
call fcn.0040d840
push dword [ebx + 4]
call fcn.0044946b
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00448ea0
mov esp, ebp
pop ebp
ret