Function at 0x413af0
Capabilities:
Get logon sessions
List user accounts

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 0x413b6c
add esi, 0x1c
jmp 0x413b26
add esi, 0x2c
dec edi
je 0x413b6c
mov eax, dword [esi - 0x1c]
test eax, eax
je 0x413b3b
push 1
push eax
push dword [esi - 0x18]
call fcn.0040cd20
add esp, 0xc
mov eax, dword [esi - 0x10]
test eax, eax
je 0x413b50
push 1
push eax
push dword [esi - 0xc]
call fcn.0040cd20
add esp, 0xc
mov eax, dword [esi - 4]
mov ecx, eax
neg ecx
jo 0x413b20
jae 0x413b20
add eax, eax
push 2
push eax
push dword [esi]
call fcn.0040cd20
add esp, 0xc
jmp 0x413b20
mov dword [ebp - 0x64], 0
nop word cs:[eax + eax]
nop dword [eax]
lea eax, [ebp - 0x64]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x3c], 0
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x5c]
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 0x413bc1
cmp eax, 0xea
jne 0x413e0f
mov edi, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x38]
mov dword [ebp - 0x60], eax
test edi, edi
je 0x413df3
shl edi, 2
jmp 0x413bec
add esi, 4
add edi, 0xfffffffc
je 0x413df0
mov ebx, dword [esi]
test ebx, ebx
je 0x413be0
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 0x413c20
test eax, eax
jne 0x413dd7
jmp 0x413be0
push dword [eax + 0x10]
lea eax, [ebp - 0x54]
push eax
call fcn.00410fd0
add esp, 8
xor eax, eax
cmp eax, dword [ebp - 0x54]
jo 0x413dcc
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.00411100
add esp, 8
mov ecx, dword [ebp - 0x48]
mov eax, ecx
neg eax
jno 0x413ca9
mov eax, dword [esi]
test eax, eax
mov dword [ebp - 0x18], eax
je 0x413cba
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0043f230
add esp, 8
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x24]
mov eax, edx
neg eax
mov eax, 0
cmovo ecx, eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x30], ecx
mov ecx, 1
cmovo eax, ecx
mov ecx, 0
cmovo edx, ecx
mov dword [ebp - 0x20], eax
jmp 0x413cca
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x30], ecx
jmp 0x413ccd
xor edx, edx
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x68]
movsd xmm0, qword [ebp - 0x70]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x18]
movsd qword [ebp - 0x2c], xmm0
push eax
call fcn.0043f210
add esp, 4
mov ecx, eax
xor eax, eax
test edx, edx
js 0x41403e
lea ebx, [edx + edx]
cmp ebx, 0x7ffffffe
ja 0x41403e
test ebx, ebx
mov dword [ebp - 0x14], edx
je 0x413d37
mov eax, dword [0x59fb24]
mov dword [ebp - 0x10], ecx
movzx eax, byte [eax]
push 2
push ebx
call fcn.0040cd10
add esp, 8
test eax, eax
je 0x414036
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x58], ecx
mov ecx, dword [ebp - 0x10]
jmp 0x413d43
mov eax, 2
mov dword [ebp - 0x58], 0
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 0x413d77
push eax
call fcn.00417d60
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 - 0x34]
movsd xmm0, qword [ebp - 0x48]
movsd qword [eax + ecx], xmm0
mov dword [eax + ecx + 0xc], edx
mov edx, dword [ebp - 0x20]
mov dword [eax + ecx + 0x10], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + ecx + 0x14], edx
mov edx, dword [ebp - 0x58]
mov dword [eax + ecx + 0x18], edx
mov edx, dword [ebp - 0x14]
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 0x413be0
push eax
call sub.netapi32.dll_NetApiBufferFree
jmp 0x413be0
mov esi, dword [ebp - 0x38]
cmp dword [ebp - 0x60], 0xea
jne 0x413e12
test esi, esi
je 0x413b80
push esi
call sub.netapi32.dll_NetApiBufferFree
jmp 0x413b80
mov esi, dword [ebp - 0x38]
test esi, esi
je 0x413e1c
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 0x414024
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x414024
lea edi, [esi + eax*8]
mov dword [ebp - 0x20], edi
jmp 0x413ec5
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 - 0x14]
movsd xmm0, qword [ebp - 0x2c]
movsd qword [eax + ecx], xmm0
mov dword [eax + ecx + 0xc], ebx
mov ebx, dword [ebp - 0x10]
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 - 0x34]
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x413eba
push eax
call sub.secur32.dll_LsaFreeReturnBuffer
add esi, 8
cmp esi, edi
je 0x414021
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push esi
call sub.secur32.dll_LsaGetLogonSessionData
test eax, eax
mov eax, dword [ebp - 0x18]
sets cl
test eax, eax
sete dl
or dl, cl
jne 0x413eb0
cmp dword [eax + 0x24], 3
je 0x413eb4
movzx ebx, word [eax + 0xc]
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x10], ecx
push dword [eax + 0x2c]
lea eax, [ebp - 0x2c]
push eax
call fcn.00410fd0
add esp, 8
xor eax, eax
cmp eax, dword [ebp - 0x2c]
jo 0x413ead
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 0x24]
movsd xmm0, qword [ebp - 0x2c]
mov dword [ebp - 0x34], esi
mov eax, dword [eax + 8]
mov dword [ebp - 0x4c], ebx
movsd qword [ebp - 0x54], xmm0
test eax, eax
je 0x413f93
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x50]
imul esi, eax, 0x2c
mov edi, dword [ecx + 4]
mov dword [ebp - 0x14], edx
add edi, 8
jmp 0x413f58
add edi, 0x2c
add esi, 0xffffffd4
je 0x413f93
cmp dword [edi], ebx
jne 0x413f50
push ebx
push dword [ebp - 0x14]
push dword [edi - 4]
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x413f50
mov eax, dword [ebp - 0x54]
mov esi, dword [ebp - 0x34]
mov edi, dword [ebp - 0x20]
test eax, eax
je 0x413ead
push 1
push eax
push dword [ebp - 0x14]
call fcn.0040cd20
add esp, 0xc
jmp 0x413ead
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00411100
add esp, 8
mov ebx, dword [ebp - 0x48]
mov eax, ebx
neg eax
jno 0x413fe9
mov eax, dword [ebp - 0x30]
shr eax, 1
push eax
push dword [ebp - 0x10]
lea eax, [ebp - 0x2c]
push eax
call fcn.004d1210
add esp, 0xc
mov ebx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
mov ecx, 1
mov eax, ebx
neg eax
mov eax, 0
cmovo edx, ecx
cmovo ebx, eax
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0x24]
cmovo edx, eax
mov dword [ebp - 0x10], edx
jmp 0x413ff5
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], 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 0x413e55
push edi
call fcn.00417d60
add esp, 4
jmp 0x413e55
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x41402e
push esi
call sub.secur32.dll_LsaFreeReturnBuffer
add esp, 0x64
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 2
mov dword [ebp - 0x10], ebx
push dword [ebp - 0x10]
push eax
call fcn.004cf340
nop word [eax + eax]
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
mov ecx, dword [ebp + 8]
xor edi, edi
mov eax, dword [ecx + 8]
test eax, eax
je 0x4140a4
mov edx, dword [ebp + 0xc]
mov edi, dword [ecx + 4]
imul ebx, eax, 0x2c
mov ecx, dword [edx + 4]
mov esi, dword [edx + 8]
mov dword [ebp - 0x10], ecx
jmp 0x414088
add edi, 0x2c
add ebx, 0xffffffd4
je 0x4140a2
cmp dword [edi + 8], esi
jne 0x414080
push esi
push dword [ebp - 0x10]
push dword [edi + 4]
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x414080
jmp 0x4140a4
xor edi, edi
mov eax, edi
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret