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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov eax, 0x8290
call fcn.14001e320
sub rsp, rax
mov rax, qword [0x14002d030]
xor rax, rsp
mov qword [rsp + 0x8280], rax
mov rsi, qword [rdx + 0x18]
mov rbp, rdx
mov r15, qword [rcx + 0x238]
xor r14d, r14d
xor edx, edx
mov rcx, rsi
lea r8d, [r14 + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
test eax, eax
je 0x1400122e2
cmp dword [0x14002da14], 4
jg 0x1400122d8
lea rdx, str.error_during_file_seek:__m
lea ecx, [r14 + 4]
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__ftelli64]
mov qword [rbp + 0x38], rax
test rax, rax
jns 0x140012318
cmp dword [0x14002da14], 4
jg 0x14001230e
lea rdx, str.could_not_determine_seek_position_in_archive_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
test eax, eax
je 0x14001234e
cmp dword [0x14002da14], 4
jg 0x140012344
lea rdx, str.error_during_file_seek:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov r9, qword [rbp + 0x38]
mov ecx, 0x180
mov rdx, qword [rbp + 0x20]
xor r8d, r8d
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x400
mov dword [rsp + 0x28], 0x800
mov word [rsp + 0x20], cx
lea rcx, [rsp + 0x80]
call fcn.14001bd60
mov r9, qword [rbp + 0x10]
lea rcx, [rsp + 0x80]
mov edx, 1
mov r8d, 0x200
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, 0x200
je 0x1400123d6
cmp dword [0x14002da14], 4
jg 0x1400123cc
lea rdx, str.could_not_write_to_output_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov r9, rsi
lea rcx, [rsp + 0x280]
mov edx, 1
mov r8d, 0x8000
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rbx, rax
test rax, rax
je 0x14001246d
nop word [rax + rax]
mov r9, qword [rbp + 0x10]
lea rcx, [rsp + 0x280]
mov r8, rbx
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rdi, rax
cmp rax, rbx
je 0x140012446
cmp dword [0x14002da14], 4
jg 0x14001243c
lea rdx, str.could_not_write_to_output_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov r9, rsi
lea rcx, [rsp + 0x280]
mov edx, 1
mov r8d, 0x8000
add r14, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rbx, rax
test rax, rax
jne 0x140012400
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
jne 0x1400124bd
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
je 0x140012499
cmp dword [0x14002da14], 4
jg 0x1400124b3
lea rdx, str.could_not_read_from_input_file:_end_of_file
jmp 0x1400124a9
cmp dword [0x14002da14], 4
jg 0x1400124b3
lea rdx, str.could_not_read_from_input_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test eax, eax
je 0x1400124ee
cmp dword [0x14002da14], 4
jg 0x1400124e4
lea rdx, str.could_not_close_temporary_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
cmp r14, qword [rbp + 0x38]
je 0x140012555
mov r9, r14
lea r8, str._lld
mov edx, Ordinal_33
lea rcx, [rsp + 0x60]
call fcn.140018490
mov r9, qword [rbp + 0x38]
lea r8, str._lld
mov edx, Ordinal_33
lea rcx, [rsp + 0x40]
call fcn.140018490
cmp dword [0x14002da14], 4
jg 0x14001254b
lea r9, [rsp + 0x40]
mov ecx, 4
lea r8, [rsp + 0x60]
lea rdx, str.actual_file_length___s__does_not_match_expected___s_
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
lea rdi, [r14 + 0x1ff]
and rdi, 0xfffffffffffffe00
sub rdi, r14
je 0x1400125a9
mov rbx, rdi
nop dword [rax + rax]
mov rdx, qword [rbp + 0x10]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
cmp eax, 0xffffffff
jne 0x1400125a3
cmp dword [0x14002da14], 4
jg 0x140012599
lea rdx, str.could_not_write_to_output_file:__m
lea ecx, [rax + 5]
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
sub rbx, 1
jne 0x140012570
lea rax, [rdi + r14]
add qword [r15 + 0x20], rax
mov rcx, qword [rsp + 0x8280]
xor rcx, rsp
call fcn.14001e2e0
mov rbx, qword [rsp + 0x82d0]
add rsp, 0x8290
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret