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

Disassembly:
sub esp, 0x4c
push ebx
fldz
mov ebx, dword [esp + 0x54]
fld dword [esp + 0x64]
mov eax, dword [ebx]
fcom st(1)
push ebp
push esi
mov esi, dword [eax + 4]
push edi
mov edi, dword [esp + 0x64]
imul esi, edi
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 ebp, ebp
fnstsw ax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
test ah, 0x41
jnp 0x4827be
fld dword [esp + 0x74]
fcom st(2)
fnstsw ax
fstp st(2)
test ah, 0x41
jnp 0x4827be
mov ecx, dword [esi]
mov edx, dword [esi + 4]
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
mov dword [esp + 0x1c], edx
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
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 0x4822c4
fild dword [esp + 0x1c]
fsub st(4)
fabs
fstp dword [esp + 0x20]
fcomp dword [esp + 0x20]
fnstsw ax
test ah, 0x41
jne 0x4822c6
fstp st(2)
fstp st(0)
fstp st(0)
fld dword [esp + 0x6c]
call fcn.004dc850
fld dword [esp + 0x68]
mov esi, eax
call fcn.004dc850
push eax
push edi
push ebx
mov eax, esi
call fcn.00480da0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
fstp st(0)
sub ecx, dword [esi + 8]
fld dword [esp + 0x68]
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
fmul st(3)
fdivrp st(2)
fxch st(1)
fsub qword [0x4fd7e0]
fsubp st(1)
fstp dword [esp + 0x68]
fild dword [esp + 0x1c]
fstp dword [esp + 0x20]
fld dword [esp + 0x6c]
fild dword [esi + 0xc]
fmul st(3)
fdiv dword [esp + 0x20]
fsubp st(1)
fstp dword [esp + 0x6c]
fld dword [esp + 0x6c]
fild dword [0x504214]
fcomp st(1)
fnstsw ax
test ah, 0x41
jnp 0x4827bc
fld st(0)
faddp st(3)
fxch st(2)
fst qword [esp + 0x40]
fld qword [0x4fd830]
fsub st(1), st(0)
fild dword [0x504210]
fcomp st(2)
fnstsw ax
fstp st(1)
test ah, 1
je 0x4827cc
fld dword [esp + 0x68]
fild dword [0x50420c]
fcomp st(1)
fnstsw ax
test ah, 0x41
jnp 0x4827ca
faddp st(2)
fxch st(1)
fst qword [esp + 0x30]
fsubrp st(1)
fild dword [0x504208]
fcompp
fnstsw ax
test ah, 1
je 0x4827d0
sub esp, 8
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.004dc850
mov edi, eax
mov dword [esp + 0x14], edi
fild dword [esp + 0x14]
fld dword [esp + 0x6c]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x4823eb
fild dword [esp + 0x14]
fld st(1)
fsub qword [0x4fd830]
fcompp
fnstsw ax
test ah, 0x41
jne 0x4823ba
inc edi
mov dword [esp + 0x14], edi
fisubr dword [esp + 0x14]
sub esp, 8
fmul dword [esp + 0x28]
fdiv dword [esp + 0x7c]
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 ebp, eax
jmp 0x4823ed
fstp st(0)
mov ebx, dword [0x504210]
cmp edi, ebx
jge 0x482452
mov eax, ebx
sub eax, edi
imul eax, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
sub esp, 8
fild dword [esp + 0x28]
fdiv dword [esp + 0x7c]
fmul qword [0x4fd990]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fstp qword [esp]
call sub.MSVCR90.dll_floor
fnstcw word [esp + 0x18]
add esp, 8
movzx eax, word [esp + 0x10]
or eax, 0xc00
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], ebx
mov edi, ebx
fldcw word [esp + 0x20]
fistp qword [esp + 0x50]
mov ecx, dword [esp + 0x50]
add ebp, ecx
fldcw word [esp + 0x10]
fld qword [esp + 0x40]
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 + 0x20], eax
jl 0x482485
dec ecx
mov dword [esp + 0x20], ecx
mov eax, ecx
sub eax, edi
inc eax
test eax, eax
jle 0x4827d2
fld dword [esp + 0x68]
sub esp, 8
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.004dc850
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fld dword [esp + 0x68]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x482510
fild dword [esp + 0x10]
fld st(1)
fsub qword [0x4fd830]
fcompp
fnstsw ax
test ah, 0x41
jne 0x4824d7
inc dword [esp + 0x10]
fisubr dword [esp + 0x10]
sub esp, 8
fmul dword [esp + 0x20]
fdiv dword [esp + 0x78]
fmul qword [0x4fd990]
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.004dc850
fld dword [esp + 0x68]
mov ebx, eax
mov dword [esp + 0x18], ebx
jmp 0x48251c
mov dword [esp + 0x18], 0
mov ebx, dword [esp + 0x18]
fild dword [0x504208]
fcompp
fnstsw ax
test ah, 0x41
jne 0x482590
mov edi, dword [0x504208]
mov edx, edi
sub edx, dword [esp + 0x10]
sub esp, 8
imul edx, dword [esp + 0x2c]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fdiv dword [esp + 0x78]
fmul qword [0x4fd990]
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fstp qword [esp]
call sub.MSVCR90.dll_floor
fnstcw word [esp + 0x18]
add esp, 8
movzx eax, word [esp + 0x10]
or eax, 0xc00
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
fistp qword [esp + 0x50]
mov eax, dword [esp + 0x50]
add ebx, eax
mov dword [esp + 0x18], ebx
fldcw word [esp + 0x10]
mov dword [esp + 0x10], edi
fld qword [esp + 0x30]
push ecx
fsub qword [0x4fd7e0]
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp dword [esp]
call fcn.00480680
mov edi, eax
mov eax, dword [0x50420c]
add esp, 4
cmp edi, eax
jl 0x4825bc
lea edi, [eax - 1]
mov ecx, dword [esp + 0x24]
shl ecx, 0x10
mov dword [esp + 0x30], ecx
fild dword [esp + 0x30]
fdiv dword [esp + 0x70]
call fcn.004dc850
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x1c]
shl eax, 0x10
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
fdiv dword [esp + 0x74]
call fcn.004dc850
mov dword [esp + 0x1c], eax
test ebx, ebx
jge 0x48260e
cmp dword [esp + 0x10], edi
jg 0x48260a
add ebx, dword [esp + 0x70]
inc dword [esp + 0x10]
test ebx, ebx
jl 0x4825f8
mov dword [esp + 0x18], ebx
mov ecx, ebx
sar ecx, 0x10
test ecx, ecx
je 0x482625
and ebx, 0xffff
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], ebx
test ebp, ebp
jge 0x482646
lea esp, [esp]
mov ecx, dword [esp + 0x20]
cmp dword [esp + 0x14], ecx
jg 0x48264a
inc dword [esp + 0x14]
add ebp, eax
test ebp, ebp
jl 0x482630
jmp 0x48264a
mov ecx, dword [esp + 0x20]
mov edx, ebp
sar edx, 0x10
test edx, edx
je 0x48265d
mov dword [esp + 0x28], edx
and ebp, 0xffff
sub edi, dword [esp + 0x10]
sub ecx, dword [esp + 0x14]
inc edi
inc ecx
mov dword [esp + 0x20], edi
mov dword [esp + 0x30], ecx
test edi, edi
jle 0x4827d2
test ecx, ecx
jle 0x4827d2
shl dword [esp + 0x10], 1
lea edx, [edi - 1]
imul edx, dword [esp + 0x70]
add edx, ebx
sar edx, 0x10
add edx, dword [esp + 0x2c]
cmp edx, dword [esi]
jl 0x48269c
dec dword [esp + 0x70]
dec ecx
imul ecx, eax
add ecx, ebp
sar ecx, 0x10
add ecx, dword [esp + 0x28]
cmp ecx, dword [esi + 4]
jl 0x4826b3
dec eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x64]
push eax
mov eax, dword [esp + 0x64]
call fcn.00465970
add esp, 4
mov dword [esp + 0x40], eax
test eax, eax
je 0x4827d2
mov ecx, dword [0x5042a8]
mov eax, dword [0x5042a4]
push ecx
call fcn.00465970
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x54], eax
mov eax, dword [esi + 0x30]
add esp, 4
call fcn.00465950
mov ecx, dword [esp + 0x30]
add eax, 0x10
test ecx, ecx
jle 0x4827d2
mov edx, dword [esp + 0x14]
add edx, edx
add edx, edx
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], ecx
jmp 0x48272c
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
mov edx, ebp
sar edx, 0x10
add edx, ecx
cmp edx, dword [esi + 4]
jl 0x482742
sub ebp, 0x10000
mov edx, ebp
sar edx, 0x10
add edx, ecx
mov ecx, dword [esi + 0x2c]
mov edx, dword [ecx + edx*4]
sub edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
add edx, dword [esp + 0x40]
lea esi, [edx + ecx - 1]
mov edx, dword [esp + 0x4c]
mov ecx, dword [edx + 0x2c]
mov edx, dword [esp + 0x60]
mov ecx, dword [edx + ecx]
add ecx, dword [esp + 0x50]
mov edx, ebx
add ecx, dword [esp + 0x10]
mov bl, byte [esi]
test bl, bl
je 0x482787
movzx ebx, bl
mov bx, word [eax + ebx*2]
mov word [ecx], bx
add edx, dword [esp + 0x70]
add ecx, 2
mov ebx, edx
sar ebx, 0x10
sub esi, ebx
and edx, 0xffff
sub edi, 1
jne 0x482777
add ebp, dword [esp + 0x1c]
add dword [esp + 0x60], 4
sub dword [esp + 0x64], 1
jne 0x482720
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
fstp st(0)
fstp st(1)
fstp st(0)
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
fstp st(3)
fstp st(2)
fstp st(0)
fstp st(0)
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret