Function at 0x475300
Capabilities:
Get logon sessions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58da8a
mov eax, dword fs:[0]
push eax
sub esp, 0x1f4
mov eax, dword [0x61b000]
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 0x5e41f8
call fcn.0040c230
add esp, 8
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x28]
push ecx
call sub.Secur32.dll_LsaEnumerateLogonSessions
test eax, eax
jne 0x475377
cmp dword [ebp - 0x10], 0
jne 0x4753a6
cmp dword [ebp - 0x10], 0
je 0x475386
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 0x5e42a4
call fcn.0040c230
add esp, 0xc
xor eax, eax
jmp 0x475d02
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x40], 0
jmp 0x4753bf
mov eax, dword [ebp - 0x40]
add eax, 1
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
cmp ecx, dword [ebp - 0x28]
jae 0x475bd6
cmp dword [ebp - 0x14], 0
je 0x4753e1
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 0x475428
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 0x5e4360
call fcn.0040c230
add esp, 0x14
jmp 0x4753b6
lea ecx, [ebp - 0x15c]
call fcn.00418b60
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
cmp dword [ecx + 0x10], 0
je 0x47548d
mov edx, dword [ebp - 0x14]
movzx eax, word [edx + 0xc]
test eax, eax
je 0x47548d
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 0x47548d
mov eax, dword [ebp - 0x14]
movzx ecx, word [eax + 0xc]
shr ecx, 1
cmp ecx, 0x14
ja 0x47548d
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.00408510
jmp 0x4754b6
push str.WAR:_Can_not_get_a_valid_user_name__continue..._n
push 0x5e43f4
call fcn.0040c230
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.00406270
jmp 0x4753b6
lea ecx, [ebp - 0x15c]
call fcn.004061b0
test eax, eax
je 0x4754d8
lea ecx, [ebp - 0x15c]
call fcn.00406290
mov dword [ebp - 0x1e4], eax
jmp 0x4754e2
mov dword [ebp - 0x1e4], 0x5e4064
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 0x5e4480
call fcn.0040c230
add esp, 0x14
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0x24], 2
je 0x475556
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x24], 0xa
je 0x475556
mov ecx, dword [ebp - 0x14]
cmp dword [ecx + 0x24], 0xb
je 0x475556
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0x24], 0xc
je 0x475556
push str.TIP:_Session_logon_type_not_Interactive__ignore_continue..._n
push 0x5e452c
call fcn.0040c230
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.00406270
jmp 0x4753b6
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.00474130
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.00406290
push eax
mov ecx, dword [ebp - 0x1e0]
call fcn.00474f50
mov dword [ebp - 0x164], 0
lea ecx, [ebp - 0x140]
call fcn.00418b60
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
call fcn.00418b60
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x190]
call fcn.00406020
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.00475010
test eax, eax
jne 0x47578d
cmp dword [0x640660], 0
jne 0x4756bf
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x190]
call fcn.004060d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
call fcn.00406270
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x140]
call fcn.00406270
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.00406270
jmp 0x4753b6
mov dword [ebp - 0x164], 0
lea edx, [ebp - 0x15c]
push edx
lea ecx, [ebp - 0x140]
call fcn.0042b7d0
push str.console
lea ecx, [ebp - 0x60]
call fcn.0040e620
lea ecx, [ebp - 0x1b0]
call fcn.0047b8d0
mov byte [ebp - 4], 4
lea eax, [ebp - 0x1b0]
push eax
mov ecx, dword [ebp - 0x1e0]
call fcn.0047ab30
lea ecx, [ebp - 0x1b0]
call fcn.004a2040
test eax, eax
je 0x47577e
lea ecx, [ebp - 0x1b8]
push ecx
lea ecx, [ebp - 0x1b0]
call fcn.0047b9d0
lea ecx, [ebp - 0x1b8]
call fcn.0047bdf0
add eax, 0x28
push eax
lea ecx, [ebp - 0x190]
call fcn.004060f0
lea ecx, [ebp - 0x1b8]
call fcn.0047bdf0
add eax, 0xc
push eax
mov ecx, dword [ebp - 0x1e0]
add ecx, 0x10
call fcn.004060f0
lea ecx, [ebp - 0x1b8]
call fcn.0047bdf0
add eax, 0xc
push eax
mov ecx, dword [ebp - 0x1e0]
add ecx, 0x2c
call fcn.004060f0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1b0]
call fcn.00473dc0
cmp dword [ebp - 0x164], 0
je 0x4757f0
mov edx, dword [ebp - 0x164]
push edx
push str.TIP:_Session_state_d_not_active__ignore_continue..._n
push 0x5e45fc
call fcn.0040c230
add esp, 0xc
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x190]
call fcn.004060d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
call fcn.00406270
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x140]
call fcn.00406270
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.00406270
jmp 0x4753b6
lea eax, [ebp - 0x15c]
push eax
lea ecx, [ebp - 0x140]
push ecx
call fcn.00461060
add esp, 8
movzx edx, al
test edx, edx
jne 0x47581c
lea ecx, [ebp - 0x60]
call fcn.0045ba80
movzx eax, al
test eax, eax
je 0x475890
lea ecx, [ebp - 0x60]
call fcn.00406290
push eax
lea ecx, [ebp - 0x15c]
call fcn.00406290
push eax
lea ecx, [ebp - 0x140]
call fcn.00406290
push eax
push str.TIP:_WStaUser_s_LsaUser_s_StationName_s_invalid__ignore_continue..._n
push 0x5e46c0
call fcn.0040c230
add esp, 0x14
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x190]
call fcn.004060d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
call fcn.00406270
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x140]
call fcn.00406270
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.00406270
jmp 0x4753b6
lea ecx, [ebp - 0x104]
call fcn.00475d30
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x140]
call fcn.00406290
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4758bf
mov dword [ebp - 0x1e8], 0
jmp 0x475920
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 0x4758e4
mov dword [ebp - 0x1ec], 0
jmp 0x475914
mov eax, dword [ebp - 0x18]
shl eax, 1
call fcn.00570840
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.00406110
lea ecx, [ebp - 0x60]
call fcn.00406290
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x47594f
mov dword [ebp - 0x1f4], 0
jmp 0x4759b0
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 0x475974
mov dword [ebp - 0x1f8], 0
jmp 0x4759a4
mov eax, dword [ebp - 0x18]
shl eax, 1
call fcn.00570840
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.00406110
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x28]
mov dword [ebp - 0x104], ecx
lea ecx, [ebp - 0x190]
call fcn.004061b0
test eax, eax
je 0x4759eb
lea edx, [ebp - 0x190]
mov dword [ebp - 0x200], edx
jmp 0x4759fa
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.004060f0
mov eax, dword [ebp - 0x1e0]
add eax, 0x10
push eax
lea ecx, [ebp - 0xbc]
call fcn.004060f0
mov dword [ebp - 0x100], 1
mov ecx, dword [ebp - 0x160]
mov dword [ebp - 0xfc], ecx
call fcn.00567095
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 0x475a93
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 0x475b10
movzx edx, word [ebp - 0x114]
cmp edx, 0x7c6
jle 0x475acb
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 0x475b10
movzx ecx, word [ebp - 0x124]
cmp ecx, 0x7c6
jle 0x475b10
movzx edx, word [ebp - 0x124]
cmp edx, 0x7ee
jge 0x475b10
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.00474380
mov dword [ebp - 0x30], 1
mov edx, dword [ebp - 0x1e0]
cmp dword [edx + 0x58], 0
jne 0x475b86
lea ecx, [ebp - 0xf4]
call fcn.00406190
push eax
push str.Tip:_Need_report_user_S_logon_info..._n
push 0x5e4744
call fcn.0040c230
add esp, 0xc
lea ecx, [ebp - 0xa0]
call fcn.00406190
push eax
lea ecx, [ebp - 0xbc]
call fcn.00406190
push eax
lea eax, [ebp - 0x84]
push eax
lea ecx, [ebp - 0xf4]
call fcn.00406190
push eax
call fcn.004331b0
add esp, 0x10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x104]
call fcn.00474690
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x190]
call fcn.004060d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
call fcn.00406270
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x140]
call fcn.00406270
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.00406270
jmp 0x4753b6
cmp dword [0x64065c], 1
jne 0x475c5d
cmp dword [ebp - 0x30], 0
je 0x475c5d
lea ecx, [ebp - 0x1d8]
call fcn.0047b8d0
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x1d8]
push ecx
mov ecx, dword [ebp - 0x1e0]
call fcn.0047ab30
lea ecx, [ebp - 0x1d8]
call fcn.004a2040
test eax, eax
jne 0x475c39
push str.Tip:_Already_has_user_logon_in_local__disable_null_password_filter_
push 0x5e4804
call fcn.0040c230
add esp, 8
mov edx, dword [ebp - 0x1e0]
mov dword [edx + 8], 0
jmp 0x475c4b
push str.Tip:_Already_has_user_logon_by_remote__keep_null_password_filter...
push 0x5e48c4
call fcn.0040c230
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1d8]
call fcn.00473dc0
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.00413da0
add esp, 0x10
cmp dword [ebp - 0x20], 5
jne 0x475cc2
cmp dword [ebp - 0x1c], 0
jbe 0x475cc2
cmp dword [ebp - 0x30], 0
je 0x475cc2
mov ecx, dword [ebp - 0x1e0]
mov dword [ecx + 0xc], 0
push str.Tip:_Already_has_user_logon__disable_first_console_logon_0_filter_
push 0x5e4984
call fcn.0040c230
add esp, 8
cmp dword [ebp - 0x14], 0
je 0x475cd8
mov edx, dword [ebp - 0x14]
push edx
call sub.Secur32.dll_LsaFreeReturnBuffer
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x10], 0
je 0x475cee
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.0040c230
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.00560c61
mov esp, ebp
pop ebp
ret