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

Disassembly:
mov qword [rsp + 0x18], r8
mov byte [rsp + 0x10], dl
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x138
movsx eax, dl
mov rbx, rcx
xor edi, edi
mov esi, eax
and al, 0xbf
lea rdx, str.MACHINE_
and esi, 0x40
mov rbp, r8
mov qword [rsp + 0x48], r8
cmp esi, edi
mov dword [rsp + 0x60], esi
mov byte [rsp + 0x178], al
cmovne rdx, rcx
lea rcx, [rsp + 0x58]
call fcn.14006d5dc
cmp esi, edi
jne 0x14009933b
lea rcx, [rsp + 0x58]
mov rdx, rbx
call fcn.1400617d4
xor edx, edx
lea rcx, [rsp + 0xd4]
mov qword [rsp + 0x88], rdi
lea r8d, [rdx + 0x2c]
mov qword [rsp + 0xb0], rdi
mov qword [rsp + 0x80], rdi
mov dword [rsp + 0xd0], edi
call fcn.1400fae60
xor edx, edx
lea r8d, [rdx + 0x30]
lea rcx, [rsp + 0x100]
call fcn.1400fae60
mov eax, esi
lea rcx, [rsp + 0xa8]
neg eax
mov qword [rsp + 0x98], rdi
sbb eax, eax
and eax, 0xfffffffd
add eax, 4
mov dword [rsp + 0x50], eax
call fcn.1400613bc
mov rbx, qword [rsp + 0x58]
xor ecx, ecx
mov edi, 1
cmp esi, ecx
je 0x1400994b7
mov eax, 0x80000
lea rcx, [rsp + 0xa8]
mov edx, 0x181450
mov dword [rsp + 0x78], 0xa28
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x68], eax
call fcn.14006149c
mov r11d, dword [rsp + 0x78]
mov rcx, qword [rsp + 0xa8]
mov edx, dword [rsp + 0x40]
mov r8, qword [rsp + 0x170]
lea rax, [rcx + r11*2]
xor r9d, r9d
add rdx, rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0xa0], rdx
mov dword [rsp + 0x90], r9d
cmp word [r8], r9w
jne 0x140099458
lea rdx, [rsp + 0x78]
mov rbp, rcx
mov qword [rsp + 0x48], rcx
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
xor ecx, ecx
cmp eax, ecx
jne 0x14009944b
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
mov ebp, eax
cmp eax, ecx
cmove ebp, edi
jmp 0x14009983b
mov rax, qword [rsp + 0x70]
mov rdx, qword [rsp + 0xa0]
lea rcx, [rsp + 0x90]
lea r9, [rsp + 0x40]
mov r8, rax
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rdx
mov rdx, rbp
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
xor ecx, ecx
cmp eax, ecx
je 0x140099437
mov ebp, dword [rsp + 0x50]
mov r9, qword [rsp + 0x70]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rcx
mov edx, ebp
mov r8d, edi
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
xor ecx, ecx
jmp 0x1400994bb
mov ebp, dword [rsp + 0x50]
lea rax, [rsp + 0x88]
xor r9d, r9d
mov edx, ebp
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rcx
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea r8d, [r9 + 4]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
xor ecx, ecx
mov ebp, eax
cmp eax, ecx
jne 0x14009983b
lea rax, str.Administrators
xor ebp, ebp
mov ecx, 2
mov qword [rsp + 0xb8], rax
lea rax, [0x1401210b0]
mov dword [rsp + 0x70], ecx
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0x48]
cmp rax, rbp
je 0x140099543
cmp word [rax], bp
je 0x140099543
mov ecx, edi
mov qword [rsp + 0xb8], rax
mov dword [rsp + 0x70], ecx
movsxd rax, ecx
mov edx, ebp
cmp rax, rbp
mov dword [rsp + 0x40], edx
mov qword [rsp + 0x48], rax
jle 0x1400995be
mov eax, esi
mov rsi, qword [rsp + 0x48]
mov rbx, rdx
neg eax
sbb ebp, ebp
and ebp, 0x10ffc0
movsxd rax, edx
mov rdx, qword [rsp + rbx*8 + 0xb8]
lea r8d, [rbp + 0xf003f]
lea rcx, [rax + rax*2]
mov r9d, 2
mov dword [rsp + 0x20], 3
add rcx, rcx
lea rcx, [rsp + rcx*8 + 0xd0]
call qword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameW]
mov edx, dword [rsp + 0x40]
add rbx, rdi
add edx, edi
cmp rbx, rsi
mov dword [rsp + 0x40], edx
jl 0x14009956a
mov rbx, qword [rsp + 0x58]
mov esi, dword [rsp + 0x60]
mov ecx, dword [rsp + 0x70]
mov r8, qword [rsp + 0xb0]
lea r9, [rsp + 0x80]
lea rdx, [rsp + 0xd0]
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
xor ecx, ecx
mov ebp, eax
cmp eax, ecx
jne 0x14009983b
mov rax, qword [rsp + 0x80]
mov edx, dword [rsp + 0x50]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rax
lea r8d, [rcx + 4]
mov qword [rsp + 0x20], rcx
mov rcx, rbx
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
xor ecx, ecx
mov ebp, eax
cmp eax, ecx
jne 0x14009983b
cmp byte [rsp + 0x178], cl
jle 0x14009983b
mov rcx, qword [rsp + 0x88]
xor eax, eax
cmp rcx, rax
je 0x14009964b
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
mov qword [rsp + 0x88], rax
cmp esi, eax
je 0x1400997ee
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
cmp eax, ecx
mov dword [rsp + 0x160], eax
jle 0x14009968d
movsxd rcx, eax
mov edx, 0x5c
cmp dx, word [rbx + rcx*2 - 2]
je 0x140099684
mov edx, 0x2f
cmp dx, word [rbx + rcx*2 - 2]
jne 0x14009968d
sub eax, edi
mov dword [rsp + 0x160], eax
lea ecx, [rax + 4]
cmp ecx, 0x212
mov dword [rsp + 0x178], ecx
jl 0x1400996a9
mov ebp, 0x80070057
jmp 0x14009983b
lea eax, [rax + rax + 0xf]
lea rcx, [rsp + 0x58]
and eax, 0xfffffff8
movsxd rdi, eax
lea rdx, [rdi + 0xab8]
call fcn.14006149c
mov rbx, qword [rsp + 0x58]
lea rax, [rdi + rbx]
mov rdx, rbx
lea rsi, [rax + 0x250]
mov qword [rsp + 0x48], rax
movsxd rax, dword [rsp + 0x160]
lea rdi, [rax + rax]
mov rcx, rsi
mov r8, rdi
call fcn.14001d614
lea rcx, [rdi + rsi]
lea rdx, [0x1401191e8]
mov r8d, 0xa
call fcn.14001d614
mov r8, qword [rsp + 0x48]
xor eax, eax
mov word [rsi + 0x422], ax
lea rcx, [rsp + 0x68]
mov rdx, rsi
mov qword [rsp + 0x68], rax
call fcn.1400fa184
xor ecx, ecx
cmp qword [rsp + 0x68], rcx
je 0x14009983b
mov rsi, qword [rsp + 0x48]
lea eax, [rcx + 0x2e]
test byte [rsi], 0x10
je 0x14009975b
cmp ax, word [rsi + 0x2c]
jne 0x14009975b
cmp cx, word [rsi + 0x2e]
je 0x1400997bb
cmp ax, word [rsi + 0x2e]
jne 0x14009975b
cmp cx, word [rsi + 0x30]
je 0x1400997bb
lea rcx, [rsi + 0x2c]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
movsxd rax, dword [rsp + 0x178]
add rcx, rax
cmp rcx, 0x211
jge 0x1400997bb
lea r9, [rsi + 0x2c]
lea rdx, [0x140119440]
lea rcx, [rsi + 0x674]
mov r8, rbx
call qword [sym.imp.USER32.dll_wsprintfW]
mov r8, qword [rsp + 0x170]
mov dl, byte [rsp + 0x168]
xor eax, eax
lea rcx, [rsi + 0x674]
mov word [rsi + 0xa96], ax
call fcn.1400992d8
mov rcx, qword [rsp + 0x68]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
xor ecx, ecx
cmp eax, ecx
lea eax, [rcx + 0x2e]
jne 0x14009973e
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x14009983b
cmp rcx, 0xffffffffffffffff
je 0x14009983b
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x14009983b
mov rdx, qword [rsp + 0x160]
lea rax, [rsp + 0x98]
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor ecx, ecx
mov ebp, eax
cmp eax, ecx
jne 0x14009983b
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x98]
lea r8, [rsp + 0x58]
call fcn.14009910c
mov rcx, qword [rsp + 0x98]
test rcx, rcx
je 0x14009984e
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x140099861
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x88]
test rcx, rcx
je 0x140099874
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rcx, [rsp + 0xa8]
call fcn.1400591f8
lea rcx, [rsp + 0x58]
call fcn.1400591f8
mov eax, ebp
add rsp, 0x138
pop rdi
pop rsi
pop rbp
pop rbx
ret