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

Disassembly:
sub esp, 0x4c
fldz
push ebx
mov ebx, dword [esp + 0x54]
fld dword [esp + 0x64]
mov eax, dword [ebx]
fcom st(1)
push ebp
mov ebp, dword [eax + 4]
push esi
mov esi, dword [esp + 0x60]
imul ebp, esi
add ebp, dword [eax + 0x18]
mov eax, dword [0x52b3ac]
mov eax, dword [eax]
mov ecx, dword [eax + 4]
imul ecx, dword [0x52b3b0]
add ecx, dword [eax + 0x18]
push edi
xor edi, edi
fnstsw ax
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
test ah, 0x41
jnp 0x41dd37
fld dword [esp + 0x74]
fcom st(2)
fnstsw ax
fstp st(2)
test ah, 0x41
jnp 0x41dd37
mov ecx, dword [ebp]
mov edx, dword [ebp + 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
fld qword [0x4a6dc8]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x41d848
fild dword [esp + 0x1c]
fsub st(4)
fabs
fcompp
fnstsw ax
test ah, 5
jp 0x41d84a
fstp st(2)
fstp st(0)
fstp st(0)
fld dword [esp + 0x6c]
call fcn.00499690
fld dword [esp + 0x68]
mov edi, eax
call fcn.00499690
mov edx, eax
push esi
push ebx
mov eax, edi
call fcn.0041c940
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
fstp st(0)
fild dword [ebp + 8]
fmul st(2)
fdivrp st(1)
fsubr dword [esp + 0x68]
fstp dword [esp + 0x68]
fild dword [esp + 0x1c]
fstp dword [esp + 0x20]
fld dword [esp + 0x6c]
fild dword [ebp + 0xc]
fmul st(3)
fdiv dword [esp + 0x20]
fsubp st(1)
fstp dword [esp + 0x6c]
fld dword [esp + 0x6c]
fild dword [0x52be08]
fcomp st(1)
fnstsw ax
test ah, 5
jnp 0x41dd35
fld st(0)
faddp st(3)
fxch st(2)
fst qword [esp + 0x40]
fld qword [0x4a6ba0]
fsub st(1), st(0)
fild dword [0x52be04]
fcomp st(2)
fnstsw ax
fstp st(1)
test ah, 1
je 0x41dd45
fld dword [esp + 0x68]
fild dword [0x52be18]
fcomp st(1)
fnstsw ax
test ah, 5
jnp 0x41dd43
faddp st(2)
fxch st(1)
fst qword [esp + 0x30]
fsubrp st(1)
fild dword [0x52be3c]
fcompp
fnstsw ax
test ah, 1
je 0x41dd49
sub esp, 8
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.00499690
mov ebx, eax
mov dword [esp + 0x14], ebx
fild dword [esp + 0x14]
fld dword [esp + 0x6c]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x41d95d
fild dword [esp + 0x14]
fld st(1)
fsub qword [0x4a6ba0]
fcompp
fnstsw ax
test ah, 0x41
jne 0x41d92c
inc ebx
mov dword [esp + 0x14], ebx
fisubr dword [esp + 0x14]
sub esp, 8
fmul dword [esp + 0x28]
fdiv dword [esp + 0x7c]
fmul qword [0x4a6da0]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.00499690
mov edi, eax
jmp 0x41d95f
fstp st(0)
mov esi, dword [0x52be04]
cmp ebx, esi
jge 0x41d9c4
mov eax, esi
sub eax, ebx
imul eax, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
sub esp, 8
fild dword [esp + 0x28]
fdiv dword [esp + 0x7c]
fmul qword [0x4a6da0]
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], esi
mov ebx, esi
fldcw word [esp + 0x20]
fistp qword [esp + 0x50]
mov ecx, dword [esp + 0x50]
add edi, ecx
fldcw word [esp + 0x10]
fld qword [esp + 0x40]
push ecx
fsub qword [0x4a6bd0]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fstp dword [esp]
call fcn.0041c740
mov ecx, dword [0x52be08]
add esp, 4
cmp eax, ecx
mov dword [esp + 0x20], eax
jle 0x41d9f6
mov dword [esp + 0x20], ecx
mov eax, ecx
sub eax, ebx
inc eax
test eax, eax
jle 0x41dd4b
fld dword [esp + 0x68]
sub esp, 8
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.00499690
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 0x41da81
fild dword [esp + 0x10]
fld st(1)
fsub qword [0x4a6ba0]
fcompp
fnstsw ax
test ah, 0x41
jne 0x41da48
inc dword [esp + 0x10]
fisubr dword [esp + 0x10]
sub esp, 8
fmul dword [esp + 0x20]
fdiv dword [esp + 0x78]
fmul qword [0x4a6da0]
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.00499690
fld dword [esp + 0x68]
mov esi, eax
mov dword [esp + 0x18], eax
jmp 0x41da87
xor esi, esi
mov dword [esp + 0x18], esi
fild dword [0x52be3c]
fcompp
fnstsw ax
test ah, 0x41
jne 0x41dafb
mov ebx, dword [0x52be3c]
mov edx, ebx
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 [0x4a6da0]
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 esi, eax
mov dword [esp + 0x18], esi
fldcw word [esp + 0x10]
mov dword [esp + 0x10], ebx
fld qword [esp + 0x30]
push ecx
fsub qword [0x4a6bd0]
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp dword [esp]
call fcn.0041c740
mov ebx, eax
mov eax, dword [0x52be18]
add esp, 4
cmp ebx, eax
jle 0x41db26
mov ebx, eax
mov eax, dword [esp + 0x24]
shl eax, 0x10
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
fdiv dword [esp + 0x70]
call fcn.00499690
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.00499690
mov dword [esp + 0x1c], eax
test esi, esi
jge 0x41db78
cmp dword [esp + 0x10], ebx
jg 0x41db74
add esi, dword [esp + 0x70]
inc dword [esp + 0x10]
test esi, esi
jl 0x41db62
mov dword [esp + 0x18], esi
mov ecx, esi
sar ecx, 0x10
test ecx, ecx
je 0x41db8f
and esi, 0xffff
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], esi
test edi, edi
jge 0x41dba9
mov ecx, dword [esp + 0x20]
cmp dword [esp + 0x14], ecx
jg 0x41dbad
inc dword [esp + 0x14]
add edi, eax
test edi, edi
jl 0x41db93
jmp 0x41dbad
mov ecx, dword [esp + 0x20]
mov edx, edi
sar edx, 0x10
test edx, edx
je 0x41dbc0
mov dword [esp + 0x28], edx
and edi, 0xffff
sub ebx, dword [esp + 0x10]
sub ecx, dword [esp + 0x14]
inc ebx
inc ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x30], ecx
test ebx, ebx
jle 0x41dd4b
test ecx, ecx
jle 0x41dd4b
shl dword [esp + 0x10], 1
lea edx, [ebx - 1]
imul edx, dword [esp + 0x70]
add edx, esi
sar edx, 0x10
add edx, dword [esp + 0x2c]
cmp edx, dword [ebp]
jl 0x41dc00
dec dword [esp + 0x70]
dec ecx
imul ecx, eax
add ecx, edi
sar ecx, 0x10
add ecx, dword [esp + 0x28]
cmp ecx, dword [ebp + 4]
jl 0x41dc17
dec eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x64]
push eax
mov eax, dword [esp + 0x64]
call fcn.00417890
add esp, 4
mov dword [esp + 0x40], eax
test eax, eax
je 0x41dd4b
mov ecx, dword [0x52b3b0]
mov eax, dword [0x52b3ac]
push ecx
call fcn.00417890
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x64]
mov ecx, dword [eax + 0x14]
add esp, 4
test ecx, ecx
jne 0x41dc69
mov edx, dword [ebp + 0x30]
push edx
call fcn.004177d0
add esp, 4
mov dword [esp + 0x64], eax
jmp 0x41dc78
mov ebx, ecx
mov dword [esp + 0x64], ecx
call fcn.00413ac0
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x30]
test eax, eax
jle 0x41dd4b
mov ecx, dword [esp + 0x14]
lea edx, [ecx*4]
mov dword [esp + 0x60], edx
mov dword [esp + 0x20], eax
jmp 0x41dcac
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x3c]
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov ecx, edi
sar ecx, 0x10
add ecx, eax
cmp ecx, dword [ebp + 4]
jl 0x41dcc2
sub edi, 0x10000
mov edx, edi
sar edx, 0x10
add edx, eax
mov eax, dword [ebp + 0x2c]
mov ecx, dword [eax + edx*4]
mov edx, dword [esp + 0x4c]
mov eax, dword [edx + 0x2c]
mov edx, dword [esp + 0x60]
mov eax, dword [edx + eax]
add ecx, dword [esp + 0x40]
add eax, dword [esp + 0x50]
add ecx, dword [esp + 0x2c]
add eax, dword [esp + 0x10]
mov edx, esi
mov esi, ebx
movzx ebx, byte [ecx]
mov ebp, dword [esp + 0x64]
mov bx, word [ebp + ebx*2 + 0x5c]
add edx, dword [esp + 0x70]
mov word [eax], bx
mov ebx, edx
sar ebx, 0x10
add eax, 2
add ecx, ebx
and edx, 0xffff
sub esi, 1
jne 0x41dcf1
add edi, dword [esp + 0x1c]
add dword [esp + 0x60], 4
sub dword [esp + 0x20], 1
jne 0x41dca0
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