Function at 0x140002580
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov r11, rsp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x140
mov qword [r11 - 0x98], 0xfffffffffffffffe
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x130], rax
mov rsi, r9
mov rbx, r8
mov qword [rsp + 0x50], rbx
mov r12, rcx
or r15d, 0xffffffff
mov dword [rsp + 0x3c], r15d
lea rax, [0x140002520]
mov qword [r11 - 0xd0], rax
lea rax, [0x140002550]
mov qword [r11 - 0xc8], rax
xor edi, edi
mov qword [r11 - 0xd8], rdi
mov qword [r11 - 0xc0], rdx
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x34]
lea r8d, [r15 + 0x25]
lea rdx, [r11 - 0x70]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140002984
lea r9, [rsp + 0x34]
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x108]
mov rcx, r12
call fcn.140002240
test eax, eax
jne 0x140002984
cmp dword [rsp + 0x108], 0x46464952
jne 0x140002975
cmp dword [rsp + 0x110], 0x45564157
jne 0x140002975
movzx eax, word [rsp + 0x11e]
dec ax
cmp ax, 5
ja 0x140002975
movzx eax, word [rsp + 0x12a]
dec ax
cmp ax, 0x17
ja 0x140002975
lea edx, [rdi + 0x10]
mov ecx, 0x1af0
call qword [sym.imp.MSVCR120.dll__aligned_malloc]
mov r13, rax
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400026bb
lea rdx, [rsp + 0xa0]
mov rcx, rax
call sym.tta.exe_public:_void___cdecl_tta::tta_encoder::constructor_struct__tag_TTA_io_callback____ptr64____ptr64
mov r14, rax
jmp 0x1400026be
mov r14, rdi
mov qword [rsp + 0x48], r14
movzx r8d, word [rsp + 0x12a]
movzx ecx, word [rsp + 0x11e]
lea eax, [r8 + 7]
cdq
and edx, 7
lea edi, [rdx + rax]
sar edi, 3
imul edi, ecx
mov dword [rsp + 0x34], edi
mov dword [rsp + 0x64], ecx
mov dword [rsp + 0x68], r8d
mov ecx, dword [rsp + 0x120]
mov dword [rsp + 0x6c], ecx
mov ecx, dword [rsp + 0x1a8]
mov dword [rsp + 0x60], ecx
cmp ecx, 2
jne 0x140002720
mov r8d, dword [rsp + 0x1a0]
mov rdx, rsi
mov rcx, r14
call sym.tta.exe_public:_void___cdecl_tta::tta_encoder::set_password_void_const____ptr64__unsigned_int____ptr64
lea edi, [rdi + rdi*4]
shl edi, 0xa
lea ecx, [rdi + 4]
mov edx, 0x10
call qword [sym.imp.MSVCR120.dll__aligned_malloc]
mov rsi, rax
mov qword [rsp + 0x80], rax
test rax, rax
jne 0x140002767
call qword [sym.imp.MSVCR120.dll___iob_func]
lea rcx, [rax + 0x60]
mov r8, qword [0x1400106a0]
lea rdx, str._r_s:_insufficient_memory_available_n
call qword [sym.imp.MSVCR120.dll_fwprintf]
jmp 0x140002951
cmp rbx, 0xffffffffffffffff
je 0x14000283d
xor ebx, ebx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x30]
mov r8d, edi
mov rdx, rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000280b
mov r8d, dword [rsp + 0x30]
test r8d, r8d
je 0x14000280b
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov rdx, rsi
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400027e8
cmp dword [rsp + 0x40], 0
je 0x1400027e8
add ebx, dword [rsp + 0x30]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x30]
mov r8d, edi
mov rdx, rsi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140002790
jmp 0x14000280b
call qword [sym.imp.MSVCR120.dll___iob_func]
lea rcx, [rax + 0x60]
mov r8, qword [0x1400106a0]
lea rdx, str._r_s:_cant_write_to_output_file_n
call qword [sym.imp.MSVCR120.dll_fwprintf]
jmp 0x140002951
call qword [sym.imp.MSVCR120.dll___iob_func]
lea rcx, [rax + 0x60]
mov r8d, ebx
lea rdx, str._rBuffered:__d_bytes_n
call qword [sym.imp.MSVCR120.dll_fwprintf]
mov r12, qword [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x14000286c
mov ebx, dword [rsp + 0x38]
cmp ebx, 0x7fffffff
jb 0x14000286c
call qword [sym.imp.MSVCR120.dll___iob_func]
lea rcx, [rax + 0x60]
mov r8, qword [0x1400106a0]
lea rdx, str._r_s:_incorrect_data_size_info_in_wav_file_n
call qword [sym.imp.MSVCR120.dll_fwprintf]
jmp 0x140002951
xor edx, edx
mov eax, ebx
div dword [rsp + 0x34]
mov dword [rsp + 0x70], eax
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, r14
call sym.tta.exe_public:_void___cdecl_tta::tta_encoder::init_set_info_struct_TTA_info____ptr64__unsigned_long_long_unsigned___int64_____ptr64
xor r15d, r15d
nop dword [rax + rax]
test ebx, ebx
je 0x140002928
mov eax, ebx
cmp edi, ebx
cmovb eax, edi
mov edi, eax
mov dword [rsp + 0x88], eax
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x30]
mov r8d, eax
mov rdx, rsi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400028eb
mov r8d, dword [rsp + 0x30]
test r8d, r8d
je 0x1400028eb
lea r9, [0x140002480]
mov rdx, rsi
mov rcx, r14
call sym.tta.exe_public:_void___cdecl_tta::tta_encoder::process_stream_unsigned_char____ptr64__unsigned_int__void____cdecl___unsigned_int__unsigned_int__unsigned_int_____ptr64
sub ebx, dword [rsp + 0x30]
mov dword [rsp + 0x38], ebx
jmp 0x140002890
lea rcx, [rsp + 0xc0]
call qword [sym.imp.MSVCR120.dll_public:_void___cdecl_std::exception::constructor_void____ptr64]
nop
lea rax, vtable.tta::tta_exception.0
mov qword [rsp + 0xc0], rax
mov dword [rsp + 0xd8], 4
lea rdx, [0x14000e2b0]
lea rcx, [rsp + 0xc0]
call sub.MSVCR120.dll__CxxThrowException
mov rcx, r14
call sym.tta.exe_public:_void___cdecl_tta::tta_encoder::finalize_void____ptr64
mov dword [rsp + 0x3c], r15d
jmp 0x140002951
mov r8, qword [r14]
xor edx, edx
mov rcx, r14
call qword [r8]
mov rcx, r13
call qword [sym.imp.MSVCR120.dll__aligned_free]
test rsi, rsi
je 0x1400029a2
mov rcx, rsi
call qword [sym.imp.MSVCR120.dll__aligned_free]
jmp 0x1400029a2
call qword [sym.imp.MSVCR120.dll___iob_func]
lea rdx, str._r_s:_not_compatible_file_format_n
jmp 0x140002991
call qword [sym.imp.MSVCR120.dll___iob_func]
lea rdx, str._r_s:_cant_read_from_input_file_n
mov r8, qword [0x1400106a0]
lea rcx, [rax + 0x60]
call qword [sym.imp.MSVCR120.dll_fwprintf]
mov eax, r15d
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.140009190
add rsp, 0x140
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret