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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x90]
sub rsp, 0x190
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x80], rax
mov r13, rdx
mov rbx, rcx
xor r15d, r15d
lea rdx, [0x1400065ac]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov r12, rax
mov qword [rsp + 0x20], rax
test rax, rax
jne 0x1400025f8
lea rcx, str.Unable_to_open_file__n
call fcn.140001010
lea rax, [r15 - 1]
jmp 0x140002a8f
mov r9, r12
mov edx, 0x20
lea r8d, [rdx - 0x1f]
lea rcx, [rsp + 0x60]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov eax, dword [rsp + 0x60]
mov rdi, 0xffffffffffffffff
cmp eax, 0x52415344
je 0x140002656
cmp eax, 0x52415350
jne 0x140002643
lea rcx, [rbp - 0x80]
sub rcx, rbx
nop
movzx eax, byte [rbx]
mov byte [rcx + rbx], al
lea rbx, [rbx + 1]
test al, al
jne 0x140002630
jmp 0x1400027e9
lea rcx, str.Unrecognized_magic._DSAR_was_expected._n
call fcn.140001010
mov eax, edi
jmp 0x140002a8f
mov ecx, dword [rsp + 0x68]
mov eax, 0x20
mul rcx
cmovo rax, rdi
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
mov qword [rsp + 0x58], rax
mov r8d, dword [rsp + 0x68]
mov r9, r12
mov edx, 0x20
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov r8, rbx
lea rdx, str._s.dec
lea rcx, [rbp - 0x80]
call fcn.140001070
lea rdx, [0x1400065f8]
lea rcx, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rsi, rax
mov qword [rsp + 0x50], rax
lea rcx, str.Decompressing_DSAR..._n
call fcn.140001010
cmp dword [rsp + 0x68], r15d
jbe 0x1400027ce
mov ebx, r15d
shl rbx, 5
add rbx, r14
xor r8d, r8d
mov edx, dword [rbx + 8]
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
xor r8d, r8d
mov edx, dword [rbx]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov r14d, dword [rbx + 0x14]
test r14, r14
je 0x1400027bb
mov ecx, r14d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
mov edx, r14d
test rax, rax
je 0x14000287e
mov r9, r12
mov r8d, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, dword [rbx + 0x10]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r12, rax
movzx eax, byte [rbx + 0x18]
cmp al, 3
jne 0x14000276e
mov r9d, dword [rbx + 0x10]
mov r8d, r14d
mov rdx, r12
mov rcx, rsi
call fcn.140003b90
test eax, eax
jne 0x140002788
lea rcx, str.LZ4_Decompression_Error_n
call fcn.140001010
mov eax, 0xfffffffd
jmp 0x140002a8f
cmp al, 2
je 0x140002868
test al, al
jne 0x140002788
mov r8, r14
mov rdx, rsi
mov rcx, r12
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [rbx + 0x10]
mov r9, qword [rsp + 0x50]
mov r8d, 1
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r12, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x50]
inc r15d
mov r14, qword [rsp + 0x58]
cmp r15d, dword [rsp + 0x68]
jb 0x1400026d0
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rbx, rdi
nop dword [rax]
inc rbx
cmp byte [rbx + r13], 0
jne 0x1400027f0
call fcn.1400043bc
mov qword [rsp + 0x20], r13
mov qword [rsp + 0x28], rbx
lea r8, [rsp + 0x20]
mov edx, eax
lea rcx, [rsp + 0x30]
call fcn.140001990
nop
lea rcx, [rsp + 0x30]
call fcn.140002490
movzx ebx, al
mov rdx, qword [rsp + 0x48]
cmp rdx, 7
jbe 0x140002899
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002894
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002894
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
lea rcx, str.GDeflate_not_implemented_n
call fcn.140001010
mov eax, 0xfffffffc
jmp 0x140002a8f
lea rcx, str.Allocation_error___0.8d_bytes__n
call fcn.140001010
mov eax, 0xfffffffe
jmp 0x140002a8f
call fcn.140004b8c
test bl, bl
jne 0x140002939
mov rbx, rdi
inc rbx
cmp byte [rbx + r13], 0
jne 0x1400028a4
call fcn.1400043bc
mov qword [rsp + 0x20], r13
mov qword [rsp + 0x28], rbx
lea r8, [rsp + 0x20]
mov edx, eax
lea rcx, [rsp + 0x30]
call fcn.140001990
nop
lea rcx, [rsp + 0x30]
cmp qword [rsp + 0x48], 7
cmova rcx, qword [rsp + 0x30]
call fcn.1400044f8
mov rdx, rax
shr rax, 0x20
test eax, eax
jne 0x140002acf
mov rdx, qword [rsp + 0x48]
cmp rdx, 7
jbe 0x140002939
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002934
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002934
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004b8c
mov rdx, r13
lea rcx, [rbp - 0x80]
call fcn.140003770
test eax, eax
jne 0x14000295f
lea rcx, str.Extraction_failed._n
call fcn.140001010
mov eax, 0xfffffffb
jmp 0x140002a8f
lea rax, [rbp - 0x80]
mov rbx, rdi
inc rbx
cmp byte [rax + rbx], 0
jne 0x140002966
call fcn.1400043bc
lea rcx, [rbp - 0x80]
mov qword [rsp + 0x20], rcx
mov qword [rsp + 0x28], rbx
lea r8, [rsp + 0x20]
mov edx, eax
lea rcx, [rsp + 0x30]
call fcn.140001990
nop
lea rcx, [rsp + 0x30]
call fcn.140002490
movzx ebx, al
mov rdx, qword [rsp + 0x48]
cmp rdx, 7
jbe 0x1400029e6
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400029e1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400029e1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004b8c
test bl, bl
je 0x140002a8a
lea rax, [rbp - 0x80]
inc rdi
cmp byte [rax + rdi], 0
jne 0x1400029f2
call fcn.1400043bc
lea rcx, [rbp - 0x80]
mov qword [rsp + 0x20], rcx
mov qword [rsp + 0x28], rdi
lea r8, [rsp + 0x20]
mov edx, eax
lea rcx, [rsp + 0x30]
call fcn.140001990
nop
lea rcx, [rsp + 0x30]
cmp qword [rsp + 0x48], 7
cmova rcx, qword [rsp + 0x30]
call fcn.1400048f0
mov rdx, rax
shr rax, 0x20
test eax, eax
jne 0x140002ab9
mov rdx, qword [rsp + 0x48]
cmp rdx, 7
jbe 0x140002a8a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002a85
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002a85
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004b8c
mov eax, 1
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.140004b30
mov rbx, qword [rsp + 0x1e0]
add rsp, 0x190
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
shr rdx, 0x20
lea r8, [rsp + 0x30]
lea rcx, str.remove
call fcn.1400023c0
nop
shr rdx, 0x20
lea r8, [rsp + 0x30]
lea rcx, str.create_directory
call fcn.1400023c0
int3