Function at 0x140001210
Capabilities:
Read file on windows
Terminate process
Write file on windows

Disassembly:
push rbx
push rdi
sub rsp, 0x58
mov ebx, ecx
mov rdi, rdx
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.WARNING:_lz4_decompress_is_deprecated_and_will_be_removed_in_a_future_version_n
call fcn.1400011c0
mov rax, qword [rdi]
mov qword [0x140606f90], rax
call fcn.1400016b0
cmp ebx, 3
je 0x14000125b
call fcn.140001170
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rcx, qword [rdi + 8]
lea rdx, [0x1400668f0]
mov qword [rsp + 0x70], rbp
mov qword [rsp + 0x30], r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1400668f4]
mov r15, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rbp, rax
test r15, r15
jne 0x1400012b6
lea ecx, [r15 + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.lz4_decompress:__Error__Cannot_open_input_file_for_reading._n
call fcn.1400011c0
lea ecx, [r15 + 1]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
test rbp, rbp
jne 0x1400012dd
lea ecx, [rbp + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.lz4_decompress:__Error__Cannot_create_output_file._n
call fcn.1400011c0
lea ecx, [rbp + 1]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov qword [rsp + 0x50], rsi
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r13
xor r13d, r13d
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x80], r13
lea edx, [r13 + 0x64]
call fcn.1400117e0
mov ecx, 0x100000
call fcn.140063458
mov ecx, 0x100000
mov r14, rax
call fcn.140063458
mov rdi, rax
xor r12b, r12b
nop word [rax + rax]
mov r9, r15
mov edx, 1
mov r8d, 0x100000
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rsi, rax
cmp eax, 0x100000
jge 0x140001368
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
setne r12b
test eax, eax
je 0x140001458
mov rbx, r13
movsxd rsi, esi
nop
mov rcx, qword [rsp + 0x80]
lea r9, [rbx + r14]
mov rax, rsi
mov qword [rsp + 0x28], r13
sub rax, rbx
mov qword [rsp + 0x78], 0x100000
mov qword [rsp + 0x88], rax
lea r8, [rsp + 0x78]
lea rax, [rsp + 0x88]
mov rdx, rdi
mov qword [rsp + 0x20], rax
call fcn.140011ad0
mov rcx, rax
call fcn.140012cc0
test eax, eax
jne 0x14000147e
add rbx, qword [rsp + 0x88]
mov r8, qword [rsp + 0x78]
test r8, r8
je 0x140001410
mov r9, rbp
lea edx, [rax + 1]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, qword [rsp + 0x78]
je 0x140001370
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.lz4_decompress:__Error__Encountered_problem_during_writing_to_buffer._n
call fcn.1400011c0
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
test r12b, r12b
je 0x140001330
mov rcx, qword [rsp + 0x80]
call fcn.140012940
mov rcx, r14
call fcn.140063460
mov rcx, rdi
call fcn.140063460
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor ecx, ecx
call fcn.1400015a0
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.lz4_decompress:__Error__Encountered_problem_during_reading_input._n
call fcn.1400011c0
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.lz4_decompress:__Error__Encountered_problem_during_decompression._n
call fcn.1400011c0
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3