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

Disassembly:
push ecx
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x48]
push ebx
xor edi, edi
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x1c]
test eax, eax
jne 0x4f073d
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret 4
mov bl, byte [esi + 1]
test bl, bl
push ebp
mov ebp, dword [esp + 0x18]
je 0x4f0791
mov al, byte [esi + 5]
test al, al
je 0x4f0791
mov ecx, dword [esi + ebp*4 + 0x30]
test ecx, ecx
je 0x4f0780
cmp ebp, 1
jne 0x4f0787
mov byte [esi + 5], 0
mov ecx, dword [esi + 0x34]
call fcn.004fb9b0
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
pop ecx
ret 4
mov ecx, dword [esi + 0x30]
test ecx, ecx
je 0x4f0795
call fcn.004d9040
mov dword [esi + 0x2c], eax
jmp 0x4f0795
mov byte [esi + 5], 0
test bl, bl
je 0x4f07c1
mov al, byte [esi + 2]
test al, al
jne 0x4f07c1
cmp ebp, 2
jne 0x4f07ac
mov eax, dword [esi + 0x34]
test eax, eax
je 0x4f07c1
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret 4
mov eax, dword [esi + ebp*4 + 0x30]
test eax, eax
je 0x4f087e
cmp ebp, 1
jne 0x4f0893
mov eax, dword [esi + 0x34]
test eax, eax
je 0x4f087e
cmp dword [esi + 0x24], 0xffffffff
jne 0x4f0800
call dword [sym.imp.WINMM.dll_timeGetTime]
and eax, 0x7fffffff
mov dword [esi + 0x24], eax
mov ecx, dword [esi + 0x34]
call fcn.004d9040
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x34]
test eax, eax
je 0x4f087e
jmp 0x4f0810
mov ebp, dword [esi + 0x34]
mov ecx, esi
call fcn.004eef90
movzx edx, byte [ebp + 0xd]
xor ecx, ecx
mov ch, byte [ebp + 0xf]
mov cl, byte [ebp + 0xc]
shl ecx, 8
or ecx, edx
movzx edx, byte [ebp + 0xe]
shl ecx, 8
or ecx, edx
cmp ecx, eax
jge 0x4f0874
xor ebx, ebx
cmp edi, ebx
je 0x4f084e
mov ecx, edi
call fcn.004fb7d0
push edi
call fcn.00527b30
add esp, 4
mov edi, dword [esi + 0x34]
mov eax, dword [edi]
cmp eax, ebx
je 0x4f085c
mov dword [esi + 0x34], eax
jmp 0x4f0862
mov dword [esi + 0x40], ebx
mov dword [esi + 0x34], ebx
mov eax, dword [edi + 0x14]
mov cl, byte [eax]
and cl, 0xf0
cmp cl, 0x30
jne 0x4f0876
cmp dword [esi + 0x34], ebx
jne 0x4f0810
xor ebx, ebx
cmp edi, ebx
jne 0x4f0963
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret 4
cmp ebp, 2
jne 0x4f08f4
cmp dword [esi + 0x24], 0xffffffff
jne 0x4f08b7
call dword [sym.imp.WINMM.dll_timeGetTime]
and eax, 0x7fffffff
mov dword [esi + 0x24], eax
mov ecx, dword [esi + 0x38]
call fcn.004d9040
mov dword [esi + 0x28], eax
mov edi, dword [esi + 0x38]
mov ecx, esi
call fcn.004eef90
movzx edx, byte [edi + 0xd]
xor ecx, ecx
mov ch, byte [edi + 0xf]
mov cl, byte [edi + 0xc]
shl ecx, 8
or ecx, edx
movzx edx, byte [edi + 0xe]
shl ecx, 8
or ecx, edx
cmp ecx, eax
jl 0x4f0949
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret 4
test ebp, ebp
jne 0x4f0949
mov al, byte [esi + 7]
test al, al
je 0x4f0949
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x78]
mov edi, dword [ecx + 0x11c]
mov edx, dword [esi + 0x10]
sar eax, 2
sub edx, edi
and eax, 3
mov ecx, dword [eax*4 + 0x53e2d8]
shl edx, cl
mov ecx, dword [esi + 0x30]
mov eax, 0x4a4dc96f
mul edx
shr edx, 7
lea edi, [edx + edx*4]
shl edi, 1
call fcn.004d9040
mov ecx, esi
mov ebx, eax
call fcn.004eef90
add eax, edi
cmp ebx, eax
jg 0x4f07ac
mov edi, dword [esi + ebp*4 + 0x30]
mov eax, dword [edi]
xor ecx, ecx
cmp eax, ecx
je 0x4f095b
mov dword [esi + ebp*4 + 0x30], eax
jmp 0x4f0963
mov dword [esi + ebp*4 + 0x3c], ecx
mov dword [esi + ebp*4 + 0x30], ecx
mov ecx, esi
call fcn.004f0410
test eax, eax
jne 0x4f0983
mov ecx, esi
call fcn.004eee20
mov eax, dword [esi + 0x78]
test eax, eax
jne 0x4f0983
mov dword [esi + 0x24], 0xffffffff
movzx eax, byte [edi + 0xd]
movzx ecx, byte [edi + 0xe]
xor edx, edx
mov dh, byte [edi + 0xf]
mov dl, byte [edi + 0xc]
shl edx, 8
or edx, eax
shl edx, 8
or edx, ecx
mov dword [esi + 0x2c], edx
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
pop ecx
ret 4