Function at 0x421ad0
Capabilities:
Enumerate processes on remote desktop session host

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
push str.GetRealUserToken_startss
call fcn.004217c0
add esp, 4
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x10]
push ecx
push 1
push 0
push 0
call sub.WTSAPI32.dll_WTSEnumerateProcessesW
test eax, eax
jne 0x421b23
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WTSEnumerateProcesses___failed__GetLastError__:__d_n
call fcn.004217c0
add esp, 8
xor eax, eax
jmp 0x421dbd
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 8]
sub edx, 1
mov dword [ebp - 0x14], edx
jmp 0x421b3e
mov eax, dword [ebp - 0x14]
sub eax, 1
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jle 0x421dae
mov ecx, dword [ebp - 0x14]
shl ecx, 4
mov edx, dword [ebp - 0x10]
cmp dword [edx + ecx + 0xc], 0
je 0x421da9
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x14]
shl ecx, 4
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + ecx + 0xc]
push eax
call sub.ADVAPI32.dll_ConvertSidToStringSidW
test eax, eax
jne 0x421b8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ConvertSidToStringSid___failed__GetLastError__:__d_n
call fcn.004217c0
add esp, 8
jmp 0x421b35
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.0040f622
add esp, 8
test eax, eax
jne 0x421da9
push 0
push 0
push 0x400
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x421bea
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42612c
call fcn.004217c0
add esp, 8
jmp 0x421b35
lea ecx, [ebp - 0x24]
push ecx
push 0xf01ff
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x421c24
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DuplicateHandle___failed__GetLastError__:__d_n
call fcn.004217c0
add esp, 8
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x421b35
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
push 0x42618c
mov edx, dword [ebp - 0x24]
push edx
call fcn.00421a00
add esp, 0xc
test eax, eax
jne 0x421c68
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4261b0
call fcn.004217c0
add esp, 8
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x421b35
push 1
push 0x4261dc
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00421a00
add esp, 0xc
test eax, eax
jne 0x421ca2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x426204
call fcn.004217c0
add esp, 8
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x421b35
push 1
push 0x426230
mov eax, dword [ebp - 0x24]
push eax
call fcn.00421a00
add esp, 0xc
test eax, eax
jne 0x421cdc
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetPrivilege___failed__GetLastError__:__d_n
call fcn.004217c0
add esp, 8
jmp 0x421b35
mov edx, dword [ebp - 0x14]
shl edx, 4
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + edx + 4]
push ecx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], 0
lea edx, [ebp - 0x1c]
push edx
push 0xb
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x421d38
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenProcessToken___failed__GetLastError__:__d_n
call fcn.004217c0
add esp, 8
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x421b35
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x20]
push eax
push 1
push 3
push 0
push 0x2000000
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x421d89
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DuplicateTokenEx___failed__GetLastError__:__d_n
call fcn.004217c0
add esp, 8
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x421b35
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x20]
push ecx
push str.GetRealUserToken_returns__d_n
call fcn.004217c0
add esp, 8
mov eax, dword [ebp - 0x20]
jmp 0x421dbd
jmp 0x421b35
push str.GetRealUserToken_returns_NULL_n
call fcn.004217c0
add esp, 4
xor eax, eax
mov esp, ebp
pop ebp
ret