Function at 0x47f1f8
Capabilities:
Enumerate processes on remote desktop session host
Get session information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x34], ebx
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x47f4df
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 1], 0
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x14]
xor edx, edx
mov dword [eax], edx
mov eax, dword [ebp + 0x10]
xor edx, edx
mov dword [eax], edx
mov eax, dword [ebp + 0xc]
call fcn.00404988
lea edx, [ebp - 0x40]
mov eax, ebx
call fcn.00408f58
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x14]
call fcn.00409304
lea edx, [ebp - 0x44]
mov eax, edi
call fcn.00408f58
mov eax, dword [ebp - 0x44]
lea edx, [ebp - 0x24]
call fcn.00409304
mov eax, dword [ebp - 0x14]
call fcn.00404c40
test eax, eax
je 0x47f49f
mov eax, dword [ebp - 0x24]
call fcn.00404c40
test eax, eax
je 0x47f49f
xor eax, eax
push ebp
push 0x47f498
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 1
push 0
push 0
call sub.wtsapi32.dll_WTSEnumerateProcessesA
test eax, eax
je 0x47f2d2
cmp dword [ebp - 0xc], 0
je 0x47f2d2
cmp dword [ebp - 0x10], 0
jne 0x47f2dc
call fcn.004043f0
jmp 0x47f49f
cmp dword [ebp - 0x10], 0x2710
jbe 0x47f2ec
mov dword [ebp - 0x10], 0x2710
mov ebx, dword [ebp - 0x10]
dec ebx
test ebx, ebx
jl 0x47f47b
inc ebx
xor esi, esi
mov eax, esi
add eax, eax
mov edx, dword [ebp - 0xc]
lea eax, [edx + eax*8]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 8]
mov edx, dword [edx + 8]
call fcn.00404b78
lea edx, [ebp - 0x48]
mov eax, dword [ebp - 0x18]
call fcn.00408f58
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x14]
call fcn.00404d84
jne 0x47f473
mov byte [ebp - 0x25], 6
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 8
mov eax, dword [ebp - 8]
mov eax, dword [eax]
push eax
push 0
call sub.wtsapi32.dll_WTSQuerySessionInformationA
test eax, eax
je 0x47f368
cmp dword [ebp - 0x1c], 0
je 0x47f368
mov eax, dword [ebp - 0x1c]
mov al, byte [eax]
mov byte [ebp - 0x25], al
mov eax, dword [ebp - 0x1c]
push eax
call sub.wtsapi32.dll_WTSFreeMemory
cmp byte [ebp - 0x25], 0
jne 0x47f473
mov dword [ebp - 0x30], pe_nt_image_headers32
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x30]
call fcn.00404fc4
mov dword [ebp - 0x38], pe_nt_image_headers32
lea eax, [ebp - 0x34]
mov edx, dword [ebp - 0x38]
call fcn.00404fc4
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x34]
call fcn.00404e38
push eax
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00404e38
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0xc]
push eax
push 0x47f4f4
call fcn.0047e5ec
test eax, eax
je 0x47f473
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x30]
call fcn.00404fc4
lea eax, [ebp - 0x34]
mov edx, dword [ebp - 0x38]
call fcn.00404fc4
lea edx, [ebp - 0x50]
mov eax, dword [ebp - 0x2c]
call fcn.00408f58
mov eax, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
call fcn.00409304
mov edx, dword [ebp - 0x4c]
lea eax, [ebp - 0x2c]
call fcn.00404a20
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
call fcn.00404d84
jne 0x47f473
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
push 0x47f500
push dword [ebp - 0x34]
push 0x47f50c
push edi
mov eax, dword [ebp + 8]
mov edx, 4
call fcn.00404d00
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 6
push ebx
push 0
call sub.wtsapi32.dll_WTSQuerySessionInformationA
cmp dword [ebp - 0x1c], 0
je 0x47f46d
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x1c]
call fcn.00404b78
mov eax, dword [ebp - 0x1c]
push eax
call sub.wtsapi32.dll_WTSFreeMemory
mov byte [ebp - 1], 1
jmp 0x47f47b
inc esi
dec ebx
jne 0x47f2fb
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x47f49f
cmp dword [ebp - 8], 0
je 0x47f497
mov eax, dword [ebp - 0xc]
push eax
call sub.wtsapi32.dll_WTSFreeMemory
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x47f4e6
lea eax, [ebp - 0x50]
mov edx, 5
call fcn.004049ac
lea eax, [ebp - 0x34]
call fcn.00404988
lea eax, [ebp - 0x2c]
call fcn.00404988
lea eax, [ebp - 0x24]
call fcn.00404988
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004049ac
ret