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

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor ebp, ebp
lea edi, [esi + 0x48]
push edi
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x1c]
test eax, eax
jne 0x48374f
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 4
mov al, byte [esi + 1]
mov ebx, dword [esp + 0x18]
test al, al
je 0x4837b9
mov cl, byte [esi + 4]
test cl, cl
je 0x4837b9
mov edi, dword [esi + ebx*4 + 0x30]
test edi, edi
je 0x483791
cmp ebx, 1
jne 0x483798
mov byte [esi + 4], 0
mov ecx, dword [esi + 0x34]
call fcn.0046f030
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
mov edi, dword [esi + 0x30]
test edi, edi
je 0x4837bd
xor ecx, ecx
xor edx, edx
mov ch, byte [edi + 0xf]
mov dl, byte [edi + 0xd]
mov cl, byte [edi + 0xc]
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [edi + 0xe]
shl ecx, 8
or ecx, edx
mov dword [esi + 0x2c], ecx
jmp 0x4837bd
mov byte [esi + 4], 0
test al, al
je 0x4837e9
mov al, byte [esi + 2]
test al, al
jne 0x4837e9
cmp ebx, 2
jne 0x4837d4
mov eax, dword [esi + 0x34]
test eax, eax
je 0x4837e9
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 4
mov eax, dword [esi + ebx*4 + 0x30]
test eax, eax
jne 0x483806
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 4
cmp ebx, 1
jne 0x4838d8
mov eax, dword [esi + 0x34]
test eax, eax
je 0x48384c
cmp dword [esi + 0x24], 0xffffffff
jne 0x48384c
call dword [sym.imp.WINMM.dll_timeGetTime]
and eax, 0x7fffffff
xor edx, edx
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0x34]
xor ecx, ecx
mov dh, byte [eax + 0xf]
mov cl, byte [eax + 0xd]
mov dl, byte [eax + 0xc]
shl edx, 8
or edx, ecx
xor ecx, ecx
mov cl, byte [eax + 0xe]
shl edx, 8
or edx, ecx
mov dword [esi + 0x28], edx
mov edi, dword [esi + 0x34]
xor ebx, ebx
cmp edi, ebx
je 0x4838c3
mov ecx, esi
call fcn.00483c00
xor edx, edx
xor ecx, ecx
mov dh, byte [edi + 0xf]
mov cl, byte [edi + 0xd]
mov dl, byte [edi + 0xc]
shl edx, 8
or edx, ecx
xor ecx, ecx
mov cl, byte [edi + 0xe]
shl edx, 8
or edx, ecx
cmp edx, eax
jge 0x4838bb
cmp ebp, ebx
je 0x483890
mov ecx, ebp
call fcn.0046ee90
push ebp
call fcn.00417900
add esp, 4
mov ebp, dword [esi + 0x34]
mov eax, dword [ebp]
cmp eax, ebx
je 0x48389f
mov dword [esi + 0x34], eax
jmp 0x4838a5
mov dword [esi + 0x40], ebx
mov dword [esi + 0x34], ebx
cmp ebp, ebx
je 0x4838b4
mov edx, dword [ebp + 0x14]
mov al, byte [edx]
and al, 0xf0
cmp al, 0x30
jne 0x4838bb
mov edi, dword [esi + 0x34]
cmp edi, ebx
jne 0x483855
cmp ebp, ebx
jne 0x4839ec
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 4
cmp ebx, 2
jne 0x483956
cmp dword [esi + 0x24], 0xffffffff
jne 0x483913
call dword [sym.imp.WINMM.dll_timeGetTime]
and eax, 0x7fffffff
xor edx, edx
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0x38]
xor ecx, ecx
mov dh, byte [eax + 0xf]
mov cl, byte [eax + 0xd]
mov dl, byte [eax + 0xc]
shl edx, 8
or edx, ecx
xor ecx, ecx
mov cl, byte [eax + 0xe]
shl edx, 8
or edx, ecx
mov dword [esi + 0x28], edx
mov edi, dword [esi + 0x38]
mov ecx, esi
call fcn.00483c00
xor edx, edx
xor ecx, ecx
mov dh, byte [edi + 0xf]
mov cl, byte [edi + 0xd]
mov dl, byte [edi + 0xc]
shl edx, 8
or edx, ecx
xor ecx, ecx
mov cl, byte [edi + 0xe]
shl edx, 8
or edx, ecx
cmp edx, eax
jl 0x4839d1
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 4
test ebx, ebx
jne 0x4839d1
mov al, byte [esi + 6]
test al, al
je 0x4839d1
mov eax, dword [esi + 0x78]
mov edx, dword [esi + 0x10]
mov edi, dword [esi + 0x30]
mov ebp, dword [eax + 0x100]
mov eax, dword [esi + 0x7c]
sar eax, 2
and eax, 3
sub edx, ebp
mov ecx, dword [eax*4 + 0x4a4ed4]
mov eax, 0x4a4dc96f
shl edx, cl
mov ecx, esi
mul edx
shr edx, 7
lea ebp, [edx + edx*4]
shl ebp, 1
call fcn.00483c00
xor ecx, ecx
xor edx, edx
mov ch, byte [edi + 0xf]
mov dl, byte [edi + 0xd]
mov cl, byte [edi + 0xc]
add eax, ebp
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [edi + 0xe]
shl ecx, 8
or ecx, edx
cmp ecx, eax
jle 0x4839d1
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 4
mov ebp, dword [esi + ebx*4 + 0x30]
xor ecx, ecx
mov eax, dword [ebp]
cmp eax, ecx
je 0x4839e4
mov dword [esi + ebx*4 + 0x30], eax
jmp 0x4839ec
mov dword [esi + ebx*4 + 0x3c], ecx
mov dword [esi + ebx*4 + 0x30], ecx
mov ecx, esi
call fcn.00483460
test eax, eax
jne 0x483a17
call dword [sym.imp.WINMM.dll_timeGetTime]
and eax, 0x7fffffff
mov byte [esi + 1], 1
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x78]
test eax, eax
jne 0x483a17
mov dword [esi + 0x24], 0xffffffff
test ebp, ebp
je 0x483a3a
xor ecx, ecx
xor edx, edx
mov ch, byte [ebp + 0xf]
mov dl, byte [ebp + 0xd]
mov cl, byte [ebp + 0xc]
xor eax, eax
mov al, byte [ebp + 0xe]
shl ecx, 8
or ecx, edx
shl ecx, 8
or ecx, eax
mov dword [esi + 0x2c], ecx
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
pop ecx
ret 4