Function at 0x180006890
Capabilities:
Print debug messages
Read file on windows
Write file on windows

Disassembly:
mov r11, rsp
push rsi
push rdi
push r12
sub rsp, 0xb0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
mov rax, qword [0x1800f18c0]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov rbp, rcx
mov qword [r11 - 0x58], 0xf
xor r12d, r12d
mov qword [r11 - 0x60], r12
mov byte [r11 - 0x70], r12b
xor r8d, r8d
lea edx, [r12 + 0x2f]
lea rcx, [r11 - 0x78]
call fcn.180005ab0
lea rcx, [rsp + 0x58]
mov rdx, qword [rsp + 0x70]
cmp rdx, 0x10
cmovae rcx, qword [rsp + 0x58]
lea r9d, [r12 + 0x2f]
lea r8, str..pipe86A12194_0576_496F_911E_CB6B64509AA9
call fcn.180087940
mov qword [rsp + 0x68], 0x2f
lea rax, [rsp + 0x58]
cmp qword [rsp + 0x70], 0x10
cmovae rax, qword [rsp + 0x58]
mov byte [rax + 0x2f], r12b
mov qword [rsp + 0x98], InitCommonControls
mov qword [rsp + 0x90], r12
mov byte [rsp + 0x80], r12b
lea r9d, [r12 + 3]
lea r8, [0x1800bc050]
lea edx, [r12 + 0xf]
lea rcx, [rsp + 0x80]
call fcn.180087940
mov qword [rsp + 0x90], 3
lea rax, [rsp + 0x80]
cmp qword [rsp + 0x98], 0x10
cmovae rax, qword [rsp + 0x80]
mov byte [rax + 3], r12b
lea rcx, [rsp + 0x58]
cmp qword [rsp + 0x70], 0x10
cmovae rcx, qword [rsp + 0x58]
mov edx, 0xbb8
call qword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
test eax, eax
je 0x180006ad8
lea rcx, [rsp + 0x58]
cmp qword [rsp + 0x70], 0x10
cmovae rcx, qword [rsp + 0x58]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180006ac9
mov dword [rsp + 0x44], r12d
lea rdx, [rsp + 0x80]
cmp qword [rsp + 0x98], 0x10
cmovae rdx, qword [rsp + 0x80]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x44]
mov r8d, dword [rsp + 0x90]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180006ab1
mov ecx, 0xa00000
call fcn.18002d8d0
mov rbx, rax
test rax, rax
je 0x180006abe
mov dword [rsp + 0x40], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x40]
mov r8d, 0xa00000
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180006a9a
mov eax, dword [rsp + 0x40]
cmp eax, 0x9fffff
jae 0x180006aa7
mov byte [rax + rbx], r12b
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbx
mov rcx, rbp
call fcn.1800053c0
jmp 0x180006aa7
lea rcx, str.e4..
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov rcx, rbx
call fcn.180088960
jmp 0x180006abe
lea rcx, str.e3..
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180006ae5
lea rcx, str.e2..
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x180006ae5
lea rcx, str.e1..
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp qword [rbp + 0x18], 0
seta dil
cmp qword [rsp + 0x98], 0x10
jb 0x180006b06
mov rcx, qword [rsp + 0x80]
call fcn.180087ce0
mov qword [rsp + 0x98], InitCommonControls
mov qword [rsp + 0x90], r12
mov byte [rsp + 0x80], 0
cmp qword [rsp + 0x70], 0x10
jb 0x180006b39
mov rcx, qword [rsp + 0x58]
call fcn.180087ce0
mov al, dil
jmp 0x180006b3c
mov al, dil
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.180087cc0
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r12
pop rdi
pop rsi
ret