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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x364
mov eax, dword [0x8f2918]
test eax, eax
push ebx
push esi
push edi
je 0x50581f
cmp dword [ebp + 0x1c], 2
jne 0x5053d6
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x68]
test eax, eax
je 0x5053b4
fld dword [eax + 0x36a0]
jmp 0x5053ba
fld dword [0x890968]
fld dword [0x8f23f4]
fsub dword [0x8f23f0]
fmul st(1)
fadd dword [0x8f23f0]
fstp dword [0x8f23ec]
fstp st(0)
mov ebx, dword [ebp + 0xc]
test ebx, ebx
mov ecx, dword [ebp + 8]
mov esi, dword [ecx + 0x40]
je 0x50581f
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x50581f
test esi, esi
je 0x50581f
fld dword [0x890968]
movsx eax, byte [ebx + 0x2d]
fld dword [ebp + 0x20]
movsx edx, byte [ebx + 0x2c]
fucompp
mov dword [esp + 0x7c], eax
mov dword [esp + 0x30], edx
fnstsw ax
test ah, 0x44
jnp 0x505454
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x10]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x10]
push eax
push ecx
mov dword [esp + 0x18], edx
mov edx, dword [ebx + 0x18]
mov ecx, eax
push ecx
mov dword [esp + 0x24], edx
call fcn.006bd940
fld dword [esp + 0x24]
fsub dword [ebp + 0x20]
add esp, 0xc
fsubr dword [ebp + 0x20]
fstp dword [ebx + 0x1c]
jmp 0x5054f7
cmp dword [ebx + 0x1c], 0x4479c000
je 0x505467
cmp dword [ebp + 0x18], 1
jne 0x5054f7
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x10]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x10]
push eax
push ecx
mov dword [esp + 0x18], edx
mov edx, dword [ebx + 0x18]
mov ecx, eax
push ecx
mov dword [esp + 0x24], edx
call fcn.006bd940
fld dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
fchs
mov edx, dword [esp + 0x24]
fstp dword [esp + 0x6c]
mov dword [esp + 0x74], eax
mov eax, dword [0x925e90]
add esp, 0xc
cmp eax, 6
mov dword [esp + 0x64], edx
jne 0x5054f0
push 0
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x68]
push edx
lea ecx, [esp + 0xa4]
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa8], 3
call fcn.00789870
fld dword [esp + 0x18]
fsub dword [esp + 0x34]
fsubr dword [esp + 0x34]
fstp dword [ebx + 0x1c]
jmp 0x5054f7
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x1c], eax
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
mov eax, dword [ebx + 0x18]
lea edi, [ebx + 0x10]
mov dword [esp + 0xd0], ecx
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0xd4], edx
push ecx
lea edx, [esp + 0x224]
push edx
mov dword [esp + 0xe0], eax
call fcn.00444fe0
mov eax, dword [ebp + 0x1c]
add esp, 8
cmp eax, 2
jne 0x5055e8
mov eax, dword [ebx + 0x1c]
cmp eax, 0x4479c000
je 0x50581f
cmp eax, 0x461c3c00
je 0x50581f
lea eax, [esp + 0xd0]
push eax
lea ecx, [esp + 0x224]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.0045ed20
mov eax, dword [ebx + 0x1c]
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x20]
mov dword [esp + 0x68], eax
push edx
lea eax, [esp + 0x74]
push eax
call fcn.0045fba0
mov ecx, dword [0x8f23ec]
push ecx
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x84]
push ecx
call fcn.0045fc60
mov ecx, dword [ebp + 8]
add esp, 0x28
push 0
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x68]
push eax
call fcn.006cf2b0
test eax, eax
je 0x50581f
fld dword [ebx + 0x28]
mov ecx, dword [ebx + 0x20]
mov edx, dword [ebx + 0x24]
fchs
fstp dword [esp + 0xb8]
mov dword [esp + 0xb0], ecx
mov dword [esp + 0xb4], edx
jmp 0x505787
cmp eax, 1
jne 0x505686
lea eax, [esp + 0xd0]
push eax
lea ecx, [esp + 0x224]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.0045ed20
mov eax, dword [0x8f291c]
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x20]
mov dword [esp + 0x3c], eax
push edx
lea eax, [esp + 0x74]
push eax
call fcn.0045fba0
mov ecx, dword [esp + 0x44]
push ecx
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x84]
push ecx
call fcn.0045fc60
mov ecx, dword [ebp + 8]
add esp, 0x28
push 0
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x68]
push eax
call fcn.006cf2b0
test eax, eax
je 0x50581f
mov ecx, dword [ebx + 0x20]
mov edx, dword [ebx + 0x24]
mov eax, dword [ebx + 0x28]
mov dword [esp + 0xb0], ecx
mov dword [esp + 0xb4], edx
mov dword [esp + 0xb8], eax
jmp 0x505787
cmp eax, 3
je 0x505694
cmp eax, 4
jne 0x505735
mov eax, dword [esp + 0x30]
cmp eax, 0x11
je 0x505735
cmp eax, 0x12
je 0x505735
cmp eax, 0x14
je 0x505735
cmp eax, 0x13
je 0x505735
mov ecx, dword [ebp + 8]
call fcn.00410d40
test eax, eax
je 0x505735
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x10]
mov ebx, eax
test ebx, ebx
je 0x505732
lea eax, [ebx + 0x20]
push eax
lea ecx, [esp + 0x14]
push ecx
mov ecx, edi
call fcn.004102f0
lea edx, [esp + 0x10]
push edx
mov eax, edx
push eax
call fcn.0045f490
fld dword [esp + 0x1c]
fmul dword [ebx + 0x54]
add esp, 8
fld dword [esp + 0x18]
fmul dword [ebx + 0x58]
faddp st(1)
fld dword [esp + 0x10]
fmul dword [ebx + 0x50]
faddp st(1)
fcom dword [0x8f2924]
fnstsw ax
test ah, 1
jne 0x50581d
fsub dword [0x8f2924]
fld dword [0x89096c]
fsub dword [0x8f2924]
fdivp st(1)
fstp dword [ebp + 0x14]
mov ebx, dword [ebp + 0xc]
lea ecx, [esp + 0xd0]
push ecx
lea edx, [esp + 0x224]
push edx
lea eax, [esp + 0x58]
push eax
call fcn.0045ed20
add esp, 0xc
push 0
lea ecx, [esp + 0x54]
push ecx
mov ecx, dword [ebp + 8]
call fcn.006be8f0
test eax, eax
je 0x50581f
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x24]
mov ecx, dword [ebx + 0x28]
mov dword [esp + 0xb0], edx
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], ecx
mov edx, dword [esi + 0x40]
mov eax, dword [esi + 0x44]
mov ecx, dword [esi + 0x48]
mov dword [esp + 0x10], edx
lea edx, [esp + 0x50]
mov dword [esp + 0x14], eax
push edx
lea eax, [esp + 0x44]
mov dword [esp + 0x1c], ecx
push eax
lea ecx, [esp + 0x18]
call fcn.004102f0
fld dword [esp + 0x48]
fmul dword [esp + 0x48]
mov eax, dword [ebp + 0x1c]
dec eax
fld dword [esp + 0x44]
fmul dword [esp + 0x44]
mov dword [esp + 0x78], 0x3f800000
faddp st(1)
fld dword [esp + 0x40]
fmul dword [esp + 0x40]
faddp st(1)
fstp dword [esp + 0x28]
fld dword [0x899c60]
fld dword [0x899c64]
je 0x5057fe
dec eax
jne 0x50580e
fstp st(0)
fstp st(0)
fld dword [0x899c60]
fld dword [0x899c64]
jmp 0x50580e
fstp st(0)
fstp st(0)
fld dword [0x899c70]
fld dword [0x899c74]
fld dword [esp + 0x28]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x505828
fstp st(0)
fstp st(0)
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
fld dword [esp + 0x28]
fcomp st(2)
fnstsw ax
test ah, 0x41
jne 0x50584d
fld dword [esp + 0x28]
fsub st(2)
fxch st(1)
fsub st(2)
fdivp st(1)
fsubr dword [0x89096c]
fstp dword [esp + 0x78]
jmp 0x50584f
fstp st(0)
lea ecx, [esp + 0x40]
fstp st(0)
push ecx
mov edx, ecx
push edx
call fcn.0045f490
mov eax, dword [ebp + 0x10]
add esp, 8
push eax
lea ecx, [esp + 0x2b4]
call fcn.00445070
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x2e4]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
call fcn.00444fa0
lea edx, [esp + 0xb0]
push edx
lea eax, [esp + 0x2b4]
push eax
lea ecx, [esp + 0x108]
push ecx
call fcn.0045ed20
fld dword [esp + 0x114]
fmul dword [esp + 0x54]
mov al, byte [esp + 0x88]
fld dword [esp + 0x110]
add esp, 0xc
test al, 1
fmul dword [esp + 0x44]
faddp st(1)
fld dword [esp + 0x40]
fmul dword [esp + 0x100]
faddp st(1)
fstp dword [esp + 0x38]
je 0x505902
fld dword [esp + 0x38]
fabs
fstp dword [esp + 0x38]
jmp 0x50591b
fld dword [esp + 0x38]
fcomp dword [0x890968]
fnstsw ax
test ah, 5
jp 0x50591b
mov dword [esp + 0x38], 0
mov edx, dword [esi]
mov dword [esp + 0xa0], edx
mov eax, dword [esi + 0x10]
mov dword [esp + 0xa4], eax
mov ecx, dword [esi + 0x20]
mov dword [esp + 0xa8], ecx
mov edx, dword [esi + 4]
mov dword [esp + 0x80], edx
mov eax, dword [esi + 0x14]
mov dword [esp + 0x84], eax
mov ecx, dword [esi + 0x24]
mov dword [esp + 0x88], ecx
mov edx, dword [esi + 8]
mov dword [esp + 0xe0], edx
mov eax, dword [esi + 0x18]
mov dword [esp + 0xe4], eax
mov ecx, dword [esi + 0x28]
mov dword [esp + 0xe8], ecx
push esi
lea ecx, [esp + 0x334]
call fcn.00445070
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x334]
mov dword [esp + 0x30], eax
push edx
lea eax, [esp + 0x128]
push eax
call fcn.0045ed20
fld dword [esp + 0x134]
fdiv dword [esp + 0x38]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x64]
mov dword [esp + 0xfc], ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x100], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 0x11c], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x104], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x120], edx
lea edx, [ecx*8 + 0x8f2868]
add esp, 0xc
mov dword [esp + 0x118], eax
mov dword [esp + 0x34], edx
mov dword [esp + 0x2c], 2
fstp dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
mov esi, dword [eax]
test esi, esi
je 0x505e4e
cmp dword [ebp + 0x1c], 2
jne 0x505a39
push 0
push 0
push 0x3394fe62
call fcn.00503400
add esp, 0xc
mov edi, eax
jmp 0x505a43
mov ecx, dword [esi + 0x28]
mov edi, dword [ecx*4 + 0x915114]
test edi, edi
je 0x505e4e
test byte [esp + 0x7c], 4
mov edx, dword [ebp + 0x14]
mov dword [0x91599c], edx
je 0x505a87
fld dword [esp + 0x38]
fld dword [esi + 0x18]
call fcn.007c45f0
fmul dword [ebp + 0x14]
fst dword [0x91599c]
fcomp dword [0x89096c]
fnstsw ax
test ah, 0x41
jne 0x505a87
mov dword [0x91599c], 0x3f800000
fld dword [esi + 4]
fsub dword [esi]
fmul dword [0x91599c]
fadd dword [esi]
fst dword [esp + 0x30]
fcomp dword [0x890968]
fnstsw ax
test ah, 0x41
jnp 0x505e4e
mov eax, dword [esi + 0x1c]
push eax
lea ecx, [esp + 0x114]
push ecx
lea edx, [esp + 0xf8]
push edx
lea eax, [esp + 0x1c]
push eax
call fcn.0045f640
fld dword [esp + 0x4c]
fcomp dword [esi + 0x20]
add esp, 0x10
fnstsw ax
test ah, 5
jp 0x505adf
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x3c], ecx
fld dword [esp + 0x3c]
fcomp dword [esi + 0x24]
fnstsw ax
test ah, 0x41
jne 0x505af4
mov edx, dword [esi + 0x24]
mov dword [esp + 0x3c], edx
fld dword [esp + 0x30]
lea ecx, [esp + 0x130]
fmul dword [esp + 0x3c]
fmul dword [ebp + 0x28]
fstp dword [esp + 0x30]
call fcn.006c0a30
fld dword [0x91599c]
fmul dword [esi + 8]
fstp dword [esp + 0x98]
fld dword [0x91599c]
fmul dword [esi + 0xc]
fstp dword [esp + 0xcc]
fld dword [0x91599c]
fmul dword [esi + 0x10]
fstp dword [esp + 0xc4]
fld dword [0x91599c]
fmul dword [esi + 0x14]
fmul dword [esp + 0x78]
fadd st(0), st(0)
fst dword [esp + 0x28]
fcomp dword [0x899dd8]
fnstsw ax
test ah, 0x41
jne 0x505b67
mov dword [esp + 0x28], 0x437f0000
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x505c16
lea eax, [esp + 0xe0]
push eax
mov ecx, eax
push ecx
call fcn.0045f490
mov esi, dword [ebp + 8]
add esp, 8
lea edx, [esp + 0xf0]
push edx
lea eax, [esp + 0x64]
push eax
mov ecx, esi
call fcn.006be940
mov ecx, esi
call fcn.006be6b0
mov dword [esp + 0xc8], eax
fild dword [esp + 0xc8]
fdivr dword [esp + 0x60]
fmul dword [0x8f2920]
fstp dword [0x916038]
mov ecx, dword [0x916038]
push ecx
call fcn.00444eb0
lea edx, [esp + 0xe4]
push eax
push edx
lea eax, [esp + 0x2fc]
push eax
call fcn.006bd980
lea ecx, [esp + 0xb0]
push ecx
lea edx, [esp + 0x304]
push edx
mov eax, ecx
push eax
call fcn.006bd940
lea ecx, [esp + 0x9c]
push ecx
lea edx, [esp + 0x310]
push edx
mov eax, ecx
push eax
call fcn.006bd940
add esp, 0x28
mov esi, dword [esp + 0x30]
push esi
lea ecx, [esp + 0xa4]
call fcn.004022e0
push esi
lea ecx, [esp + 0x84]
call fcn.004022e0
cmp dword [ebp + 0x1c], 2
jne 0x505c72
fld dword [ebx + 0x18]
fsub dword [ebx + 0x1c]
fcomp dword [0x899c8c]
fnstsw ax
test ah, 5
jp 0x505c5f
fld dword [0x8f23ec]
push ecx
fmul dword [0x8933d4]
fstp dword [esp]
jmp 0x505c66
mov ecx, dword [0x8f23ec]
push ecx
lea ecx, [esp + 0x84]
call fcn.004022e0
mov eax, dword [ebp + 0x24]
fld dword [esp + 0x28]
test eax, eax
je 0x505c8c
call fcn.007c4b80
mov esi, eax
mov eax, dword [ebp + 0x24]
shl esi, 0x18
jmp 0x505cc4
call fcn.007c4b80
fld dword [esp + 0xc4]
mov esi, eax
shl esi, 8
call fcn.007c4b80
fld dword [esp + 0xcc]
or esi, eax
shl esi, 8
call fcn.007c4b80
fld dword [esp + 0x98]
or esi, eax
shl esi, 8
call fcn.007c4b80
or esi, eax
lea edx, [esp + 0x80]
push edx
lea eax, [esp + 0x214]
push eax
lea ecx, [esp + 0x298]
push ecx
lea ecx, [esp + 0xac]
mov dword [esp + 0x1bc], esi
mov dword [esp + 0x1c0], esi
mov dword [esp + 0x1c4], esi
mov dword [esp + 0x1c8], esi
call fcn.00470050
mov ecx, eax
call fcn.004102f0
push eax
lea edx, [esp + 0x1f4]
push edx
lea ecx, [esp + 0x18]
call fcn.00470020
fld dword [eax + 4]
fld dword [eax + 8]
mov eax, dword [eax]
lea ecx, [esp + 0x80]
fxch st(1)
push ecx
fstp dword [esp + 0x138]
lea edx, [esp + 0x2a4]
push edx
fstp dword [esp + 0x140]
lea ecx, [esp + 0xa8]
mov dword [esp + 0x138], eax
call fcn.004102f0
push eax
lea eax, [esp + 0x1d4]
push eax
lea ecx, [esp + 0x18]
call fcn.00470020
fld dword [eax + 4]
fld dword [eax + 8]
mov ecx, dword [eax]
lea edx, [esp + 0x80]
fxch st(1)
push edx
fstp dword [esp + 0x148]
lea eax, [esp + 0x274]
mov dword [esp + 0x144], ecx
fstp dword [esp + 0x14c]
push eax
lea ecx, [esp + 0xa8]
call fcn.00470020
push eax
lea ecx, [esp + 0x264]
push ecx
lea ecx, [esp + 0x18]
call fcn.00470020
fld dword [eax + 4]
fld dword [eax + 8]
mov edx, dword [eax]
lea eax, [esp + 0x80]
fxch st(1)
push eax
fstp dword [esp + 0x158]
lea ecx, [esp + 0x284]
mov dword [esp + 0x154], edx
fstp dword [esp + 0x15c]
push ecx
lea edx, [esp + 0x1e8]
push edx
lea ecx, [esp + 0xac]
call fcn.00470050
mov ecx, eax
call fcn.00470020
push eax
lea eax, [esp + 0x204]
push eax
lea ecx, [esp + 0x18]
call fcn.00470020
fld dword [eax + 4]
fld dword [eax + 8]
mov ecx, dword [eax]
push 0
fxch st(1)
push 0
fstp dword [esp + 0x16c]
push 0x987ab0
push edi
fstp dword [esp + 0x178]
lea edx, [esp + 0x140]
mov dword [esp + 0x170], ecx
mov ecx, dword [ebp + 8]
push edx
call fcn.006be750
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x2c]
add ecx, 4
dec eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], eax
jne 0x505a10
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret