Function at 0x414040
Capabilities:
Get logon sessions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x64
mov eax, dword [ebp + 8]
mov edi, dword [eax + 8]
mov esi, dword [eax + 4]
mov dword [eax + 8], 0
test edi, edi
je 0x4140bf
add esi, 0x1c
jmp 0x414076
add esi, 0x2c
dec edi
je 0x4140bf
mov eax, dword [esi - 0x1c]
test eax, eax
je 0x41408b
push 1
push eax
push dword [esi - 0x18]
call fcn.0040d1e0
add esp, 0xc
mov eax, dword [esi - 0x10]
test eax, eax
je 0x4140a0
push 1
push eax
push dword [esi - 0xc]
call fcn.0040d1e0
add esp, 0xc
mov eax, dword [esi - 4]
cmp eax, 0x80000000
je 0x414070
test eax, eax
je 0x414070
add eax, eax
push 2
push eax
push dword [esi]
call fcn.0040d1e0
add esp, 0xc
jmp 0x414070
mov dword [ebp - 0x64], 0
nop word cs:[eax + eax]
lea eax, [ebp - 0x64]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x3c], 0
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x58]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x38]
push eax
push 2
push 0
push 0
call sub.netapi32.dll_NetUserEnum
test eax, eax
je 0x414111
cmp eax, 0xea
jne 0x41433f
mov edi, dword [ebp - 0x58]
mov esi, dword [ebp - 0x38]
mov dword [ebp - 0x5c], eax
test edi, edi
je 0x414323
shl edi, 2
jmp 0x41413c
add esi, 4
add edi, 0xfffffffc
je 0x414320
mov ebx, dword [esi]
test ebx, ebx
je 0x414130
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
push 0x17
push ebx
push 0
call sub.netapi32.dll_NetUserGetInfo
test eax, eax
mov eax, dword [ebp - 0x1c]
je 0x414170
test eax, eax
jne 0x414314
jmp 0x414130
push dword [eax + 0x10]
lea eax, [ebp - 0x54]
push eax
call fcn.00412850
add esp, 8
cmp dword [ebp - 0x54], 0x80000000
je 0x414309
mov eax, dword [ebp - 0x4c]
movsd xmm0, qword [ebp - 0x54]
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x70]
movsd qword [ebp - 0x70], xmm0
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00412980
add esp, 8
mov eax, dword [ebp - 0x48]
cmp eax, 0x80000000
jne 0x4141fe
mov eax, dword [esi]
test eax, eax
mov dword [ebp - 0x14], eax
je 0x41420f
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.004416f0
add esp, 8
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x24]
mov eax, 0
cmp edx, 0x80000000
cmove ecx, eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x20], ecx
mov ecx, 1
cmove eax, ecx
mov ecx, 0
cmove edx, ecx
mov dword [ebp - 0x30], eax
jmp 0x41421f
mov edx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x20], ecx
jmp 0x414222
xor edx, edx
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x68]
movsd xmm0, qword [ebp - 0x70]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x14]
movsd qword [ebp - 0x2c], xmm0
push eax
call fcn.004403d0
add esp, 4
mov ecx, eax
test edx, edx
mov dword [ebp - 0x34], edx
je 0x41427c
cmp edx, 0x3fffffff
mov dword [ebp - 0x60], ecx
ja 0x41455a
mov eax, dword [0x55bd94]
lea ebx, [edx + edx]
movzx eax, byte [eax]
push 2
push ebx
call fcn.0040d1d0
add esp, 8
test eax, eax
je 0x414565
mov ecx, dword [ebp - 0x60]
jmp 0x414283
mov eax, 2
xor ebx, ebx
push ebx
push ecx
mov dword [ebp - 0x10], eax
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x24]
movsd xmm0, qword [ebp - 0x2c]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
movsd qword [ebp - 0x48], xmm0
mov ebx, dword [eax + 8]
cmp ebx, dword [eax]
jne 0x4142b7
push eax
call fcn.004244a0
mov eax, dword [ebp + 8]
add esp, 4
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x40]
imul ecx, ebx, 0x2c
inc ebx
mov dword [eax + ecx + 8], edx
mov edx, dword [ebp - 0x18]
movsd xmm0, qword [ebp - 0x48]
movsd qword [eax + ecx], xmm0
mov dword [eax + ecx + 0xc], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + ecx + 0x10], edx
mov edx, dword [ebp - 0x20]
mov dword [eax + ecx + 0x14], edx
mov edx, dword [ebp - 0x34]
mov dword [eax + ecx + 0x18], edx
mov dword [eax + ecx + 0x20], edx
mov edx, dword [ebp - 0x10]
mov dword [eax + ecx + 0x1c], edx
mov dword [eax + ecx + 0x24], 0
mov byte [eax + ecx + 0x28], 1
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], ebx
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x414130
push eax
call sub.netapi32.dll_NetApiBufferFree
jmp 0x414130
mov esi, dword [ebp - 0x38]
cmp dword [ebp - 0x5c], 0xea
jne 0x414342
test esi, esi
je 0x4140d0
push esi
call sub.netapi32.dll_NetApiBufferFree
jmp 0x4140d0
mov esi, dword [ebp - 0x38]
test esi, esi
je 0x41434c
push esi
call sub.netapi32.dll_NetApiBufferFree
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x1c], 0
push eax
lea eax, [ebp - 0x3c]
push eax
call sub.secur32.dll_LsaEnumerateLogonSessions
mov esi, dword [ebp - 0x1c]
test eax, eax
js 0x414548
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x414548
lea edi, [esi + eax*8]
mov dword [ebp - 0x34], edi
jmp 0x4143f5
mov eax, dword [edi + 4]
mov edx, dword [ebp - 0x24]
imul ecx, esi, 0x2c
inc esi
mov dword [eax + ecx + 8], edx
mov edx, dword [ebp - 0x10]
movsd xmm0, qword [ebp - 0x2c]
movsd qword [eax + ecx], xmm0
mov dword [eax + ecx + 0xc], ebx
mov ebx, dword [ebp - 0x18]
mov dword [eax + ecx + 0x10], edx
mov dword [eax + ecx + 0x14], ebx
mov dword [eax + ecx + 0x18], 0x80000000
mov dword [eax + ecx + 0x20], 0
mov dword [eax + ecx + 0x1c], 0
mov dword [eax + ecx + 0x24], 0
mov byte [eax + ecx + 0x28], 0
mov dword [edi + 8], esi
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4143ea
push eax
call sub.secur32.dll_LsaFreeReturnBuffer
add esi, 8
cmp esi, edi
je 0x414545
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push esi
call sub.secur32.dll_LsaGetLogonSessionData
test eax, eax
mov eax, dword [ebp - 0x14]
js 0x4143e0
test eax, eax
je 0x4143e0
cmp dword [eax + 0x24], 3
je 0x4143e4
movzx ebx, word [eax + 0xc]
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x18], ecx
push dword [eax + 0x2c]
lea eax, [ebp - 0x2c]
push eax
call fcn.00412850
add esp, 8
cmp dword [ebp - 0x2c], 0x80000000
je 0x4143dd
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 0x24]
movsd xmm0, qword [ebp - 0x2c]
mov dword [ebp - 0x20], esi
mov eax, dword [eax + 8]
mov dword [ebp - 0x4c], ebx
movsd qword [ebp - 0x54], xmm0
test eax, eax
je 0x4144b3
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x50]
imul esi, eax, 0x2c
mov edi, dword [ecx + 4]
mov dword [ebp - 0x10], edx
add edi, 8
jmp 0x414478
add edi, 0x2c
add esi, 0xffffffd4
je 0x4144b3
cmp dword [edi], ebx
jne 0x414470
push ebx
push dword [ebp - 0x10]
push dword [edi - 4]
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x414470
mov eax, dword [ebp - 0x54]
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x34]
test eax, eax
je 0x4143dd
push 1
push eax
push dword [ebp - 0x10]
call fcn.0040d1e0
add esp, 0xc
jmp 0x4143dd
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00412980
add esp, 8
mov ebx, dword [ebp - 0x48]
cmp ebx, 0x80000000
jne 0x41450d
mov eax, dword [ebp - 0x30]
shr eax, 1
push eax
push dword [ebp - 0x18]
lea eax, [ebp - 0x2c]
push eax
call fcn.004d27f0
add esp, 0xc
mov ebx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
mov ecx, 1
mov eax, 0
cmp ebx, 0x80000000
cmove edx, ecx
cmove ebx, eax
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x24]
cmove edx, eax
mov dword [ebp - 0x18], edx
jmp 0x414519
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], ecx
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x4c]
movsd xmm0, qword [ebp - 0x54]
mov esi, dword [edi + 8]
mov dword [ebp - 0x24], eax
movsd qword [ebp - 0x2c], xmm0
cmp esi, dword [edi]
jne 0x414385
push edi
call fcn.004244a0
add esp, 4
jmp 0x414385
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x414552
push esi
call sub.secur32.dll_LsaFreeReturnBuffer
add esp, 0x64
pop esi
pop edi
pop ebx
pop ebp
ret
xor eax, eax
push dword [ebp - 0x10]
push eax
call fcn.004d09f0
mov eax, 2
mov dword [ebp - 0x10], ebx
push dword [ebp - 0x10]
push eax
call fcn.004d09f0
nop
nop
nop
nop
nop
push ebp
mov ebp, esp
push esi
movzx esi, byte [ebp + 0x10]
call fcn.0041458d