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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x254
push ebx
push esi
push edi
call fcn.00448d00
mov eax, dword [ebp + 8]
xor esi, esi
mov ebx, dword [eax]
cmp ebx, esi
mov dword [esp + 0x10], ebx
je 0x501b1f
jmp 0x50146d
mov ebx, dword [esp + 0x10]
mov eax, dword [ebx]
mov edi, dword [ebx + 0x34]
test ah, 2
mov dword [esp + 0x74], edi
je 0x501b13
mov ecx, eax
xor edx, edx
mov dx, word [ebx + 0x88]
and ch, 0xfd
mov dword [ebx], ecx
mov ecx, dword [ebx + 0x3c]
push edx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x5c], ecx
call fcn.004d1c40
mov dword [esp + 0x58], eax
mov eax, dword [ebx + 0xa4]
add esp, 4
cmp eax, esi
je 0x5014ce
fld qword [eax + 0x10]
fchs
fstp qword [esp + 0x5c]
fld qword [eax + 0x30]
fchs
fstp qword [esp + 0x64]
fld qword [eax + 0x50]
fchs
fstp qword [esp + 0x6c]
jmp 0x5014fe
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0xbff00000
xor eax, eax
mov ax, word [ebx + 0x6c]
cmp eax, esi
mov dword [esp + 0x20], eax
jg 0x501518
mov dword [esp + 0x20], 1
mov eax, dword [esp + 0x20]
fld dword [ebx + 0x64]
fsub dword [ebx + 0x68]
fidiv dword [esp + 0x20]
cmp eax, 1
mov dword [esp + 0x24], 1
fstp qword [esp + 0xb0]
jl 0x501ad6
jmp 0x501540
mov ebx, dword [esp + 0x10]
fld dword [ebx + 0x64]
fild dword [esp + 0x24]
mov ecx, 0x14
lea esi, [ebx + 0x40]
lea edi, [esp + 0x124]
fmul qword [esp + 0xb0]
rep movsd dword es:[edi], dword [esi]
fsubp st(1)
fstp dword [esp + 0x14c]
mov esi, dword [esp + 0x124]
mov word [esp + 0x150], 1
and esi, 0xffffffdf
mov dword [esp + 0x124], esi
call fcn.004ebe50
xor edi, edi
push ebx
mov dword [esp + 0x20], edi
call fcn.00463830
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x501ab7
push ebx
call fcn.00481650
fcomp qword [0x550f20]
add esp, 4
fnstsw ax
test ah, 0x41
jne 0x5019c6
mov eax, dword [ebx]
test ah, 0x10
jne 0x5019c6
mov ecx, eax
and ecx, 0xe00
cmp ecx, 0x400
je 0x5015e5
test al, 0xc0
jne 0x5015e5
mov edx, dword [ebp + 0xc]
fld dword [edx + 0x18]
fdivr qword [ebx + 0x68]
jmp 0x5015eb
fld qword [0x550f30]
call fcn.00547c92
mov esi, eax
cmp esi, 1
mov dword [esp + 0x18], esi
jge 0x501607
mov dword [esp + 0x18], 1
mov esi, dword [esp + 0x18]
fild dword [esp + 0x18]
cmp edi, esi
mov dword [esp + 0x14], edi
fdivr qword [0x550f30]
fstp qword [esp + 0x88]
jg 0x5019c1
jmp 0x50162a
mov esi, dword [esp + 0x18]
fild dword [esp + 0x14]
lea eax, [esp + 0x3c]
push eax
fmul qword [esp + 0x8c]
sub esp, 8
fstp qword [esp]
push ebx
call fcn.0043ff80
mov al, byte [ebx]
add esp, 0x10
test al, 0x40
je 0x50165a
cmp dword [esp + 0x14], esi
jne 0x50165a
mov eax, dword [ebx + 0xc]
jmp 0x50165c
mov eax, ebx
lea ecx, [esp + 0x78]
lea edx, [esp + 0x3c]
push ecx
push eax
push edx
call fcn.0043f950
mov esi, dword [esp + 0x1c]
add esp, 0xc
mov eax, dword [esi]
and eax, 3
cmp eax, 1
jne 0x50169c
fld qword [esp + 0x80]
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
fchs
fstp qword [esp + 0x28]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
jmp 0x5016e2
test eax, eax
jne 0x5016c2
fld qword [esp + 0x78]
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x84]
fchs
fstp qword [esp + 0x30]
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
jmp 0x5016e2
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
fld dword [esi + 0x4c]
fmul qword [0x550f68]
sub esp, 8
lea ecx, [esp + 0x30]
fstp qword [esp]
push ecx
call fcn.00418af0
lea edx, [esp + 0x34]
lea eax, [esp + 0x48]
push edx
push eax
call fcn.00418940
lea ecx, [esp + 0x50]
lea edx, [esp + 0x50]
push ecx
push esi
push edx
call fcn.004465c0
mov edi, dword [ebp + 0x14]
add esp, 0x20
test edi, edi
jne 0x50178f
mov edx, dword [ebp + 0x10]
lea eax, [esp + 0xac]
lea ecx, [esp + 0x174]
push eax
push ecx
push edi
lea eax, [esp + 0x68]
push edx
lea ecx, [esp + 0x4c]
push eax
push ecx
call fcn.004fe990
add esp, 0x18
cmp eax, 0xffffffff
je 0x501b3c
mov ecx, 6
lea esi, [esp + 0x184]
lea edi, [esp + 0x3c]
test eax, eax
rep movsd dword es:[edi], dword [esi]
jne 0x5019ac
mov esi, dword [esp + 0x10]
test dword [ebx], 0x1000000
je 0x5017e7
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x5017e7
fld dword [esi + 0x60]
mov dword [esp + 0x38], 1
jmp 0x5017ee
lea edx, [esp + 0x3c]
lea eax, [esp + 0x5c]
push edx
push edi
lea ecx, [esp + 0x44]
push eax
push ecx
call fcn.00449dc0
add esp, 0x10
test eax, eax
jne 0x501b3c
lea edx, [esp + 0x3c]
lea eax, [edi + 0x60]
push edx
lea ecx, [esp + 0x40]
push eax
push ecx
call fcn.004464c0
lea edx, [esp + 0x48]
lea eax, [esp + 0x48]
push edx
push edi
push eax
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
call fcn.004464c0
add esp, 0x18
jmp 0x501772
fld dword [esp + 0x14c]
sub esp, 8
lea ecx, [esp + 0x64]
fchs
fstp qword [esp]
lea edx, [esp + 0x44]
push ecx
push edx
call fcn.00418e80
mov ecx, 6
lea esi, [esp + 0x4c]
lea edi, [esp + 0xa4]
add esp, 0x10
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0xa4]
test eax, eax
je 0x501844
lea ecx, [esp + 0x94]
add eax, 0x60
push ecx
lea edx, [esp + 0x98]
push eax
push edx
call fcn.004464c0
add esp, 0xc
lea eax, [esp + 0x28]
lea ecx, [esp + 0x94]
push eax
push ecx
call fcn.00418920
mov edi, dword [esp + 0x24]
add esp, 8
test edi, edi
jne 0x5018a2
push 0xc0
push 1
call fcn.00547150
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x501b4d
mov ecx, dword [eax]
or ecx, 0x140
mov dword [eax], ecx
mov edx, dword [esi]
xor edx, ecx
and edx, 3
xor edx, ecx
mov dword [eax], edx
mov ecx, dword [esi + 0xa4]
mov dword [eax + 0xa4], ecx
jmp 0x501997
mov eax, dword [ebx]
push edi
mov edx, eax
and edx, 0xe00
cmp edx, 0x600
jne 0x5018fc
fld qword [esp + 0x8c]
fmul qword [ebx + 0x68]
mov ecx, dword [ebx + 0x44]
mov edx, dword [ebx + 0x40]
sub esp, 8
shr eax, 4
fstp qword [esp]
push ecx
lea ecx, [ebx + 0x30]
push edx
push ecx
lea edx, [esp + 0xac]
lea ecx, [esp + 0x124]
push edx
and eax, 1
push ecx
push eax
call fcn.004405d0
mov esi, eax
add esp, 0x24
test esi, esi
je 0x501b4d
jmp 0x50191e
lea edx, [esp + 0x98]
lea eax, [esp + 0x110]
push edx
push eax
call fcn.00440210
mov esi, eax
add esp, 0xc
test esi, esi
je 0x501b4d
mov ecx, dword [esi]
mov eax, dword [ebx]
xor eax, ecx
mov edx, dword [esp + 0x54]
and eax, 0x40
push edx
xor eax, ecx
mov dword [esi], eax
mov ecx, dword [ebx]
xor ecx, eax
and ecx, 0x80
xor ecx, eax
mov dword [esi], ecx
call fcn.004b2890
mov eax, dword [0x584ce8]
add esp, 4
test eax, eax
je 0x50195c
mov eax, dword [0x5838d8]
or ah, 4
mov dword [0x5838d8], eax
mov eax, dword [edi + 0xa4]
push eax
call fcn.00457cd0
push esi
call fcn.0048e930
add esp, 8
call fcn.004b2a10
call fcn.00457f30
mov edx, dword [0x5838d8]
and dh, 0xfb
mov dword [0x5838d8], edx
call fcn.00458de0
test eax, eax
jne 0x501b2d
mov ecx, 6
lea esi, [esp + 0x94]
lea edi, [esp + 0x10c]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jle 0x501626
mov edi, 1
mov ecx, dword [esp + 0x10]
mov ebx, dword [ebx + 0xc]
cmp ebx, dword [ecx + 0xc]
je 0x5019da
test ebx, ebx
jne 0x5015a1
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x501ab7
push eax
push 0x585054
call fcn.004894b0
mov ecx, 0x14
lea esi, [esp + 0x12c]
lea edi, [esp + 0xc4]
add esp, 8
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x1c]
mov eax, dword [esi + 0xc]
mov edx, dword [eax]
and edx, 0xe00
cmp edx, 0x400
jne 0x501a25
fld dword [eax + 0x40]
jmp 0x501a28
fld dword [eax + 0x70]
fst dword [esp + 0xe4]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x38]
fld st(0)
fadd dword [eax + 0x5c]
test ecx, ecx
fsub dword [eax + 0x68]
fstp dword [esp + 0xd8]
je 0x501a5a
fst dword [esp + 0xdc]
fstp dword [esp + 0xe0]
jmp 0x501a76
fld st(0)
fadd dword [eax + 0x64]
fsub dword [eax + 0x68]
fstp dword [esp + 0xe0]
fadd dword [eax + 0x60]
fsub dword [eax + 0x68]
fstp dword [esp + 0xdc]
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x58]
mov ebx, dword [esp + 0xbc]
lea edx, [esp + 0xbc]
shr eax, 0x10
and eax, 3
and bh, 0xf7
push eax
push ecx
push edx
push 2
push esi
mov dword [esp + 0xd0], ebx
call fcn.004893a0
push esi
call fcn.00441c50
push 3
push esi
call fcn.004ac0f0
add esp, 0x20
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x24], eax
jle 0x50153c
mov edi, dword [esp + 0x74]
mov ebx, dword [esp + 0x10]
xor esi, esi
push ebx
mov dword [0x584fa8], 1
call fcn.0048cbe0
push 2
push ebx
mov dword [0x584fa8], esi
call fcn.004ac0f0
mov eax, dword [ebp + 8]
push eax
push ebx
call fcn.00488bf0
mov eax, dword [0x56d4f0]
add esp, 0x14
cmp eax, esi
jne 0x501b13
push ebx
call fcn.004888a0
add esp, 4
cmp edi, esi
mov dword [esp + 0x10], edi
jne 0x501469
call fcn.004a0ba0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x5832c8]
push ecx
call fcn.0054715c
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x501b4d
push eax
call fcn.004888a0
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret