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

Disassembly:
sub esp, 0x268
mov eax, dword [0x500030]
xor eax, esp
mov dword [esp + 0x264], eax
push ebx
fldz
push ebp
fld dword [esp + 0x280]
mov ebp, dword [esp + 0x274]
fcom st(1)
push esi
mov esi, ecx
mov eax, dword [esi]
push edi
mov edi, dword [eax + 4]
imul edi, ebp
add edi, dword [eax + 0x18]
mov eax, dword [0x5042a4]
mov ecx, dword [eax]
mov eax, dword [ecx + 4]
imul eax, dword [0x5042a8]
add eax, dword [ecx + 0x18]
mov ebx, dword [esp + 0x294]
mov dword [esp + 0x64], eax
xor ecx, ecx
fnstsw ax
lea edx, [esp + 0x70]
mov dword [esp + 0x28], esi
mov dword [esp + 0x44], edi
mov dword [esp + 0x50], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x54], edx
test ah, 0x41
jnp 0x49657e
fld dword [esp + 0x28c]
fcom st(2)
fnstsw ax
fstp st(2)
test ah, 0x41
jnp 0x49657e
mov eax, dword [esp + 0x290]
cmp eax, 0x100
jne 0x4959ed
cmp ebx, ecx
jne 0x4959b4
sub esp, 0x10
fxch st(1)
fstp dword [esp + 0xc]
fstp dword [esp + 8]
fld dword [esp + 0x294]
fstp dword [esp + 4]
fld dword [esp + 0x290]
fstp dword [esp]
push ebp
push esi
call fcn.00482dd0
add esp, 0x18
jmp 0x496582
cmp ebx, 0x100
jne 0x4959fd
sub esp, 0x10
fxch st(1)
fstp dword [esp + 0xc]
fstp dword [esp + 8]
fld dword [esp + 0x294]
fstp dword [esp + 4]
fld dword [esp + 0x290]
fstp dword [esp]
push ebp
push esi
call fcn.00492ad0
add esp, 0x18
jmp 0x496582
cmp eax, ecx
jne 0x4959fd
cmp ebx, 0x100
je 0x49657e
mov ecx, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp + 0x48], ecx
fild dword [esp + 0x48]
mov dword [esp + 0x3c], edx
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fld st(0)
fsub st(2)
fabs
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fld dword [0x4fd9d8]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x495a85
fild dword [esp + 0x3c]
fsub st(4)
fabs
fstp dword [esp + 0x20]
fcomp dword [esp + 0x20]
fnstsw ax
test ah, 0x41
jne 0x495a87
mov eax, dword [esp + 0x290]
fstp st(2)
fstp st(0)
push ebx
fstp st(0)
push eax
fld dword [esp + 0x28c]
call fcn.004dc850
fld dword [esp + 0x288]
push eax
call fcn.004dc850
push eax
push ebp
mov ecx, esi
call fcn.00490f60
add esp, 0x14
jmp 0x496582
fstp st(0)
sub ecx, dword [edi + 8]
fld dword [esp + 0x280]
sub edx, dword [edi + 0xc]
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
mov dword [esp + 0x20], edx
fmul st(3)
fdivrp st(2)
fld1
fsub st(2), st(0)
fxch st(1)
fsubrp st(2)
fxch st(1)
fstp dword [esp + 0x280]
fild dword [esp + 0x3c]
fstp dword [esp + 0x1c]
fild dword [esp + 0x20]
fmul st(3)
fdiv dword [esp + 0x1c]
fsubrp st(1)
fsubr dword [esp + 0x284]
fstp dword [esp + 0x284]
fld dword [esp + 0x284]
fild dword [0x504214]
fcomp st(1)
fnstsw ax
test ah, 0x41
jnp 0x49657c
fld st(0)
faddp st(3)
fxch st(2)
fst qword [esp + 0x58]
fld qword [0x4fd830]
fsub st(1), st(0)
fild dword [0x504210]
fcomp st(2)
fnstsw ax
fstp st(1)
test ah, 1
je 0x49659d
fld dword [esp + 0x280]
fild dword [0x50420c]
fcomp st(1)
fnstsw ax
test ah, 0x41
jnp 0x49659b
faddp st(2)
fxch st(1)
fst qword [esp + 0x68]
fsubrp st(1)
fild dword [0x504208]
fcompp
fnstsw ax
test ah, 1
je 0x496580
sub esp, 8
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.004dc850
mov esi, eax
mov dword [esp + 0x14], esi
fild dword [esp + 0x14]
fld dword [esp + 0x284]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x495bce
fild dword [esp + 0x14]
fld st(1)
fsub qword [0x4fd830]
fcompp
fnstsw ax
test ah, 0x41
jne 0x495b98
inc esi
mov dword [esp + 0x14], esi
fisubr dword [esp + 0x14]
sub esp, 8
fmul dword [esp + 0x24]
fdiv dword [esp + 0x294]
fmul qword [0x4fd990]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.004dc850
mov dword [esp + 0x18], eax
jmp 0x495bd8
fstp st(0)
mov dword [esp + 0x18], 0
mov ebp, dword [0x504210]
cmp esi, ebp
jge 0x495c42
mov ecx, ebp
sub ecx, esi
imul ecx, dword [esp + 0x3c]
mov dword [esp + 0x20], ecx
sub esp, 8
fild dword [esp + 0x28]
fdiv dword [esp + 0x294]
fmul qword [0x4fd990]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fstp qword [esp]
call sub.MSVCR90.dll_floor
fnstcw word [esp + 0x18]
mov esi, ebp
movzx eax, word [esp + 0x18]
or eax, 0xc00
mov dword [esp + 0x28], eax
add esp, 8
mov dword [esp + 0x14], esi
fldcw word [esp + 0x20]
fistp qword [esp + 0x20]
mov edx, dword [esp + 0x20]
add dword [esp + 0x18], edx
fldcw word [esp + 0x10]
fld qword [esp + 0x58]
push ecx
fsub qword [0x4fd7e0]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fstp dword [esp]
call fcn.00480680
mov ecx, dword [0x504214]
add esp, 4
cmp eax, ecx
mov dword [esp + 0x58], eax
jl 0x495c75
lea eax, [ecx - 1]
mov dword [esp + 0x58], eax
sub eax, esi
inc eax
test eax, eax
jle 0x496582
fld dword [esp + 0x280]
sub esp, 8
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.004dc850
mov ebp, eax
mov dword [esp + 0x34], ebp
fild dword [esp + 0x34]
fld dword [esp + 0x280]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x495d0f
fild dword [esp + 0x34]
fld st(1)
fsub qword [0x4fd830]
fcompp
fnstsw ax
test ah, 0x41
jne 0x495cd0
inc ebp
mov dword [esp + 0x34], ebp
fisubr dword [esp + 0x34]
sub esp, 8
fmul dword [esp + 0x34]
fdiv dword [esp + 0x290]
fmul qword [0x4fd990]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.004dc850
fld dword [esp + 0x280]
mov esi, eax
mov dword [esp + 0x30], eax
jmp 0x495d15
xor esi, esi
mov dword [esp + 0x30], esi
fild dword [0x504208]
fcompp
fnstsw ax
test ah, 0x41
jne 0x495d89
mov eax, dword [0x504208]
sub eax, ebp
imul eax, dword [esp + 0x48]
mov dword [esp + 0x20], eax
sub esp, 8
fild dword [esp + 0x28]
fdiv dword [esp + 0x290]
fmul qword [0x4fd990]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fstp qword [esp]
call sub.MSVCR90.dll_floor
mov ebp, dword [0x504208]
fnstcw word [esp + 0x18]
movzx eax, word [esp + 0x18]
or eax, 0xc00
mov dword [esp + 0x28], eax
add esp, 8
fldcw word [esp + 0x20]
fistp qword [esp + 0x20]
mov ecx, dword [esp + 0x20]
add esi, ecx
mov dword [esp + 0x30], esi
fldcw word [esp + 0x10]
fld qword [esp + 0x68]
push ecx
fsub qword [0x4fd7e0]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fstp dword [esp]
call fcn.00480680
mov ecx, dword [0x50420c]
add esp, 4
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x495dba
dec ecx
mov dword [esp + 0x2c], ecx
mov edx, dword [esp + 0x48]
shl edx, 0x10
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fdiv dword [esp + 0x288]
call fcn.004dc850
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x3c]
shl eax, 0x10
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fdiv dword [esp + 0x28c]
call fcn.004dc850
mov dword [esp + 0x40], eax
test esi, esi
jge 0x495e13
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x2c]
cmp ebp, ecx
jg 0x495e0f
add esi, eax
inc ebp
test esi, esi
jl 0x495e04
mov dword [esp + 0x30], esi
mov eax, esi
sar eax, 0x10
test eax, eax
je 0x495e2a
and esi, 0xffff
mov dword [esp + 0x4c], eax
mov dword [esp + 0x30], esi
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x58]
test ecx, ecx
jge 0x495e4f
mov eax, dword [esp + 0x14]
cmp eax, edx
jg 0x495e47
add ecx, dword [esp + 0x40]
inc eax
test ecx, ecx
jl 0x495e3a
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
mov eax, ecx
sar eax, 0x10
test eax, eax
je 0x495e66
and ecx, 0xffff
mov dword [esp + 0x50], eax
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x2c]
sub edx, dword [esp + 0x14]
sub ecx, ebp
inc ecx
inc edx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x10], edx
test ecx, ecx
jle 0x496582
test edx, edx
jle 0x496582
mov eax, dword [esp + 0x18]
dec ecx
imul ecx, dword [esp + 0x38]
add ecx, esi
sar ecx, 0x10
add ecx, dword [esp + 0x4c]
add ebp, ebp
cmp ecx, dword [edi]
mov dword [esp + 0x34], ebp
mov dword [esp + 0x18], eax
jl 0x495eaf
dec dword [esp + 0x38]
dec edx
imul edx, dword [esp + 0x40]
add edx, eax
sar edx, 0x10
add edx, dword [esp + 0x50]
cmp edx, dword [edi + 4]
jl 0x495ec7
dec dword [esp + 0x40]
mov ecx, dword [esp + 0x27c]
mov esi, dword [esp + 0x28]
push ecx
mov eax, esi
call fcn.00465970
add esp, 4
mov dword [esp + 0x68], eax
test eax, eax
je 0x496582
mov edx, dword [0x5042a8]
mov eax, dword [0x5042a4]
push edx
call fcn.00465970
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x30]
add esp, 4
mov ecx, esi
call fcn.00465950
mov ecx, dword [esp + 0x290]
add eax, 0x10
cmp ecx, 0x100
jne 0x495f26
mov dword [esp + 0x54], eax
jmp 0x495fda
test ecx, ecx
jne 0x495f43
mov eax, dword [edi + 0x14]
add eax, eax
push eax
push ecx
lea ecx, [esp + 0x78]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
jmp 0x495fda
cmp ecx, 0x80
jne 0x495f7b
mov edx, dword [edi + 0x14]
mov ecx, 1
cmp edx, ecx
jle 0x495fda
jmp 0x495f60
mov si, word [eax + ecx*2]
shr si, 1
mov ebp, 0x7bef
and si, bp
mov word [esp + ecx*2 + 0x70], si
inc ecx
cmp ecx, edx
jl 0x495f60
jmp 0x495fda
mov edx, 1
cmp dword [edi + 0x14], edx
jle 0x495fda
mov esi, ecx
movzx ecx, word [eax + edx*2]
mov ebp, ecx
and ebp, 0x7e0
imul ebp, esi
mov esi, ecx
and esi, 0x1f
imul esi, dword [esp + 0x290]
shr ebp, 8
shr esi, 8
and ebp, 0x7e0
and esi, 0x1f
or ebp, esi
mov esi, dword [esp + 0x290]
and ecx, 0xf800
imul ecx, esi
shr ecx, 8
and ecx, 0xf800
or ebp, ecx
mov word [esp + edx*2 + 0x70], bp
inc edx
cmp edx, dword [edi + 0x14]
jl 0x495f87
test ebx, ebx
jne 0x49609c
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x496582
mov edx, dword [esp + 0x14]
lea ecx, [edx*4]
mov edx, dword [esp + 0x54]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x44], ecx
lea esp, [esp]
mov ecx, dword [esp + 0x3c]
sar eax, 0x10
sub ecx, eax
sub ecx, dword [esp + 0x50]
mov eax, dword [edi + 0x2c]
mov ecx, dword [eax + ecx*4 - 4]
sub ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
add ecx, dword [esp + 0x68]
mov ebp, dword [esp + 0x58]
lea esi, [ecx + eax - 1]
mov ecx, dword [esp + 0x64]
mov eax, dword [ecx + 0x2c]
mov ecx, dword [esp + 0x44]
mov eax, dword [ecx + eax]
add eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
add eax, dword [esp + 0x34]
mov bl, byte [esi]
test bl, bl
je 0x496062
movzx ebx, bl
mov bx, word [edx + ebx*2]
mov word [eax], bx
add ecx, dword [esp + 0x38]
add eax, 2
mov ebx, ecx
sar ebx, 0x10
sub esi, ebx
and ecx, 0xffff
sub ebp, 1
jne 0x496052
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0x40]
add dword [esp + 0x44], 4
sub dword [esp + 0x1c], 1
mov dword [esp + 0x18], eax
jne 0x496010
jmp 0x496582
mov edx, dword [esp + 0x290]
lea eax, [edx + ebx]
cmp eax, 0x100
jg 0x4962f6
cmp ebx, 0x80
jne 0x4961c2
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x496582
mov ecx, dword [esp + 0x14]
lea edx, [ecx*4]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x28], eax
lea edx, [ebx - 0x7f]
nop
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
sar eax, 0x10
sub ecx, eax
sub ecx, dword [esp + 0x50]
mov eax, dword [edi + 0x2c]
mov ecx, dword [eax + ecx*4 - 4]
sub ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
add ecx, dword [esp + 0x68]
mov esi, dword [esp + 0x30]
lea ecx, [ecx + eax - 1]
mov eax, dword [esp + 0x64]
mov dword [esp + 0x10], ecx
mov ecx, dword [eax + 0x2c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + ecx]
add ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x58]
add ecx, dword [esp + 0x34]
mov dword [esp + 0x14], eax
mov edi, edi
mov eax, dword [esp + 0x10]
mov al, byte [eax]
test al, al
je 0x49618a
movzx edx, al
mov eax, dword [esp + 0x54]
movzx edx, word [eax + edx*2]
movzx eax, word [ecx]
shr eax, 1
and eax, 0x7bef
mov edi, eax
mov ebx, edx
and ebx, 0x7e0
and edi, 0x7e0
add edi, ebx
mov ebx, eax
mov ebp, edx
and ebx, 0x1f
and ebp, 0x1f
and edx, 0xf800
add ebx, ebp
and eax, 0xf800
or edi, ebx
add eax, edx
or edi, eax
mov word [ecx], di
mov edi, dword [esp + 0x44]
mov edx, 1
add esi, dword [esp + 0x38]
add ecx, 2
mov eax, esi
sar eax, 0x10
sub dword [esp + 0x10], eax
and esi, 0xffff
sub dword [esp + 0x14], edx
jne 0x496130
mov ecx, dword [esp + 0x40]
add dword [esp + 0x18], ecx
add dword [esp + 0x1c], 4
sub dword [esp + 0x28], edx
jne 0x4960e0
jmp 0x496582
cmp eax, 0x100
jg 0x4962f6
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x496582
mov edx, dword [esp + 0x14]
lea ecx, [edx*4]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], eax
mov edx, 1
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
sar eax, 0x10
sub ecx, eax
sub ecx, dword [esp + 0x50]
mov eax, dword [edi + 0x2c]
mov ecx, dword [eax + ecx*4 - 4]
sub ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
add ecx, dword [esp + 0x68]
mov esi, dword [esp + 0x30]
lea ecx, [ecx + eax - 1]
mov eax, dword [esp + 0x64]
mov dword [esp + 0x10], ecx
mov ecx, dword [eax + 0x2c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + ecx]
add ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x58]
add ecx, dword [esp + 0x34]
mov dword [esp + 0x14], eax
nop
mov eax, dword [esp + 0x10]
mov al, byte [eax]
test al, al
je 0x4962ba
movzx edx, al
mov eax, dword [esp + 0x54]
movzx edx, word [eax + edx*2]
movzx eax, word [ecx]
mov edi, eax
and edi, 0x7e0
imul edi, ebx
shr edi, 8
mov ebp, edx
and ebp, 0x7e0
and edi, 0x7e0
add edi, ebp
mov ebp, eax
and ebp, 0x1f
imul ebp, ebx
shr ebp, 8
mov ebx, edx
and ebx, 0x1f
and ebp, 0x1f
and eax, 0xf800
add ebp, ebx
mov ebx, dword [esp + 0x294]
imul eax, ebx
shr eax, 8
and edx, 0xf800
and eax, 0xf800
or edi, ebp
add eax, edx
or edi, eax
mov word [ecx], di
mov edi, dword [esp + 0x44]
mov edx, 1
add esi, dword [esp + 0x38]
add ecx, 2
mov eax, esi
sar eax, 0x10
sub dword [esp + 0x10], eax
and esi, 0xffff
sub dword [esp + 0x14], edx
jne 0x496240
mov ecx, dword [esp + 0x40]
add dword [esp + 0x18], ecx
add dword [esp + 0x1c], 4
sub dword [esp + 0x28], edx
jne 0x4961f1
jmp 0x496582
mov eax, dword [esp + 0x10]
cmp ebx, 0x80
jne 0x49642d
test eax, eax
jle 0x496582
mov edx, dword [esp + 0x14]
lea ecx, [edx*4]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], eax
lea ecx, [ebx - 0x7f]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x3c]
sar edx, 0x10
sub eax, edx
sub eax, dword [esp + 0x50]
mov edx, dword [edi + 0x2c]
mov eax, dword [edx + eax*4 - 4]
sub eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
add eax, dword [esp + 0x68]
mov ebx, dword [esp + 0x30]
lea eax, [eax + edx - 1]
mov edx, dword [esp + 0x64]
mov dword [esp + 0x10], eax
mov eax, dword [edx + 0x2c]
mov edx, dword [esp + 0x1c]
mov edx, dword [edx + eax]
add edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x58]
add edx, dword [esp + 0x34]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
mov al, byte [eax]
test al, al
je 0x4963f1
movzx ecx, al
mov eax, dword [esp + 0x54]
movzx esi, word [eax + ecx*2]
movzx eax, word [edx]
shr eax, 1
and eax, 0x7bef
mov ecx, eax
mov edi, esi
and ecx, 0xf800
and edi, 0xf800
add ecx, edi
cmp ecx, 0xf800
jbe 0x4963b0
mov ecx, 0xf800
mov edi, eax
mov ebp, esi
and edi, 0x7e0
and ebp, 0x7e0
add edi, ebp
cmp edi, 0x7e0
jbe 0x4963cf
mov edi, 0x7e0
and eax, 0x1f
and esi, 0x1f
add eax, esi
cmp eax, 0x1f
jbe 0x4963e1
mov eax, 0x1f
or ecx, edi
mov edi, dword [esp + 0x44]
or ecx, eax
mov word [edx], cx
mov ecx, 1
add ebx, dword [esp + 0x38]
add edx, 2
mov eax, ebx
sar eax, 0x10
sub dword [esp + 0x10], eax
and ebx, 0xffff
sub dword [esp + 0x14], ecx
jne 0x496372
mov edx, dword [esp + 0x40]
add dword [esp + 0x18], edx
add dword [esp + 0x1c], 4
sub dword [esp + 0x28], ecx
jne 0x496324
jmp 0x496582
test eax, eax
jle 0x496582
mov ecx, dword [esp + 0x14]
lea edx, [ecx*4]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov edx, 1
lea ecx, [ecx]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
sar eax, 0x10
sub ecx, eax
sub ecx, dword [esp + 0x50]
mov eax, dword [edi + 0x2c]
mov ecx, dword [eax + ecx*4 - 4]
sub ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
add ecx, dword [esp + 0x68]
lea ecx, [ecx + eax - 1]
mov eax, dword [esp + 0x64]
mov dword [esp + 0x10], ecx
mov ecx, dword [eax + 0x2c]
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + ecx]
add esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x58]
add esi, dword [esp + 0x34]
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
mov cl, byte [ecx]
test cl, cl
je 0x496540
mov eax, dword [esp + 0x54]
movzx edx, cl
movzx edi, word [eax + edx*2]
movzx ecx, word [esi]
mov eax, ecx
and eax, 0xf800
imul eax, ebx
shr eax, 8
mov edx, edi
and eax, 0xf800
and edx, 0xf800
add eax, edx
cmp eax, 0xf800
jbe 0x4964e6
mov eax, 0xf800
mov edx, ecx
and edx, 0x7e0
imul edx, ebx
shr edx, 8
mov ebp, edi
and edx, 0x7e0
and ebp, 0x7e0
add edx, ebp
cmp edx, 0x7e0
jbe 0x496511
mov edx, 0x7e0
and ecx, 0x1f
imul ecx, ebx
shr ecx, 8
and ecx, 0x1f
and edi, 0x1f
add ecx, edi
cmp ecx, 0x1f
jbe 0x49652c
mov ecx, 0x1f
mov edi, dword [esp + 0x44]
or eax, edx
or eax, ecx
mov word [esi], ax
mov eax, dword [esp + 0x28]
mov edx, 1
add eax, dword [esp + 0x38]
add esi, 2
mov ecx, eax
sar ecx, 0x10
sub dword [esp + 0x10], ecx
and eax, 0xffff
sub dword [esp + 0x14], edx
mov dword [esp + 0x28], eax
jne 0x4964a2
mov eax, dword [esp + 0x40]
add dword [esp + 0x18], eax
add dword [esp + 0x1c], 4
sub dword [esp + 0x20], edx
jne 0x496450
jmp 0x496582
fstp st(0)
fstp st(1)
fstp st(0)
mov ecx, dword [esp + 0x274]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004dc814
add esp, 0x268
ret
fstp st(3)
fstp st(2)
fstp st(0)
jmp 0x496580