Function at 0x47fe8d
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov ebx, ecx
push edi
xor edi, edi
cmp dword [ebx + 0x40], edi
jne 0x47fea9
mov eax, 0x80004005
jmp 0x48008f
lea eax, [ebx + 0x14]
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebx + 0xc]
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x480084
mov dword [ebp - 4], edi
jge 0x47ffad
sub esi, eax
test esi, esi
jle 0x480084
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
xor eax, eax
lea ecx, [ebx + 0x38]
inc eax
xchg dword [ecx], eax
push 0xffffffffffffffff
push edi
push edi
push dword [ebx + 0x40]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
push dword [ebp + 0xc]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, 0x102
cmp eax, edx
jne 0x47ff21
xor eax, eax
lea ecx, [ebx + 0x38]
xchg dword [ecx], eax
test eax, eax
je 0x47ff25
mov ecx, edx
call fcn.0047fd0c
jmp 0x47ffa6
test eax, eax
jne 0x47ffa1
mov dword [ebp + 8], edi
cmp dword [ebx + 0xc], edi
jle 0x47ff46
mov ecx, dword [ebx + 4]
mov eax, dword [ebx + 0x10]
cmp dword [ecx], eax
mov eax, dword [ebp + 8]
je 0x47ff4c
inc eax
add ecx, 4
mov dword [ebp + 8], eax
cmp eax, dword [ebx + 0xc]
jl 0x47ff30
or eax, 0xffffffff
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x47ff83
push eax
lea ecx, [ebx + 4]
call fcn.00480096
push 0xea60
mov eax, dword [eax]
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x47ff97
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 8]
lea ecx, [ebx + 4]
call fcn.0047fd1c
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp eax, esi
jl 0x47fed7
jmp 0x480084
mov edi, 0x80004005
jmp 0x480084
call fcn.0047fe7a
mov edi, eax
jmp 0x480084
sub eax, esi
mov dword [ebp + 8], eax
test eax, eax
jle 0x480084
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 8]
push eax
push edi
push ebx
push 0x47fe6b
push dword [ebx + 0x2c]
push edi
call dword [sym.imp.msvcrt.dll__beginthreadex]
mov esi, eax
add esp, 0x18
test esi, esi
je 0x480072
push dword [ebp + 0xc]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x480064
mov eax, dword [ebx + 0xc]
push 4
inc eax
push eax
push dword [ebx + 4]
call fcn.00483cb0
add esp, 0xc
test eax, eax
je 0x480047
mov dword [ebx + 4], eax
mov eax, dword [ebx + 0xc]
push 4
inc eax
push eax
push dword [ebx + 8]
call fcn.00483cb0
add esp, 0xc
test eax, eax
je 0x480047
mov edx, dword [ebx + 0xc]
mov ecx, dword [ebx + 4]
shl edx, 2
mov dword [ebx + 8], eax
add ecx, edx
je 0x48003c
mov eax, dword [ebp - 8]
mov dword [ecx], eax
mov eax, dword [ebx + 8]
add eax, edx
je 0x480042
mov dword [eax], esi
inc dword [ebx + 0xc]
mov esi, edi
test esi, esi
je 0x480052
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp eax, dword [ebp + 8]
jl 0x47ffba
jmp 0x480084
cmp eax, 0x102
jne 0x480072
mov edi, 0x80070102
jmp 0x480079
call fcn.0047fe7a
mov edi, eax
test esi, esi
je 0x480084
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 8