Function at 0x10056d58
Capabilities:
Allocate thread local storage

Disassembly:
push 8
mov eax, 0x10069cd3
call fcn.10049974
mov edi, ecx
xor esi, esi
and dword [ebp - 0x10], esi
cmp dword [edi + 0x24], esi
jne 0x10056d7a
mov esi, 0x8007000e
jmp 0x10056fba
cmp dword [edi + 0x28], esi
je 0x10056d70
cmp dword [edi + 8], esi
je 0x10056d8e
mov esi, 0x80004005
jmp 0x10056fba
cmp dword [edi + 0x20], esi
jne 0x10056d84
mov ebx, dword [sym.imp.KERNEL32.dll_TlsAlloc]
call ebx
mov dword [edi + 0x14], eax
cmp eax, 0xffffffff
jne 0x10056dad
mov esi, 0x80004005
jmp 0x10056fa5
test eax, eax
jne 0x10056dc9
call ebx
mov dword [edi + 0x14], eax
test eax, eax
jne 0x10056dc4
push 0x1c13e2
call fcn.10042c89
cmp dword [edi + 0x14], esi
je 0x10056da3
lea eax, [ebp - 0x10]
push eax
push 0x10
push 0
call fcn.100599cf
test eax, eax
jns 0x10056de1
mov esi, eax
jmp 0x10056fa5
lea eax, [edi + 8]
push eax
push dword [ebp - 0x10]
push 0x100
push 0x40
call fcn.10059c6f
test eax, eax
js 0x10056dda
lea eax, [edi + 0x30]
cmp dword [eax], esi
jne 0x10056e09
push eax
call fcn.10058d1d
test eax, eax
js 0x10056dda
push 0x20
call fcn.10058207
mov ebx, eax
mov dword [ebp - 0x14], ebx
and dword [ebp - 4], 0
test ebx, ebx
je 0x10056e29
push dword [edi + 0x30]
mov ecx, ebx
call fcn.10058cb8
jmp 0x10056e2b
xor ebx, ebx
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x6c], ebx
test ebx, ebx
jne 0x10056e40
mov esi, 0x8007000e
jmp 0x10056fa5
push 0x1f0003
push 1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventExW]
mov dword [edi + 0x74], eax
test eax, eax
je 0x10056da3
push 0
lea ecx, [edi + 0x7c]
call fcn.1005975c
test eax, eax
js 0x10056dda
push 0
lea ecx, [edi + 0xd0]
call fcn.1005975c
test eax, eax
js 0x10056dda
mov ecx, dword [edi + 0x28]
mov eax, dword [ecx]
push edi
call dword [eax + 4]
test eax, eax
js 0x10056dda
push 0x28
call fcn.10058207
mov ebx, eax
mov dword [ebp - 0x14], ebx
xor eax, eax
inc eax
mov dword [ebp - 4], eax
test ebx, ebx
je 0x10056ebc
push eax
push eax
mov ecx, ebx
call fcn.100542ac
mov dword [ebx + 0x24], 1
jmp 0x10056ebe
xor ebx, ebx
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x2c], ebx
test ebx, ebx
je 0x10056e36
push 0xd8
call fcn.10058207
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x10056ef2
push dword [edi + 0x2c]
mov ecx, eax
push edi
call fcn.1005e19f
jmp 0x10056ef4
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x78], eax
test eax, eax
je 0x10056e36
push edi
mov ecx, eax
call fcn.1005e280
test eax, eax
js 0x10056dda
push dword [edi + 8]
mov ecx, dword [edi + 0x24]
mov eax, dword [ecx]
push edi
call dword [eax + 4]
test eax, eax
js 0x10056dda
push dword [edi + 8]
lea ecx, [edi + 0x124]
call fcn.1005975c
test eax, eax
js 0x10056dda
push edi
call fcn.10054033
mov ecx, eax
mov dword [edi + 0xc], ecx
test ecx, ecx
je 0x10056e36
mov eax, dword [ecx]
call dword [eax + 0x14]
test eax, eax
js 0x10056dda
push 0x248
call fcn.10058207
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x10056f7f
push edi
mov ecx, eax
call fcn.1005ea65
jmp 0x10056f81
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [edi + 0x10], eax
test eax, eax
je 0x10056e36
mov ecx, edi
call fcn.1005696b
test al, al
jne 0x10056fa5
push 0x1c1401
call fcn.10042c89
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x10056fb6
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
and dword [ebp - 0x10], 0
test esi, esi
jns 0x10056fd0
mov ecx, edi
call fcn.1005674f
push 0
mov ecx, edi
call fcn.1005679d
mov ecx, dword [edi]
push edi
call dword [ecx + 0x60]
mov eax, esi
call fcn.10049a4c
ret