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

Disassembly:
push 0xffffffffffffffff
push 0x879e29
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x8ce6f4]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x8ce6f4]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov esi, ecx
mov byte [esp + 0x17], 0
mov dword [esp + 0x50], 0
xor ebx, ebx
xor ebp, ebp
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x80], ebp
lea edi, [esi + 0xfb8]
push edi
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0xff0], 1
mov byte [esp + 0x80], 2
jbe 0x604eb9
lea eax, [esi + 0x5cc]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esi + 0xfe8]
call fcn.004d3b30
mov ebx, dword [eax]
mov dword [eax], ebp
mov eax, dword [esp + 0x24]
mov dword [esp + 0x2c], ebx
test eax, eax
je 0x604ebe
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
jmp 0x604ebe
mov ebp, 0xc00d4a3e
push edi
mov byte [esp + 0x84], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebp, ebp
js 0x6050d9
xor eax, eax
mov dword [esp + 0x3c], eax
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x40], ebx
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x1c]
push 0x43a384
push ebx
call eax
call fcn.00533c60
mov ecx, eax
call fcn.005fe750
mov dword [esp + 0x58], edx
lea edx, [esp + 0x5c]
push edx
lea edx, [esp + 0x3c]
push edx
mov ebp, eax
mov eax, dword [esi + 0xf70]
mov ecx, dword [eax]
push 1
push 0
push eax
mov eax, dword [ecx + 0x64]
call eax
mov edi, eax
mov dword [esp + 0x18], edi
call fcn.00533c60
mov ecx, eax
call fcn.005fe750
cmp edi, 0xc00d6d72
je 0x6050f6
mov ecx, dword [esi + 0xf74]
test ecx, ecx
je 0x604f72
sub eax, ebp
sbb edx, dword [esp + 0x58]
mov dword [esp + 0x48], eax
push 0
lea eax, [esp + 0x4c]
push eax
mov dword [esp + 0x54], edx
mov edx, dword [ecx]
push 0x21
push ecx
mov ecx, dword [edx + 0xc]
call ecx
mov byte [esp + 0x17], 1
call fcn.00533c60
cmp byte [eax + 8], 0
je 0x605019
mov eax, dword [esi + 0x558]
mov edx, dword [esi + 0x44]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x64], eax
add eax, 4
mov dword [esp + 0x6c], eax
mov eax, dword [esi + 0x170]
push 0xffff0000
mov dword [esp + 0x6c], 0
mov dword [esp + 0x74], edx
mov ecx, dword [esi + ecx*4 + 0x26c]
mov edx, dword [eax]
lea edi, [esp + 0x68]
push edi
push ecx
push eax
mov eax, dword [edx + 0x8c]
call eax
mov eax, dword [esp + 0x6c]
add eax, 0xf
cdq
idiv dword [esi + 0x40]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esi + 0x170]
push 0xffff0000
push edi
mov dword [esp + 0x6c], edx
add edx, 4
mov dword [esp + 0x74], edx
mov ecx, dword [esi + ecx*4 + 0x26c]
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 0x8c]
call eax
mov eax, dword [esi + 0x558]
add eax, 7
cdq
idiv dword [esi + 0x40]
mov dword [esi + 0x558], edx
lea eax, [esi + 0xfb8]
push eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esi + 0x1004]
mov dword [esp + 0x34], ecx
lea ecx, [esi + 0x1000]
mov byte [esp + 0x80], 6
call fcn.005dfd30
mov ebp, dword [esi + 0x1010]
mov edx, dword [ebp]
mov dword [esp + 0x60], ebp
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], ebp
mov byte [esp + 0x80], 7
test ebp, ebp
je 0x605073
mov dword [ebp + 8], ebx
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
push ebx
call ecx
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x34]
mov dword [esi + 0x1010], edx
mov dword [ebp + 4], eax
mov dword [ebp], 0
mov eax, dword [esi + 0x1004]
inc dword [esi + 0x1008]
test eax, eax
je 0x60509f
mov dword [eax], ebp
jmp 0x6050a5
mov dword [esi + 0x1000], ebp
mov ecx, dword [esp + 0x20]
push ecx
mov dword [esi + 0x1004], ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebx]
mov eax, dword [edx + 8]
push ebx
mov dword [esp + 0x84], 0xffffffff
call eax
cmp dword [esp + 0x18], 0
jge 0x604e51
jmp 0x605170
mov dword [esp + 0x80], 0xffffffff
test ebx, ebx
je 0x605170
mov ecx, dword [ebx]
mov edx, dword [ecx + 8]
push ebx
call edx
jmp 0x605170
lea edi, [esi + 0xfb8]
push edi
mov dword [esp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ebp, [esi + 0x5cc]
push ebp
mov byte [esp + 0x84], 3
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp byte [esi + 0xfa5], 0
je 0x605146
cmp dword [ebp], 0
jne 0x605146
mov eax, dword [esi + 0xf74]
push 0
push 0
mov byte [esi + 0xfa5], 0
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push 1
push eax
call edx
push ebx
lea ecx, [esi + 0xfe8]
call fcn.004f5f10
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x80], 0xffffffff
test ebx, ebx
je 0x605170
mov eax, dword [ebx]
mov ecx, dword [eax + 8]
push ebx
call ecx
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0080262b
add esp, 0x70
ret