Function at 0x417690
Capabilities:
Compare security identifiers
Enumerate processes on remote desktop session host

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44b158
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x4690f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x4c], ebx
push dword [ebp - 0x4c]
mov dword [ebp - 0x48], 0
push ecx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x44], 0
call fcn.00418640
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x48]
push eax
push 1
push 0
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateProcessesW]
test eax, eax
jne 0x417700
xor bl, bl
jmp 0x417865
push 0xc
xor eax, eax
push str.explorer.exe
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.004015d0
xor esi, esi
mov byte [ebp - 4], 1
cmp dword [ebp - 0x50], esi
jbe 0x417803
xor edi, edi
mov eax, dword [ebp - 0x48]
mov eax, dword [eax + edi + 0xc]
test eax, eax
je 0x4177ca
push dword [ebx + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x4177ca
mov eax, dword [ebp - 0x48]
mov edx, dword [eax + edi + 8]
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
cmp word [edx], ax
je 0x417788
mov eax, edx
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x417776
sub eax, ebx
mov ebx, dword [ebp - 0x4c]
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x40]
call fcn.004015d0
mov byte [ebp - 4], 2
cmp dword [ebp - 0x14], 8
push dword [ebp - 0x18]
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push dword [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x40]
call fcn.00405300
test eax, eax
je 0x4177d9
mov byte [ebp - 4], 1
cmp dword [ebp - 0x2c], 8
jb 0x4177ca
push dword [ebp - 0x40]
call fcn.0042f2d8
add esp, 4
inc esi
add edi, 0x10
cmp esi, dword [ebp - 0x50]
jb 0x417734
jmp 0x417803
shl esi, 4
add esi, dword [ebp - 0x48]
cmp dword [ebp - 0x2c], 8
movq xmm0, qword [esi]
movq qword [ebp - 0x60], xmm0
movq xmm0, qword [esi + 8]
movq qword [ebp - 0x58], xmm0
jb 0x417803
push dword [ebp - 0x40]
call fcn.0042f2d8
add esp, 4
push dword [ebp - 0x5c]
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x417833
lea edi, [ebx + 0x20]
push edi
push 0xe
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x417833
cmp dword [edi], 0
je 0x417833
mov bl, 1
jmp 0x417835
xor bl, bl
test esi, esi
je 0x417840
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], 8
jb 0x417851
push dword [ebp - 0x28]
call fcn.0042f2d8
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x44]
test esi, esi
je 0x417898
or edi, 0xffffffff
lea ecx, [esi + 4]
mov eax, edi
lock xadd dword [ecx], eax
jne 0x417898
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lea edx, [esi + 8]
lock xadd dword [edx], edi
dec edi
jne 0x417898
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042f2dd
mov esp, ebp
pop ebp
ret