Function at 0x140002320
Capabilities:
Get token membership

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x47]
sub rsp, 0xd0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x37], rax
xor r15d, r15d
lea rdx, [rbp - 0x31]
mov rbx, rcx
mov dword [rbp - 0x49], r15d
mov rcx, qword [rcx + 0x20]
mov r14d, r15d
mov qword [rbp - 0x41], r15
mov esi, r15d
mov qword [rbp - 0x39], r15
mov edi, 0xffffffff
mov dword [rbp - 0x2d], r15d
call qword [sym.imp.KERNEL32.dll_GetNamedPipeClientProcessId]
test eax, eax
je 0x140002666
mov r8d, dword [rbp - 0x31]
xor edx, edx
mov ecx, 0x440
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r14, rax
test rax, rax
je 0x140002666
lea r8, [rbp - 0x41]
mov edx, 0xa
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140002666
mov rcx, qword [rbp - 0x41]
lea r8, [rbp - 0x39]
mov edx, 2
call qword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
je 0x140002666
mov rcx, qword [rbp - 0x41]
lea rax, [rbp - 0x49]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp eax, 1
je 0x14000269b
mov ecx, dword [rbp - 0x49]
call fcn.14003d014
mov rsi, rax
test rax, rax
je 0x14000269b
mov r9d, dword [rbp - 0x49]
lea rax, [rbp - 0x49]
mov rcx, qword [rbp - 0x41]
mov r8, rsi
mov edx, 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x14000269b
mov rcx, qword [rsi]
mov edx, socket
call qword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
je 0x14000245d
mov dword [rbx + 0x40048], 3
mov edi, r15d
jmp 0x14000269b
mov rcx, qword [rsi]
mov edx, 0x18
call qword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
jne 0x140002657
mov rcx, qword [rsi]
mov edx, reloc.WS2_32.dll_socket
call qword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
jne 0x140002657
mov rcx, qword [rbp - 0x41]
lea rax, [0x1400841c8]
mov qword [rsp + 0x28], rax
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0xb
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x1400024fb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x38], eax
mov r9d, 1
mov r8d, 0x150
lea rdx, str.get_con_client_info
lea rax, str.Failed_to_duplicate_the_primary_token._error:_d
mov qword [rsp + 0x30], rax
lea rcx, str.C:__w1_scontribwin32win32compat_ssh_agent_agent.c
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 2
call fcn.14001ae20
mov rdx, qword [rsi]
test rdx, rdx
jne 0x1400025d8
lea rax, str.sid_is_NULL
mov r9d, 1
mov qword [rsp + 0x30], rax
lea rdx, str.get_username
mov qword [rsp + 0x28], r15
lea rcx, str.C:__w1_scontribwin32win32compatpwd.c
mov r8d, 0x151
mov dword [rsp + 0x20], 2
call fcn.14001ae20
mov qword [0x1400841d0], r15
lea rax, str.Failed_to_get_the_userName
mov r9d, 1
mov qword [rsp + 0x30], rax
lea rdx, str.get_con_client_info
mov qword [rsp + 0x28], r15
lea rcx, str.C:__w1_scontribwin32win32compat_ssh_agent_agent.c
mov r8d, 0x158
mov dword [rsp + 0x20], 2
call fcn.14001ae20
lea r9, [rbp - 0x29]
mov dword [rbp - 0x29], 0x44
lea r8, [rbp - 0x19]
xor edx, edx
mov ecx, 0x1a
call qword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
test eax, eax
je 0x14000269b
mov rcx, qword [rbp - 0x39]
lea r8, [rbp - 0x2d]
lea rdx, [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
je 0x14000269b
mov edi, r15d
cmp dword [rbp - 0x2d], r15d
je 0x14000264b
mov dword [rbx + 0x40048], 2
jmp 0x14000269b
xor ecx, ecx
call fcn.140010070
test rax, rax
je 0x14000253f
mov rcx, qword [rax]
test rcx, rcx
je 0x14000253f
call fcn.14003ee40
mov qword [0x1400841d0], rax
test rax, rax
je 0x140002546
mov qword [rsp + 0x38], rax
lea rdx, str.get_con_client_info
lea rax, str.sshagent_con_username:__s
mov r9d, 1
mov qword [rsp + 0x30], rax
lea rcx, str.C:__w1_scontribwin32win32compat_ssh_agent_agent.c
mov qword [rsp + 0x28], r15
mov r8d, 0x156
mov dword [rsp + 0x20], 5
call fcn.14001ae20
jmp 0x14000257e
mov dword [rbx + 0x40048], 1
jmp 0x14000269b
mov dword [rbx + 0x40048], 4
mov edi, r15d
jmp 0x14000269b
lea rax, str.cannot_retrieve_client_impersonation_token
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea rdx, str.get_con_client_info
mov qword [rsp + 0x28], r15
lea rcx, str.C:__w1_scontribwin32win32compat_ssh_agent_agent.c
mov r8d, 0x134
mov dword [rsp + 0x20], 2
call fcn.14001ae20
mov ecx, dword [rbx + 0x40048]
test ecx, ecx
je 0x1400026e6
sub ecx, 1
je 0x1400026dd
sub ecx, 1
je 0x1400026d4
sub ecx, 1
je 0x1400026cb
cmp ecx, 1
je 0x1400026c2
lea rax, str.unexpected
jmp 0x1400026ed
lea rax, str.service
jmp 0x1400026ed
lea rax, str.system
jmp 0x1400026ed
lea rax, str.administrator
jmp 0x1400026ed
lea rax, str.restricted_user
jmp 0x1400026ed
lea rax, str.unknown
mov qword [rsp + 0x38], rax
lea rdx, str.get_con_client_info
lea rax, str.client_type:__s
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea rcx, str.C:__w1_scontribwin32win32compat_ssh_agent_agent.c
mov qword [rsp + 0x28], r15
mov r8d, 0x16c
mov dword [rsp + 0x20], 5
call fcn.14001ae20
mov qword [rbx + 0x40050], r15
test rsi, rsi
je 0x14000273b
mov rcx, rsi
call fcn.14003d000
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x14000274a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x14000275c
mov rcx, qword [rbp - 0x39]
mov qword [rbx + 0x28], rcx
mov qword [rbx + 0x30], r14
jmp 0x140002779
test r14, r14
je 0x14000276a
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x39]
test rcx, rcx
je 0x140002779
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1400313f0
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret