Function at 0x410a30
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.00410780
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 0x410a83
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WTSEnumerateProcesses___failed__GetLastError__:__d_n
call fcn.00410780
add esp, 8
xor eax, eax
jmp 0x410d1d
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 8]
sub edx, 1
mov dword [ebp - 0x14], edx
jmp 0x410a9e
mov eax, dword [ebp - 0x14]
sub eax, 1
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jle 0x410d0e
mov ecx, dword [ebp - 0x14]
shl ecx, 4
mov edx, dword [ebp - 0x10]
cmp dword [edx + ecx + 0xc], 0
je 0x410d09
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 0x410aed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ConvertSidToStringSid___failed__GetLastError__:__d_n
call fcn.00410780
add esp, 8
jmp 0x410a95
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.00402cd2
add esp, 8
test eax, eax
jne 0x410d09
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 0x410b4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x414a14
call fcn.00410780
add esp, 8
jmp 0x410a95
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 0x410b84
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DuplicateHandle___failed__GetLastError__:__d_n
call fcn.00410780
add esp, 8
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x410a95
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
push str.SeBackupPrivilege
mov edx, dword [ebp - 0x24]
push edx
call fcn.00410960
add esp, 0xc
test eax, eax
jne 0x410bc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x414a98
call fcn.00410780
add esp, 8
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x410a95
push 1
push str.SeRestorePrivilege
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00410960
add esp, 0xc
test eax, eax
jne 0x410c02
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x414aec
call fcn.00410780
add esp, 8
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x410a95
push 1
push str.SeIncreaseQuotaPrivilege
mov eax, dword [ebp - 0x24]
push eax
call fcn.00410960
add esp, 0xc
test eax, eax
jne 0x410c3c
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.00410780
add esp, 8
jmp 0x410a95
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 0x410c98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenProcessToken___failed__GetLastError__:__d_n
call fcn.00410780
add esp, 8
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x410a95
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 0x410ce9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DuplicateTokenEx___failed__GetLastError__:__d_n
call fcn.00410780
add esp, 8
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x410a95
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.00410780
add esp, 8
mov eax, dword [ebp - 0x20]
jmp 0x410d1d
jmp 0x410a95
push str.GetRealUserToken_returns_NULL_n
call fcn.00410780
add esp, 4
xor eax, eax
mov esp, ebp
pop ebp
ret