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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x46f074]
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 0x4083d9
push ecx
mov ecx, dword [ebp - 0xc]
mov edx, str.SeDebugPrivilege
call fcn.00404df0
add esp, 4
push dword [ebp - 0xc]
test al, al
jne 0x4083f0
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.0041d21a
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 0x4083d9
xor ebx, ebx
cmp dword [ebp - 8], ebx
jbe 0x408550
xor ecx, ecx
mov dword [ebp - 0x20], ecx
nop
test esi, esi
jne 0x408550
mov edi, dword [ebp - 0x1c]
add edi, ecx
push str.explorer.exe
push dword [edi + 8]
call fcn.00442178
add esp, 8
test eax, eax
jne 0x40853d
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 0x4084ec
cmp edi, 0xffffffff
je 0x4084ec
lea eax, [ebp - 0x18]
push eax
push 0xe
push edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4084ec
lea eax, [ebp - 0x14]
push eax
push 2
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
je 0x4084ec
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x4084ec
lea eax, [ebp - 0x10]
push eax
push 0xf003f
call dword [sym.imp.ADVAPI32.dll_RegOpenCurrentUser]
test eax, eax
je 0x4084c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
jmp 0x4084f4
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
test eax, eax
jne 0x4084d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x24]
cmp dword [eax], 0
jne 0x4084f4
mov edx, dword [ebp - 0x10]
push eax
call fcn.00405f60
add esp, 4
jmp 0x4084f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x408507
cmp eax, 0xffffffff
je 0x408507
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40851a
cmp eax, 0xffffffff
je 0x40851a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40852d
cmp eax, 0xffffffff
je 0x40852d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x40853d
cmp edi, 0xffffffff
je 0x40853d
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 0x408420
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40855e
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.0041d21a
mov esp, ebp
pop ebp
ret