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

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x420]
sub rsp, 0x520
mov rax, qword [0x18005c010]
xor rax, rsp
mov qword [rbp + 0x410], rax
mov rdi, rdx
mov rbx, rcx
xor edx, edx
lea rcx, [rbp - 0x10]
mov r8d, 0x208
call fcn.180019360
lea rdx, [rsp + 0x58]
mov dword [rsp + 0x58], 0x104
lea rcx, [rbp - 0x10]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x18000b6f6
mov qword [rsp + 0x550], rsi
lea rdx, [rbp - 0x10]
lea rcx, [rbx + 0x10]
mov qword [rsp + 0x558], r14
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
xorps xmm0, xmm0
mov dword [rsp + 0x64], 0x44
xor eax, eax
lea rcx, [rbp + 0x200]
xor edx, edx
mov dword [rbp - 0x20], eax
mov r8d, 0x208
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
call fcn.180019360
lea rax, [rsp + 0x5c]
mov dword [rsp + 0x60], 0x104
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x64]
lea rax, [rsp + 0x60]
xor r14d, r14d
mov qword [rsp + 0x28], rax
lea r8, [rbp - 0x60]
lea rax, [rbp + 0x200]
mov dword [rsp + 0x5c], r14d
lea rdx, [rbp - 0x10]
mov qword [rsp + 0x20], rax
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x18000b56f
lea rcx, str.Lookup_Account_Name_fails._r_n
call fcn.18000a0c0
lea eax, [r14 + 2]
mov rsi, qword [rsp + 0x550]
mov r14, qword [rsp + 0x558]
mov rcx, qword [rbp + 0x410]
xor rcx, rsp
call fcn.180015840
add rsp, 0x520
pop rdi
pop rbx
pop rbp
ret
lea rax, [rsp + 0x48]
mov qword [rsp + 0x48], r14
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov rdx, rdi
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x18000b5c9
cmp eax, 2
jne 0x18000b5b3
lea rcx, str.Key_not_found._n
call fcn.18000a0c0
mov eax, 4
jmp 0x18000b545
lea rcx, str.Error_opening_key._n
call fcn.18000a0c0
mov eax, 5
jmp 0x18000b545
mov rcx, qword [rsp + 0x48]
lea r9, [rbp - 0x60]
mov edx, 4
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov qword [rbx + 8], rcx
mov qword [rsp + 0x20], r14
lea r8d, [rdx - 3]
call qword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
test eax, eax
je 0x18000b610
mov edx, eax
lea rcx, str.SetSecurityInfo_Error__u_n
call fcn.18000a110
mov eax, 6
jmp 0x18000b545
mov rcx, qword [rbx + 8]
lea rax, [rsp + 0x50]
xorps xmm0, xmm0
mov qword [rsp + 0x38], r14
mov edx, 4
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], rax
mov r8d, edx
xor r9d, r9d
mov qword [rsp + 0x20], r14
movups xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x40], r14
movups xmmword [rsp + 0x78], xmm0
mov qword [rsp + 0x50], r14
movups xmmword [rbp - 0x78], xmm0
call qword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
mov r9d, 1
mov dword [rsp + 0x20], 3
mov r8d, 0x10000000
lea rdx, [rbx + 0x10]
lea rcx, [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameW]
mov r8, qword [rsp + 0x50]
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x68]
mov ecx, 1
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x18000b6a3
lea rcx, str.SetEntriesInAcl_r_n
jmp 0x18000b6d7
mov rax, qword [rsp + 0x40]
mov edx, 4
mov rcx, qword [rbx + 8]
mov r8d, edx
mov qword [rsp + 0x30], r14
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
test eax, eax
je 0x18000b6dc
lea rcx, str.SetNamedSecurityInfo_r_n
call fcn.18000a0c0
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18000b6ec
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 0xa
jmp 0x18000b545
lea rcx, str.Get_User_Name_fails._r_n
call fcn.18000a0c0
mov eax, 1
jmp 0x18000b555