Function at 0x423c60
Capabilities:
Get logon sessions
Get session information
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc58
mov eax, dword [0x462078]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
push 0x208
xor ebx, ebx
mov dword [ebp - 0xc54], 0
lea eax, [ebp - 0x20c]
mov dword [ebp - 0xc50], 0
push ebx
push eax
mov dword [ebp - 0xc38], 0
mov edi, 0x104
mov dword [ebp - 0xc58], 0
call fcn.00429af0
push 0x208
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.00429af0
add esp, 0x18
mov dword [ebp - 0xc44], ebx
lea eax, [ebp - 0xc58]
mov dword [ebp - 0xc48], ebx
mov dword [ebp - 0xc40], ebx
mov dword [ebp - 0xc3c], ebx
push eax
lea eax, [ebp - 0xc38]
push eax
push 0x18
push 0xffffffffffffffff
push ebx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
jne 0x423d3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetLoggedUserSid__:_WTSQuerySessionInformation___err___d_n
lea eax, [ebp - 0xc34]
push 0x410
push eax
call fcn.00424850
add esp, 0x10
lea eax, [ebp - 0xc34]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00426898
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc38]
mov dword [ebp - 0xc4c], eax
push esi
test eax, eax
je 0x423e2b
mov esi, dword [eax + 4]
add eax, 0x82
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0xc50], esi
push 0x104
push eax
call fcn.00424850
mov eax, dword [ebp - 0xc4c]
add eax, 0x60
push eax
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.00424850
lea edi, [ebp - 0x20c]
add esp, 0x18
lea ecx, [edi + 2]
nop word [eax + eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x423da0
sub edi, ecx
lea ebx, [ebp - 0x414]
sar edi, 1
lea ecx, [ebx + 2]
nop dword [eax + eax]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x423dc0
push esi
lea eax, [ebp - 0x414]
sub ebx, ecx
push eax
lea eax, [ebp - 0x20c]
sar ebx, 1
push eax
push str.GetLoggedUserSid__:_szUserName___s__szDomain___s__dwSessionId___d_n
lea eax, [ebp - 0xc34]
push 0x410
push eax
call fcn.00424850
add esp, 0x18
lea eax, [ebp - 0xc34]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test esi, esi
je 0x423e25
lea eax, [ebp - 0xc48]
push eax
lea eax, [ebp - 0xc44]
push eax
call sub.Secur32.dll_LsaEnumerateLogonSessions
test eax, eax
je 0x423e25
push eax
call sub.ADVAPI32.dll_LsaNtStatusToWinError
mov eax, dword [ebp - 0xc38]
xor esi, esi
cmp dword [ebp - 0xc44], esi
jbe 0x423ee6
xor eax, eax
nop dword [eax + eax]
test eax, eax
jne 0x423ed3
lea eax, [ebp - 0xc40]
push eax
mov eax, dword [ebp - 0xc48]
lea eax, [eax + esi*8]
push eax
call sub.Secur32.dll_LsaGetLogonSessionData
test eax, eax
jne 0x423ebc
mov eax, dword [ebp - 0xc40]
test eax, eax
je 0x423ebc
mov ecx, dword [ebp - 0xc50]
cmp dword [eax + 0x28], ecx
jne 0x423ebc
push edi
lea ecx, [ebp - 0x20c]
push ecx
push dword [eax + 0x10]
call fcn.00436987
add esp, 0xc
test eax, eax
jne 0x423ebc
push ebx
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0xc40]
push dword [eax + 0x18]
call fcn.00436987
add esp, 0xc
test eax, eax
jne 0x423ebc
mov eax, dword [ebp - 0xc40]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0xc3c], eax
jmp 0x423ec2
mov eax, dword [ebp - 0xc3c]
inc esi
cmp esi, dword [ebp - 0xc44]
jb 0x423e40
test eax, eax
je 0x423ee0
lea ecx, [ebp - 0xc54]
push ecx
push eax
call sub.ADVAPI32.dll_ConvertSidToStringSidW
mov eax, dword [ebp - 0xc38]
mov ecx, dword [ebp - 0xc48]
pop esi
test ecx, ecx
je 0x423efd
push ecx
call sub.Secur32.dll_LsaFreeReturnBuffer
mov eax, dword [ebp - 0xc38]
test eax, eax
je 0x423f07
push eax
call sub.WTSAPI32.dll_WTSFreeMemory
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc54]
xor ecx, ebp
pop edi
pop ebx
call fcn.00426898
mov esp, ebp
pop ebp
ret