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

Disassembly:
push 0x5c
mov eax, 0x59c12c
call fcn.00576e00
mov esi, ecx
call fcn.004db897
cmp eax, 2
jne 0x4982c9
call fcn.004dbf32
test al, al
je 0x4982c9
lea eax, [ebp - 0x54]
xor ebx, ebx
push eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x4c], ebx
push eax
push 1
push ebx
push ebx
mov dword [ebp - 0x54], ebx
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateProcessesW]
test eax, eax
jne 0x49819a
xor eax, eax
jmp 0x498381
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x50], eax
mov eax, dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov dword [ebp - 0x64], eax
mov dword [ebp - 4], ebx
mov esi, ebx
cmp dword [ebp - 0x54], esi
jbe 0x498200
mov edi, ebx
lea eax, [ebp - 0x2c]
push eax
call fcn.00498387
mov byte [ebp - 4], 1
cmp dword [eax + 0x14], 8
jb 0x4981cc
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0x4c]
push dword [edi + eax + 8]
call fcn.0057229a
mov ebx, eax
neg ebx
pop ecx
pop ecx
sbb bl, bl
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x2c]
call fcn.0047997f
inc bl
jne 0x49821b
inc esi
add edi, 0x10
cmp esi, dword [ebp - 0x54]
jb 0x4981b7
xor ebx, ebx
mov edi, ebx
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x498214
push eax
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov eax, edi
jmp 0x498381
mov eax, dword [ebp - 0x4c]
add esi, esi
xor ebx, ebx
push dword [eax + esi*8 + 4]
push ebx
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x5c], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x4982a4
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x58], ebx
push ecx
push 2
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4982a4
mov esi, dword [ebp - 0x58]
mov dword [ebp - 0x60], esi
mov byte [ebp - 4], 3
lea eax, [ebp - 0x48]
push eax
push 1
push 2
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], ebx
push eax
push 0x2000000
push dword [ebp - 0x58]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x20], 0xc
mov dword [ebp - 0x48], ebx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov edi, eax
neg edi
sbb edi, edi
and edi, dword [ebp - 0x48]
mov byte [ebp - 4], 2
test esi, esi
je 0x4982a6
cmp esi, 0xffffffff
je 0x4982a6
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4982a6
mov edi, ebx
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x498202
cmp eax, 0xffffffff
je 0x498202
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x498202
lea eax, [ebp - 0x48]
xor ebx, ebx
push eax
push dword [esi + 0xc]
mov dword [ebp - 0x48], ebx
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x49837e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str._1231
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x50], eax
call fcn.00479014
mov dword [ebp - 4], 4
lea edx, [ebp - 0x50]
lea ecx, [ebp - 0x44]
call fcn.004831ee
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x2c]
push 0xffffffffffffffff
push ebx
push eax
call fcn.0047a009
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x44]
push ebx
push 1
call fcn.0047997f
mov edi, str._1232
push edi
call fcn.004752da
pop ecx
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.0047c652
lea edx, [esi + 0xc]
lea ecx, [ebp - 0x44]
call fcn.004831ee
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x2c]
push 0xffffffffffffffff
push ebx
push eax
call fcn.0047a009
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x44]
push ebx
push 1
call fcn.0047997f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
push ebx
push 1
call fcn.0047997f
jmp 0x498193
mov eax, dword [ebp - 0x48]
call fcn.00576daf
ret