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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xb8
mov eax, dword [0x5da084]
xor eax, esp
mov dword [esp + 0xb4], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [esp + 0x24], eax
mov edi, ecx
lea eax, [esp + 0x18]
mov dword [esp + 0x38], edx
push eax
push 0
push 1
xor edx, edx
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], 0
call fcn.00515520
mov esi, eax
xor ecx, ecx
add esp, 0xc
mov dword [esp + 0x10], esi
mov dword [esp + 0x2c], ecx
test esi, esi
jne 0x5184b4
mov esi, dword [esp + 0x18]
mov eax, dword [edi + 0x1c]
sub eax, dword [ebp + 8]
cmp ecx, eax
jge 0x518496
mov eax, dword [esi + 0x18]
xor edi, edi
xorps xmm0, xmm0
mov dword [esp + 0x28], edi
xorps xmm1, xmm1
movlpd qword [esp + 0x18], xmm0
movsd qword [esp + 0x40], xmm0
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
add eax, ecx
movsd qword [esp + 0x48], xmm1
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x1c]
je 0x518396
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x50]
push eax
push edi
mov edx, esi
call fcn.00515dc0
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.00517eb0
push dword [esp + 0x40]
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x8c]
movsd qword [esp + 0x3c], xmm0
call fcn.00518020
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x8c]
add esp, 0xc
call fcn.00517eb0
subsd xmm0, qword [esp + 0x30]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x50]
movsd qword [esp + 0x30], xmm0
call fcn.00517eb0
movaps xmm2, xmm0
movsd xmm0, qword [esp + 0x30]
test edi, edi
je 0x518363
movsd xmm1, qword [esp + 0x40]
comisd xmm1, xmm0
ja 0x518363
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jp 0x518381
movsd xmm1, qword [esp + 0x48]
comisd xmm1, xmm2
jbe 0x518381
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 + 0x10], eax
jmp 0x518389
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
inc edi
cmp edi, dword [esp + 0x3c]
jl 0x5182a6
jmp 0x51839a
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
lea edx, [esp + 0x28]
push edx
push eax
push ecx
mov edx, esi
mov ecx, edi
call fcn.00515520
add esp, 0xc
mov dword [esp + 0x10], eax
add dword [esi + 0x10], 0xffffffff
jne 0x518481
dec dword [edi + 0x3c]
cmp dword [esi + 8], 1
jne 0x5183d5
cmp dword [esi + 0xc], 0
jne 0x5183d5
mov dword [edi + 0x1c], 0xffffffff
mov edx, dword [esi]
test edx, edx
je 0x5183e6
mov ecx, edi
call fcn.00515cc0
test eax, eax
jne 0x5183ef
mov edx, esi
mov ecx, edi
call fcn.00515b70
mov eax, dword [esi + 8]
mov ecx, eax
or ecx, dword [esi + 0xc]
je 0x518425
xor edx, edx
mov ecx, 0x61
div ecx
lea ecx, [edi + 0x74]
mov eax, dword [ecx + edx*4]
lea ecx, [ecx + edx*4]
cmp eax, esi
je 0x518419
nop
lea ecx, [eax + 0x1c]
mov eax, dword [ecx]
cmp eax, esi
jne 0x518410
mov eax, dword [esi + 0x1c]
mov dword [ecx], eax
mov dword [esi + 0x1c], 0
cmp dword [0x5dac30], 0
je 0x518473
mov eax, dword [0x5dfe08]
test eax, eax
je 0x518441
push eax
call dword [0x5dac80]
add esp, 4
push esi
call dword [0x5dac5c]
sub dword [0x5dfca8], eax
add esp, 4
dec dword [0x5dfccc]
push esi
call dword [0x5dac54]
mov eax, dword [0x5dfe08]
add esp, 4
test eax, eax
je 0x51847d
push eax
call dword [0x5dac88]
jmp 0x51847a
push esi
call dword [0x5dac54]
add esp, 4
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
inc ecx
mov dword [esp + 0x2c], ecx
test eax, eax
je 0x518250
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
mov dword [ecx], esi
pop edi
pop esi
mov ecx, dword [esp + 0xb4]
xor ecx, esp
call fcn.0056eb71
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
pop edi
mov dword [ecx], eax
mov eax, esi
mov ecx, dword [esp + 0xb8]
pop esi
xor ecx, esp
call fcn.0056eb71
mov esp, ebp
pop ebp
ret