Function at 0x9c2af0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov edi, dword [ebp + 8]
cmp dword [ebp + 0x14], 9
jg 0x9c2d18
mov eax, dword [ebp + 0x14]
test eax, eax
jle 0x9c2c53
mov eax, dword [ebp + 0x14]
shl eax, 2
mov dword [ebp - 0x4c], eax
mov eax, dword [edi]
mov edx, dword [ebp - 0x4c]
mov esi, dword [eax + edx]
test esi, esi
je 0x9c2c5b
movzx ecx, byte [ebp + 0x14]
mov dword [ebp - 0x40], 1
shl dword [ebp - 0x40], cl
mov ecx, dword [ebp + 0x14]
mov eax, edi
mov edx, dword [ebp + 0xc]
call fcn.009c29b0
mov ecx, dword [ebp + 0x14]
mov eax, edi
mov edx, dword [ebp + 0x10]
call fcn.009c29b0
mov esi, dword [ebp - 0x4c]
mov eax, dword [edi + 4]
cmp dword [ebp - 0x40], 1
mov eax, dword [esi + eax]
mov dword [ebp - 0x48], eax
mov eax, dword [edi]
mov eax, dword [esi + eax]
mov dword [ebp - 0x44], eax
jle 0x9c2c53
mov edi, dword [ebp - 0x40]
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x20], edi
mov eax, dword [ebp - 0x3c]
xor edx, edx
sar dword [ebp - 0x20], 1
add eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
lea esi, [esi]
mov ecx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x3c]
add ecx, edx
test ebx, ebx
mov dword [ebp - 0x24], ecx
jle 0x9c2c4f
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x6c], 0
shl eax, 3
lea ecx, [eax + esi]
add ebx, eax
lea eax, [edx*8]
mov edx, dword [ebp + 0xc]
add edx, eax
add eax, esi
xor esi, esi
nop
lea esi, [esi]
mov edi, dword [ebp - 0x44]
fld qword [ebx]
add dword [ebp - 0x6c], 1
fld dword [edi + esi*4]
mov edi, dword [ebp - 0x48]
fld qword [ecx]
fld dword [edi + esi*4]
fld st(3)
mov edi, dword [ebp - 0x3c]
fmul st(3)
add esi, dword [ebp - 0x20]
fld st(2)
fmul st(2)
fsubp st(1)
fxch st(4)
fmulp st(1)
fxch st(2)
fmulp st(1)
faddp st(1)
fld qword [edx]
fsub st(2)
fstp qword [ebx]
fxch st(1)
add ebx, 8
fadd qword [edx]
fstp qword [edx]
add edx, 8
fld qword [eax]
fsub st(1)
fstp qword [ecx]
add ecx, 8
fadd qword [eax]
fstp qword [eax]
add eax, 8
cmp dword [ebp - 0x6c], edi
jne 0x9c2bd0
mov edx, edi
add edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
add dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x28]
cmp dword [ebp - 0x40], eax
jg 0x9c2b90
mov edx, dword [ebp - 0x28]
cmp dword [ebp - 0x40], edx
jle 0x9c2c53
mov dword [ebp - 0x3c], edx
jmp 0x9c2b7d
mov edx, ecx
jmp 0x9c2c2a
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edi + 4]
mov esi, dword [ebp + 0x14]
movzx ecx, byte [ebp + 0x14]
mov dword [ebp - 0x40], 1
shl dword [ebp - 0x40], cl
mov eax, dword [eax + esi*4]
test eax, eax
je 0x9c2c7e
mov dword [esp], eax
call sub.msvcrt.dll_free
mov ebx, dword [ebp - 0x40]
mov esi, dword [ebp - 0x4c]
add esi, dword [edi]
shr ebx, 0x1f
add ebx, dword [ebp - 0x40]
sar ebx, 1
shl ebx, 2
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
mov dword [esi], eax
mov esi, dword [ebp - 0x4c]
add esi, dword [edi + 4]
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
mov dword [esi], eax
mov eax, dword [ebp - 0x40]
sar eax, 1
test eax, eax
mov dword [ebp - 0x50], eax
jle 0x9c2b38
mov edx, dword [ebp + 0x14]
xor ebx, ebx
mov eax, dword [edi]
fild dword [ebp - 0x40]
fstp qword [ebp - 0x38]
mov eax, dword [eax + edx*4]
mov dword [ebp - 0x30], eax
mov eax, dword [edi + 4]
mov esi, dword [eax + edx*4]
push ebx
fild dword [esp]
add esp, 4
fmul qword [0xbfa968]
fdiv qword [ebp - 0x38]
fst qword [esp]
fstp qword [ebp - 0x68]
call sub.msvcrt.dll_cos
mov ecx, dword [ebp - 0x30]
fstp dword [ecx + ebx*4]
fld qword [ebp - 0x68]
fstp qword [esp]
call sub.msvcrt.dll_sin
fstp dword [ebp - 0x1c]
fld dword [ebp - 0x1c]
fchs
fstp dword [esi + ebx*4]
add ebx, 1
cmp ebx, dword [ebp - 0x50]
jne 0x9c2cd4
jmp 0x9c2b38
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x11
mov dword [esp + 4], 1
mov dword [esp], 0xbfa940
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov dword [esp], 1
call sub.msvcrt.dll_exit
lea esi, [esi]