Function at 0x140050a60
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x10], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rbx, rcx
xor r15d, r15d
cmp byte [rcx + 0x78], r15b
je 0x140050aa3
call fcn.140050e80
test al, al
je 0x140050e5b
lea rsi, [rbx + 0xb0]
mov rax, qword [rsi + 8]
mov edi, 1
or r12, 0xffffffffffffffff
cmp qword [rsi], rax
jne 0x140050c7f
lea rax, [rbx + 0xd0]
mov qword [rbp - 0x48], rax
lea r14, [rax + 8]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [rbx + 0x120], r15
jne 0x140050af0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140050e5b
lea rcx, [rbx + 0x100]
lea rdx, [rbp - 0x28]
call fcn.14002e26c
mov rdx, rax
mov rcx, qword [rax]
test rcx, rcx
mov rax, r15
je 0x140050b11
mov rax, qword [rcx]
mov rcx, qword [rax + 0x10]
sub rcx, rdi
and rcx, qword [rdx + 0x10]
mov rax, qword [rax + 8]
mov r13, qword [rax + rcx*8]
mov r10d, dword [0x1401aad80]
mov ecx, r10d
imul ecx, r10d
imul ecx, r10d
mov eax, 0x30c30c31
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x15
sub ecx, edx
cmp ecx, 0x13
jne 0x140050ba1
lea r9d, [rcx + 0x55]
mov ecx, r15d
mov eax, r10d
cdq
sub eax, edx
sar eax, 1
mov r12d, eax
test r12d, r12d
jle 0x140050b96
mov eax, r10d
cdq
and edx, 3
add eax, edx
sar eax, 2
mov r8d, r15d
mov r15, r12
test eax, eax
jle 0x140050b8e
mov edx, r8d
mov r11d, eax
add r9d, edx
sub edx, edi
sub r11, rdi
jne 0x140050b84
add r8d, ecx
sub r15, rdi
jne 0x140050b7a
add ecx, edi
cmp ecx, r9d
jl 0x140050b63
or r12, 0xffffffffffffffff
lea rdx, [r13 + 8]
mov rcx, rsi
call fcn.14002ab6c
mov qword [rbx + 0xc8], r15
mov r8d, dword [0x1401aad80]
lea ecx, [r8 + 1]
imul ecx, r8d
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
shl eax, 3
sub ecx, eax
cmp ecx, 0x10
jne 0x140050c3c
mov rax, qword [str.uDkJ1B2UEzaTnW]
mov qword [rbp - 0x40], rax
mov eax, dword [0x14013e170]
mov dword [rbp - 0x38], eax
movzx eax, word [0x14013e174]
mov word [rbp - 0x34], ax
mov al, byte [0x14013e176]
mov byte [rbp - 0x32], al
lea rax, [rbp - 0x40]
mov rcx, r12
inc rcx
cmp byte [rax + rcx], r15b
jne 0x140050c10
mov eax, 4
mul rcx
cmovo rax, r12
mov rcx, rax
call fcn.1400bcf98
mov rcx, rax
call fcn.1400be048
mov r8d, dword [0x1401aad80]
imul r8d, r8d
mov eax, 0x38e38e39
imul r8d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*8]
add eax, eax
sub r8d, eax
cmp r8d, 3
jne 0x140050c76
mov edx, 0x97
lea r8d, [rdx + 1]
lea rcx, str._d__d_n
call fcn.1400be234
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rbp - 0x50], r15d
mov rdx, qword [rsi]
mov r8, qword [rsi + 8]
sub r8, rdx
lea rcx, [rbx + 0x80]
add rdx, qword [rbx + 0xc8]
mov qword [rsp + 0x20], rcx
lea r9, [rbp - 0x50]
mov rcx, qword [rbx + 0xa8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140050d33
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x140050d02
cmp eax, 0x3e5
je 0x140050cfc
lea rax, str.Channel_write_failure
mov qword [rbp - 0x48], rax
lea rdx, [rbp - 0x48]
lea rcx, [rbp - 0x28]
call fcn.1400c0da8
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rbp - 0x28], rax
lea rdx, [0x14016d650]
lea rcx, [rbp - 0x28]
call fcn.1400c57f8
int3
mov byte [rbx + 0x78], dil
jmp 0x140050d33
lea rcx, [rbp - 0x40]
call fcn.1400c0e20
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rbp - 0x40], rax
lea rax, vtable.CRSimpleIPCExceptionDisconnected.0
mov qword [rbp - 0x40], rax
lea rdx, [0x14016d608]
lea rcx, [rbp - 0x40]
call fcn.1400c57f8
int3
cmp byte [rbx + 0x78], r15b
jne 0x140050e5b
mov r8d, dword [0x1401aad80]
mov r9d, r8d
imul r9d, r8d
mov eax, 0x2aaaaaab
imul r9d
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea ecx, [rdx + rdx*2]
shl ecx, 2
mov edx, r9d
sub edx, ecx
mov ecx, dword [0x1401acbb0]
mov r10d, 0xdd45d574
cmp edx, 0xb
cmove ecx, r10d
mov dword [0x1401acbb0], ecx
mov ecx, dword [rbp - 0x50]
add qword [rbx + 0xc8], rcx
imul r9d, r8d
mov eax, 0x2aaaaaab
imul r9d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
shl eax, 3
sub r9d, eax
cmp r9d, 2
jne 0x140050db5
add dword [0x1401acc00], edi
mov rax, qword [rsi + 8]
sub rax, qword [rsi]
cmp qword [rbx + 0xc8], rax
jne 0x140050e49
lea rax, [rbx + 0xd0]
mov qword [rbp - 0x48], rax
lea r14, [rax + 8]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [rbx + 0x120], r15
je 0x140050e27
mov rcx, qword [rbx + 0x110]
sub rcx, rdi
and rcx, qword [rbx + 0x118]
mov rax, qword [rbx + 0x108]
mov rcx, qword [rax + rcx*8]
mov rax, qword [rcx]
xor edx, edx
call qword [rax]
add qword [rbx + 0x120], r12
jne 0x140050e20
mov qword [rbx + 0x118], r15
jmp 0x140050e27
add qword [rbx + 0x118], rdi
mov rax, qword [rsi]
mov qword [rsi + 8], rax
mov qword [rbx + 0xc8], r15
cmp qword [rbx + 0x120], r15
setne dil
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbx + 0xa0]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov al, dil
jmp 0x140050e5d
xor al, al
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret