Function at 0x407360
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov ecx, dword [0x458020]
mov dword [esp + 0x5c], ecx
xor ecx, ecx
mov edx, dword [esp + 0x80]
mov ebp, dword [esp + 0x84]
mov edi, dword [edx + 0x14]
mov dword [esp + 0x24], edx
cmp edi, ebp
jle 0x407391
cmp ebp, 2
jle 0x4073e3
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x3e
xor ebp, ebp
mov dword [esp + 4], 1
mov dword [esp], str.Downmix_must_actually_downmix_and_only_knows_mono_stereo_out._n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov ebx, dword [esp + 0x24]
cmp dword [ebx + 0x14], 8
jg 0x4076d0
mov esi, dword [esp + 0x5c]
xor esi, dword [0x458020]
mov eax, ebp
jne 0x40786c
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
je 0x407700
test edi, edi
jle 0x407391
cmp ebp, 1
jne 0x407391
mov dword [esp + 4], 0x18
mov dword [esp], 1
call sub.msvcrt.dll_calloc
mov dword [esp + 0x30], eax
mov eax, edi
shl eax, 0xe
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov esi, dword [esp + 0x30]
lea edx, [edi*4]
mov dword [esp + 0x38], edx
mov dword [esi + 8], eax
mov eax, edx
imul eax, ebp
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov ecx, dword [esp + 0x24]
cmp ebp, 1
mov dword [esi + 0xc], eax
mov edx, dword [ecx]
mov dword [esi], edx
mov edx, dword [ecx + 4]
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], ebp
mov dword [esi + 4], edx
je 0x407720
mov edx, edi
mov dword [esp + 0x48], ebp
mov ebx, eax
lea esi, [edi - 2]
shl edx, 6
mov dword [esp + 0x44], eax
sub edx, 0x78
shl esi, 6
test edi, edi
mov dword [esp + 0x3c], edx
mov edx, 1
xorps xmm2, xmm2
cmovg edx, edi
mov dword [esp + 0x20], edx
sub edx, 1
shr edx, 2
mov dword [esp + 0x2c], edx
shl edx, 2
test edx, edx
mov dword [esp + 0x28], edx
mov ebp, dword [esp + 0x2c]
sete cl
cmp dword [esp + 0x20], 3
setbe dl
or cl, dl
mov byte [esp + 0x43], cl
mov ecx, 0
cmove ecx, dword [esp + 0x28]
mov dword [esp + 0x34], ecx
cmp byte [esp + 0x43], 0
jne 0x40750a
lea edx, [esi + 0x452100]
xor eax, eax
xor ecx, ecx
lea esi, [esi]
movaps xmm0, xmm2
movaps xmm1, xmm2
add ecx, 1
movlps xmm0, qword [edx + eax*2]
movlps xmm1, qword [edx + eax*2 + 0x10]
movhps xmm0, qword [edx + eax*2 + 8]
movhps xmm1, qword [edx + eax*2 + 0x18]
shufps xmm0, xmm1, 0x88
movlps qword [ebx + eax], xmm0
movhps qword [ebx + eax + 8], xmm0
add eax, 0x10
cmp ebp, ecx
ja 0x4074d0
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x20], eax
je 0x407521
mov eax, dword [esp + 0x34]
nop
fld dword [esi + eax*8 + 0x452100]
fstp dword [ebx + eax*4]
add eax, 1
cmp edi, eax
jg 0x407510
add esi, 4
add ebx, dword [esp + 0x38]
cmp esi, dword [esp + 0x3c]
jne 0x4074b9
mov eax, dword [esp + 0x44]
mov ebp, dword [esp + 0x48]
jmp 0x407542
fstp st(0)
jmp 0x407542
fstp st(0)
imul edi, ebp
test edi, edi
jle 0x4076b0
fldz
mov ebx, eax
mov ecx, edi
and ebx, 0xf
shr ebx, 2
neg ebx
and ebx, 3
cmp ebx, edi
cmova ebx, edi
cmp edi, 6
cmova ecx, ebx
xor edx, edx
test ecx, ecx
je 0x40757e
nop
fadd dword [eax + edx*4]
add edx, 1
cmp ecx, edx
ja 0x407570
cmp edi, ecx
je 0x4075fa
mov esi, edi
sub esi, ecx
mov dword [esp + 0x2c], esi
shr esi, 2
mov dword [esp + 0x28], esi
shl esi, 2
test esi, esi
mov dword [esp + 0x20], esi
je 0x4075f0
lea esi, [eax + ecx*4]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
xor ecx, ecx
xorps xmm0, xmm0
nop
lea esi, [esi]
add ecx, 1
addps xmm0, xmmword [esi]
add esi, 0x10
cmp ecx, eax
jb 0x4075b0
movaps xmm1, xmm0
mov ecx, dword [esp + 0x20]
movhlps xmm1, xmm0
add edx, dword [esp + 0x20]
addps xmm1, xmm0
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x2c], ecx
movaps xmm0, xmm1
shufps xmm0, xmm1, 0x55
addps xmm0, xmm1
movss dword [esp + 0x28], xmm0
fadd dword [esp + 0x28]
je 0x4075fa
lea esi, [esi]
fadd dword [eax + edx*4]
add edx, 1
cmp edi, edx
jg 0x4075f0
cmp edi, 4
mov dword [esp + 0x4c], ebp
cmovbe ebx, edi
fild dword [esp + 0x4c]
xor edx, edx
fdivrp st(1)
test ebx, ebx
je 0x407627
fld dword [eax + edx*4]
fmul st(1)
fstp dword [eax + edx*4]
add edx, 1
cmp ebx, edx
ja 0x407610
cmp ebx, edi
je 0x4076a3
mov ecx, edi
sub ecx, ebx
mov dword [esp + 0x2c], ecx
shr ecx, 2
mov dword [esp + 0x28], ecx
shl ecx, 2
test ecx, ecx
mov dword [esp + 0x20], ecx
je 0x407690
lea ecx, [eax + ebx*4]
fst dword [esp + 0x1c]
xor ebx, ebx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
mov esi, ecx
movss xmm0, dword [esp + 0x1c]
shufps xmm0, xmm0, 0
movaps xmm1, xmm0
movaps xmm0, xmmword [ecx]
add ebx, 1
add ecx, 0x10
mulps xmm0, xmm1
movaps xmmword [esi], xmm0
add esi, 0x10
cmp ebx, eax
jb 0x407661
mov ebx, dword [esp + 0x20]
add edx, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x2c], ebx
je 0x4076a7
lea esi, [esi]
fld dword [eax + edx*4]
fmul st(1)
fstp dword [eax + edx*4]
add edx, 1
cmp edi, edx
jg 0x407690
fstp st(0)
jmp 0x4076b0
fstp st(0)
jmp 0x4076b0
fstp st(0)
lea esi, [esi]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x30]
mov dword [edx], 0x404f00
mov dword [edx + 4], eax
mov dword [edx + 0x14], ebp
jmp 0x4073c9
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x31
mov dword [esp + 4], 1
mov dword [esp], str.Downmix_also_only_knows_how_to_mix__8ch_to_mono._n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
jmp 0x4073c9
cmp edi, 8
jg 0x407391
test edi, edi
nop
lea esi, [esi]
jg 0x4073f2
jmp 0x407391
cmp edi, 8
jle 0x4077cf
mov ecx, eax
mov dword [esp + 0x4c], edi
and ecx, 0xf
fild dword [esp + 0x4c]
fdivr dword [0x4522d4]
shr ecx, 2
neg ecx
and ecx, 3
cmp edi, ecx
cmovbe ecx, edi
xor edx, edx
test ecx, ecx
je 0x40775a
nop
fst dword [eax + edx*4]
add edx, 1
cmp ecx, edx
ja 0x407750
mov ebx, edi
sub ebx, ecx
mov esi, ebx
mov dword [esp + 0x2c], ebx
shr esi, 2
lea ebx, [esi*4]
test ebx, ebx
mov dword [esp + 0x20], ebx
je 0x4077b0
fst dword [esp + 0x1c]
lea ebx, [eax + ecx*4]
xor ecx, ecx
movss xmm1, dword [esp + 0x1c]
shufps xmm1, xmm1, 0
movaps xmm0, xmm1
lea esi, [esi]
add ecx, 1
movaps xmmword [ebx], xmm0
add ebx, 0x10
cmp ecx, esi
jb 0x407790
mov ecx, dword [esp + 0x20]
add edx, dword [esp + 0x20]
cmp dword [esp + 0x2c], ecx
je 0x407538
nop
fst dword [eax + edx*4]
add edx, 1
cmp edi, edx
jle 0x407540
fst dword [eax + edx*4]
add edx, 1
cmp edi, edx
jg 0x4077b0
fstp st(0)
jmp 0x407542
lea edx, [edi - 2]
test edi, edi
mov ecx, ebp
cmovg ecx, edi
mov dword [esp + 0x28], edx
mov esi, ecx
mov dword [esp + 0x2c], ecx
shr esi, 2
lea ebx, [esi*4]
test ebx, ebx
mov dword [esp + 0x34], ebx
je 0x407871
cmp ecx, 3
jbe 0x407871
mov ebx, edx
xor ecx, ecx
xor edx, edx
shl ebx, 6
add ebx, 0x452100
lea esi, [esi]
movaps xmm1, xmmword [ebx + edx*2]
add ecx, 1
movaps xmm0, xmm1
shufps xmm1, xmmword [ebx + edx*2 + 0x10], 0x88
shufps xmm0, xmmword [ebx + edx*2 + 0x10], 0xdd
addps xmm0, xmm1
movlps qword [eax + edx], xmm0
movhps qword [eax + edx + 8], xmm0
add edx, 0x10
cmp ecx, esi
jb 0x407810
mov edx, dword [esp + 0x34]
cmp dword [esp + 0x2c], edx
je 0x407542
mov esi, dword [esp + 0x28]
lea ecx, [edx + esi*8]
lea ecx, [ecx*8 + 0x452100]
fld dword [ecx + 4]
fadd dword [ecx]
add ecx, 8
fstp dword [eax + edx*4]
add edx, 1
cmp edi, edx
jg 0x407855
jmp 0x407542
call fcn.00442960
xor edx, edx
jmp 0x407847