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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x4c
cmp byte [esp + 0x6c], 0
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x64]
je 0x5174d8
fld dword [ebx + 0x58]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fldz
fcompi st(1)
fstp st(0)
jae 0x5174c8
cmp byte [ebx + 0x3b], 0xd
je 0x5174c8
cmp byte [ebx + 9], 8
je 0x5174c8
movsx eax, word [ebx + 6]
mov dword [esp + 4], edi
mov ecx, 0x5b39c8
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 8], eax
call fcn.0054c4e0
sub esp, 0x10
test eax, eax
jne 0x517520
mov eax, dword [ebx]
mov dword [esp + 0x1c], 0
mov ecx, ebx
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [eax + 0x7c]
sub esp, 0x20
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov ecx, 0x5b8ac0
call fcn.004ba5f0
test eax, eax
je 0x51743c
mov dword [esp + 4], 8
mov ecx, 0x5b8ac0
mov dword [esp], 0x25e5
call fcn.004ba910
movzx edx, word [ebx + 6]
sub esp, 8
mov word [eax + 4], di
movzx edi, word [esp + 0x68]
mov word [eax], dx
mov word [eax + 2], si
mov word [eax + 6], di
jmp 0x5174c8
movsx eax, word [ebx + 6]
mov dword [esp + 4], edi
mov ecx, 0x5b39c8
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 8], eax
call fcn.0054c4e0
mov ecx, 0x5b62e0
sub esp, 0x10
mov ebp, eax
mov eax, dword [esp + 0x68]
mov dword [esp], eax
call fcn.00438280
sub esp, 4
cmp byte [eax + 0x39], 4
je 0x5176c0
movzx eax, word [ebx + 0x1c]
mov edx, dword [0x59ad30]
movzx ecx, word [ebx + 0x1a]
mov ebp, dword [0x5b39d0]
sar ax, 5
cwde
sar cx, 5
imul eax, edx
movsx ecx, cx
imul edx, edi
add eax, ecx
add edx, esi
imul eax, eax, 0xe
imul edx, edx, 0xe
movzx edx, byte [ebp + edx + 0xc]
cmp byte [ebp + eax + 0xc], dl
jne 0x517487
cmp byte [ebx + 0x42], 0xa
je 0x517760
movzx eax, word [esp + 0x68]
mov byte [ebx + 0x42], 0xa
mov word [esp + 0x28], si
mov word [esp + 0x26], ax
mov word [ebx + 0x43], ax
mov word [ebx + 0x45], si
mov word [esp + 0x2a], di
mov word [ebx + 0x47], di
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp], 0
call dword [eax + 0x78]
mov ecx, 0x5b62e0
sub esp, 4
mov eax, dword [esp + 0x68]
mov dword [esp], eax
call fcn.00438280
mov ecx, ebx
movsx edx, word [eax + 0x4a]
movsx ebp, word [eax + 0x48]
sub esp, 4
mov eax, dword [ebx + 0x1e]
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ebp
mov dword [esp + 0xc], esi
movsx eax, word [eax + 0xe]
mov dword [esp + 0x2c], edx
mov dword [esp + 8], eax
movsx eax, word [ebx + 0x54]
mov dword [esp + 4], eax
movsx eax, word [ebx + 0x52]
mov dword [esp], eax
call fcn.00517370
sub esp, 0x1c
test eax, eax
mov edx, dword [esp + 0x2c]
je 0x5177b0
mov eax, dword [ebx + 0x1a]
mov dword [esp + 0x2c], edx
mov ecx, ebx
mov dword [esp], 0
mov dword [ebx + 0x12], eax
mov eax, dword [ebx]
call dword [eax + 0x2c]
mov ecx, ebx
sub esp, 4
mov edx, dword [esp + 0x2c]
mov eax, edx
shr eax, 0x1f
add eax, edx
sar eax, 1
add eax, edi
mov dword [esp + 0xc], eax
mov eax, ebp
shr eax, 0x1f
add eax, ebp
sar eax, 1
add eax, esi
mov dword [esp + 8], eax
movsx eax, word [ebx + 0x54]
mov dword [esp + 4], eax
movsx eax, word [ebx + 0x52]
mov dword [esp], eax
call fcn.004de540
sub esp, 0x10
movzx eax, word [esp + 0x26]
mov byte [ebx + 0x3b], 0xa
mov word [ebx + 0x3c], ax
movzx eax, word [esp + 0x28]
mov word [ebx + 0x3e], ax
movzx eax, word [esp + 0x2a]
mov word [ebx + 0x40], ax
jmp 0x5174c8
cmp ebp, 4
je 0x517750
jg 0x517730
cmp ebp, 1
je 0x517740
cmp ebp, 2
jne 0x517487
lea ecx, [esi + 1]
mov edx, edi
nop
movzx eax, word [ebx + 0x1c]
movzx ebp, word [ebx + 0x1a]
imul edx, dword [0x59ad30]
sar ax, 5
sar bp, 5
cwde
imul eax, dword [0x59ad30]
movsx ebp, bp
add edx, ecx
mov ecx, dword [0x5b39d0]
imul edx, edx, 0xe
add eax, ebp
imul eax, eax, 0xe
movzx edx, byte [ecx + edx + 0xc]
cmp byte [ecx + eax + 0xc], dl
je 0x5175a3
jmp 0x517487
lea edx, [edi + 1]
mov ecx, esi
cmp ebp, 8
je 0x5176e0
jmp 0x517487
lea ecx, [esi + 1]
lea edx, [edi + 2]
jmp 0x5176e0
lea ecx, [esi + 2]
lea edx, [edi + 1]
jmp 0x5176e0
movsx eax, word [ebx + 0x43]
cmp eax, dword [esp + 0x68]
jne 0x5175ad
movsx eax, word [ebx + 0x45]
cmp eax, esi
jne 0x5175ad
movsx eax, word [ebx + 0x47]
cmp eax, edi
jne 0x5175ad
cmp byte [ebx + 9], 1
jne 0x5174c8
movzx eax, word [esp + 0x68]
mov word [esp + 0x28], si
mov word [esp + 0x2a], di
mov word [esp + 0x26], ax
jmp 0x5175d1
mov eax, dword [esp + 0x68]
mov dword [esp + 0xc], edx
mov ecx, ebx
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 1
mov dword [esp + 8], ebp
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.00516ad0
sub esp, 0x20
jmp 0x517698