Function at 0x140097f60
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.14006d444
cmp esi, edi
jne 0x140097fc3
lea rcx, [rsp + 0x58]
mov rdx, rbx
call fcn.14006175c
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.1400f8760
xor edx, edx
lea r8d, [rdx + 0x30]
lea rcx, [rsp + 0x100]
call fcn.1400f8760
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.140061344
mov rbx, qword [rsp + 0x58]
xor ecx, ecx
mov edi, 1
cmp esi, ecx
je 0x14009813f
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.140061424
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 0x1400980e0
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 0x1400980d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
mov ebp, eax
cmp eax, ecx
cmove ebp, edi
jmp 0x1400984c3
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 0x1400980bf
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 0x140098143
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 0x1400984c3
lea rax, str.Administrators
xor ebp, ebp
mov ecx, 2
mov qword [rsp + 0xb8], rax
lea rax, str.Everyone
mov dword [rsp + 0x70], ecx
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0x48]
cmp rax, rbp
je 0x1400981cb
cmp word [rax], bp
je 0x1400981cb
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 0x140098246
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 0x1400981f2
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 0x1400984c3
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 0x1400984c3
cmp byte [rsp + 0x178], cl
jle 0x1400984c3
mov rcx, qword [rsp + 0x88]
xor eax, eax
cmp rcx, rax
je 0x1400982d3
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
mov qword [rsp + 0x88], rax
cmp esi, eax
je 0x140098476
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
cmp eax, ecx
mov dword [rsp + 0x160], eax
jle 0x140098315
movsxd rcx, eax
mov edx, 0x5c
cmp dx, word [rbx + rcx*2 - 2]
je 0x14009830c
mov edx, 0x2f
cmp dx, word [rbx + rcx*2 - 2]
jne 0x140098315
sub eax, edi
mov dword [rsp + 0x160], eax
lea ecx, [rax + 4]
cmp ecx, 0x212
mov dword [rsp + 0x178], ecx
jl 0x140098331
mov ebp, 0x80070057
jmp 0x1400984c3
lea eax, [rax + rax + 0xf]
lea rcx, [rsp + 0x58]
and eax, 0xfffffff8
movsxd rdi, eax
lea rdx, [rdi + 0xab8]
call fcn.140061424
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.14001d04c
lea rcx, [rdi + rsi]
lea rdx, [0x140116158]
mov r8d, 0xa
call fcn.14001d04c
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.1400f7af4
xor ecx, ecx
cmp qword [rsp + 0x68], rcx
je 0x1400984c3
mov rsi, qword [rsp + 0x48]
lea eax, [rcx + 0x2e]
test byte [rsi], 0x10
je 0x1400983e3
cmp ax, word [rsi + 0x2c]
jne 0x1400983e3
cmp cx, word [rsi + 0x2e]
je 0x140098443
cmp ax, word [rsi + 0x2e]
jne 0x1400983e3
cmp cx, word [rsi + 0x30]
je 0x140098443
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 0x140098443
lea r9, [rsi + 0x2c]
lea rdx, [0x1401163b0]
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.140097f60
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 0x1400983c6
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400984c3
cmp rcx, 0xffffffffffffffff
je 0x1400984c3
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x1400984c3
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 0x1400984c3
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x98]
lea r8, [rsp + 0x58]
call fcn.140097d94
mov rcx, qword [rsp + 0x98]
test rcx, rcx
je 0x1400984d6
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x1400984e9
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x88]
test rcx, rcx
je 0x1400984fc
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rcx, [rsp + 0xa8]
call fcn.140058efc
lea rcx, [rsp + 0x58]
call fcn.140058efc
mov eax, ebp
add rsp, 0x138
pop rdi
pop rsi
pop rbp
pop rbx
ret