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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
push str.GetRealUserToken_In
call fcn.00429690
add esp, 4
cmp dword [ebp + 8], 0
je 0x429bff
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.ADVAPI32.dll_ConvertStringSidToSidW
test eax, eax
jne 0x429bff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetRealUserToken___:_ConvertStringSidToSid___err___d_n
call fcn.00429690
add esp, 8
cmp dword [ebp - 8], 0
je 0x429c30
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x1c]
push eax
push 1
push 0
push 0
call sub.WTSAPI32.dll_WTSEnumerateProcessesW
test eax, eax
jne 0x429c30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetRealUserToken___:_WTSEnumerateProcesses___err___d_n
call fcn.00429690
add esp, 8
cmp dword [ebp - 4], 0
je 0x429cf0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x429c80
push 0
push 0
push 0x400
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x429c80
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetRealUserToken___:_DuplicateHandle___err___d_n
call fcn.00429690
add esp, 8
cmp dword [ebp - 0x10], 0
je 0x429cb1
lea edx, [ebp - 0x18]
push edx
push 0xf01ff
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x429cb1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetRealUserToken___:_OpenProcessToken___err___d_n
call fcn.00429690
add esp, 8
cmp dword [ebp - 0x18], 0
je 0x429cf0
push 1
push 0x42f66c
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00429950
add esp, 0xc
push 1
push 0x42faac
mov edx, dword [ebp - 0x18]
push edx
call fcn.00429950
add esp, 0xc
push 1
push 0x42f82c
mov eax, dword [ebp - 0x18]
push eax
call fcn.00429950
add esp, 0xc
mov dword [ebp - 0x20], 0
jmp 0x429d02
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp - 4]
jae 0x429e0c
cmp dword [ebp - 0x18], 0
je 0x429e0c
cmp dword [ebp - 0xc], 0
jne 0x429e0c
mov eax, dword [ebp - 0x20]
shl eax, 4
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx + eax + 0xc], 0
je 0x429e07
mov edx, dword [ebp - 0x20]
shl edx, 4
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + edx + 0xc]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x429e07
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x20]
shl eax, 4
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + eax + 4]
push edx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x429db0
lea eax, [ebp - 0x28]
push eax
push 0xb
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x429db0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenProcessToken___failed__GetLastError__:__d_n
call fcn.00429690
add esp, 8
cmp dword [ebp - 0x28], 0
je 0x429de7
lea edx, [ebp - 0xc]
push edx
push 1
push 3
push 0
push 0x2000000
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x429de7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DuplicateTokenEx___failed__GetLastError__:__d_n
call fcn.00429690
add esp, 8
cmp dword [ebp - 0x24], 0
je 0x429df7
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x28], 0
je 0x429e07
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x429cf9
cmp dword [ebp - 0x10], 0
je 0x429e1c
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], 0
je 0x429e2c
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], 0
je 0x429e3c
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x1c], 0
je 0x429e4b
mov eax, dword [ebp - 0x1c]
push eax
call sub.WTSAPI32.dll_WTSFreeMemory
mov ecx, dword [ebp - 0xc]
push ecx
push str.GetRealUserToken_Out__ret__0x_x_n
call fcn.00429690
add esp, 8
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret