Function at 0x17ae7a0
Capabilities:
Get session user name
Get user security identifier

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x2d0
lea rbp, [rsp + 0x60]
mov qword [rbp + 0x2a0], rbx
mov qword [rbp + 0x2a8], rsi
mov qword [rbp + 0x2b0], rdi
mov rax, qword [0x039f1190]
xor rax, rbp
mov qword [rbp + 0x260], rax
xor r12d, r12d
lea r15, [0x03e490d0]
mov byte [rbp + 0x40], 0
lea edx, [r12 + 1]
mov rcx, r15
mov byte [rbp + 0x41], 0
mov byte [rbp + 0x42], 0
mov byte [rbp + 0x43], 0
mov byte [rbp + 0x44], 0
mov byte [rbp + 0x45], 1
mov byte [rbp + 0x38], 0
mov byte [rbp + 0x39], 0
mov byte [rbp + 0x3a], 0
mov byte [rbp + 0x3b], 0
mov byte [rbp + 0x3c], 0
mov byte [rbp + 0x3d], 5
mov qword [rbp + 8], r12
mov qword [rbp + 0x10], r12
mov qword [rbp + 0x18], r12
mov qword [rbp + 0x20], r12
mov qword [rbp + 0x28], r12
mov rbx, r12
mov edi, r12d
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x17ae852
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [r12 + 1]
jmp 0x17aede6
lea r14, [0x03e490a8]
mov edx, 1
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x17ae87b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
lea rdx, [rbp + 0x34]
lea rcx, [rbp + 0x50]
mov dword [rbp + 0x34], 0x101
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x17ae8a4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
lea rax, [rbp + 0x30]
lea r9, [rbp]
lea rdx, [rbp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 4]
xor r8d, r8d
mov qword [rsp + 0x28], rax
xor ecx, ecx
mov dword [rbp + 4], r12d
mov qword [rsp + 0x20], r12
mov dword [rbp], r12d
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x17ae8eb
mov edi, 1
jmp 0x17aede6
mov eax, dword [rbp]
movabs r13, 0xffffffffffffff0
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x17ae904
mov rcx, r13
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.0119a4f0
mov eax, dword [rbp + 4]
sub rsp, rcx
add rax, rax
lea r8, [rsp + 0x60]
lea rcx, [rax + 0xf]
mov qword [rbp + 8], r8
cmp rcx, rax
ja 0x17ae92e
mov rcx, r13
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.0119a4f0
sub rsp, rcx
lea rcx, [rbp + 0x30]
mov qword [rsp + 0x30], rcx
lea rcx, [rbp + 4]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rcx
lea r9, [rbp]
lea rdx, [rbp + 0x50]
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x17ae97d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
lea rcx, [0x017aeec8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
jne 0x17ae997
lea edi, [rax + 1]
jmp 0x17aede6
lea rdx, [0x017aeeb0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
mov rsi, rax
jne 0x17ae9b7
lea edi, [rax + 1]
jmp 0x17aede6
xor edx, edx
lea r9, [rbp]
xor r8d, r8d
lea ecx, [rdx + 0x39]
mov dword [rbp], r12d
call rsi
test eax, eax
jne 0x17aea8d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x17aea8d
mov eax, dword [rbp]
lea rdx, [rax + 0xf]
cmp rdx, rax
ja 0x17ae9ef
mov rdx, r13
and rdx, 0xfffffffffffffff0
mov rax, rdx
call fcn.0119a4f0
sub rsp, rdx
xor edx, edx
lea r8, [rsp + 0x60]
lea ecx, [rdx + 0x39]
lea r9, [rbp]
mov qword [rbp + 0x18], r8
call rsi
test eax, eax
jne 0x17aea26
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
xor edx, edx
lea r9, [rbp]
xor r8d, r8d
lea ecx, [rdx + 0x3a]
mov dword [rbp], r12d
call rsi
test eax, eax
jne 0x17aea8d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x17aea8d
mov eax, dword [rbp]
lea rdx, [rax + 0xf]
cmp rdx, rax
ja 0x17aea56
mov rdx, r13
and rdx, 0xfffffffffffffff0
mov rax, rdx
call fcn.0119a4f0
sub rsp, rdx
xor edx, edx
lea r8, [rsp + 0x60]
lea ecx, [rdx + 0x3a]
lea r9, [rbp]
mov qword [rbp + 0x20], r8
call rsi
test eax, eax
jne 0x17aea8d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
lea rax, [rbp + 0x10]
lea rcx, [rbp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], r12d
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x38], r12d
mov dword [rsp + 0x30], r12d
xor r8d, r8d
mov dl, 1
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x17aeada
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
lea rax, [rbp + 0x28]
lea rcx, [rbp + 0x38]
mov r9d, 0x220
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], r12d
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x38], r12d
mov dword [rsp + 0x30], r12d
mov r8d, 0x20
mov dl, 2
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x17aeb2d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
cmp qword [rbp + 0x20], rbx
jne 0x17aeb4f
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov rcx, qword [rbp + 8]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea esi, [rbx + rax + 0x18]
jmp 0x17aeb81
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov rcx, qword [rbp + 0x20]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov rcx, qword [rbp + 0x18]
add ebx, eax
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov rcx, qword [rbp + 8]
add ebx, eax
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea esi, [rax + rbx + 0x28]
mov ecx, esi
call qword [sym.imp.MSVCR80.dll_malloc]
test rax, rax
mov rbx, rax
jne 0x17aeb9f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [rbx + 1]
jmp 0x17aede6
mov r8d, 2
mov edx, esi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x17aebc4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
cmp qword [rbp + 0x20], rdi
mov edx, 2
mov r8d, 0x80120000
mov rcx, rbx
jne 0x17aebfa
mov r9, qword [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x17aec70
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
mov r9, qword [rbp + 0x18]
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x17aec18
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
mov r9, qword [rbp + 0x20]
mov edx, 2
mov r8d, 0x80120000
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x17aec44
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
mov r9, qword [rbp + 0x28]
mov edx, 2
mov r8d, 0x80120000
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x17aec70
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
mov r9, qword [rbp + 8]
mov edx, 2
mov r8d, 0xe01f0000
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x17aec9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
xor r9d, r9d
mov r8, rbx
mov rcx, r15
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x17aecc3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
mov rcx, qword [rbp + 0x28]
lea rax, [0x03e49090]
mov dword [0x03e49090], 0x18
mov qword [0x03e48e38], rax
mov qword [0x03e49098], r15
mov dword [0x03e490a0], r12d
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov rcx, qword [rbp + 8]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea esi, [rbx + rax + 0x18]
mov ecx, esi
call qword [sym.imp.MSVCR80.dll_malloc]
test rax, rax
mov rbx, rax
jne 0x17aed21
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [rbx + 1]
jmp 0x17aede6
mov r8d, 2
mov edx, esi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x17aed46
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
mov rax, qword [rbp + 8]
mov edx, 2
mov r9d, 0x101f0000
lea r8d, [rdx + 1]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAceEx]
test eax, eax
jne 0x17aed78
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
mov rax, qword [rbp + 0x28]
mov edx, 2
mov r9d, 0x101f0000
lea r8d, [rdx + 1]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAceEx]
test eax, eax
jne 0x17aedaa
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
xor r9d, r9d
mov r8, rbx
mov rcx, r14
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x17aedce
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 1
jmp 0x17aede6
mov dword [0x03e49078], 0x18
mov qword [0x03e49080], r14
mov dword [0x03e49088], r12d
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x17aedf9
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov qword [rbp + 0x10], r12
mov rcx, qword [rbp + 0x28]
test rcx, rcx
je 0x17aee0c
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov qword [rbp + 0x28], r12
test edi, edi
je 0x17aee38
test rbx, rbx
je 0x17aee1e
mov rcx, rbx
call qword [sym.imp.MSVCR80.dll_free]
lea r8, [0x017aee70]
lea rcx, [0x01580b10]
mov edx, 0x34b
call fcn.017eea00
jmp 0x17aee3a
xor eax, eax
mov rcx, qword [rbp + 0x260]
xor rcx, rbp
call fcn.01003340
mov rbx, qword [rbp + 0x2a0]
mov rsi, qword [rbp + 0x2a8]
mov rdi, qword [rbp + 0x2b0]
lea rsp, [rbp + 0x270]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret