Function at 0x1400652e8
Capabilities:
Get session user name

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x37]
sub rsp, 0xb0
mov qword [rbp - 0x21], 0xfffffffffffffffe
mov rax, qword [0x1400be278]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rsi, r8
mov rdi, rdx
mov rbx, rcx
xor r14d, r14d
mov dword [rbp - 0x39], r14d
lea rcx, [rbp - 0x31]
call fcn.14003efe4
mov eax, dword [rbp - 0x39]
test eax, eax
jne 0x14006533f
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
mov dword [rbp - 0x39], eax
test eax, eax
jne 0x140065397
lea edx, [rax + 0x5c]
lea rcx, str.admin_appman_appv_shareduseruserinfo.cpp
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
test rax, rax
je 0x14006535d
inc rax
jmp 0x140065364
lea rax, str.admin_appman_appv_shareduseruserinfo.cpp
mov rdx, rax
lea rcx, [0x1400bf638]
call fcn.140012ce4
mov rbx, rax
shl rbx, 0x34
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
or rdi, rbx
movabs rax, 0x162500000000
or rdi, rax
jmp 0x1400655fc
mov edx, pe_nt_image_headers64
mov dword [rbp - 0x59], edx
lea rcx, [rbp - 0x51]
call fcn.14001c438
nop
lea r8, [rbp - 0x59]
mov rdx, qword [rbp - 0x51]
mov ecx, SafeArrayGetDim
call qword [sym.imp.Secur32.dll_GetUserNameExW]
test al, al
jne 0x140065494
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0xea
je 0x14006541b
mov edx, 0x5c
lea rcx, str.admin_appman_appv_shareduseruserinfo.cpp
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
test rax, rax
je 0x1400653ef
inc rax
jmp 0x1400653f6
lea rax, str.admin_appman_appv_shareduseruserinfo.cpp
mov rdx, rax
lea rcx, [0x1400bf638]
call fcn.140012ce4
shl rax, 0x34
mov rdi, rbx
or rdi, rax
movabs rax, 0x172500000000
jmp 0x14006548c
mov edx, dword [rbp - 0x59]
lea rcx, [rbp - 0x51]
call fcn.1400386b8
lea r8, [rbp - 0x59]
mov rdx, qword [rbp - 0x51]
mov ecx, SafeArrayGetDim
call qword [sym.imp.Secur32.dll_GetUserNameExW]
test al, al
jne 0x140065494
mov edx, 0x5c
lea rcx, str.admin_appman_appv_shareduseruserinfo.cpp
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
test rax, rax
je 0x14006545a
inc rax
jmp 0x140065461
lea rax, str.admin_appman_appv_shareduseruserinfo.cpp
mov rdx, rax
lea rcx, [0x1400bf638]
call fcn.140012ce4
mov rbx, rax
shl rbx, 0x34
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
or rdi, rbx
movabs rax, 0x182500000000
or rdi, rax
jmp 0x1400655ac
mov qword [rbp - 9], r14
mov qword [rbp - 1], 7
mov word [rbp - 0x19], r14w
mov rdx, qword [rbp - 0x51]
lea rcx, [rbp - 0x19]
call fcn.140003c94
nop
lea rax, [rbp - 0x19]
cmp qword [rbp - 1], 8
cmovae rax, qword [rbp - 0x19]
or r9, 0xffffffffffffffff
lea edx, [r9 + 0x5d]
mov rcx, qword [rbp - 9]
test rcx, rcx
je 0x1400654f7
mov r8, rcx
mov rbx, rax
cmp word [rbx], dx
je 0x1400654ea
add rbx, 2
sub r8, 1
jne 0x1400654d8
mov rbx, r14
test rbx, rbx
je 0x1400654f7
sub rbx, rax
sar rbx, 1
jmp 0x1400654fa
mov rbx, r9
cmp rbx, r9
je 0x140065561
lea r8, [rbx + 1]
cmp r8, rcx
je 0x140065561
test rbx, rbx
je 0x140065561
lea rdx, [rbp + 7]
lea rcx, [rbp - 0x19]
call fcn.14003f700
mov rdx, rax
mov rcx, rdi
call fcn.14001c54c
lea rcx, [rbp + 7]
call fcn.140003c2c
mov r9, rbx
xor r8d, r8d
lea rdx, [rbp + 7]
lea rcx, [rbp - 0x19]
call fcn.14003f700
mov rdx, rax
mov rcx, rsi
call fcn.14001c54c
lea rcx, [rbp + 7]
call fcn.140003c2c
movabs rdi, 0x8000000000
jmp 0x1400655a2
lea rcx, str.admin_appman_appv_shareduseruserinfo.cpp
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
test rax, rax
je 0x140065578
inc rax
jmp 0x14006557f
lea rax, str.admin_appman_appv_shareduseruserinfo.cpp
mov rdx, rax
lea rcx, [0x1400bf638]
call fcn.140012ce4
mov rdi, rax
shl rdi, 0x34
movabs rax, 0x19250000000d
or rdi, rax
lea rcx, [rbp - 0x19]
call fcn.140003c2c
nop
mov rcx, qword [rbp - 0x51]
test rcx, rcx
je 0x1400655fc
mov rax, qword [rbp - 0x41]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400655eb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400655eb
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400674a4
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x51], xmm0
mov qword [rbp - 0x41], r14
mov ebx, 0x29c
cmp dword [rbp - 0x39], r14d
je 0x140065626
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x140065626
xor r9d, r9d
xor r8d, r8d
lea edx, [rax + 1]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov rdx, qword [rbp - 0x29]
test rdx, rdx
je 0x140065664
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
mov rcx, qword [rbp - 0x29]
test eax, eax
je 0x140065647
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140065664
test rcx, rcx
je 0x140065652
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov rax, rdi
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140067150
add rsp, 0xb0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret