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

Disassembly:
sub esp, 0x64
mov eax, dword [esp + 0x68]
fld dword [esp + 0x70]
mov eax, dword [eax]
fadd qword [0x4fd830]
mov ecx, dword [0x5042a4]
push ebp
mov ebp, dword [esp + 0x70]
push esi
mov esi, dword [eax + 4]
imul esi, ebp
add esi, dword [eax + 0x18]
mov eax, dword [ecx]
mov ecx, dword [eax + 4]
imul ecx, dword [0x5042a8]
add ecx, dword [eax + 0x18]
mov edx, dword [esi + 0x2c]
push edi
sub esp, 8
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], edx
fstp qword [esp]
call sub.MSVCR90.dll_floor
fstp dword [esp + 0x68]
fld dword [esp + 0x68]
call fcn.004dc850
fld dword [esp + 0x88]
fadd qword [0x4fd830]
mov dword [esp + 0x5c], eax
fstp qword [esp]
call sub.MSVCR90.dll_floor
fstp dword [esp + 0x68]
add esp, 8
fld dword [esp + 0x60]
call fcn.004dc850
fld dword [esp + 0x88]
fld st(0)
mov dword [esp + 0x44], eax
fld qword [0x4fd848]
fmul st(1), st(0)
fxch st(1)
call fcn.004dc850
fld qword [0x4fd878]
mov edi, eax
mov dword [esp + 0x48], eax
test edi, edi
jge 0x4971c6
fld dword [esp + 0x84]
neg edi
fadd st(1)
mov dword [esp + 0x48], edi
fstp dword [esp + 0x84]
fld dword [esp + 0x8c]
fld st(0)
fmulp st(3)
fxch st(2)
call fcn.004dc850
mov dword [esp + 0x38], eax
test eax, eax
jge 0x4971f6
fadd dword [esp + 0x84]
neg eax
mov dword [esp + 0x38], eax
fstp dword [esp + 0x84]
jmp 0x4971f8
fstp st(0)
test edi, edi
je 0x497c2d
test eax, eax
je 0x497c2d
fldz
fld dword [esp + 0x84]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x49724c
fld qword [0x4fd870]
fdivr st(1)
call fcn.004dc850
imul eax, eax, 0xfffffe98
mov ecx, 0x168
sub ecx, eax
mov dword [esp + 0x60], ecx
fiadd dword [esp + 0x60]
fstp dword [esp + 0x84]
fld dword [esp + 0x84]
fmul qword [0x4fd9a0]
push ebx
call fcn.004dc850
cdq
mov ecx, 0xb40
idiv ecx
mov ebx, edx
test ebx, ebx
jne 0x49729b
fmul dword [esp + 0x98]
sub esp, 0x10
fstp dword [esp + 0xa0]
fld dword [esp + 0xa0]
fstp dword [esp + 0xc]
fchs
fmul dword [esp + 0xa4]
fstp dword [esp + 0xa0]
fld dword [esp + 0xa0]
jmp 0x4972d6
cmp ebx, 0x5a0
jne 0x497308
fchs
sub esp, 0x10
fmul dword [esp + 0xa8]
fstp dword [esp + 0xa0]
fld dword [esp + 0xa0]
fstp dword [esp + 0xc]
fmul dword [esp + 0xa4]
fstp dword [esp + 0xa0]
fld dword [esp + 0xa0]
mov edi, dword [esp + 0x88]
fstp dword [esp + 8]
fld dword [esp + 0x94]
mov esi, ebp
fstp dword [esp + 4]
fld dword [esp + 0x90]
fstp dword [esp]
call fcn.00465cb0
add esp, 0x10
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x64
ret
mov eax, dword [esi + 8]
mov edx, dword [esi + 4]
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], ecx
lea eax, [ebx + 0x2d0]
cdq
mov ecx, 0xb40
idiv ecx
mov ecx, dword [0x50423c]
mov eax, 0xb60b60b7
mov ebp, dword [esi]
mov dword [esp + 0x5c], ebp
mov edx, dword [ecx + edx*4]
mov dword [esp + 0x84], edx
imul ebx
fild dword [esp + 0x84]
fstp dword [esp + 0x50]
fld dword [esp + 0x50]
fld qword [0x4fd998]
fmul st(1), st(0)
fxch st(1)
add edx, ebx
sar edx, 0xb
fstp dword [esp + 0x24]
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0xb40
mov edx, ebx
sub edx, eax
mov eax, dword [ecx + edx*4]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x84]
shl eax, 0x10
cdq
fild dword [esp + 0x80]
idiv edi
fstp dword [esp + 0x54]
fmul dword [esp + 0x54]
fstp dword [esp + 0x20]
mov dword [esp + 0x84], eax
fild dword [esp + 0x84]
fld dword [esp + 0x94]
fld st(0)
fdivp st(2)
fxch st(1)
call fcn.004dc850
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x80]
shl eax, 0x10
cdq
idiv dword [esp + 0x3c]
mov dword [esp + 0x84], eax
fidivr dword [esp + 0x84]
call fcn.004dc850
cmp ebx, 0x2d0
mov dword [esp + 0x44], eax
jge 0x49748c
mov eax, dword [esp + 0x2c]
mov ecx, eax
neg ecx
mov dword [esp + 0x84], ecx
fild dword [esp + 0x84]
mov ecx, dword [esp + 0x30]
mov edx, ecx
neg edx
fstp dword [esp + 0x14]
mov dword [esp + 0x84], edx
fld dword [esp + 0x14]
sub ebp, eax
mov eax, dword [esp + 0x28]
fst dword [esp + 0x80]
fild dword [esp + 0x84]
dec ebp
mov dword [esp + 0x64], ebp
sub eax, ecx
fstp dword [esp + 0x10]
dec eax
fld dword [esp + 0x10]
fst dword [esp + 0x84]
fild dword [esp + 0x64]
mov dword [esp + 0x64], eax
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fst dword [esp + 0x1c]
fstp dword [esp + 0x14]
fstp dword [esp + 0x18]
fild dword [esp + 0x64]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fst dword [esp + 0x10]
fstp dword [esp + 0x34]
fstp dword [esp + 0x38]
jmp 0x49764a
cmp ebx, 0x5a0
jge 0x497519
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
sub ebp, eax
dec ebp
mov dword [esp + 0x84], ebp
fild dword [esp + 0x84]
mov edx, ecx
neg edx
mov dword [esp + 0x84], edx
mov edx, dword [esp + 0x28]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
sub edx, ecx
fst dword [esp + 0x80]
dec edx
fild dword [esp + 0x84]
mov dword [esp + 0x64], edx
neg eax
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fst dword [esp + 0x84]
fxch st(1)
fstp dword [esp + 0x1c]
fild dword [esp + 0x64]
mov dword [esp + 0x64], eax
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fst dword [esp + 0x18]
fild dword [esp + 0x64]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
jmp 0x49763a
cmp ebx, 0x870
jge 0x4975b2
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
sub ebp, eax
dec ebp
mov dword [esp + 0x84], ebp
fild dword [esp + 0x84]
sub edx, ecx
dec edx
mov dword [esp + 0x84], edx
fstp dword [esp + 0x14]
neg eax
fld dword [esp + 0x14]
mov dword [esp + 0x64], eax
fst dword [esp + 0x80]
neg ecx
fild dword [esp + 0x84]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fst dword [esp + 0x84]
fild dword [esp + 0x64]
mov dword [esp + 0x64], ecx
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fst dword [esp + 0x1c]
fstp dword [esp + 0x14]
fstp dword [esp + 0x18]
fild dword [esp + 0x64]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fst dword [esp + 0x10]
fstp dword [esp + 0x34]
fstp dword [esp + 0x38]
jmp 0x49764a
cmp ebx, 0xb40
jge 0x497c21
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov ecx, eax
neg ecx
mov dword [esp + 0x84], ecx
fild dword [esp + 0x84]
mov ecx, dword [esp + 0x30]
sub edx, ecx
dec edx
fstp dword [esp + 0x14]
mov dword [esp + 0x84], edx
fld dword [esp + 0x14]
neg ecx
fst dword [esp + 0x80]
mov dword [esp + 0x64], ecx
fild dword [esp + 0x84]
sub ebp, eax
dec ebp
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fst dword [esp + 0x84]
fxch st(1)
fstp dword [esp + 0x1c]
fild dword [esp + 0x64]
mov dword [esp + 0x64], ebp
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fst dword [esp + 0x18]
fild dword [esp + 0x64]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fst dword [esp + 0x14]
fstp dword [esp + 0x38]
fstp dword [esp + 0x10]
fstp dword [esp + 0x34]
fld dword [esp + 0x80]
push ecx
fmul st(2)
fstp dword [esp + 0x84]
fld dword [esp + 0x88]
fmul st(1)
fstp dword [esp + 0x88]
fld dword [esp + 0x20]
fmul st(2)
fstp dword [esp + 0x20]
fld dword [esp + 0x1c]
fmul st(1)
fstp dword [esp + 0x1c]
fld dword [esp + 0x18]
fmulp st(2)
fxch st(1)
fstp dword [esp + 0x18]
fmul dword [esp + 0x14]
fstp dword [esp + 0x14]
fld dword [esp + 0x88]
fmul dword [esp + 0x28]
fld dword [esp + 0x84]
fmul dword [esp + 0x24]
fsubp st(1)
fmul dword [esp + 0x9c]
fstp dword [esp + 0x68]
fld dword [esp + 0x68]
fstp dword [esp]
call fcn.00461890
fld dword [esp + 0x14]
mov edi, eax
fmul dword [esp + 0x28]
mov dword [esp + 0x64], edi
fld dword [esp + 0x18]
fmul dword [esp + 0x24]
fsubp st(1)
fmul dword [esp + 0x9c]
fstp dword [esp + 0x68]
fld dword [esp + 0x68]
fstp dword [esp]
call fcn.00461890
fld dword [esp + 0x1c]
mov ebp, eax
fmul dword [esp + 0x28]
mov dword [esp + 0x68], ebp
fld dword [esp + 0x20]
fmul dword [esp + 0x24]
fsubp st(1)
fmul dword [esp + 0x9c]
fstp dword [esp + 0x6c]
fld dword [esp + 0x6c]
fstp dword [esp]
call fcn.00461890
fld dword [esp + 0x38]
mov ebx, eax
fmul dword [esp + 0x94]
fstp dword [esp + 0x94]
fld dword [esp + 0x94]
fmul dword [esp + 0x28]
fld dword [esp + 0x3c]
fmul dword [esp + 0x90]
fstp dword [esp + 0x94]
fld dword [esp + 0x94]
fmul dword [esp + 0x24]
fsubp st(1)
fmul dword [esp + 0x9c]
fstp dword [esp + 0x94]
fld dword [esp + 0x94]
fstp dword [esp]
call fcn.00461890
mov dword [esp + 0x3c], eax
mov eax, ebx
add esp, 4
sub eax, edi
mov dword [esp + 0x90], eax
je 0x49785e
mov eax, ebx
sub eax, ebp
mov dword [esp + 0x68], eax
je 0x49785e
fld dword [esp + 0x18]
fld dword [esp + 0x20]
fld st(0)
fmulp st(2)
fld dword [esp + 0x1c]
fld dword [esp + 0x24]
fld st(0)
fmulp st(2)
fxch st(3)
faddp st(1)
fld dword [esp + 0x84]
fmul st(2)
fld dword [esp + 0x80]
fmul st(4)
faddp st(1)
fsubr st(1)
fld qword [0x4fd990]
fmul st(1), st(0)
fld dword [esp + 0x94]
fld st(0)
fmulp st(3)
fild dword [esp + 0x90]
fdivp st(3)
fxch st(2)
call fcn.004dc850
mov edi, eax
mov dword [esp + 0x8c], eax
test edi, edi
jge 0x49780c
neg edi
mov dword [esp + 0x8c], edi
fld dword [esp + 0x10]
fmulp st(4)
fld dword [esp + 0x14]
fmulp st(5)
fxch st(3)
faddp st(4)
fxch st(3)
fsub st(1)
fmul st(2)
fmul st(3)
fidiv dword [esp + 0x68]
call fcn.004dc850
mov ebp, eax
mov dword [esp + 0x90], eax
test ebp, ebp
jge 0x497843
neg ebp
mov dword [esp + 0x90], ebp
fmulp st(1)
fmulp st(1)
call fcn.004dc850
mov ecx, eax
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], ecx
jmp 0x4978d7
fld dword [esp + 0x84]
xor ebp, ebp
fld dword [esp + 0x20]
xor edi, edi
fld st(0)
mov dword [esp + 0x90], ebp
fmulp st(2)
mov dword [esp + 0x8c], edi
fld dword [esp + 0x80]
fld dword [esp + 0x24]
fld st(0)
fmulp st(2)
fxch st(3)
faddp st(1)
fld qword [0x4fd990]
fmul st(1), st(0)
fld dword [esp + 0x94]
fld st(0)
fmulp st(3)
fxch st(2)
call fcn.004dc850
fld dword [esp + 0x10]
fmulp st(3)
mov dword [esp + 0x84], eax
fld dword [esp + 0x14]
fmulp st(4)
fxch st(2)
faddp st(3)
fxch st(2)
fmulp st(1)
fmulp st(1)
call fcn.004dc850
mov dword [esp + 0x80], eax
mov ecx, eax
mov eax, dword [0x504210]
sub eax, dword [esp + 0x48]
cmp ebx, eax
jge 0x49791b
mov edx, dword [esp + 0x84]
jmp 0x4978f0
cmp ebx, dword [esp + 0x60]
jge 0x4978fa
sub edx, edi
jmp 0x4978fc
add edx, ebp
cmp ebx, dword [esp + 0x64]
jge 0x497906
add ecx, ebp
jmp 0x497908
sub ecx, edi
inc ebx
cmp ebx, eax
jl 0x4978f0
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], edx
mov eax, dword [0x504214]
sub eax, dword [esp + 0x48]
cmp dword [esp + 0x38], eax
jl 0x49792f
dec eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x7c]
mov ebp, dword [esp + 0x78]
push eax
mov eax, ebp
call fcn.00465970
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
je 0x497c25
mov ecx, dword [0x5042a8]
mov eax, dword [0x5042a4]
push ecx
call fcn.00465970
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x30]
add esp, 4
mov ecx, ebp
call fcn.00465950
add eax, 0x10
cmp ebx, dword [esp + 0x38]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x7c], ebx
jg 0x497c25
fild dword [esp + 0x4c]
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x48]
shl eax, 0x10
fstp dword [esp + 0x78]
mov dword [esp + 0x68], eax
fild dword [esp + 0x3c]
mov eax, dword [esp + 0x30]
lea ebp, [ebx + edx]
shl eax, 0x10
fstp dword [esp + 0x3c]
add ebp, ebp
fld qword [0x4fd988]
add ebp, ebp
fld dword [esp + 0x78]
mov dword [esp + 0x34], eax
fld dword [esp + 0x50]
mov dword [esp + 0x4c], ebp
fld dword [esp + 0x54]
mov esi, dword [esp + 0x84]
mov eax, dword [esp + 0x58]
mov edi, dword [esp + 0x80]
mov ecx, dword [0x50420c]
mov edx, dword [0x504208]
sar esi, 0x10
mov ebx, eax
sub ebx, esi
sar edi, 0x10
cmp ebx, ecx
mov dword [esp + 0x78], esi
jl 0x497a05
mov esi, eax
sub esi, ecx
inc esi
mov dword [esp + 0x78], esi
mov ecx, eax
sub ecx, edi
cmp ecx, edx
jge 0x497a11
mov edi, eax
sub edi, edx
fild dword [esp + 0x78]
fdiv dword [esp + 0x94]
fild dword [esp + 0x7c]
fdiv dword [esp + 0x98]
fld st(3)
fmul st(2)
fld st(3)
fmul st(2)
fsubp st(1)
fmul st(6)
fdiv st(5)
call fcn.004dc850
fmul st(3)
fld st(2)
mov ebx, dword [esp + 0x68]
fmulp st(2)
sub ebx, eax
faddp st(1)
fmul st(4)
fdiv dword [esp + 0x3c]
call fcn.004dc850
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x6c]
mov ecx, dword [ecx + 0x2c]
mov ecx, dword [ecx + ebp]
sub edx, eax
mov eax, dword [esp + 0x58]
sub eax, esi
lea eax, [ecx + eax*2]
add eax, dword [esp + 0x24]
mov dword [esp + 0x78], eax
mov eax, edi
sub eax, esi
inc eax
mov ecx, eax
imul eax, dword [esp + 0x44]
imul ecx, dword [esp + 0x40]
add eax, edx
add ecx, ebx
cmp edi, esi
mov dword [esp + 0x54], eax
jl 0x497b01
sar eax, 0x10
cmp eax, dword [esp + 0x28]
mov dword [esp + 0x50], eax
jge 0x497ab4
mov eax, ecx
sar eax, 0x10
cmp eax, dword [esp + 0x5c]
jge 0x497ab4
cmp dword [esp + 0x50], 0
jl 0x497ab4
test eax, eax
jge 0x497acb
mov eax, dword [esp + 0x54]
sub eax, dword [esp + 0x44]
sub ecx, dword [esp + 0x40]
dec edi
cmp edi, esi
mov dword [esp + 0x54], eax
jge 0x497a91
jmp 0x497b01
cmp esi, edi
jg 0x497b01
mov ebp, dword [esp + 0x28]
mov ecx, edx
sar ecx, 0x10
cmp ecx, ebp
jge 0x497aef
mov eax, ebx
sar eax, 0x10
cmp eax, dword [esp + 0x5c]
jge 0x497aef
test ecx, ecx
jl 0x497aef
test eax, eax
jge 0x497b01
add ebx, dword [esp + 0x40]
add edx, dword [esp + 0x44]
sub dword [esp + 0x78], 2
inc esi
cmp esi, edi
jle 0x497ad3
sub edi, esi
inc edi
test edi, edi
jle 0x497bb7
mov dword [esp + 0x54], edi
mov esi, dword [esp + 0x70]
mov ecx, edx
sar ecx, 0x10
mov ecx, dword [esi + ecx*4]
mov eax, ebx
sar eax, 0x10
add ecx, eax
mov eax, dword [esp + 0x20]
movzx cx, byte [ecx + eax]
movzx eax, cx
test ax, ax
je 0x497b9f
mov ecx, dword [esp + 0x1c]
movzx eax, ax
movzx esi, word [ecx + eax*2]
mov eax, dword [esp + 0x78]
movzx ecx, word [eax]
mov eax, ecx
mov edi, esi
and eax, 0xf800
and edi, 0xf800
add eax, edi
cmp eax, 0xf800
jbe 0x497b63
mov eax, 0xf800
mov edi, ecx
mov ebp, esi
and edi, 0x7e0
and ebp, 0x7e0
add edi, ebp
cmp edi, 0x7e0
jbe 0x497b82
mov edi, 0x7e0
and ecx, 0x1f
and esi, 0x1f
add ecx, esi
cmp ecx, 0x1f
jbe 0x497b94
mov ecx, 0x1f
or eax, edi
or eax, ecx
mov ecx, dword [esp + 0x78]
mov word [ecx], ax
add ebx, dword [esp + 0x40]
add edx, dword [esp + 0x44]
sub dword [esp + 0x78], 2
sub dword [esp + 0x54], 1
jne 0x497b10
mov eax, dword [esp + 0x7c]
cmp eax, dword [esp + 0x60]
jge 0x497bd1
mov edx, dword [esp + 0x8c]
sub dword [esp + 0x84], edx
jmp 0x497bdf
mov ecx, dword [esp + 0x90]
add dword [esp + 0x84], ecx
cmp eax, dword [esp + 0x64]
jge 0x497bf5
mov edx, dword [esp + 0x90]
add dword [esp + 0x80], edx
jmp 0x497c03
mov ecx, dword [esp + 0x8c]
sub dword [esp + 0x80], ecx
mov ebp, dword [esp + 0x4c]
inc eax
add ebp, 4
cmp eax, dword [esp + 0x38]
mov dword [esp + 0x7c], eax
mov dword [esp + 0x4c], ebp
jle 0x4979cc
fstp st(3)
fstp st(0)
fstp st(1)
fstp st(0)
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x64
ret
pop edi
fstp st(1)
pop esi
fstp st(0)
pop ebp
add esp, 0x64
ret