Function at 0x1007ac60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], 0
push 0
push 0
mov dword [ebp - 8], edi
push dword [edi + 0x38]
mov dword [ebp - 0xc], 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push dword [edi + 0x38]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_clearerr]
push 0
push str.bformat
push str.wave
push 0
call fcn.100018c0
add esp, 0x20
test eax, eax
je 0x1007acc0
mov eax, dword [edi + 4]
mov dword [eax + 0x18], 0x1508
mov eax, dword [edi + 4]
mov dword [eax + 0x24], 1
mov ecx, dword [edi + 4]
mov eax, dword [ecx + 0x1c]
sub eax, 0x1400
je 0x1007ace9
sub eax, 3
je 0x1007ace0
sub eax, 2
jne 0x1007acf0
mov dword [ecx + 0x1c], 0x1404
jmp 0x1007acf0
mov dword [ecx + 0x1c], 0x1402
jmp 0x1007acf0
mov dword [ecx + 0x1c], 0x1401
mov ecx, dword [edi + 4]
mov eax, ecx
mov edx, dword [ecx + 0x18]
cmp edx, 0x70000000
jg case.0x1007ad11.5378
je 0x1007ad85
sub edx, 0x1500
cmp edx, 8
ja case.0x1007ad11.5378
jmp dword [edx*4 + 0x1007af58]
mov dword [ebp - 4], 4
jmp case.0x1007ad11.5378
mov dword [ebp - 4], 3
jmp case.0x1007ad11.5378
mov dword [ebp - 4], 0x33
jmp case.0x1007ad11.5378
mov dword [ebp - 4], 0x60f
jmp case.0x1007ad11.5378
mov dword [ebp - 4], 0x70f
jmp case.0x1007ad11.5378
mov dword [ebp - 4], 0x63f
jmp case.0x1007ad11.5378
mov eax, dword [ecx + 0x24]
mov edx, 3
cmp eax, edx
mov dword [ebp - 0xc], 1
mov dword [ebp - 4], 0
cmova eax, edx
mov dword [ecx + 0x24], eax
mov eax, dword [edi + 4]
mov dword [eax + 0x28], 0
mov eax, dword [edi + 4]
mov dword [eax + 0x2c], 0
mov eax, dword [edi + 4]
jmp case.0x1007ad11.5378
mov dword [ebp - 4], 0x3f
push dword [eax + 0x1c]
call fcn.10001c71
mov ecx, dword [edi + 4]
mov ebx, eax
push dword [ecx + 0x24]
push dword [ecx + 0x18]
call fcn.10002239
push dword [edi + 0x38]
mov esi, eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
push dword [edi + 0x38]
push str.RIFF
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
push dword [edi + 0x38]
push 0xffffffffffffffff
call fcn.1007a4a0
push dword [edi + 0x38]
push str.WAVE
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
push dword [edi + 0x38]
push str.fmt
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
push dword [edi + 0x38]
push 0x28
call fcn.1007a4a0
push dword [edi + 0x38]
push 0xfffe
call fcn.1007a470
mov eax, dword [ebp - 8]
add esp, 0x40
movzx edi, si
push dword [eax + 0x38]
push edi
call fcn.1007a470
mov eax, dword [ebp - 8]
push dword [eax + 0x38]
mov eax, dword [eax + 4]
push dword [eax + 0xc]
call fcn.1007a4a0
mov eax, dword [ebp - 8]
push dword [eax + 0x38]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xc]
imul eax, ebx
imul eax, esi
push eax
call fcn.1007a4a0
movzx esi, bx
mov ebx, dword [ebp - 8]
mov eax, esi
imul eax, edi
push dword [ebx + 0x38]
push eax
call fcn.1007a470
push dword [ebx + 0x38]
shl esi, 3
push esi
call fcn.1007a470
push dword [ebx + 0x38]
push 0x16
call fcn.1007a470
push dword [ebx + 0x38]
push esi
call fcn.1007a470
push dword [ebx + 0x38]
push dword [ebp - 4]
call fcn.1007a4a0
mov eax, dword [ebx + 4]
add esp, 0x40
cmp dword [eax + 0x1c], 0x1406
jne 0x1007ae8e
mov eax, 0x1014702c
mov ecx, 0x1014700c
jmp 0x1007ae98
mov eax, 0x1014701c
mov ecx, 0x10146ffc
push dword [ebx + 0x38]
cmp dword [ebp - 0xc], 0
push 0x10
cmove eax, ecx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push dword [ebx + 0x38]
push str.data
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
push dword [ebx + 0x38]
push 0xffffffffffffffff
call fcn.1007a4a0
push dword [ebx + 0x38]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 0x24
test eax, eax
je 0x1007af09
cmp dword [0x10162a28], 1
jl 0x1007af00
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
push eax
push str.AL_lib:__EE__Error_writing_header:__s_n
push dword [0x10164d18]
call fcn.100012cb
add esp, 0x10
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebx + 0x38]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push dword [ebx + 4]
mov dword [ebx + 0x3c], eax
call fcn.10002220
mov esi, dword [ebx + 4]
push dword [esi + 0x1c]
call fcn.10001c71
push dword [esi + 0x24]
mov edi, eax
push dword [esi + 0x18]
call fcn.10002239
mov edx, dword [ebx + 4]
lea ecx, [ebx + 0x40]
imul eax, edi
add esp, 0x14
mov edx, dword [edx + 0x10]
push ecx
imul edx, eax
push edx
call fcn.10001627
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret