Function at 0x4727b0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x3c
mov eax, dword [esp + 0x54]
push ebx
push ebp
push esi
mov dword [eax], 0
mov eax, dword [esp + 0x5c]
push edi
mov edi, ecx
mov dword [esp + 0x14], 0
mov ecx, dword [esp + 0x6c]
mov dword [eax], 0
mov dword [esp + 0x20], 0
test ecx, ecx
je 0x4727f0
mov eax, dword [ecx]
lea edx, [esp + 0x20]
push edx
push ecx
call dword [eax + 0x24]
mov esi, dword [edi + 0x6c]
mov ebp, dword [esp + 0x54]
push 0
push esi
push ebp
push dword [esp + 0x5c]
call fcn.00491bb0
mov ecx, dword [esp + 0x50]
mov ebx, eax
add ecx, dword [esp + 0x58]
mov dword [esp + 0x38], ecx
adc ebp, dword [esp + 0x5c]
sub ecx, 1
push 0
push esi
mov dword [esp + 0x3c], ebp
sbb ebp, 0
push ebp
push ecx
mov dword [esp + 0x2c], ebx
call fcn.00491bb0
mov ebp, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [edi + 8]
mov dword [esp + 0x24], eax
mov eax, ebx
and eax, 0xf
add eax, eax
mov dword [esp + 0x2c], eax
mov eax, ebx
shr eax, 4
lea ebx, [edi + 0x50]
shl eax, 2
mov dword [esp + 0x28], eax
push esi
mov dword [esp + 0x34], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esp + 0x28]
mov eax, dword [edi + 0x2c]
mov eax, dword [eax + ecx]
mov ecx, dword [esp + 0x2c]
shr eax, cl
and eax, 3
cmp eax, 1
je 0x472a7d
cmp eax, 2
je 0x472a7d
cmp dword [edi + 0x58], 1
jne 0x4728c8
push esi
call ebp
mov eax, dword [ebx]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x44]
push 0xffffffffffffffff
push 0
push eax
xor eax, eax
mov dword [esp + 0x54], ecx
test ecx, ecx
setne al
inc eax
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
jne 0x472855
pop edi
pop esi
pop ebp
mov eax, 0x821804c7
pop ebx
add esp, 0x3c
ret 0x20
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov al, byte [edi + 0x74]
mov ebp, dword [edi + 0x6c]
not al
mov ebx, dword [edi + 0x78]
mov dword [edi + 0x58], 1
push 0
push ebp
test al, 1
je 0x4729d1
mov ecx, dword [edi + 0x38]
xor eax, eax
mov edx, dword [edi + 0x3c]
add ebx, ebp
mov dword [esp + 0x18], ecx
adc eax, eax
mov dword [esp + 0x20], edx
add ebx, ecx
adc eax, edx
sub ebx, 1
sbb eax, 0
push eax
push ebx
call fcn.00491bb0
push 0
push ebp
push 0
push eax
call fcn.00491a50
mov ebx, eax
mov ebp, edx
mov edx, dword [esp + 0x10]
mov ecx, dword [edi + 0x34]
mov eax, dword [edi + 0x30]
cmp ebp, ecx
jl 0x472939
jg 0x472935
cmp ebx, eax
jbe 0x472939
mov ebx, eax
mov ebp, ecx
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub ebx, edx
push esi
sbb ebp, dword [esp + 0x1c]
call eax
push 0
push dword [esp + 0x70]
lea eax, [esp + 0x44]
mov dword [esp + 0x44], 0
push dword [esp + 0x70]
mov ecx, edi
mov dword [esp + 0x4c], 0
push eax
push ebp
push ebx
push dword [esp + 0x30]
push dword [esp + 0x2c]
call fcn.00474490
mov dword [esp + 0x14], eax
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
call eax
mov edx, dword [esp + 0x40]
test edx, edx
jl 0x4729a4
mov ecx, dword [esp + 0x3c]
jg 0x472995
test ecx, ecx
je 0x4729a4
mov al, byte [edi + 0x74]
not al
test al, 1
je 0x4729a4
add dword [edi + 0x38], ecx
adc dword [edi + 0x3c], edx
mov ebx, dword [esp + 0x30]
mov dword [edi + 0x58], 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebp, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
call ebp
mov eax, dword [esp + 0x14]
test eax, eax
js 0x472bde
jmp 0x472855
mov eax, dword [esp + 0x24]
push 0
push eax
call fcn.00491a50
push 0
push ebp
lea ecx, [ebx - 1]
mov dword [esp + 0x18], eax
add ecx, ebp
mov dword [esp + 0x20], edx
push 0
push ecx
call fcn.00491fd0
mov edx, dword [esp + 0x1c]
lea ecx, [edx - 1]
add ecx, eax
mov eax, dword [edi + 0x28]
cmp ecx, eax
lea ebx, [eax - 1]
mov eax, edx
cmovb ebx, ecx
cmp edx, ebx
ja 0x472a2e
mov ebp, dword [edi + 0x2c]
mov edx, eax
mov ecx, eax
shr edx, 4
and ecx, 0xf
add ecx, ecx
mov edx, dword [ebp + edx*4]
shr edx, cl
test dl, 3
jne 0x472a2e
inc eax
cmp eax, ebx
jbe 0x472a12
lea ecx, [eax - 1]
xor eax, eax
push 0
push dword [edi + 0x6c]
add ecx, 1
adc eax, eax
push eax
push ecx
call fcn.00491a50
mov ecx, dword [edi + 0x78]
mov ebx, eax
mov ebp, edx
mov edx, ebx
sub edx, dword [esp + 0x10]
mov eax, ebp
sbb eax, dword [esp + 0x18]
js 0x472921
jg 0x472a67
cmp edx, ecx
jbe 0x472921
mov edx, dword [esp + 0x10]
mov ebx, ecx
add ebx, edx
mov ebp, 0
adc ebp, dword [esp + 0x18]
jmp 0x472925
mov ebp, dword [esp + 0x1c]
push 0
push dword [edi + 0x6c]
inc ebp
push 0
push ebp
call fcn.00491a50
mov ebx, eax
cmp ebp, dword [esp + 0x24]
ja 0x472adc
mov esi, dword [edi + 0x2c]
lea ebx, [ebx]
cmp dword [esp + 0x34], edx
jl 0x472ad9
jg 0x472aae
cmp dword [esp + 0x38], ebx
jbe 0x472ad9
mov eax, ebp
mov ecx, ebp
shr eax, 4
and ecx, 0xf
add ecx, ecx
mov eax, dword [esi + eax*4]
shr eax, cl
and eax, 3
cmp eax, 1
je 0x472acc
cmp eax, 2
jne 0x472ad9
inc ebp
add ebx, dword [edi + 0x6c]
adc edx, 0
cmp ebp, dword [esp + 0x24]
jbe 0x472aa0
lea esi, [edi + 8]
mov ecx, dword [edi + 0x34]
mov eax, dword [edi + 0x30]
cmp edx, ecx
jl 0x472af0
jg 0x472aec
cmp ebx, eax
jbe 0x472af0
mov ebx, eax
mov edx, ecx
sub ebx, dword [esp + 0x50]
mov ecx, dword [esp + 0x5c]
sbb edx, dword [esp + 0x54]
cmp edx, ecx
jl 0x472b0e
mov eax, dword [esp + 0x58]
jg 0x472b0a
cmp ebx, eax
jbe 0x472b0e
mov ebx, eax
mov edx, ecx
test edx, edx
jl 0x472b29
jg 0x472b1c
cmp ebx, 0x40000000
jbe 0x472b29
mov ebx, 0x40000000
mov dword [esp + 0x5c], 0
mov eax, dword [edi + 0x60]
test eax, eax
je 0x472b41
mov ebp, dword [esp + 0x64]
dec eax
mov dword [edi + 0x60], eax
mov ecx, dword [edi + eax*4 + 0x48]
mov dword [ebp], ecx
jmp 0x472b60
mov ecx, dword [edi + 0x24]
lea edx, [esp + 0x14]
push edx
mov eax, dword [ecx]
call dword [eax + 0x54]
mov ebp, dword [esp + 0x14]
mov ecx, eax
mov eax, dword [esp + 0x64]
mov dword [eax], ecx
test ebp, ebp
js 0x472bd5
mov ebp, eax
push dword [esp + 0x54]
mov edx, dword [esp + 0x54]
mov eax, dword [ecx]
push edx
push 0
call dword [eax + 0x14]
mov dword [esp + 0x14], eax
test eax, eax
jns 0x472bcd
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [ebp]
push esi
call eax
mov eax, dword [edi + 0x60]
cmp eax, 2
jb 0x472b99
test ebx, ebx
je 0x472ba7
mov eax, dword [ebx]
mov ecx, ebx
push 1
call dword [eax]
jmp 0x472ba7
mov dword [edi + eax*4 + 0x48], ebx
mov ecx, ebx
mov eax, dword [ebx]
call dword [eax + 0x30]
inc dword [edi + 0x60]
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
call eax
mov dword [ebp], 0
mov ebp, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x3c
ret 0x20
mov eax, dword [esp + 0x60]
xor ebp, ebp
mov dword [eax], ebx
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 0x20