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

Disassembly:
sub esp, 0x40
push edi
mov edi, ecx
mov eax, dword [edi]
call dword [eax + 0x94]
cmp eax, 1
je 0x51584f
mov ecx, edi
call fcn.0063e7f0
cmp eax, 1
je 0x51584f
mov ecx, edi
call fcn.004ef890
cmp eax, 1
je 0x51584f
mov ecx, dword [esp + 0x48]
mov edx, dword [ecx + 0x3c]
mov eax, dword [ecx + 0x38]
mov dword [esp + 0x14], edx
mov edx, dword [ecx + 0x40]
mov ecx, dword [ecx + 0x44]
mov dword [esp + 8], edx
mov edx, dword [0x7a39fc]
mov dword [esp + 0x10], eax
mov dword [esp + 4], ecx
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov ecx, dword [edx + 8]
lea edx, [esp + 0x18]
push edx
push eax
call fcn.004aed70
mov ecx, eax
call fcn.004d8230
cmp al, byte [0x74666c]
jne 0x51584f
mov ecx, dword [esp + 0x18]
lea eax, [ecx + 0x90]
mov edx, dword [eax]
mov dword [esp + 0x20], edx
mov edx, dword [eax + 4]
push ebx
push ebp
mov dword [esp + 0x2c], edx
mov eax, dword [eax + 8]
push esi
mov dword [esp + 0x34], eax
call fcn.004cb120
mov dword [esp + 0x28], eax
lea ebp, [edi + 0xfc]
xor ebx, ebx
test ebp, ebp
je 0x5156dd
mov eax, dword [ebp]
mov ecx, dword [eax]
test ecx, ecx
jne 0x515689
xor esi, esi
jmp 0x51568c
mov esi, dword [ecx + 8]
test esi, esi
mov ecx, dword [eax]
mov dword [esp + 0x18], ecx
je 0x5156dd
test ebx, ebx
jne 0x5156d8
cmp dword [esi], 3
jne 0x5156c5
mov eax, dword [esi + 0x38]
cmp eax, dword [esp + 0x1c]
jne 0x5156be
xor edx, edx
mov dx, word [esi + 0x6c]
mov ecx, edi
push edx
push ebx
call fcn.004f1ef0
mov ebx, 1
jmp 0x5156d4
lea eax, [esp + 0x18]
push eax
jmp 0x5156ca
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [ebp]
call fcn.005e9b90
mov esi, eax
test esi, esi
jne 0x515696
cmp ebx, 1
je 0x515676
fld dword [edi + 0x90]
lea esi, [edi + 0x90]
fsub dword [esp + 0x2c]
mov ecx, edi
fstp dword [esp + 0x38]
fld dword [esi + 4]
fsub dword [esp + 0x30]
fstp dword [esp + 0x3c]
fld dword [esi + 8]
fsub dword [esp + 0x34]
fstp dword [esp + 0x40]
call fcn.004cb120
mov ebx, dword [esp + 0x28]
cmp ebx, eax
jne 0x515840
fld dword [esp + 0x40]
fmul dword [esp + 0x40]
fld dword [esp + 0x3c]
fmul dword [esp + 0x3c]
faddp st(1)
fld dword [esp + 0x38]
fmul dword [esp + 0x38]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
fcompp
fnstsw ax
test ah, 1
jne 0x515840
mov eax, dword [esp + 0x10]
cmp eax, 1
jl 0x515840
mov edx, dword [edi + 0x340]
dec eax
push edx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x34]
push ecx
push esi
lea edx, [esp + 0x54]
push edx
mov ecx, ebx
call fcn.004bdf80
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
mov esi, dword [ebx + 0x120]
push 0
mov ebx, dword [esp + 0x88]
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x58]
push eax
push 1
lea ecx, [esp + 0x64]
push ecx
push 2
xor ecx, ecx
mov cx, word [ebx + 0x6c]
lea edx, [esp + 0x78]
push edx
push 1
lea eax, [esp + 0x7c]
push eax
push 3
push ecx
push 3
mov ecx, edi
call fcn.004ccb00
push 0
push 0
mov eax, dword [esp + 0x28]
push 0
lea edx, [esp + 0x44]
push edx
push 0
push 1
push 0
push 0
push 0
push 0
push 0
push 0
push eax
xor edx, edx
mov dx, word [ebx + 0x6c]
push 0x7f000000
push esi
lea ecx, [esp + 0x80]
push ecx
mov ecx, edi
mov dword [esp + 0x78], 0
push edx
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
call fcn.004f8a50
xor eax, eax
mov ax, word [ebx + 0x6c]
push eax
mov ecx, edi
call fcn.004eb5a0
mov eax, dword [0x745dc0]
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x40
ret 4
mov eax, dword [0x745dc4]
pop edi
add esp, 0x40
ret 4