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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov eax, dword [eax]
and dword [esp + 0x2c], 0
cmp dword [ecx + 0x484], 0
mov edx, dword [ebp + 0x20]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov dword [esp + 0x3c], eax
jle 0x504976
mov eax, dword [ebp + 0x1c]
add ecx, 0x888
sub eax, edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x6c], eax
mov esi, dword [ebp + 0x28]
lea eax, [ecx - 0x400]
mov edx, dword [eax]
lea edx, [esi + edx*4]
cmp dword [edx], 0
mov dword [esp + 0x48], edx
jne 0x504641
mov edx, dword [ecx]
cmp dword [esi + edx*4], 0
je 0x504953
mov eax, dword [eax]
mov ecx, dword [ecx]
mov edx, dword [ebp + 0x18]
shl eax, 2
mov esi, dword [eax + edx]
shl ecx, 2
mov edi, dword [ecx + edx]
mov edx, dword [esp + 0x3c]
lea edx, [esi + edx*4]
mov dword [esp + 0x50], edx
mov edx, dword [ebp + 0x24]
mov eax, dword [eax + edx]
mov dword [esp + 0x58], eax
mov eax, dword [ecx + edx]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x54], eax
mov eax, dword [ebx + ecx*4 + 0xfc]
fld qword [eax*8 + 0x5a41a0]
mov eax, dword [ebx + ecx*4 + 0x138]
fstp dword [esp + 0x44]
mov dword [esp + 0x5c], esi
fld qword [eax*8 + 0x5a41a0]
mov eax, dword [edx + 4]
cmp dword [eax + 0x1f8], 0
fstp dword [esp + 0x40]
je 0x5046b2
mov esi, dword [eax + 0x200]
jmp 0x5046b4
mov esi, dword [edx]
mov eax, dword [eax]
and dword [esp + 0x1c], 0
imul eax, eax, 0xf
add eax, ecx
mov eax, dword [ebx + eax*4 + 0x84]
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x4c], eax
xor eax, eax
inc eax
cmp dword [edx], 0
mov dword [ecx], eax
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx]
mov dword [esp + 0x10], esi
mov esi, dword [ebp + 0x28]
mov dword [esi + ecx*4], eax
jle 0x50494f
xor esi, esi
mov dword [esp + 0x34], esi
cmp dword [esp + 0x10], 0
fldz
fstp dword [esp + 0x18]
jle 0x50486f
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x54]
sub eax, ecx
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x5c]
sub dword [esp + 0x28], edi
sub eax, edi
mov dword [esp + 0x2c], esi
sub ecx, edi
lea edx, [edi + edx*4]
add esi, edi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
sub edx, edi
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], edx
mov dword [esp + 0x48], eax
jmp 0x50475b
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x30]
cmp eax, dword [ebp + 0x2c]
jge 0x50484d
cmp eax, dword [esp + 0x4c]
jl 0x504791
fld dword [ecx + esi]
fabs
fld dword [esp + 0x40]
fcompp
fnstsw ax
test ah, 0x41
jne 0x504791
fld dword [esi]
fabs
fld dword [esp + 0x40]
fcompp
fnstsw ax
test ah, 0x41
je 0x5047b9
add ecx, esi
fld dword [ecx]
fabs
fld dword [esp + 0x44]
fcompp
fnstsw ax
test ah, 0x41
jne 0x50482c
fld dword [esi]
fabs
fld dword [esp + 0x44]
fcompp
fnstsw ax
test ah, 0x41
jne 0x50482c
mov eax, dword [esp + 0x14]
lea ecx, [eax + esi]
mov eax, dword [esp + 0x28]
add edx, esi
push edx
push ecx
mov ecx, dword [esp + 0x70]
add eax, esi
push dword [eax + ecx]
mov ecx, dword [esp + 0x78]
push dword [eax]
mov eax, dword [esp + 0x34]
mov eax, dword [eax + ecx]
push ecx
mov ecx, dword [esp + 0x40]
fld dword [eax + ecx]
fstp dword [esp]
call fcn.004f8488
mov eax, dword [esp + 0x28]
add eax, esi
fld dword [eax]
add esp, 0xc
fadd dword [0x54ddb0]
fstp qword [esp]
call fcn.004c4790
fcomp qword [0x566828]
pop ecx
pop ecx
fnstsw ax
test ah, 0x44
jp 0x504859
mov eax, dword [esp + 0x14]
add eax, esi
fld dword [eax]
fld st(0)
fmulp st(1)
fadd dword [esp + 0x18]
fstp dword [esp + 0x18]
jmp 0x504859
mov eax, dword [esp + 0x14]
fld dword [esi]
add edx, esi
push edx
add eax, esi
push eax
push ecx
push ecx
fstp dword [esp + 4]
fld dword [ecx]
fstp dword [esp]
call fcn.004f84e7
add esp, 0x10
jmp 0x504859
fldz
mov eax, dword [esp + 0x14]
fst dword [eax + esi]
fstp dword [edx + esi]
add dword [esp + 0x2c], 4
add esi, 4
inc dword [esp + 0x30]
dec dword [esp + 0x48]
jne 0x504753
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x1f8], eax
je 0x50492b
cmp dword [esp + 0x10], eax
mov dword [esp + 0x2c], eax
jle 0x50492b
mov eax, dword [esp + 0x34]
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x10]
fld dword [esp + 0x18]
mov eax, dword [eax + 4]
fcomp qword [eax + 0x208]
fnstsw ax
test ah, 1
jne 0x50492b
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx + eax]
cmp eax, dword [ebp + 0x2c]
jge 0x504914
cmp eax, dword [esp + 0x4c]
jl 0x504914
mov ecx, dword [esp + 0x50]
lea esi, [ecx + eax*4]
fld dword [esi]
push ecx
fadd dword [0x54ddb0]
push ecx
fstp qword [esp]
call fcn.004c4790
fcomp qword [0x566828]
pop ecx
pop ecx
fnstsw ax
test ah, 0x44
jp 0x504914
fld dword [esi]
fstp dword [esp + 0x68]
mov eax, dword [esp + 0x68]
fld dword [esp + 0x18]
and eax, 0xbf800000
fsub dword [0x54ddc4]
or eax, 0x3f800000
mov dword [esi], eax
fstp dword [esp + 0x18]
inc dword [esp + 0x2c]
mov eax, dword [esp + 0x2c]
add dword [esp + 0x30], 4
cmp eax, dword [esp + 0x10]
jl 0x504899
mov eax, dword [esp + 0x10]
add dword [esp + 0x1c], eax
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x1c]
shl eax, 2
add esi, eax
mov eax, dword [ebp + 0x10]
cmp ecx, dword [eax]
mov dword [esp + 0x34], esi
jl 0x5046f3
mov ecx, dword [esp + 0x20]
inc dword [esp + 0x38]
mov eax, dword [ebp + 0x14]
mov edx, dword [esp + 0x38]
add dword [esp + 0x24], 4
add ecx, 4
cmp edx, dword [eax + 0x484]
mov dword [esp + 0x20], ecx
jl 0x50461e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret