Function at 0x100047f0
Capabilities:
Create thread
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100afdc8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
xor eax, eax
cmp dword [ebp + 0xc], eax
push esi
push edi
push dword [0x100db8a4]
setne al
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [ebp + 8]
lea ecx, [ebx + 0x3c]
cmp eax, ecx
jne 0x10004841
push 0x65b
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10004a46
lea esi, [ebx + 0x44]
push esi
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
cmp dword [ebx + 0x34], 0
jne 0x10004871
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 6
call ebx
mov dword [ebp + 8], 0
jmp 0x10004a31
mov eax, dword [ebp - 0x10]
cmp dword [ebx + 0x5c], eax
je 0x10004a20
test eax, eax
je 0x100049e8
mov eax, dword [ebx + 0x38]
shl eax, 2
mov dword [ebx + 0x88], 0
call fcn.100a9b90
mov eax, esp
mov dword [ebp + 8], eax
test eax, eax
jne 0x100048b9
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0xe
call ebx
mov dword [ebp + 8], 0
jmp 0x10004a31
xor edi, edi
cmp dword [ebx + 0x38], edi
jbe 0x10004905
xor ecx, ecx
mov dword [ebp + 0xc], ecx
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebx + 0x34]
push 0
add eax, ecx
push eax
push 0x100047c0
push 0
push 0
call fcn.1009c4da
mov ecx, dword [ebp + 8]
add esp, 0x18
mov dword [ecx + edi*4], eax
test eax, eax
je 0x1000499d
mov ecx, dword [ebp + 0xc]
inc edi
add ecx, 0x90
mov dword [ebp + 0xc], ecx
cmp edi, dword [ebx + 0x38]
jb 0x100048c5
mov eax, dword [ebp + 8]
push 0xffffffffffffffff
push 1
push eax
push dword [ebx + 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor edi, edi
cmp dword [ebx + 0x38], edi
jbe 0x10004a1a
xor esi, esi
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x18]
lea eax, [eax + edi*4]
push ecx
push dword [eax]
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x10004942
test esi, esi
jne 0x10004942
mov esi, eax
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, dword [ebx + 0x38]
jb 0x10004920
mov dword [ebp + 0xc], esi
test esi, esi
lea esi, [ebx + 0x44]
je 0x10004a1a
mov eax, dword [ebx + 0x38]
mov edi, dword [ebx + 0x34]
lea ebx, [eax + eax*8]
shl ebx, 4
add ebx, edi
cmp edi, ebx
jae 0x10004985
mov eax, dword [edi]
push 0
push edi
call dword [eax + 0x28]
add edi, 0x90
cmp edi, ebx
jb 0x10004973
mov eax, dword [ebp + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push eax
call ebx
mov dword [ebp + 8], 0
jmp 0x10004a31
call fcn.1009c385
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
test edi, edi
je 0x10004988
lea esi, [edi + edi*8]
shl esi, 4
mov eax, dword [ebp + 8]
dec edi
push 0xffffffffffffffff
sub esi, 0x90
push dword [eax + edi*4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp + 8]
push dword [eax + edi*4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0x34]
add eax, esi
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
test edi, edi
jne 0x100049b1
mov esi, dword [ebp - 0x14]
jmp 0x10004985
mov eax, dword [ebx]
push ebx
call dword [eax + 0x98]
mov eax, dword [ebx + 0x38]
mov edi, dword [ebx + 0x34]
lea eax, [eax + eax*8]
shl eax, 4
add eax, edi
cmp edi, eax
jae 0x10004a1a
mov ebx, eax
mov eax, dword [edi]
push 0
push edi
call dword [eax + 0x28]
add edi, 0x90
cmp edi, ebx
jb 0x10004a05
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x5c], eax
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
call ebx
mov dword [ebp + 8], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call ebx
mov eax, dword [ebp + 8]
lea esp, [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8