Function at 0x470f60
Capabilities:
Get logon sessions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58758a
mov eax, dword fs:[0]
push eax
sub esp, 0x1f4
mov eax, dword [0x615000]
xor eax, ebp
mov dword [ebp - 0x44], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1e0], ecx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x30], 0
call fcn.00402270
mov dword [ebp - 0x34], eax
push str.Tip:_InitialReportAllLogonSesssionsEx_func_in..._n
push 0x5de088
call fcn.0040c050
add esp, 8
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x28]
push ecx
call sub.Secur32.dll_LsaEnumerateLogonSessions
test eax, eax
jne 0x470fd7
cmp dword [ebp - 0x10], 0
jne 0x471006
cmp dword [ebp - 0x10], 0
je 0x470fe6
mov edx, dword [ebp - 0x10]
push edx
call sub.Secur32.dll_LsaFreeReturnBuffer
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:_LsaEnumerateLogonSessions_fail_err_d__continue..._n
push 0x5de134
call fcn.0040c050
add esp, 0xc
xor eax, eax
jmp 0x471962
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x40], 0
jmp 0x47101f
mov eax, dword [ebp - 0x40]
add eax, 1
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
cmp ecx, dword [ebp - 0x28]
jae 0x471836
cmp dword [ebp - 0x14], 0
je 0x471041
mov edx, dword [ebp - 0x14]
push edx
call sub.Secur32.dll_LsaFreeReturnBuffer
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x10]
lea eax, [edx + ecx*8]
push eax
call sub.Secur32.dll_LsaGetLogonSessionData
test eax, eax
je 0x471088
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + ecx*8]
push eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + ecx*8 + 4]
push eax
push str.WAR:_LsaGetLogonSessionData:_08lx:_08lx_fail_err_d__continue..._n
push 0x5de1f0
call fcn.0040c050
add esp, 0x14
jmp 0x471016
lea ecx, [ebp - 0x15c]
call fcn.00419260
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
cmp dword [ecx + 0x10], 0
je 0x4710ed
mov edx, dword [ebp - 0x14]
movzx eax, word [edx + 0xc]
test eax, eax
je 0x4710ed
push 0x14
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_IsBadStringPtrW]
test eax, eax
jne 0x4710ed
mov eax, dword [ebp - 0x14]
movzx ecx, word [eax + 0xc]
shr ecx, 1
cmp ecx, 0x14
ja 0x4710ed
mov edx, dword [ebp - 0x14]
movzx eax, word [edx + 0xc]
shr eax, 1
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x10]
push edx
lea ecx, [ebp - 0x15c]
call fcn.00408380
jmp 0x471116
push str.WAR:_Can_not_get_a_valid_user_name__continue..._n
push 0x5de284
call fcn.0040c050
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.004060f0
jmp 0x471016
lea ecx, [ebp - 0x15c]
call fcn.00459160
test eax, eax
je 0x471138
lea ecx, [ebp - 0x15c]
call fcn.00406110
mov dword [ebp - 0x1e4], eax
jmp 0x471142
mov dword [ebp - 0x1e4], 0x5ddef4
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x24]
push ecx
mov edx, dword [ebp - 0x1e4]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x28]
push ecx
push str.TIP:_Session_Id_d__User_s__LogonType_d_n
push 0x5de310
call fcn.0040c050
add esp, 0x14
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0x24], 2
je 0x4711b6
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x24], 0xa
je 0x4711b6
mov ecx, dword [ebp - 0x14]
cmp dword [ecx + 0x24], 0xb
je 0x4711b6
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0x24], 0xc
je 0x4711b6
push str.TIP:_Session_logon_type_not_Interactive__ignore_continue..._n
push 0x5de3bc
call fcn.0040c050
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.004060f0
jmp 0x471016
xor eax, eax
mov word [ebp - 0x114], ax
xor ecx, ecx
mov dword [ebp - 0x112], ecx
mov dword [ebp - 0x10e], ecx
mov dword [ebp - 0x10a], ecx
mov word [ebp - 0x106], cx
mov edx, dword [ebp - 0x14]
add edx, 0x30
push edx
lea eax, [ebp - 0x114]
push eax
call fcn.004135e0
add esp, 8
xor ecx, ecx
mov word [ebp - 0x174], cx
xor edx, edx
mov dword [ebp - 0x172], edx
mov dword [ebp - 0x16e], edx
mov dword [ebp - 0x16a], edx
mov word [ebp - 0x166], dx
lea eax, [ebp - 0x174]
push eax
lea ecx, [ebp - 0x15c]
call fcn.00406110
push eax
mov ecx, dword [ebp - 0x1e0]
call fcn.00470bb0
mov dword [ebp - 0x164], 0
lea ecx, [ebp - 0x140]
call fcn.00419260
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
call fcn.00419260
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x190]
call fcn.00405ec0
mov byte [ebp - 4], 3
xor ecx, ecx
mov word [ebp - 0x124], cx
xor edx, edx
mov dword [ebp - 0x122], edx
mov dword [ebp - 0x11e], edx
mov dword [ebp - 0x11a], edx
mov word [ebp - 0x116], dx
mov dword [ebp - 0x160], 0
lea eax, [ebp - 0x160]
push eax
lea ecx, [ebp - 0x124]
push ecx
lea edx, [ebp - 0x190]
push edx
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x140]
push ecx
lea edx, [ebp - 0x164]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x28]
push ecx
mov ecx, dword [ebp - 0x1e0]
call fcn.00470c70
test eax, eax
jne 0x4713ed
cmp dword [0x63a63c], 0
jne 0x47131f
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x190]
call fcn.00405f70
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
call fcn.004060f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x140]
call fcn.004060f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.004060f0
jmp 0x471016
mov dword [ebp - 0x164], 0
lea edx, [ebp - 0x15c]
push edx
lea ecx, [ebp - 0x140]
call fcn.0042b0a0
push str.console
lea ecx, [ebp - 0x60]
call fcn.0040e480
lea ecx, [ebp - 0x1b0]
call fcn.004774f0
mov byte [ebp - 4], 4
lea eax, [ebp - 0x1b0]
push eax
mov ecx, dword [ebp - 0x1e0]
call fcn.00476790
lea ecx, [ebp - 0x1b0]
call fcn.0042e880
test eax, eax
je 0x4713de
lea ecx, [ebp - 0x1b8]
push ecx
lea ecx, [ebp - 0x1b0]
call fcn.004775f0
lea ecx, [ebp - 0x1b8]
call fcn.00477990
add eax, 0x28
push eax
lea ecx, [ebp - 0x190]
call fcn.00405f90
lea ecx, [ebp - 0x1b8]
call fcn.00477990
add eax, 0xc
push eax
mov ecx, dword [ebp - 0x1e0]
add ecx, 0x10
call fcn.00405f90
lea ecx, [ebp - 0x1b8]
call fcn.00477990
add eax, 0xc
push eax
mov ecx, dword [ebp - 0x1e0]
add ecx, 0x2c
call fcn.00405f90
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1b0]
call fcn.0046fa60
cmp dword [ebp - 0x164], 0
je 0x471450
mov edx, dword [ebp - 0x164]
push edx
push str.TIP:_Session_state_d_not_active__ignore_continue..._n
push 0x5de48c
call fcn.0040c050
add esp, 0xc
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x190]
call fcn.00405f70
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
call fcn.004060f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x140]
call fcn.004060f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.004060f0
jmp 0x471016
lea eax, [ebp - 0x15c]
push eax
lea ecx, [ebp - 0x140]
push ecx
call fcn.0045e900
add esp, 8
movzx edx, al
test edx, edx
jne 0x47147c
lea ecx, [ebp - 0x60]
call fcn.0040e460
movzx eax, al
test eax, eax
je 0x4714f0
lea ecx, [ebp - 0x60]
call fcn.00406110
push eax
lea ecx, [ebp - 0x15c]
call fcn.00406110
push eax
lea ecx, [ebp - 0x140]
call fcn.00406110
push eax
push str.TIP:_WStaUser_s_LsaUser_s_StationName_s_invalid__ignore_continue..._n
push 0x5de550
call fcn.0040c050
add esp, 0x14
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x190]
call fcn.00405f70
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
call fcn.004060f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x140]
call fcn.004060f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.004060f0
jmp 0x471016
lea ecx, [ebp - 0x104]
call fcn.00471990
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x140]
call fcn.00406110
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x47151f
mov dword [ebp - 0x1e8], 0
jmp 0x471580
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0x3fffffff
jle 0x471544
mov dword [ebp - 0x1ec], 0
jmp 0x471574
mov eax, dword [ebp - 0x18]
shl eax, 1
call fcn.0056a8e0
mov dword [ebp - 0x1f0], esp
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x18]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x1f0]
push edx
call fcn.004022d0
mov dword [ebp - 0x1ec], eax
mov eax, dword [ebp - 0x1ec]
mov dword [ebp - 0x1e8], eax
mov ecx, dword [ebp - 0x1e8]
push ecx
lea ecx, [ebp - 0xf4]
call fcn.00405fb0
lea ecx, [ebp - 0x60]
call fcn.00406110
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4715af
mov dword [ebp - 0x1f4], 0
jmp 0x471610
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0x3fffffff
jle 0x4715d4
mov dword [ebp - 0x1f8], 0
jmp 0x471604
mov eax, dword [ebp - 0x18]
shl eax, 1
call fcn.0056a8e0
mov dword [ebp - 0x1fc], esp
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x18]
shl ecx, 1
push ecx
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x1fc]
push eax
call fcn.004022d0
mov dword [ebp - 0x1f8], eax
mov ecx, dword [ebp - 0x1f8]
mov dword [ebp - 0x1f4], ecx
mov edx, dword [ebp - 0x1f4]
push edx
lea ecx, [ebp - 0xd8]
call fcn.00405fb0
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x28]
mov dword [ebp - 0x104], ecx
lea ecx, [ebp - 0x190]
call fcn.00459160
test eax, eax
je 0x47164b
lea edx, [ebp - 0x190]
mov dword [ebp - 0x200], edx
jmp 0x47165a
mov eax, dword [ebp - 0x1e0]
add eax, 0x10
mov dword [ebp - 0x200], eax
mov ecx, dword [ebp - 0x200]
mov dword [ebp - 0x1dc], ecx
mov edx, dword [ebp - 0x1dc]
push edx
lea ecx, [ebp - 0xa0]
call fcn.00405f90
mov eax, dword [ebp - 0x1e0]
add eax, 0x10
push eax
lea ecx, [ebp - 0xbc]
call fcn.00405f90
mov dword [ebp - 0x100], 1
mov ecx, dword [ebp - 0x160]
mov dword [ebp - 0xfc], ecx
call fcn.00561036
mov dword [ebp - 0xf8], eax
xor edx, edx
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x70], edx
mov dword [ebp - 0x6c], edx
mov dword [ebp - 0x68], edx
movzx eax, word [ebp - 0x174]
cmp eax, 0x7c6
jle 0x4716f3
mov ecx, dword [ebp - 0x174]
mov dword [ebp - 0x84], ecx
mov edx, dword [ebp - 0x170]
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x16c]
mov dword [ebp - 0x7c], eax
mov ecx, dword [ebp - 0x168]
mov dword [ebp - 0x78], ecx
jmp 0x471770
movzx edx, word [ebp - 0x114]
cmp edx, 0x7c6
jle 0x47172b
mov eax, dword [ebp - 0x114]
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp - 0x110]
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x10c]
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp - 0x108]
mov dword [ebp - 0x78], eax
jmp 0x471770
movzx ecx, word [ebp - 0x124]
cmp ecx, 0x7c6
jle 0x471770
movzx edx, word [ebp - 0x124]
cmp edx, 0x7ee
jge 0x471770
mov eax, dword [ebp - 0x124]
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp - 0x120]
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x11c]
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp - 0x118]
mov dword [ebp - 0x78], eax
lea ecx, [ebp - 0x104]
push ecx
mov ecx, dword [ebp - 0x1e0]
call fcn.0046ffe0
mov dword [ebp - 0x30], 1
mov edx, dword [ebp - 0x1e0]
cmp dword [edx + 0x58], 0
jne 0x4717e6
lea ecx, [ebp - 0xf4]
call fcn.00406030
push eax
push str.Tip:_Need_report_user_S_logon_info..._n
push 0x5de5d4
call fcn.0040c050
add esp, 0xc
lea ecx, [ebp - 0xa0]
call fcn.00406030
push eax
lea ecx, [ebp - 0xbc]
call fcn.00406030
push eax
lea eax, [ebp - 0x84]
push eax
lea ecx, [ebp - 0xf4]
call fcn.00406030
push eax
call fcn.004321c0
add esp, 0x10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x104]
call fcn.004702f0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x190]
call fcn.00405f70
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
call fcn.004060f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x140]
call fcn.004060f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.004060f0
jmp 0x471016
cmp dword [0x63a638], 1
jne 0x4718bd
cmp dword [ebp - 0x30], 0
je 0x4718bd
lea ecx, [ebp - 0x1d8]
call fcn.004774f0
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x1d8]
push ecx
mov ecx, dword [ebp - 0x1e0]
call fcn.00476790
lea ecx, [ebp - 0x1d8]
call fcn.0042e880
test eax, eax
jne 0x471899
push str.Tip:_Already_has_user_logon_in_local__disable_null_password_filter_
push 0x5de694
call fcn.0040c050
add esp, 8
mov edx, dword [ebp - 0x1e0]
mov dword [edx + 8], 0
jmp 0x4718ab
push str.Tip:_Already_has_user_logon_by_remote__keep_null_password_filter...
push 0x5de754
call fcn.0040c050
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1d8]
call fcn.0046fa60
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x3c], 0
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0x20]
push eax
call fcn.00414790
add esp, 0x10
cmp dword [ebp - 0x20], 5
jne 0x471922
cmp dword [ebp - 0x1c], 0
jbe 0x471922
cmp dword [ebp - 0x30], 0
je 0x471922
mov ecx, dword [ebp - 0x1e0]
mov dword [ecx + 0xc], 0
push str.Tip:_Already_has_user_logon__disable_first_console_logon_0_filter_
push 0x5de814
call fcn.0040c050
add esp, 8
cmp dword [ebp - 0x14], 0
je 0x471938
mov edx, dword [ebp - 0x14]
push edx
call sub.Secur32.dll_LsaFreeReturnBuffer
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x10], 0
je 0x47194e
mov eax, dword [ebp - 0x10]
push eax
call sub.Secur32.dll_LsaFreeReturnBuffer
mov dword [ebp - 0x10], 0
push str.Tip:_InitialReportAllLogonSesssionsEx_func_out..._n
push str.CSessionMon::InitialReportAllLogonSesssionsEx
call fcn.0040c050
add esp, 8
xor eax, eax
lea esp, [ebp - 0x204]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x44]
xor ecx, ebp
call fcn.0055abea
mov esp, ebp
pop ebp
ret