Function at 0x413820
Capabilities:
Get session information

Disassembly:
push 0xffffffffffffffff
push 0x4b30b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push esi
lea eax, [esp + 0x28]
push edi
xor ebx, ebx
push eax
mov dword [esp + 0x30], 0xffffffff
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
lea ecx, [esp + 0x10]
mov word [esp + 0x16], bx
push ecx
mov word [esp + 0x18], 1
mov word [esp + 0x36], bx
mov word [esp + 0x34], 3
call fcn.00422360
add esp, 4
lea edx, [esp + 0x14]
lea ecx, [esp + 0x10]
push edx
mov dword [esp + 0x6c], ebx
call sub.MFC42u.DLL_CString::operator_1
push 0x52fe70
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::operator_1
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
call sub.MFC42u.DLL_CString::operator_1
push 0x4e28c0
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CString::CString_2
push 0x4cf2c0
lea ecx, [esp + 0x3c]
push 0x52ed38
push ecx
mov byte [esp + 0x74], 1
mov byte [esp + 0x1b], bl
call sub.MFC42u.DLL_operator_4
push 0x52fe70
lea edx, [esp + 0x38]
push eax
push edx
mov byte [esp + 0x74], 2
call sub.MFC42u.DLL_operator_4
push str.__Remote_logon_from:
push eax
lea eax, [esp + 0x2c]
mov byte [esp + 0x70], 3
push eax
call sub.MFC42u.DLL_operator_4
lea ecx, [esp + 0x34]
mov byte [esp + 0x68], 6
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x38]
mov byte [esp + 0x68], 5
call sub.MFC42u.DLL_CString::CString
push 0x1000
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x413adc
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
push ecx
push edx
push 0xe
push eax
push ebx
mov byte [esp + 0x23], 1
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x413a35
cmp dword [esp + 0x28], 0x18
jne 0x413a35
mov esi, dword [esp + 0x18]
mov ecx, 6
lea edi, [esp + 0x48]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CString::CString_1
mov ecx, dword [esp + 0x51]
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x4f]
and ecx, 0xff
push ecx
mov ecx, dword [esp + 0x52]
and edx, 0xff
and eax, 0xff
push edx
and ecx, 0xff
push eax
push ecx
lea edx, [esp + 0x30]
push str._d._d._d._d
push edx
mov byte [esp + 0x80], 7
call sub.MFC42u.DLL_CString::Format
mov eax, dword [esp + 0x30]
add esp, 0x18
push eax
call sub.WTSAPI32.dll_WTSFreeMemory
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x14]
call fcn.004b0394
lea edx, [esp + 0x14]
lea ecx, [esp + 0x10]
push edx
call sub.MFC42u.DLL_CString::operator_1
lea eax, [esp + 0x20]
push 0x4d0e4c
lea ecx, [esp + 0x40]
push eax
push ecx
call sub.MFC42u.DLL_operator_4
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x6c], 8
call fcn.004b0394
lea ecx, [esp + 0x3c]
mov byte [esp + 0x68], 7
call sub.MFC42u.DLL_CString::CString
lea edx, [esp + 0x20]
lea ecx, [esp + 0x1c]
push edx
call fcn.004b0394
lea ecx, [esp + 0x20]
mov byte [esp + 0x68], 5
call sub.MFC42u.DLL_CString::CString
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x28]
lea ecx, [esp + 0x18]
push eax
push ecx
push 0xa
push edx
push ebx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x413b22
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
call sub.MFC42u.DLL_CString::CString_2
lea ecx, [esp + 0x20]
mov byte [esp + 0x68], 9
push ecx
lea ecx, [esp + 0x14]
call fcn.004b0394
lea edx, [esp + 0x14]
lea ecx, [esp + 0x10]
push edx
call sub.MFC42u.DLL_CString::operator_1
lea eax, [esp + 0x20]
push 0x4d0e48
lea ecx, [esp + 0x40]
push eax
push ecx
call sub.MFC42u.DLL_operator_4
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x6c], 0xa
call fcn.004b0394
lea ecx, [esp + 0x3c]
mov byte [esp + 0x68], 9
call sub.MFC42u.DLL_CString::CString
mov edx, dword [esp + 0x18]
push edx
call sub.WTSAPI32.dll_WTSFreeMemory
lea eax, [esp + 0x20]
lea ecx, [esp + 0x1c]
push eax
call fcn.004b0394
lea ecx, [esp + 0x20]
mov byte [esp + 0x68], 5
call sub.MFC42u.DLL_CString::CString
jmp 0x413b22
push str.127.0.0.1
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::operator_1
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::operator_1
push str.Localhost
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::operator_1
lea edx, [esp + 0x14]
lea ecx, [esp + 0x10]
push edx
call sub.MFC42u.DLL_CString::operator_1
push str.127.0.0.1Localhost
lea ecx, [esp + 0x20]
call fcn.004b0454
lea eax, [esp + 0x30]
lea ecx, [esp + 0x10]
push eax
call sub.MFC42u.DLL_CString::operator_1
mov eax, dword [0x52fb48]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_wcscmp]
add esp, 8
cmp eax, ebx
je 0x413bc7
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
call sub.MFC42u.DLL_CString::CString_3
push 0x4d11a0
call fcn.00425820
mov al, byte [esp + 0x17]
add esp, 8
cmp al, bl
je 0x413bb8
push ebx
push ecx
lea eax, [esp + 0x2c]
mov ecx, esp
mov dword [esp + 0x48], esp
push eax
call sub.MFC42u.DLL_CString::CString_3
push ecx
mov byte [esp + 0x74], 0xb
mov esi, esp
mov dword [esp + 0x50], esp
push ecx
mov ecx, esp
mov dword [esp + 0x54], esp
push str.IMONITOR_ID_30082
call sub.MFC42u.DLL_CString::CString_4
push 0x4e2a30
push esi
call fcn.004285b0
add esp, 0xc
mov byte [esp + 0x74], 5
call fcn.004016e0
add esp, 0xc
lea ecx, [esp + 0x1c]
push ecx
mov ecx, 0x52fb48
call sub.MFC42u.DLL_CString::operator_2
lea ecx, [esp + 0x24]
mov byte [esp + 0x68], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x68], bl
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x68], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x60]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x60
ret