Function at 0x4a0010
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 0x4a003f
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 0x4a00a9
mov cl, byte [esi + 4]
test cl, cl
je 0x4a00a9
mov edi, dword [esi + ebx*4 + 0x30]
test edi, edi
je 0x4a0081
cmp ebx, 1
jne 0x4a0088
mov byte [esi + 4], 0
mov ecx, dword [esi + 0x34]
call fcn.00488f50
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 0x4a00ad
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 0x4a00ad
mov byte [esi + 4], 0
test al, al
je 0x4a00d9
mov al, byte [esi + 2]
test al, al
jne 0x4a00d9
cmp ebx, 2
jne 0x4a00c4
mov eax, dword [esi + 0x34]
test eax, eax
je 0x4a00d9
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 0x4a00f6
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 0x4a01c8
mov eax, dword [esi + 0x34]
test eax, eax
je 0x4a013c
cmp dword [esi + 0x24], 0xffffffff
jne 0x4a013c
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 0x4a01b3
mov ecx, esi
call fcn.004a04f0
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 0x4a01ab
cmp ebp, ebx
je 0x4a0180
mov ecx, ebp
call fcn.00488db0
push ebp
call fcn.0041ec10
add esp, 4
mov ebp, dword [esi + 0x34]
mov eax, dword [ebp]
cmp eax, ebx
je 0x4a018f
mov dword [esi + 0x34], eax
jmp 0x4a0195
mov dword [esi + 0x40], ebx
mov dword [esi + 0x34], ebx
cmp ebp, ebx
je 0x4a01a4
mov edx, dword [ebp + 0x14]
mov al, byte [edx]
and al, 0xf0
cmp al, 0x30
jne 0x4a01ab
mov edi, dword [esi + 0x34]
cmp edi, ebx
jne 0x4a0145
cmp ebp, ebx
jne 0x4a02dc
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 0x4a0246
cmp dword [esi + 0x24], 0xffffffff
jne 0x4a0203
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.004a04f0
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 0x4a02c1
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 0x4a02c1
mov al, byte [esi + 6]
test al, al
je 0x4a02c1
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 + 0x4c2f48]
mov eax, 0x4a4dc96f
shl edx, cl
mov ecx, esi
mul edx
shr edx, 7
lea ebp, [edx + edx*4]
shl ebp, 1
call fcn.004a04f0
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 0x4a02c1
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 0x4a02d4
mov dword [esi + ebx*4 + 0x30], eax
jmp 0x4a02dc
mov dword [esi + ebx*4 + 0x3c], ecx
mov dword [esi + ebx*4 + 0x30], ecx
mov ecx, esi
call fcn.0049fd50
test eax, eax
jne 0x4a0307
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 0x4a0307
mov dword [esi + 0x24], 0xffffffff
test ebp, ebp
je 0x4a032a
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