Function at 0x40c700
Capabilities:
Allocate thread local storage

Disassembly:
push 8
mov eax, 0x41d81b
call fcn.00405af4
mov edi, ecx
xor esi, esi
and dword [ebp - 0x10], esi
cmp dword [edi + 0x24], esi
jne 0x40c722
mov esi, 0x8007000e
jmp 0x40c962
cmp dword [edi + 0x28], esi
je 0x40c718
cmp dword [edi + 8], esi
je 0x40c736
mov esi, 0x80004005
jmp 0x40c962
cmp dword [edi + 0x20], esi
jne 0x40c72c
mov ebx, dword [sym.imp.kernel32.dll_TlsAlloc]
call ebx
mov dword [edi + 0x14], eax
cmp eax, 0xffffffff
jne 0x40c755
mov esi, 0x80004005
jmp 0x40c94d
test eax, eax
jne 0x40c771
call ebx
mov dword [edi + 0x14], eax
test eax, eax
jne 0x40c76c
push 0x1c13e2
call main
cmp dword [edi + 0x14], esi
je 0x40c74b
lea eax, [ebp - 0x10]
push eax
push 0x10
push 0
call main
test eax, eax
jns 0x40c789
mov esi, eax
jmp 0x40c94d
lea eax, [edi + 8]
push eax
push dword [ebp - 0x10]
push 0x100
push 0x40
call main
test eax, eax
js 0x40c782
lea eax, [edi + 0x30]
cmp dword [eax], esi
jne 0x40c7b1
push eax
call main
test eax, eax
js 0x40c782
push 0x20
call main
mov ebx, eax
mov dword [ebp - 0x14], ebx
and dword [ebp - 4], 0
test ebx, ebx
je 0x40c7d1
push dword [edi + 0x30]
mov ecx, ebx
call fcn.0040789a
jmp 0x40c7d3
xor ebx, ebx
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x6c], ebx
test ebx, ebx
jne 0x40c7e8
mov esi, 0x8007000e
jmp 0x40c94d
push 0x1f0003
push 1
push 0
push 0
call dword [sym.imp.kernel32.dll_CreateEventExW]
mov dword [edi + 0x74], eax
test eax, eax
je 0x40c74b
push 0
lea ecx, [edi + 0x7c]
call main
test eax, eax
js 0x40c782
push 0
lea ecx, [edi + 0xd0]
call main
test eax, eax
js 0x40c782
mov ecx, dword [edi + 0x28]
mov eax, dword [ecx]
push edi
call dword [eax + 4]
test eax, eax
js 0x40c782
push 0x28
call main
mov ebx, eax
mov dword [ebp - 0x14], ebx
xor eax, eax
inc eax
mov dword [ebp - 4], eax
test ebx, ebx
je 0x40c864
push eax
push eax
mov ecx, ebx
call main
mov dword [ebx + 0x24], 1
jmp 0x40c866
xor ebx, ebx
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x2c], ebx
test ebx, ebx
je 0x40c7de
push 0xd8
call main
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x40c89a
push dword [edi + 0x2c]
mov ecx, eax
push edi
call fcn.00416369
jmp 0x40c89c
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x78], eax
test eax, eax
je 0x40c7de
push edi
mov ecx, eax
call main
test eax, eax
js 0x40c782
push dword [edi + 8]
mov ecx, dword [edi + 0x24]
mov eax, dword [ecx]
push edi
call dword [eax + 4]
test eax, eax
js 0x40c782
push dword [edi + 8]
lea ecx, [edi + 0x124]
call main
test eax, eax
js 0x40c782
push edi
call fcn.004099e1
mov ecx, eax
mov dword [edi + 0xc], ecx
test ecx, ecx
je 0x40c7de
mov eax, dword [ecx]
call dword [eax + 0x14]
test eax, eax
js 0x40c782
push 0x248
call main
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x40c927
push edi
mov ecx, eax
call fcn.00416c20
jmp 0x40c929
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x10], eax
test eax, eax
je 0x40c7de
mov ecx, edi
call fcn.0040c313
test al, al
jne 0x40c94d
push 0x1c1401
call main
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x40c95e
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
and dword [ebp - 0x10], 0
test esi, esi
jns 0x40c978
mov ecx, edi
call fcn.0040c0f7
push 0
mov ecx, edi
call main
mov ecx, dword [edi]
push edi
call dword [ecx + 0x60]
mov eax, esi
call fcn.00405bcc
ret