Function at 0x140016890
Capabilities:
Enumerate processes
Get session user name

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3c0]
sub rsp, 0x4c0
mov rax, qword [0x14012a210]
xor rax, rsp
mov qword [rbp + 0x3b0], rax
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x58], 0x104
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x1a0]
call fcn.1400a83f0
xor ebx, ebx
mov qword [rsp + 0x50], rbx
xor r15b, r15b
xor r12d, r12d
mov rdi, 0xffffffffffffffff
mov qword [rsp + 0x40], rdi
call fcn.140016de0
mov r14d, eax
cmp eax, 0xffffffff
je 0x14001695a
lea rcx, str.Wtsapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x14001695a
lea rdx, [0x140100388]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140016951
lea rdx, [rsp + 0x40]
mov ecx, r14d
call rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov r14, qword [rsp + 0x40]
mov esi, 1
test r14, r14
jne 0x140016a35
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x60], 0x238
xor r13d, r13d
xor edx, edx
lea ecx, [rsi + 1]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rsi, rax
cmp rax, rdi
je 0x1400169d9
lea rdx, [rsp + 0x60]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x1400169d0
lea rdx, str.explorer.exe
lea rcx, [rbp - 0x74]
call fcn.1400bc088
test eax, eax
je 0x1400169cb
lea rdx, [rsp + 0x60]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_Process32NextW]
jmp 0x1400169a3
mov r13d, dword [rsp + 0x68]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, r13d
mov esi, 1
mov edx, esi
mov ecx, 0x440
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rcx, rax
lea r8, [rsp + 0x38]
lea edx, [rsi + 9]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140016aa0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], esi
lea r9d, [rsi + 1]
xor r8d, r8d
mov edx, 0x2000000
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x140016aa0
mov r14, qword [rsp + 0x48]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
cmovne r12d, esi
test r14, r14
je 0x140016a52
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r12d, r12d
je 0x140016ad8
lea r8, [rsp + 0x58]
lea rdx, [rbp + 0x1a0]
mov ecx, 2
call qword [sym.imp.Secur32.dll_GetUserNameExW]
test al, al
je 0x140016ad8
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
lea rdx, [rsp + 0x50]
lea rcx, [rbp + 0x1a0]
call fcn.140017050
mov rbx, qword [rsp + 0x50]
test eax, eax
je 0x140016ad8
test rbx, rbx
je 0x140016ab7
mov rdx, qword [rbx]
jmp 0x140016ab9
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140016a44
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x38], r12
jmp 0x140016a44
xor edx, edx
mov r8, rdi
nop dword [rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x140016ac0
mov rcx, qword [rsp + 0x30]
call fcn.140011160
mov r15b, 1
test rbx, rbx
je 0x140016b24
lock xadd dword [rbx + 0x10], edi
cmp edi, 1
jne 0x140016b24
mov rbx, qword [rsp + 0x50]
mov rcx, qword [rbx]
test rcx, rcx
je 0x140016b01
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rbx], 0
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140016b17
call fcn.1400a59a4
mov qword [rbx + 8], 0
mov edx, 0x18
mov rcx, rbx
call fcn.1400a59a4
movzx eax, r15b
mov rcx, qword [rbp + 0x3b0]
xor rcx, rsp
call fcn.1400a5460
lea r11, [rsp + 0x4c0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret