Function at 0x408400
Capabilities:
Acquire debug privileges
Enumerate processes on remote desktop session host

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x471078]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0xc]
mov dword [ebp - 0x24], ecx
push eax
xor esi, esi
mov dword [ecx], 0
push 0x28
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x408459
push ecx
mov ecx, dword [ebp - 0xc]
mov edx, str.SeDebugPrivilege
call fcn.00404e80
add esp, 4
push dword [ebp - 0xc]
test al, al
jne 0x408470
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e04a
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x1c]
push eax
push 1
push 0
push 0
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateProcessesW]
test eax, eax
je 0x408459
xor ebx, ebx
cmp dword [ebp - 8], ebx
jbe 0x4085d0
xor ecx, ecx
mov dword [ebp - 0x20], ecx
nop
test esi, esi
jne 0x4085d0
mov edi, dword [ebp - 0x1c]
add edi, ecx
push str.explorer.exe
push dword [edi + 8]
call fcn.00442e57
add esp, 8
test eax, eax
jne 0x4085bd
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
push dword [edi + 4]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x40856c
cmp edi, 0xffffffff
je 0x40856c
lea eax, [ebp - 0x18]
push eax
push 0xe
push edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40856c
lea eax, [ebp - 0x14]
push eax
push 2
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
je 0x40856c
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x40856c
lea eax, [ebp - 0x10]
push eax
push 0xf003f
call dword [sym.imp.ADVAPI32.dll_RegOpenCurrentUser]
test eax, eax
je 0x408544
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
jmp 0x408574
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
test eax, eax
jne 0x408556
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x24]
cmp dword [eax], 0
jne 0x408574
mov edx, dword [ebp - 0x10]
push eax
call fcn.00405fe0
add esp, 4
jmp 0x408574
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x408587
cmp eax, 0xffffffff
je 0x408587
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40859a
cmp eax, 0xffffffff
je 0x40859a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4085ad
cmp eax, 0xffffffff
je 0x4085ad
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x4085bd
cmp edi, 0xffffffff
je 0x4085bd
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x20]
inc ebx
add ecx, 0x10
mov dword [ebp - 0x20], ecx
cmp ebx, dword [ebp - 8]
jb 0x4084a0
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4085de
push eax
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041e04a
mov esp, ebp
pop ebp
ret