Function at 0x425920
Capabilities:
Get session information
Get session user name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x457938
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x472008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov dword [ebp - 0x4c], 0
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
cmp eax, 0xffffffff
jne 0x4259a2
push 0x402580
push str.Failed_to_get_active_console_session_ID
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004021b0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push 4
mov dword [esi + 0x14], 0xf
mov ecx, esi
mov dword [esi + 0x10], 0
push 0x45c1c4
mov byte [esi], 0
call fcn.00403d00
jmp 0x425aa3
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x48], 0
push ecx
lea ecx, [ebp - 0x48]
push ecx
push 5
push eax
push 0
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x425a77
push 0x4061b0
push dword [ebp - 0x48]
push str.User_Name:
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.00424c30
add esp, 8
push eax
call fcn.00424c30
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
push dword [ebp - 0x48]
lea ecx, [ebp - 0x44]
call fcn.004025f0
lea eax, [ebp - 0x44]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040cf30
add esp, 8
push dword [ebp - 0x48]
call sub.WTSAPI32.dll_WTSFreeMemory
lea eax, [ebp - 0x28]
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov ecx, esi
push eax
mov byte [esi], 0
call fcn.00408b80
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x425a4c
push 1
inc eax
push eax
push dword [ebp - 0x28]
call fcn.004035c0
add esp, 0xc
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
cmp eax, 8
jb 0x425aa3
push 2
inc eax
push eax
push dword [ebp - 0x44]
call fcn.004035c0
add esp, 0xc
jmp 0x425aa3
push 0x402580
push str.Failed_to_query_user_name
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004021b0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push 0x45c1c4
mov ecx, esi
call fcn.00406980
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040219c
mov esp, ebp
pop ebp
ret