Function at 0x40c728
Capabilities:
Allocate thread local storage

Disassembly:
push 8
mov eax, 0x41d80e
call fcn.00405af4
mov edi, ecx
xor esi, esi
and dword [ebp - 0x10], esi
cmp dword [edi + 0x24], esi
jne 0x40c74a
mov esi, 0x8007000e
jmp 0x40c98a
cmp dword [edi + 0x28], esi
je 0x40c740
cmp dword [edi + 8], esi
je 0x40c75e
mov esi, 0x80004005
jmp 0x40c98a
cmp dword [edi + 0x20], esi
jne 0x40c754
mov ebx, dword [sym.imp.KERNEL32.dll_TlsAlloc]
call ebx
mov dword [edi + 0x14], eax
cmp eax, 0xffffffff
jne 0x40c77d
mov esi, 0x80004005
jmp 0x40c975
test eax, eax
jne 0x40c799
call ebx
mov dword [edi + 0x14], eax
test eax, eax
jne 0x40c794
push 0x1c13e2
call fcn.00404f88
cmp dword [edi + 0x14], esi
je 0x40c773
lea eax, [ebp - 0x10]
push eax
push 0x10
push 0
call fcn.004085ab
test eax, eax
jns 0x40c7b1
mov esi, eax
jmp 0x40c975
lea eax, [edi + 8]
push eax
push dword [ebp - 0x10]
push 0x100
push 0x40
call fcn.0040884b
test eax, eax
js 0x40c7aa
lea eax, [edi + 0x30]
cmp dword [eax], esi
jne 0x40c7d9
push eax
call fcn.004078f1
test eax, eax
js 0x40c7aa
push 0x20
call fcn.00406e16
mov ebx, eax
mov dword [ebp - 0x14], ebx
and dword [ebp - 4], 0
test ebx, ebx
je 0x40c7f9
push dword [edi + 0x30]
mov ecx, ebx
call fcn.0040789a
jmp 0x40c7fb
xor ebx, ebx
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x6c], ebx
test ebx, ebx
jne 0x40c810
mov esi, 0x8007000e
jmp 0x40c975
push 0x1f0003
push 1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventExW]
mov dword [edi + 0x74], eax
test eax, eax
je 0x40c773
push 0
lea ecx, [edi + 0x7c]
call fcn.00408338
test eax, eax
js 0x40c7aa
push 0
lea ecx, [edi + 0xd0]
call fcn.00408338
test eax, eax
js 0x40c7aa
mov ecx, dword [edi + 0x28]
mov eax, dword [ecx]
push edi
call dword [eax + 4]
test eax, eax
js 0x40c7aa
push 0x28
call fcn.00406e16
mov ebx, eax
mov dword [ebp - 0x14], ebx
xor eax, eax
inc eax
mov dword [ebp - 4], eax
test ebx, ebx
je 0x40c88c
push eax
push eax
mov ecx, ebx
call fcn.00409c7d
mov dword [ebx + 0x24], 1
jmp 0x40c88e
xor ebx, ebx
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x2c], ebx
test ebx, ebx
je 0x40c806
push 0xd8
call fcn.00406e16
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x40c8c2
push dword [edi + 0x2c]
mov ecx, eax
push edi
call fcn.004163ea
jmp 0x40c8c4
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x78], eax
test eax, eax
je 0x40c806
push edi
mov ecx, eax
call fcn.004164cb
test eax, eax
js 0x40c7aa
push dword [edi + 8]
mov ecx, dword [edi + 0x24]
mov eax, dword [ecx]
push edi
call dword [eax + 4]
test eax, eax
js 0x40c7aa
push dword [edi + 8]
lea ecx, [edi + 0x124]
call fcn.00408338
test eax, eax
js 0x40c7aa
push edi
call fcn.00409a04
mov ecx, eax
mov dword [edi + 0xc], ecx
test ecx, ecx
je 0x40c806
mov eax, dword [ecx]
call dword [eax + 0x14]
test eax, eax
js 0x40c7aa
push 0x248
call fcn.00406e16
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x40c94f
push edi
mov ecx, eax
call fcn.00416c42
jmp 0x40c951
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x10], eax
test eax, eax
je 0x40c806
mov ecx, edi
call fcn.0040c33b
test al, al
jne 0x40c975
push 0x1c1401
call fcn.00404f88
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x40c986
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
and dword [ebp - 0x10], 0
test esi, esi
jns 0x40c9a0
mov ecx, edi
call fcn.0040c11f
push 0
mov ecx, edi
call fcn.0040c16d
mov ecx, dword [edi]
push edi
call dword [ecx + 0x60]
mov eax, esi
call fcn.00405bcc
ret