Function at 0x140001d40
Capabilities:
Connect pipe
Create pipe
Get session user name
Read file on windows

Disassembly:
push rbp
push r14
lea rbp, [rsp - 0x5c8]
sub rsp, 0x6c8
mov rax, qword [0x140006008]
xor rax, rsp
mov qword [rbp + 0x5a0], rax
mov r8, rcx
lea rdx, str..pipe_s
xor r14d, r14d
lea rcx, [rbp + 0x1a0]
mov dword [rsp + 0x74], r14d
call qword [sym.imp.USER32.dll_wsprintfW]
lea edx, [r14 + 1]
lea rcx, [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x140001db1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.InitializeSecurityDescriptor___failed._Error:__d_n
call fcn.140001010
xor eax, eax
jmp 0x1400021a7
xor r9d, r9d
lea r8, [rbp - 0x80]
lea rcx, str.D:_A_OICI_GA___WD_
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
jne 0x140001de8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ConvertStringSecurityDescriptorToSecurityDescriptor___failed._Error:__d_n
call fcn.140001010
xor eax, eax
jmp 0x1400021a7
xor r8d, r8d
mov qword [rsp + 0x6e8], rbx
lea rax, [rsp + 0x78]
mov r9d, 0xff
mov qword [rsp + 0x38], rax
lea rcx, [rbp + 0x1a0]
mov dword [rsp + 0x30], r14d
lea edx, [r8 + 3]
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140001e4a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_CreatePipe__d
call fcn.140001010
xor eax, eax
jmp 0x14000219f
lea rdx, [rbp + 0x1a0]
mov qword [rsp + 0x6b8], r13
lea rcx, str.___Listening_on_pipe__S__waiting_for_client_to_connect_n
call fcn.140001010
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x140001e8f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x140001e8f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140002192
lea rcx, str.___Client_connected__n
call fcn.140001010
lea r9, [rsp + 0x74]
mov qword [rsp + 0x20], r14
mov r8d, 0xff
lea rdx, [rbp + 0xa0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ImpersonateNamedPipeClient]
test eax, eax
jne 0x140001ee8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, dword [rsp + 0x74]
lea rcx, str.____Failed_to_impersonate_the_client._d__d_n
mov edx, eax
call fcn.140001010
xor eax, eax
jmp 0x140002197
cmp dword [0x140006620], r14d
mov edx, 0x10c
mov qword [rsp + 0x6f0], rsi
mov qword [rsp + 0x6f8], rdi
mov qword [rsp + 0x6b0], r15
mov dword [rsp + 0x70], r14d
je 0x140002067
mov ecx, 0x4000
mov dword [rsp + 0x40], r14d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
lea rcx, str.___Enumerating_tokens_n
mov r15d, r14d
mov r13, rax
call fcn.140001160
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x40]
call fcn.1400014d0
mov rsi, rax
test rax, rax
jne 0x140001f69
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Failed_to_enumerate_tokens_with_error_code:__d_n
call fcn.140001160
jmp 0x14000217a
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x140001fb0
lea rbx, [rsi + 0x100]
mov edi, eax
nop word [rax + rax]
mov rcx, qword [rbx]
test rcx, rcx
je 0x140001f9e
lea r8, [rsp + 0x70]
mov rdx, r13
call fcn.140001ab0
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbx, 0x108
sub rdi, 1
jne 0x140001f80
mov r14d, dword [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea r9, [0x1400014c0]
mov edx, r14d
mov r8d, 0x10c
mov edi, r14d
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
test r14d, r14d
je 0x140002048
mov rbx, r13
mov esi, edi
nop
cmp dword [rbx + 0x104], 0
je 0x140001ffe
mov rdx, rbx
lea rcx, str.__s_n
mov r15d, 1
call fcn.140001070
add rbx, 0x10c
sub rsi, 1
jne 0x140001fe0
test r14d, r14d
je 0x140002048
lea rbx, [r13 + 0x108]
cmp dword [rbx - 4], 0
jne 0x14000203b
cmp dword [rbx], 0
je 0x14000203b
lea rdx, [rbx - 0x108]
mov r15d, 1
lea rcx, str.__s_n
call fcn.140001070
add rbx, 0x10c
sub rdi, 1
jne 0x140002017
test r15d, r15d
jne 0x140002059
lea rcx, str.____No_tokens_available_n
call fcn.140001160
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x14000217a
mov ecx, 0x1000
mov qword [rsp + 0x6c0], r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
lea rcx, str.___Enumerating_tokens...
mov r12, rax
call fcn.140001160
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x70]
call fcn.1400014d0
mov r15, rax
test rax, rax
jne 0x1400020b9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Failed_to_enumerate_tokens_with_error_code:__d_n
call fcn.140001160
jmp 0x140002172
lea rcx, str.Done__n
call fcn.140001160
lea rcx, str.___Processing_tokens__looking_for_NT_AUTHORITYDECODER..._just_kidding_____looking_for:NT_AUTHORITYSYSTEM..._n
call fcn.140001160
mov esi, dword [rsp + 0x70]
test esi, esi
je 0x14000213e
lea rbx, [r15 + 0x100]
mov edi, esi
mov rcx, qword [rbx]
test rcx, rcx
je 0x140002131
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x140002131
lea rcx, str.ok_impersonateloggedonuser_n
call fcn.140001010
lea rdx, [rsp + 0x70]
mov dword [rsp + 0x70], 0x101
lea rcx, [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x14000212b
lea rdx, [rbp - 0x70]
lea rcx, str.impersonated_user_:__ls_n
call fcn.140001ce0
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
add rbx, 0x108
sub rdi, 1
jne 0x1400020e2
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
test esi, esi
je 0x14000214b
mov r14, rsi
imul rcx, r14, 0x108
mov rcx, qword [rcx + r15 + 0x100]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r12, qword [rsp + 0x6c0]
mov rsi, qword [rsp + 0x6f0]
mov rdi, qword [rsp + 0x6f8]
mov r15, qword [rsp + 0x6b0]
mov eax, 1
mov r13, qword [rsp + 0x6b8]
mov rbx, qword [rsp + 0x6e8]
mov rcx, qword [rbp + 0x5a0]
xor rcx, rsp
call fcn.140002680
add rsp, 0x6c8
pop r14
pop rbp
ret