Function at 0x18002b070
Capabilities:
Read file on windows
Read pipe
Terminate process
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 - 0x150]
sub rsp, 0x250
mov r14, qword [0x180050ad0]
mov r13, qword [0x180050ad8]
lea rdi, [rcx + 0xc]
lea r12, [r14 + 0xc]
call qword [sym.imp.KERNEL32.dll_GetOEMCP]
mov r15d, 0x208
lea rcx, [rsp + 0x40]
mov r8d, r15d
xor edx, edx
mov ebx, eax
call fcn.18002ec70
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
xor esi, esi
mov r8, rdi
mov qword [rsp + 0x38], rsi
mov r9d, eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rsi
xor edx, edx
mov ecx, ebx
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp qword [0x180050ae8], rsi
mov ebx, esi
lea r15d, [rsi + 4]
jne 0x18002b10d
lea eax, [rsi + 1]
jmp 0x18002b2f7
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov rcx, qword [0x180050af0]
lea r9, [rbp + 0x198]
lea rdx, [rsp + 0x40]
mov r8d, eax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18002b298
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [rbp + 0x198], eax
jne 0x18002b298
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x180050ad0]
xor edx, edx
mov r8d, 0x800c
mov edi, esi
call fcn.18002ec70
mov r8d, 0x7ff6
mov rdx, r12
mov rcx, qword [0x180050af8]
lea r9, [rbp + 0x190]
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x18002b30c
cmp dword [rbp + 0x190], esi
jbe 0x18002b26b
mov rcx, qword [0x180050af8]
mov r8d, 0x7ff6
mov edx, ebx
lea r9, [rbp + 0x190]
sub r8d, ebx
add rdx, r12
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18002b298
add ebx, dword [rbp + 0x190]
mov edi, esi
cmp ebx, 0x7ff6
jb 0x18002b281
xor eax, eax
mov rcx, r14
mov qword [r14], rax
lea r12d, [rax + 0xc]
mov qword [r14 + 4], 0x410
mov edx, r12d
mov dword [r14], ebx
call fcn.18002c2a8
lea edx, [rbx + 0xc]
mov word [r14 + 0xa], ax
mov rcx, qword [0x180050ad0]
call fcn.18002e4dc
test eax, eax
jle 0x18002b2a3
xor eax, eax
mov edx, r12d
mov rcx, r13
mov qword [r13], rax
mov dword [r13 + 8], eax
call fcn.18002e420
cmp eax, 0xffffffff
je 0x18002b2a3
mov rcx, qword [0x180050ad0]
xor edx, edx
mov r8d, 0x800c
mov ebx, esi
call fcn.18002ec70
mov r14, qword [0x180050ad0]
lea r12, [r14 + 0xc]
jmp 0x18002b281
cmp edi, 0x3e8
jae 0x18002b294
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
add edi, 0x64
mov r8d, 0x7ff6
mov edx, ebx
sub r8d, ebx
add rdx, r12
jmp 0x18002b182
mov eax, esi
jmp 0x18002b29e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xffffffff
jne 0x18002b2f3
mov rcx, qword [0x180050ae8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, qword [0x180050ae8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x180050af8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x180050af0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x180050af0], rsi
mov qword [0x180050af8], rsi
mov qword [0x180050ae8], rsi
or eax, 0xffffffff
jmp 0x18002b344
test eax, eax
je 0x18002b30c
mov r9d, 1
mov r8d, eax
mov dl, r15b
mov cl, reloc.WS2_32.dll_recv
call fcn.18002c9d0
jmp 0x18002b344
xor eax, eax
mov rcx, r14
mov qword [r14], rax
lea edx, [rax + 0xc]
mov qword [r14 + 4], 0x40410
mov dword [r14], ebx
call fcn.18002c2a8
lea edx, [rbx + 0xc]
mov word [r14 + 0xa], ax
mov rcx, qword [0x180050ad0]
call fcn.18002e4dc
test eax, eax
setg sil
lea eax, [rsi - 1]
mov rbx, qword [rsp + 0x2a0]
add rsp, 0x250
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret