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

Disassembly:
sub esp, 0x54
push ebx
fldz
mov ebx, dword [esp + 0x60]
fld dword [esp + 0x6c]
push ebp
fcom st(1)
mov ebp, dword [esp + 0x60]
mov eax, dword [ebp]
push esi
mov esi, dword [eax + 4]
imul esi, ebx
add esi, dword [eax + 0x18]
mov eax, dword [0x5042a4]
mov eax, dword [eax]
mov ecx, dword [eax + 4]
imul ecx, dword [0x5042a8]
add ecx, dword [eax + 0x18]
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
push edi
fnstsw ax
mov dword [esp + 0x5c], esi
mov dword [esp + 0x3c], ecx
test ah, 0x41
jnp 0x492425
fld dword [esp + 0x7c]
fcom st(2)
fnstsw ax
fstp st(2)
test ah, 0x41
jnp 0x492425
mov ecx, dword [esi]
mov edi, dword [esi + 4]
mov dword [esp + 0x2c], ecx
fild dword [esp + 0x2c]
mov dword [esp + 0x20], edi
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fld st(0)
fsub st(2)
fabs
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fld dword [0x4fd9d8]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x491ec5
fild dword [esp + 0x20]
fsub st(4)
fabs
fstp dword [esp + 0x28]
fcomp dword [esp + 0x28]
fnstsw ax
test ah, 0x41
jne 0x491ec7
fstp st(2)
fstp st(0)
fstp st(0)
fld dword [esp + 0x74]
call fcn.004dc850
fld dword [esp + 0x70]
mov esi, eax
call fcn.004dc850
push eax
push ebx
push ebp
mov eax, esi
call fcn.0048f0b0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
fstp st(0)
sub ecx, dword [esi + 8]
fld dword [esp + 0x70]
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
fmul st(3)
fdivrp st(2)
fxch st(1)
fsub qword [0x4fd7e0]
fsubp st(1)
fstp dword [esp + 0x70]
fild dword [esp + 0x20]
fstp dword [esp + 0x28]
fld dword [esp + 0x74]
fild dword [esi + 0xc]
fmul st(3)
fdiv dword [esp + 0x28]
fsubp st(1)
fstp dword [esp + 0x74]
fld dword [esp + 0x74]
fild dword [0x504214]
fcomp st(1)
fnstsw ax
test ah, 0x41
jnp 0x492423
fld st(0)
faddp st(3)
fxch st(2)
fst qword [esp + 0x48]
fld qword [0x4fd830]
fsub st(1), st(0)
fild dword [0x504210]
fcomp st(2)
fnstsw ax
fstp st(1)
test ah, 1
je 0x492433
fld dword [esp + 0x70]
fild dword [0x50420c]
fcomp st(1)
fnstsw ax
test ah, 0x41
jnp 0x492431
faddp st(2)
fxch st(1)
fst qword [esp + 0x40]
fsubrp st(1)
fild dword [0x504208]
fcompp
fnstsw ax
test ah, 1
je 0x492437
sub esp, 8
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.004dc850
mov ebx, eax
mov dword [esp + 0x18], ebx
fild dword [esp + 0x18]
fld dword [esp + 0x74]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x491ff1
fild dword [esp + 0x18]
fld st(1)
fsub qword [0x4fd830]
fcompp
fnstsw ax
test ah, 0x41
jne 0x491fbb
inc ebx
mov dword [esp + 0x18], ebx
fisubr dword [esp + 0x18]
sub esp, 8
fmul dword [esp + 0x30]
fdiv dword [esp + 0x84]
fmul qword [0x4fd990]
fstp dword [esp + 0x30]
fld dword [esp + 0x30]
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.004dc850
mov dword [esp + 0x24], eax
jmp 0x491ffb
fstp st(0)
mov dword [esp + 0x24], 0
mov ebp, dword [0x504210]
cmp ebx, ebp
jge 0x492063
mov ecx, ebp
sub ecx, ebx
imul ecx, edi
mov dword [esp + 0x28], ecx
sub esp, 8
fild dword [esp + 0x30]
fdiv dword [esp + 0x84]
fmul qword [0x4fd990]
fstp dword [esp + 0x30]
fld dword [esp + 0x30]
fstp qword [esp]
call sub.MSVCR90.dll_floor
fnstcw word [esp + 0x1c]
add esp, 8
movzx eax, word [esp + 0x14]
or eax, 0xc00
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], ebp
mov ebx, ebp
fldcw word [esp + 0x28]
fistp qword [esp + 0x50]
mov edx, dword [esp + 0x50]
add dword [esp + 0x24], edx
fldcw word [esp + 0x14]
fld qword [esp + 0x48]
push ecx
fsub qword [0x4fd7e0]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fstp dword [esp]
call fcn.00480680
mov ecx, dword [0x504214]
add esp, 4
cmp eax, ecx
mov dword [esp + 0x28], eax
jl 0x492096
dec ecx
mov dword [esp + 0x28], ecx
mov eax, ecx
sub eax, ebx
inc eax
test eax, eax
jle 0x492439
fld dword [esp + 0x70]
sub esp, 8
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.004dc850
mov ebp, eax
mov dword [esp + 0x14], ebp
fild dword [esp + 0x14]
fld dword [esp + 0x70]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x492127
fild dword [esp + 0x14]
fld st(1)
fsub qword [0x4fd830]
fcompp
fnstsw ax
test ah, 0x41
jne 0x4920eb
inc ebp
mov dword [esp + 0x14], ebp
fisubr dword [esp + 0x14]
sub esp, 8
fmul dword [esp + 0x24]
fdiv dword [esp + 0x80]
fmul qword [0x4fd990]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.004dc850
fld dword [esp + 0x70]
mov edi, eax
mov dword [esp + 0x1c], eax
jmp 0x49212d
xor edi, edi
mov dword [esp + 0x1c], edi
fild dword [0x504208]
fcompp
fnstsw ax
test ah, 0x41
jne 0x4921a0
mov ebx, dword [0x504208]
mov eax, ebx
sub eax, ebp
imul eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
sub esp, 8
fild dword [esp + 0x24]
fdiv dword [esp + 0x80]
fmul qword [0x4fd990]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fstp qword [esp]
call sub.MSVCR90.dll_floor
fnstcw word [esp + 0x1c]
add esp, 8
movzx eax, word [esp + 0x14]
or eax, 0xc00
mov dword [esp + 0x1c], eax
mov ebp, ebx
fldcw word [esp + 0x1c]
fistp qword [esp + 0x50]
mov ecx, dword [esp + 0x50]
add edi, ecx
mov dword [esp + 0x1c], edi
fldcw word [esp + 0x14]
fld qword [esp + 0x40]
push ecx
fsub qword [0x4fd7e0]
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fstp dword [esp]
call fcn.00480680
mov ebx, eax
mov eax, dword [0x50420c]
add esp, 4
cmp ebx, eax
jl 0x4921cc
lea ebx, [eax - 1]
mov edx, dword [esp + 0x2c]
shl edx, 0x10
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fdiv dword [esp + 0x78]
call fcn.004dc850
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x20]
shl eax, 0x10
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fdiv dword [esp + 0x7c]
call fcn.004dc850
mov dword [esp + 0x20], eax
test edi, edi
jge 0x492219
cmp ebp, ebx
jg 0x492215
add edi, dword [esp + 0x78]
inc ebp
test edi, edi
jl 0x492208
mov dword [esp + 0x1c], edi
mov eax, edi
sar eax, 0x10
test eax, eax
je 0x492230
and edi, 0xffff
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], edi
mov ecx, dword [esp + 0x24]
test ecx, ecx
jge 0x492250
mov edx, dword [esp + 0x28]
cmp dword [esp + 0x18], edx
jg 0x492254
add ecx, dword [esp + 0x20]
inc dword [esp + 0x18]
test ecx, ecx
jl 0x492238
jmp 0x492254
mov edx, dword [esp + 0x28]
mov eax, ecx
sar eax, 0x10
test eax, eax
je 0x492267
mov dword [esp + 0x30], eax
and ecx, 0xffff
sub edx, dword [esp + 0x18]
sub ebx, ebp
inc ebx
mov eax, ebx
inc edx
mov dword [esp + 0x48], eax
mov ebx, edx
test eax, eax
jle 0x492439
test ebx, ebx
jle 0x492439
dec eax
imul eax, dword [esp + 0x78]
add eax, edi
sar eax, 0x10
add eax, dword [esp + 0x34]
add ebp, ebp
cmp eax, dword [esi]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x28], ecx
jl 0x4922a8
dec dword [esp + 0x78]
lea eax, [ebx - 1]
imul eax, dword [esp + 0x20]
add eax, ecx
sar eax, 0x10
add eax, dword [esp + 0x30]
cmp eax, dword [esi + 4]
jl 0x4922c2
dec dword [esp + 0x20]
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0x68]
push ecx
call fcn.00465970
add esp, 4
mov dword [esp + 0x38], eax
test eax, eax
je 0x492439
mov edx, dword [0x5042a8]
mov eax, dword [0x5042a4]
push edx
call fcn.00465970
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0x30]
add esp, 4
call fcn.00465950
add eax, 0x10
mov dword [esp + 0x50], eax
test ebx, ebx
jle 0x492439
mov eax, dword [esp + 0x18]
lea ecx, [eax*4]
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x18], ebx
mov edx, dword [esp + 0x28]
mov eax, dword [esi + 0x2c]
sar edx, 0x10
add edx, dword [esp + 0x30]
mov ecx, dword [eax + edx*4]
sub ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
add ecx, dword [esp + 0x38]
lea eax, [ecx + edx - 1]
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx + 0x2c]
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x6c]
mov edx, dword [eax + edx]
add edx, dword [esp + 0x40]
mov eax, edi
add edx, ebp
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x68]
mov cl, byte [ecx]
test cl, cl
je 0x4923e3
mov esi, dword [esp + 0x50]
movzx ecx, cl
movzx edi, word [esi + ecx*2]
movzx esi, word [edx]
mov ecx, esi
mov ebx, edi
and ecx, 0xf800
and ebx, 0xf800
add ecx, ebx
cmp ecx, 0xf800
jbe 0x49239f
mov ecx, 0xf800
mov ebx, esi
mov ebp, edi
and ebx, 0x7e0
and ebp, 0x7e0
add ebx, ebp
cmp ebx, 0x7e0
jbe 0x4923be
mov ebx, 0x7e0
and esi, 0x1f
and edi, 0x1f
add esi, edi
cmp esi, 0x1f
jbe 0x4923d0
mov esi, 0x1f
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
or ecx, ebx
or ecx, esi
mov esi, dword [esp + 0x5c]
mov word [edx], cx
add eax, dword [esp + 0x78]
add edx, 2
mov ecx, eax
sar ecx, 0x10
sub dword [esp + 0x68], ecx
and eax, 0xffff
sub dword [esp + 0x24], 1
jne 0x492368
mov edx, dword [esp + 0x20]
add dword [esp + 0x28], edx
add dword [esp + 0x6c], 4
sub dword [esp + 0x18], 1
jne 0x492325
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
fstp st(0)
fstp st(1)
fstp st(0)
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
fstp st(3)
fstp st(2)
fstp st(0)
fstp st(0)
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret