Function at 0x1400316e0
Capabilities:
Create pipe

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xf8
mov qword [rsp + 0x88], rcx
mov byte [rsp + 0x4f], dl
movzx eax, dl
mov ecx, 0x40080002
sub ecx, eax
mov dword [rsp + 0x90], ecx
mov qword [rsp + 0xa0], 0
mov r15d, 8
mov sil, 1
lea r14, [rsp + 0x58]
mov r12, qword [sym.imp.bcryptprimitives.dll_ProcessPrng]
nop word cs:[rax + rax]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rsp + 0x9c], eax
mov rax, qword [0x1400ec9b8]
test rax, rax
jne 0x14003178c
nop dword [rax]
mov qword [rsp + 0x58], 0
mov edx, 8
mov rcx, r14
call r12
mov rax, qword [rsp + 0x58]
mov qword [0x1400ec9b8], rax
mov rax, qword [0x1400ec9b8]
test rax, rax
je 0x140031760
mov eax, 1
lock xadd qword [0x1400ec9b8], rax
mov qword [rsp + 0xd8], rax
lea rax, [rsp + 0x9c]
mov qword [rsp + 0xb0], rax
lea rax, [0x140018170]
mov qword [rsp + 0xb8], rax
lea rax, [rsp + 0xd8]
mov qword [rsp + 0xc0], rax
lea rax, [0x140017b30]
mov qword [rsp + 0xc8], rax
lea rax, str..pipe__rust_anonymous_pipe1__.
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], 2
mov qword [rsp + 0x78], 0
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], 2
lea rcx, [rsp + 0xe0]
mov rdx, r14
call fcn.14000d440
test rdi, rdi
sete al
or sil, al
test sil, 1
jne 0x140031847
mov rcx, qword [0x1400ec9d0]
xor edx, edx
mov r8, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r9, qword [rsp + 0xe0]
mov r8, qword [rsp + 0xe8]
mov r10, qword [rsp + 0xf0]
lea rbx, [r8 + r10]
test r10, r10
mov qword [rsp + 0x50], r8
mov qword [rsp + 0xa8], r9
mov dword [rsp + 0x98], r15d
mov qword [rsp + 0xd0], r10
je 0x1400318a0
movzx esi, byte [r8]
test sil, sil
js 0x1400318c0
lea r12, [r8 + 1]
jmp 0x14003191b
mov edi, 4
mov edx, 8
xor r15d, r15d
xor r12d, r12d
xor esi, esi
xor r13d, r13d
jmp 0x14003196a
mov eax, esi
and eax, 0x1f
movzx edx, byte [r8 + 1]
and edx, 0x3f
cmp sil, 0xdf
jbe 0x140031910
movzx ecx, byte [r8 + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp sil, 0xf0
jb 0x140031be1
lea r12, [r8 + 4]
movzx esi, byte [r8 + 3]
and eax, 7
shl eax, 0x12
shl ecx, 6
and esi, 0x3f
or esi, ecx
or esi, eax
cmp esi, 0xffff
jbe 0x14003191b
jmp 0x140031bf8
lea r12, [r8 + 2]
shl eax, 6
or eax, edx
mov esi, eax
mov eax, 1
xor r15d, r15d
mov rcx, rbx
sub rcx, r12
add rcx, 3
mov rdx, 0xffffffffffffffff
cmovb rcx, rdx
shr rcx, 2
lea rdx, [rcx + rax]
lea rdi, [rcx + rax]
inc rdi
cmp rdx, 3
mov eax, 4
cmovb rdi, rax
mov rax, rdi
shr rax, 0x3e
jne 0x140031d8d
lea rdx, [rdi + rdi]
mov r13w, 1
movzx eax, byte [0x1400ec9e8]
xor ecx, ecx
call fcn.140033a00
test rax, rax
je 0x140031d8d
mov rcx, qword [rsp + 0xa0]
inc ecx
mov dword [rsp + 0x94], ecx
mov word [rax], si
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 1
mov esi, 1
jmp 0x1400319cf
xor ecx, ecx
mov edi, r15d
cmp rsi, qword [rsp + 0x58]
je 0x140031a9b
mov r15d, ecx
mov word [rax + rsi*2], di
inc rsi
mov qword [rsp + 0x68], rsi
test r12, r12
je 0x1400319f0
test r15w, r15w
jne 0x1400319b0
cmp r12, rbx
je 0x1400319f0
movzx edi, byte [r12]
test dil, dil
js 0x140031a1e
inc r12
xor ecx, ecx
jmp 0x1400319b5
mov rbp, qword [rsp + 0x58]
cmp r13w, 1
jne 0x140031b20
xor edi, edi
mov r12d, 0
mov r13d, 0
mov r8d, 0
cmp rsi, rbp
jne 0x1400319c3
jmp 0x140031ac6
mov ecx, edi
and ecx, 0x1f
movzx r8d, byte [r12 + 1]
and r8d, 0x3f
cmp dil, 0xdf
jbe 0x140031aed
movzx edx, byte [r12 + 2]
shl r8d, 6
and edx, 0x3f
or edx, r8d
cmp dil, 0xf0
jb 0x140031b00
movzx edi, byte [r12 + 3]
add r12, 4
and ecx, 7
shl ecx, 0x12
shl edx, 6
and edi, 0x3f
or edi, edx
or edi, ecx
cmp edi, 0xffff
jbe 0x140031b17
lea edx, [rdi + 0xff0000]
shr edx, 0xa
or edx, 0xd800
and edi, 0x3ff
or edi, 0xdc00
mov ecx, edi
mov edi, edx
jmp 0x1400319b5
mov r8, rbx
sub r8, r12
add r8, 3
mov rax, 0xffffffffffffffff
cmovb r8, rax
shr r8, 2
movzx eax, r13w
cmp cx, 1
sbb r8, 0xffffffffffffffff
add r8, rax
mov r15d, ecx
inc r8
mov qword [rsp + 0x20], 2
mov r9d, 2
mov rcx, r14
mov rdx, rsi
call fcn.14004e450
mov rax, qword [rsp + 0x60]
jmp 0x1400319c3
add r12, 2
shl ecx, 6
or ecx, r8d
mov edi, ecx
xor ecx, ecx
jmp 0x1400319b5
add r12, 3
shl ecx, 0xc
or edx, ecx
mov edi, edx
cmp edi, 0xffff
ja 0x140031a77
xor ecx, ecx
jmp 0x1400319b5
mov rbx, qword [rsp + 0x60]
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x10000
mov dword [rsp + 0x20], 0x10000
mov rcx, rbx
mov edx, dword [rsp + 0x90]
mov r15d, dword [rsp + 0x98]
mov r8d, r15d
mov r9d, 1
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140031c91
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rsp + 0x94]
cmp ecx, 0xa
mov rdi, qword [rsp + 0xa8]
mov r12, qword [sym.imp.bcryptprimitives.dll_ProcessPrng]
jge 0x140031c22
cmp eax, 5
jne 0x140031bb0
mov eax, ecx
mov qword [rsp + 0xa0], rax
jmp 0x140031bbd
test r15d, r15d
je 0x140031c22
xor r15d, r15d
cmp eax, 0x57
jne 0x140031c22
xor esi, esi
test rbp, rbp
je 0x140031740
mov rcx, qword [0x1400ec9d0]
xor esi, esi
xor edx, edx
mov r8, rbx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x140031740
lea r12, [r8 + 3]
shl eax, 0xc
or ecx, eax
mov esi, ecx
cmp esi, 0xffff
jbe 0x14003191b
lea ecx, [rsi + 0xff0000]
shr ecx, 0xa
or ecx, 0xd800
and esi, 0x3ff
or esi, 0xdc00
mov eax, 2
mov r15d, esi
mov esi, ecx
jmp 0x140031923
shl rax, 0x20
or rax, 2
mov rcx, qword [rsp + 0x88]
mov qword [rcx + 8], rax
mov qword [rcx], 1
test rbp, rbp
je 0x140031c54
mov rcx, qword [0x1400ec9d0]
xor edx, edx
mov r8, rbx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test rdi, rdi
je 0x140031c6d
mov rcx, qword [0x1400ec9d0]
xor edx, edx
mov r8, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp rsi, 0xffffffffffffffff
je 0x140031c7c
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
add rsp, 0xf8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
test rbp, rbp
mov rdi, qword [rsp + 0xa8]
je 0x140031cb0
mov rcx, qword [0x1400ec9d0]
xor edx, edx
mov r8, rbx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsp + 0x68], 0
mov dword [rsp + 0x58], 0
mov qword [rsp + 0x74], 0
mov word [rsp + 0x7c], 0
movzx eax, byte [rsp + 0x4f]
mov byte [rsp + 0x79], al
xor al, 1
mov byte [rsp + 0x78], al
mov dword [rsp + 0x70], 0
mov dword [rsp + 0xb0], 0x18
mov qword [rsp + 0xb8], 0
mov dword [rsp + 0xc0], 1
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x60], rax
lea r8, [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 0xd0]
call fcn.1400267a0
test rax, rax
je 0x140031d54
mov rax, qword [rsp + 0x88]
mov qword [rax + 8], rdx
mov qword [rax], 1
test rdi, rdi
jne 0x140031c59
jmp 0x140031c6d
mov rax, qword [rsp + 0x88]
mov qword [rax + 8], rsi
mov qword [rax + 0x10], rdx
mov qword [rax], 0
test rdi, rdi
je 0x140031c7c
mov rcx, qword [0x1400ec9d0]
xor edx, edx
mov r8, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x140031c7c
ud2