Function at 0x40afb0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x442752
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x45a024]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x24], esi
mov dword [esi], vtable.Win32xx::CWinApp.0
mov dword [ebp - 4], 7
mov edx, dword [esi + 0x44]
mov dword [ebp - 0x10], edx
cmp edx, dword [esi + 0x48]
jae 0x40b0a3
jmp 0x40b003
mov edx, dword [ebp - 0x10]
mov ebx, dword [edx]
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebx + 0xc]
cmp ecx, eax
je 0x40b034
mov edx, dword [ebp - 0x24]
push edx
push eax
call fcn.00412d70
mov ecx, dword [ebp - 0x24]
mov edi, dword [ebx + 0x10]
push ecx
mov dword [ebp - 0x14], eax
call fcn.00405b00
mov edx, dword [ebp - 0x14]
mov dword [ebx + 0x10], edx
mov edx, dword [ebp - 0x10]
add esp, 0xc
mov edi, dword [edx]
mov ecx, dword [edi + 0x40]
mov eax, dword [edi + 0x3c]
cmp eax, ecx
je 0x40b063
mov edx, dword [ebp - 0x24]
push edx
mov ebx, ecx
call fcn.00405aa0
mov ebx, eax
mov eax, dword [edi + 0x40]
add esp, 4
push eax
push ebx
lea ecx, [edi + 0x3c]
call fcn.00405070
mov edx, dword [ebp - 0x10]
mov dword [edi + 0x40], ebx
mov ebx, dword [edx]
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x2c]
cmp ecx, eax
je 0x40b091
mov edx, dword [ebp - 0x24]
push edx
push eax
call fcn.00412d70
mov ecx, dword [ebp - 0x24]
mov edi, dword [ebx + 0x30]
push ecx
mov dword [ebp - 0x14], eax
call fcn.00405b00
mov edx, dword [ebp - 0x14]
add esp, 0xc
mov dword [ebx + 0x30], edx
mov eax, dword [ebp - 0x10]
add eax, 8
mov dword [ebp - 0x10], eax
cmp eax, dword [esi + 0x48]
jb 0x40b000
mov eax, dword [esi + 0x38]
mov edi, dword [eax]
cmp edi, eax
je 0x40b10c
lea esp, [esp]
mov ebx, dword [edi + 0xc]
push ebx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40b0c5
push ebx
call dword [sym.imp.USER32.dll_DestroyWindow]
cmp byte [edi + 0x15], 0
jne 0x40b107
mov eax, dword [edi + 8]
cmp byte [eax + 0x15], 0
jne 0x40b0ec
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x15], 0
jne 0x40b107
mov edi, edi
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x15], 0
je 0x40b0e0
jmp 0x40b107
mov eax, dword [edi + 4]
cmp byte [eax + 0x15], 0
jne 0x40b105
cmp edi, dword [eax + 8]
jne 0x40b105
mov edi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x40b0f5
mov edi, eax
cmp edi, dword [esi + 0x38]
jne 0x40b0b0
mov eax, dword [esi + 0x38]
mov ebx, dword [eax + 4]
cmp byte [ebx + 0x15], 0
lea edi, [esi + 0x34]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x10], ebx
jne 0x40b143
mov ecx, dword [ebx + 8]
push ecx
mov ecx, edi
call fcn.004129b0
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebx]
push edx
call fcn.0041afda
add esp, 4
cmp byte [ebx + 0x15], 0
mov dword [ebp - 0x10], ebx
je 0x40b121
mov eax, dword [edi + 4]
mov dword [eax + 4], eax
mov eax, dword [edi + 4]
mov dword [eax], eax
mov eax, dword [edi + 4]
mov dword [eax + 8], eax
mov dword [edi + 8], 0
mov eax, dword [esi + 0x18]
mov ebx, dword [eax + 4]
cmp byte [ebx + 0x15], 0
lea edi, [esi + 0x14]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x10], ebx
jne 0x40b192
mov ecx, dword [ebx + 8]
push ecx
mov ecx, edi
call fcn.004129b0
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebx]
push edx
call fcn.0041afda
add esp, 4
cmp byte [ebx + 0x15], 0
mov dword [ebp - 0x10], ebx
je 0x40b170
mov eax, dword [edi + 4]
mov dword [eax + 4], eax
mov eax, dword [edi + 4]
mov dword [eax], eax
mov eax, dword [edi + 4]
mov dword [eax + 8], eax
mov dword [edi + 8], 0
mov eax, dword [esi + 8]
mov ebx, dword [eax + 4]
cmp byte [ebx + 0x15], 0
lea edi, [esi + 4]
mov dword [ebp - 0x10], ebx
jne 0x40b1e2
lea esp, [esp]
mov ecx, dword [ebx + 8]
push ecx
mov ecx, edi
call fcn.004129b0
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebx]
push edx
call fcn.0041afda
add esp, 4
cmp byte [ebx + 0x15], 0
mov dword [ebp - 0x10], ebx
je 0x40b1c0
mov eax, dword [edi + 4]
mov dword [eax + 4], eax
mov eax, dword [edi + 4]
mov dword [eax], eax
mov eax, dword [edi + 4]
mov dword [eax + 8], eax
mov dword [edi + 8], 0
mov eax, dword [esi + 0x28]
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
lea ebx, [esi + 0x24]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
jne 0x40b240
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 8]
push edx
mov ecx, ebx
call fcn.004129b0
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov ecx, dword [eax]
push edx
mov dword [ebp - 0x10], ecx
call fcn.0041afda
mov eax, dword [ebp - 0x10]
add esp, 4
cmp byte [eax + 0x15], 0
mov dword [ebp - 0x14], eax
je 0x40b212
mov eax, dword [ebx + 4]
mov dword [eax + 4], eax
mov eax, dword [ebx + 4]
mov dword [eax], eax
mov eax, dword [ebx + 4]
mov dword [eax + 8], eax
mov dword [ebx + 8], 0
mov eax, dword [esi + 0xa4]
cmp eax, 0xffffffff
je 0x40b279
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [esi + 0xa4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsFree]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea ecx, [esi + 0x84]
push ecx
mov dword [0x4612ac], 0
call ebx
lea edx, [esi + 0x6c]
push edx
call ebx
lea eax, [esi + 0x54]
push eax
call ebx
mov byte [ebp - 4], 3
mov eax, dword [esi + 0x44]
xor ecx, ecx
cmp eax, ecx
je 0x40b2c5
mov ecx, dword [ebp - 0x24]
mov ebx, dword [esi + 0x48]
push ecx
call fcn.00405b50
mov eax, dword [esi + 0x44]
push eax
call fcn.0041afda
add esp, 8
xor ecx, ecx
mov ebx, dword [ebp - 0x18]
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], ecx
mov dword [esi + 0x4c], ecx
mov dword [ebp - 0x18], ebx
mov byte [ebp - 4], 8
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
push eax
push ecx
lea esi, [ebp - 0x14]
mov eax, ebx
call fcn.00412a50
mov ebx, dword [ebx + 4]
push ebx
call fcn.0041afda
mov ebx, dword [ebp - 0x1c]
add esp, 4
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 4], 9
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
push eax
push ecx
lea esi, [ebp - 0x18]
mov eax, ebx
call fcn.00412a50
mov ebx, dword [ebx + 4]
push ebx
call fcn.0041afda
mov ebx, dword [ebp - 0x20]
add esp, 4
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 0xa
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
push eax
push ecx
lea esi, [ebp - 0x1c]
mov eax, ebx
call fcn.00412a50
mov ebx, dword [ebx + 4]
push ebx
call fcn.0041afda
add esp, 4
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], 0xb
mov eax, dword [edi + 4]
mov ecx, dword [eax]
push eax
push ecx
lea esi, [ebp - 0x20]
mov eax, edi
call fcn.00412a50
mov edx, dword [edi + 4]
push edx
call fcn.0041afda
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret