Function at 0x14002ea90
Capabilities:
Get session user name

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x260
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x14004f018]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov rdi, rcx
xor r12b, r12b
xor r13d, r13d
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], r13d
lea rcx, [rsp + 0x30]
call fcn.14000fdc0
nop
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x28]
call fcn.140010b10
movzx ebx, al
lea rcx, [rsp + 0x30]
call fcn.14000fe40
test bl, bl
je 0x14002ed25
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov r15, rax
test rax, rax
je 0x14002ed25
lea rdx, str.ImpersonateLoggedOnUser
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, qword [rsp + 0x28]
mov rcx, rsi
call rax
test eax, eax
je 0x14002ed13
inc dword [0x140050040]
mov rcx, qword [rdi]
test rcx, rcx
je 0x14002eb5b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi], rsi
mov rsi, r13
mov r12b, 1
cmp qword [0x14004f790], r13
jne 0x14002ed13
xor edx, edx
mov r8d, 0x20a
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x20], 0x104
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
mov word [rsp + 0x246], r13w
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
mov r14, rax
mov rbp, qword [0x14004f798]
cmp rax, rbp
ja 0x14002ec00
lea rdi, [0x14004f780]
cmp rbp, 8
cmovae rdi, qword [0x14004f780]
mov qword [0x14004f790], rax
lea rbx, [rax + rax]
mov r8, rbx
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_memmove]
mov word [rbx + rdi], r13w
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x14002ed2a
movabs rbx, 0x7ffffffffffffffe
cmp r14, rbx
ja 0x14002ed6d
mov rcx, r14
or rcx, 7
cmp rcx, rbx
ja 0x14002ec3e
mov rdx, rbp
shr rdx, 1
mov rax, rbx
sub rax, rdx
cmp rbp, rax
ja 0x14002ec3e
lea rax, [rdx + rbp]
mov rbx, rcx
cmp rcx, rax
cmovb rbx, rax
lea rax, [rbx + 1]
lea rdx, [rax + rax]
movabs rcx, 0x7fffffffffffffff
mov r8, 0xffffffffffffffff
cmp rax, rcx
jbe 0x14002ec61
mov rdx, r8
jmp 0x14002ec6a
cmp rdx, 0x1000
jb 0x14002ec94
lea rcx, [rdx + 0x27]
cmp rcx, rdx
cmovbe rcx, r8
call fcn.140025ae4
test rax, rax
je 0x14002ec8d
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x14002eca9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
test rdx, rdx
je 0x14002eca6
mov rcx, rdx
call fcn.140025ae4
mov rdi, rax
jmp 0x14002eca9
mov rdi, r13
mov qword [0x14004f790], r14
mov qword [0x14004f798], rbx
lea rbx, [r14 + r14]
mov r8, rbx
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_memcpy]
mov word [rbx + rdi], r13w
cmp rbp, 8
jb 0x14002ed0c
lea rdx, [rbp*2 + 2]
mov rcx, qword [0x14004f780]
cmp rdx, 0x1000
jb 0x14002ed07
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14002ed1e
mov rcx, r8
call fcn.140025dd4
mov qword [0x14004f780], rdi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x14002ed2a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rsi, qword [rsp + 0x28]
test rsi, rsi
je 0x14002ed38
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, r12b
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.140025ac0
lea r11, [rsp + 0x260]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
call fcn.140003280
int3