Function at 0x417010
Capabilities:
Get session user name

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov rax, qword [0x004fb010]
xor rax, rsp
mov qword [rbp + 8], rax
mov rdi, rcx
xor r14d, r14d
mov ebx, r14d
call fcn.00416760
mov esi, eax
xor r8d, r8d
lea rdx, [0x004b993c]
mov rcx, rdi
call sym.AsusSoftwareManager.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_wchar_t_const__const___ptr64__unsigned_long_long_unsigned___int64_____ptr64
cmp esi, 1
jae 0x417069
mov ebx, 0x520
jmp 0x417481
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcessId]
mov dword [rbp - 0x6c], r14d
lea rdx, [rbp - 0x6c]
mov ecx, eax
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_ProcessIdToSessionId]
test eax, eax
jne 0x417090
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
jmp 0x417481
cmp dword [rbp - 0x6c], ebx
jne 0x41734a
lfence
mov qword [rbp - 0x78], r14
lea rdx, [rbp - 0x78]
mov ecx, esi
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
je 0x417083
mov rcx, qword [rbp - 0x78]
test rcx, rcx
jne 0x4170c3
mov ebx, 0x3f0
jmp 0x417481
mov dword [rbp - 0x80], r14d
mov dword [rbp - 0x68], 8
lea rax, [rbp - 0x80]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_GetTokenInformation]
test eax, eax
jne 0x4170fc
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
cmp eax, 0x7a
jne 0x41733b
mov eax, dword [rbp - 0x80]
test eax, eax
je 0x41733b
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
mov rsi, rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x20], rax
mov r9d, dword [rbp - 0x80]
mov r8, rsi
mov edx, 1
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_GetTokenInformation]
test eax, eax
je 0x417325
mov qword [rbp - 0x38], r14
mov qword [rbp - 0x28], r14
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], r14w
xor r8d, r8d
mov edx, 0x100
lea rcx, [rbp - 0x38]
call sym.AsusSoftwareManager.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_unsigned_long_long_unsigned___int64___wchar_t____ptr64
nop
mov qword [rbp - 0x58], r14
mov qword [rbp - 0x48], r14
mov qword [rbp - 0x40], 7
mov word [rbp - 0x58], r14w
xor r8d, r8d
mov edx, 0x100
lea rcx, [rbp - 0x58]
call sym.AsusSoftwareManager.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_unsigned_long_long_unsigned___int64___wchar_t____ptr64
nop
mov dword [rbp - 0x60], 0x100
mov dword [rbp - 0x64], 0x100
lea rax, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rax, qword [rbp - 0x58]
lea r8, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae r8, qword [rbp - 0x38]
lea rcx, [rbp - 0x68]
mov qword [rsp + 0x30], rcx
lea rcx, [rbp - 0x64]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x60]
mov rdx, qword [rsi]
xor ecx, ecx
call qword [sym.imp.api_ms_win_security_lsalookup_l2_1_0.dll_LookupAccountSidW]
test eax, eax
jne 0x4171ed
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
jmp 0x41728c
lea rdx, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rdx, qword [rbp - 0x38]
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x58], 7
mov r8, 0xffffffffffffffff
inc r8
cmp word [rdx + r8*2], 0
jne 0x417215
lea rcx, [rsp + 0x40]
call sym.AsusSoftwareManager.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_wchar_t_const__const___ptr64__unsigned_long_long_unsigned___int64_____ptr64
lea rax, [rsp + 0x40]
cmp rdi, rax
je 0x417244
xor r8d, r8d
lea rdx, [rsp + 0x40]
mov rcx, rdi
call sym.AsusSoftwareManager.exe_private:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::_Move_assign_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64__struct_std::integral_constant_bool__1_____ptr64
mov rdx, qword [rsp + 0x58]
cmp rdx, 8
jb 0x417289
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x417284
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x417284
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00479330
mov ebx, r14d
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x4172cf
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x4172ca
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x4172ca
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00479330
mov qword [rbp - 0x48], r14
mov qword [rbp - 0x40], 7
mov word [rbp - 0x58], r14w
mov rdx, qword [rbp - 0x20]
cmp rdx, 8
jb 0x41732d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x41731e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x41731e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00479330
jmp 0x41732d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
test rsi, rsi
je 0x41733b
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
jmp 0x417481
mov dword [rbp - 0x70], 0x100
mov qword [rbp - 0x18], r14
mov qword [rbp - 8], r14
mov qword [rbp], 7
mov word [rbp - 0x18], r14w
xor r8d, r8d
mov edx, 0x100
lea rcx, [rbp - 0x18]
call sym.AsusSoftwareManager.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_unsigned_long_long_unsigned___int64___wchar_t____ptr64
nop
lea rcx, [rbp - 0x18]
cmp qword [rbp], 8
cmovae rcx, qword [rbp - 0x18]
lea rdx, [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x417436
lea rdx, [rbp - 0x18]
cmp qword [rbp], 8
cmovae rdx, qword [rbp - 0x18]
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], 7
mov r8, 0xffffffffffffffff
inc r8
cmp word [rdx + r8*2], 0
jne 0x4173c0
lea rcx, [rsp + 0x60]
call sym.AsusSoftwareManager.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_wchar_t_const__const___ptr64__unsigned_long_long_unsigned___int64_____ptr64
lea rax, [rsp + 0x60]
cmp rdi, rax
je 0x4173ef
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, rdi
call sym.AsusSoftwareManager.exe_private:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::_Move_assign_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64__struct_std::integral_constant_bool__1_____ptr64
mov rdx, qword [rsp + 0x78]
cmp rdx, 8
jb 0x41743e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x41742f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x41742f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00479330
jmp 0x41743e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
mov rdx, qword [rbp]
cmp rdx, 8
jb 0x417481
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x18]
mov rax, rcx
cmp rdx, 0x1000
jb 0x41747c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x41747c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00479330
mov eax, ebx
mov rcx, qword [rbp + 8]
xor rcx, rsp
call fcn.00479310
lea r11, [rsp + 0x110]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret