Function at 0x4624f3
Capabilities:
Get session user name

Disassembly:
push 0x6ec
mov eax, 0x5b401f
call fcn.0058f792
mov dword [ebp - 0x6f0], ecx
push 0x5d7aa4
push str.CUserPrivilege::ImpersonateActiveSessionUser
push 5
call fcn.00424dad
add esp, 0xc
lea ecx, [ebp - 0x6dc]
call fcn.0046f9cd
and dword [ebp - 4], 0
xor esi, esi
and dword [ebp - 0x6e4], esi
xor edi, edi
push str.Advapi32.dll
mov dword [ebp - 0x6e0], edi
call fcn.00405177
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x462565
push str.Advapi32.dll_SAW_LoadLibrary_failed._n
push str.CUserPrivilege::ImpersonateActiveSessionUser
push 4
call fcn.00424dad
add esp, 0xc
jmp 0x462701
cmp dword [ebp - 0x668], esi
je 0x462701
xor eax, eax
mov esi, 0x206
push esi
push eax
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push eax
call fcn.0058e700
xor eax, eax
push esi
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.0058e700
push str.Wtsapi32.dll
mov dword [ebp - 0x6ec], 0x104
call fcn.00405177
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x4625c8
push str.Wtsapi32.dll_SAW_LoadLibrary_failed._n
jmp 0x462551
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WTSQuerySessionInformationW
push esi
call edi
mov dword [ebp - 0x6f4], eax
test eax, eax
jne 0x4625ff
push str.WTSQuerySessionInformationW_GetProcAddress_failed._n
push str.CUserPrivilege::ImpersonateActiveSessionUser
push 4
call fcn.00424dad
mov edi, dword [ebp - 0x6e0]
add esp, 0xc
jmp 0x462701
push str.WTSFreeMemory
push esi
call edi
mov edi, eax
test edi, edi
jne 0x462614
push str.WTSFreeMemory_GetProcAddress_failed._n
jmp 0x4625e5
lea eax, [ebp - 0x6f8]
push eax
lea eax, [ebp - 0x6e8]
push eax
push 5
push 0xffffffffffffffff
push 0
call dword [ebp - 0x6f4]
test eax, eax
jne 0x462639
push str.GetUserName_failed._n
jmp 0x4625e5
push dword [ebp - 0x6e8]
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.00591d62
add esp, 0xc
push dword [ebp - 0x6e8]
call edi
lea eax, [ebp - 0x6ec]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x462632
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x218]
xor esi, esi
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.005921d4
pop ecx
pop ecx
test eax, eax
je 0x4626ff
push str.GetExplorerUserToken.__n
mov edi, str.CUserPrivilege::ImpersonateActiveSessionUser
push edi
push 4
call fcn.00424dad
mov ecx, dword [ebp - 0x6f0]
lea eax, [ebp - 0x6e4]
add esp, 0xc
push eax
call fcn.00461e50
test eax, eax
je 0x4626ff
push str.Start_Impersonation.__n
push edi
push 4
call fcn.00424dad
add esp, 0xc
push dword [ebp - 0x6e4]
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov edi, eax
test edi, edi
jne 0x462701
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ImpersonateLoggedOnUser_failed.___1_d___n
push str.CUserPrivilege::ImpersonateActiveSessionUser
push 4
call fcn.00424dad
add esp, 0x10
jmp 0x462701
mov edi, esi
cmp dword [ebp - 0x6e4], 0
je 0x46271d
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp - 0x6e4], 0
test ebx, ebx
je 0x462728
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test esi, esi
je 0x462733
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x5d7ac0
push str.CUserPrivilege::ImpersonateActiveSessionUser
push 5
call fcn.00424dad
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6dc]
add esp, 0xc
call fcn.0047009a
mov eax, edi
call fcn.0058f741
ret