Function at 0x140078bd0
Capabilities:
Get session user name
Impersonate user
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xfb0]
mov eax, 0x10b0
call fcn.1400cb1f0
sub rsp, rax
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rsp + 0x10f0], rbx
mov rax, qword [0x14011d8d0]
xor rax, rsp
mov qword [rbp + 0xfa0], rax
mov r15, r9
mov r13, r8
mov r14, rdx
xor sil, sil
lea rcx, [0x14011d880]
mov rax, qword [0x14011d880]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x48], rbx
or r12, 0xffffffffffffffff
test r13, r13
je 0x140078c82
test r13, 0xffffffffffff0000
jne 0x140078c6f
movzx edi, r13w
xor edx, edx
mov ecx, edi
call fcn.1400017e0
test rax, rax
je 0x140078c99
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140001f70
jmp 0x140078c94
xor eax, eax
mov rcx, r12
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
dec rcx
jmp 0x140078c84
xor ecx, ecx
mov r8d, ecx
mov rdx, r13
lea rcx, [rsp + 0x48]
call fcn.140001e80
mov rbx, qword [rsp + 0x48]
xor r13d, r13d
mov qword [rsp + 0x38], r13
cmp r14, 0xffffffff80000001
jne 0x140078e2a
lea rdi, [rsp + 0x68]
xor eax, eax
mov ecx, reloc.ATL100.DLL_Ordinal_56
rep stosb byte [rdi], al
mov dword [rsp + 0x68], reloc.ATL100.DLL_Ordinal_56
mov dword [rsp + 0x30], r13d
lea rdx, [rsp + 0x30]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
mov ecx, dword [rsp + 0x30]
test eax, eax
jne 0x140078ce6
test ecx, ecx
je 0x140078eab
mov eax, 2
mul rcx
cmovo rax, r12
mov rcx, rax
call fcn.1400ca8e8
mov rdi, rax
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x140078e14
test rdi, rdi
je 0x140078eab
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x40], r13
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov ecx, eax
lea rdx, [rsp + 0x40]
call sub.WTSAPI32.dll_WTSQueryUserToken
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140078e14
cmp rcx, 0xffffffffffffffff
je 0x140078e14
lea rdx, [rsp + 0x68]
call qword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
je 0x140078e09
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x140078dfa
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, rbx
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140078df4
mov dword [rsp + 0x54], r13d
mov dword [rsp + 0x58], 0x400
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x140078de1
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x54]
xor r8d, r8d
mov rdx, r15
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140078de4
mov sil, 1
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140078df4
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov rdx, qword [rbp - 0x68]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USERENV.dll_UnloadUserProfile]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rdi, rdi
je 0x140078eab
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_
jmp 0x140078eab
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140078eab
mov dword [rsp + 0x5c], r13d
mov dword [rsp + 0x50], 0x400
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x140078e97
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x7a0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x5c]
xor r8d, r8d
mov rdx, r15
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140078e9a
mov sil, 1
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140078eab
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r12d
dec r12d
test r12d, r12d
jg 0x140078ec6
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
movzx eax, sil
mov rcx, qword [rbp + 0xfa0]
xor rcx, rsp
call fcn.1400cafa0
mov rbx, qword [rsp + 0x10f0]
add rsp, 0x10b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret