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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xb8
mov eax, dword [0x501008]
xor eax, esp
mov dword [esp + 0xb4], eax
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x3c], edx
mov esi, ecx
push 0
push 1
xor edx, edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x38], edi
mov dword [esp + 0x24], 0
call fcn.004d3470
mov ecx, eax
xor edx, edx
add esp, 0xc
mov dword [esp + 0x28], edx
test ecx, ecx
jne 0x4d5a80
mov edi, dword [esp + 0x18]
nop dword [eax]
mov eax, dword [esi + 0x1c]
sub eax, dword [ebp + 8]
cmp edx, eax
jge 0x4d5a64
mov eax, dword [edi + 0x18]
xorps xmm0, xmm0
xor esi, esi
movlpd qword [esp + 0x18], xmm0
xorps xmm1, xmm1
movsd qword [esp + 0x40], xmm0
movsd qword [esp + 0x48], xmm1
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
add eax, ecx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
je 0x4d59e2
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x50]
push eax
push esi
mov edx, edi
call fcn.004d3930
movaps xmm0, xmmword [esp + 0x58]
lea edx, [esp + 0x88]
mov ecx, dword [esp + 0x1c]
movaps xmmword [esp + 0x88], xmm0
movaps xmm0, xmmword [esp + 0x68]
movaps xmmword [esp + 0x98], xmm0
movaps xmm0, xmmword [esp + 0x78]
movaps xmmword [esp + 0xa8], xmm0
call fcn.004d5530
push dword [esp + 0x40]
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x8c]
movsd qword [esp + 0x3c], xmm0
call fcn.004d56a0
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x8c]
add esp, 0xc
call fcn.004d5530
subsd xmm0, qword [esp + 0x30]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x50]
movsd qword [esp + 0x30], xmm0
call fcn.004d5530
movaps xmm2, xmm0
movsd xmm0, qword [esp + 0x30]
test esi, esi
je 0x4d59af
movsd xmm1, qword [esp + 0x40]
comisd xmm1, xmm0
ja 0x4d59af
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jp 0x4d59cd
movsd xmm1, qword [esp + 0x48]
comisd xmm1, xmm2
jbe 0x4d59cd
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x54]
movsd qword [esp + 0x40], xmm0
movsd qword [esp + 0x48], xmm2
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], eax
jmp 0x4d59d5
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
inc esi
cmp esi, dword [esp + 0x24]
jl 0x4d58f2
jmp 0x4d59e6
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
lea edx, [esp + 0x3c]
push edx
push eax
push ecx
mov edx, edi
mov ecx, esi
call fcn.004d3470
add esp, 0xc
mov ecx, eax
add dword [edi + 0x10], 0xffffffff
mov dword [esp + 0x24], ecx
jne 0x4d5a4f
dec dword [esi + 0x3c]
cmp dword [edi + 8], 1
jne 0x4d5a1f
cmp dword [edi + 0xc], 0
jne 0x4d5a1f
mov dword [esi + 0x1c], 0xffffffff
mov edx, dword [edi]
test edx, edx
je 0x4d5a30
mov ecx, esi
call fcn.004d38c0
test eax, eax
jne 0x4d5a39
mov edx, edi
mov ecx, esi
call fcn.004d37d0
mov edx, edi
mov ecx, esi
call fcn.004d33b0
push edi
call fcn.00437940
mov ecx, dword [esp + 0x28]
add esp, 4
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x3c]
inc edx
mov dword [esp + 0x28], edx
test ecx, ecx
je 0x4d58a0
mov eax, dword [esp + 0x2c]
mov dword [eax], edi
mov eax, ecx
pop edi
pop esi
mov ecx, dword [esp + 0xb4]
xor ecx, esp
call fcn.004d99e2
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x18]
mov dword [edi], eax
mov eax, ecx
mov ecx, dword [esp + 0xbc]
pop edi
pop esi
xor ecx, esp
call fcn.004d99e2
mov esp, ebp
pop ebp
ret