Function at 0x140076d70
Capabilities:
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x50
mov rsi, rdx
mov rbp, rcx
add rcx, 0x28
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea r14, [rbp + 0x18]
mov rax, qword [r14]
mov rbx, qword [rax]
xor r12d, r12d
cmp rbx, rax
je 0x140076e69
mov rax, qword [rbx + 0x10]
mov r8, rsi
sub r8, rax
nop
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x140076dc4
add rax, 2
test ecx, ecx
jne 0x140076db0
test edx, edx
jne 0x140076e3f
mov byte [rsp + 0x90], 0xff
mov rcx, qword [rbx + 0x10]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0xa8]
lea r8d, [rdx + 1]
lea rdx, [rsp + 0x90]
mov rcx, qword [rcx + 0x208]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140076e4a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, qword [rbx]
mov rax, qword [rbx + 8]
mov qword [rax], rdi
mov rcx, qword [rbx]
mov rax, qword [rbx + 8]
mov qword [rcx + 8], rax
dec qword [rbp + 0x20]
mov edx, Ordinal_27
mov rcx, rbx
call fcn.1401d0398
mov rbx, rdi
cmp rbx, qword [r14]
jmp 0x140076d9f
mov rbx, qword [rbx]
cmp rbx, qword [r14]
jmp 0x140076d9f
mov rax, qword [rbx + 0x10]
inc dword [rax + 0x210]
mov rax, qword [rbx + 0x10]
mov rbx, qword [rax + 0x208]
cmp rbx, 0xffffffffffffffff
jne 0x140076fd6
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp rbx, 0xffffffffffffffff
jne 0x140076ef4
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x140076f2b
mov edx, 0x4e20
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x140076f31
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp rbx, 0xffffffffffffffff
je 0x140076ea0
mov dword [rsp + 0xa0], 2
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0xa0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
jne 0x140076f51
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140076f31
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, 0xffffffffffffffff
add rsp, 0x50
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov edx, 0x218
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov rdi, rax
test rax, rax
je 0x140076fd6
inc dword [rax + 0x210]
mov qword [rax + 0x208], rbx
mov r8, rsi
mov edx, 0x104
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov rsi, qword [r14]
movabs rax, 0xaaaaaaaaaaaaaaa
cmp qword [r14 + 8], rax
jne 0x140076fa8
lea rcx, str.list_too_long
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x48], r12
mov ecx, Ordinal_27
call fcn.1401d0330
mov qword [rax + 0x10], rdi
inc qword [r14 + 8]
mov rcx, qword [rsi + 8]
mov qword [rax], rsi
mov qword [rax + 8], rcx
mov qword [rsi + 8], rax
mov qword [rcx], rax
lea rcx, [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, rbx
add rsp, 0x50
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret