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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov esi, dword [rsp + 0xd8]
mov rdi, qword [rsp + 0xe0]
mov r10d, edx
mov rbx, rcx
movzx edx, word [r8]
mov rbp, r8
test r10d, r10d
mov r13d, r9d
jne 0x140003570
lea ecx, [rsi + 0x10]
test dx, dx
mov rax, r8
je 0x14000374c
nop word [rax + rax]
add rax, 2
cmp word [rax], 0
jne 0x140003400
sub rax, rbp
sar rax, 1
lea r14d, [rcx + rax*2 + 2]
movsxd rcx, r14d
call qword [sym.imp.ucrtbase.dll_malloc]
movzx edx, word [rbp]
mov r12, rax
mov dword [rax], 0x57494e45
mov dword [rax + 0xc], r13d
mov dword [rax + 4], r14d
mov rax, rbp
nop word cs:[rax + rax]
add rax, 2
cmp word [rax], 0
jne 0x140003440
sub rax, rbp
sar rax, 1
add eax, 1
mov dword [r12 + 8], eax
xor eax, eax
jmp 0x140003465
movzx edx, word [rbp + rax]
mov word [r12 + rax + 0x10], dx
add rax, 2
test dx, dx
jne 0x140003460
test esi, esi
jne 0x140003660
mov esi, dword [r12 + 4]
lea rbp, [rsp + 0x3c]
mov rdx, r12
mov qword [rsp + 0x50], 0
mov rax, qword [rbx + 0x40]
lea r13, [rsp + 0x40]
mov r9, rbp
mov rcx, qword [rbx + 0x38]
mov qword [rsp + 0x20], r13
mov r8d, esi
mov qword [rsp + 0x58], rax
call qword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
jne 0x140003528
mov rax, qword gs:[0x30]
cmp dword [rax + 0x68], 0x3e5
je 0x1400034f0
test byte [section..data], 2
jne 0x140003728
mov rax, qword gs:[0x30]
mov eax, dword [rax + 0x68]
jmp 0x140003544
mov rax, qword [0x14001da80]
mov rcx, qword [rbx + 0x40]
mov edx, dword [rax]
call qword [sym.imp.kernel32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x14000378f
xor r9d, r9d
mov rcx, qword [rbx + 0x38]
mov r8, rbp
mov rdx, r13
call qword [sym.imp.kernel32.dll_GetOverlappedResult]
test eax, eax
je 0x1400034cb
nop dword [rax]
cmp esi, dword [rsp + 0x3c]
je 0x1400035e0
test byte [section..data], 2
jne 0x140003700
mov eax, 0x1d
mov dword [rdi], eax
xor r13d, r13d
mov rcx, r12
call qword [sym.imp.ucrtbase.dll_free]
mov eax, r13d
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
or r13d, 0x80000000
test dx, dx
je 0x1400036ea
mov rax, r8
nop dword [rax + rax]
add rax, 2
cmp word [rax], 0
jne 0x140003588
sub rax, rbp
sar rax, 1
lea esi, [rax + rax + 2]
lea r14d, [rsi + 0x12]
movsxd rcx, r14d
lea r15, [0x14001bd36]
call qword [sym.imp.ucrtbase.dll_malloc]
mov qword [rsp + 0xd0], rbp
movzx edx, word [r15]
mov rbp, r15
mov r12, rax
mov dword [rax], 0x57494e45
mov dword [rax + 0xc], r13d
mov dword [rax + 4], r14d
mov eax, 1
jmp 0x140003453
mov rcx, qword [rbx + 0x38]
mov qword [rsp + 0x20], r13
mov r9, rbp
mov rdx, rdi
mov r8d, 4
call qword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
jne 0x1400036c0
mov rax, qword gs:[0x30]
cmp dword [rax + 0x68], 0x3e5
je 0x14000367f
test byte [section..data], 2
je 0x1400034d8
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x20], 0
lea r9, str.service_protocol_error___failed_to_read_pipe_r___d__count___ld__n
mov ecx, 1
lea r8, str.process_send_command
lea rdx, section..data
mov dword [rsp + 0x28], eax
call fcn.140001490
jmp 0x1400034d8
mov eax, dword [r12 + 8]
mov r8d, esi
mov rdx, qword [rsp + 0xd0]
lea rcx, [r12 + rax*2 + 0x10]
call sub.ucrtbase.dll_memcpy
jmp 0x14000347c
mov rax, qword [0x14001da80]
mov rcx, qword [rbx + 0x40]
mov edx, dword [rax]
call qword [sym.imp.kernel32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x1400037c7
xor r9d, r9d
mov rcx, qword [rbx + 0x38]
mov r8, rbp
mov rdx, r13
call qword [sym.imp.kernel32.dll_GetOverlappedResult]
test eax, eax
je 0x140003615
nop dword [rax + rax]
mov edx, dword [rsp + 0x3c]
mov r13d, 1
cmp edx, 4
je 0x140003549
test byte [section..data], 2
jne 0x140003763
mov eax, 0x1e
jmp 0x140003544
mov ecx, 0x14
mov r14d, 0x14
mov esi, 2
jmp 0x1400035a3
lea r9, str.service_protocol_error___failed_to_write_pipe__n
mov ecx, 1
lea r8, str.process_send_command
lea rdx, section..data
call fcn.140001490
jmp 0x14000353f
lea r9, str.service_protocol_error___failed_to_write_pipe__n
mov ecx, 1
lea r8, str.process_send_command
lea rdx, section..data
call fcn.140001490
jmp 0x1400034d8
lea r14d, [rsi + 0x12]
mov rbp, qword [rsp + 0xd0]
mov r15, r8
movsxd rcx, r14d
jmp 0x1400035aa
mov dword [rsp + 0x28], edx
lea r9, str.service_protocol_error___failed_to_read_pipe_r___d__count___ld__n
mov ecx, 1
mov dword [rsp + 0x20], eax
lea r8, str.process_send_command
lea rdx, section..data
call fcn.140001490
jmp 0x1400036e0
test byte [section..data], 2
jne 0x1400037a6
mov dword [rdi], 0x41d
xor r13d, r13d
jmp 0x140003549
lea r9, str.sending_command_timed_out_n
mov ecx, 1
lea r8, str.process_send_command
lea rdx, section..data
call fcn.140001490
jmp 0x140003798
test byte [section..data], 2
je 0x140003798
lea r9, str.receiving_command_result_timed_out_n
mov ecx, 1
lea r8, str.process_send_command
lea rdx, section..data
call fcn.140001490
jmp 0x140003798