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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x664
mov eax, dword [0x4263d0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x20c]
push 0x208
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push esi
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x654], 0
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcslwr_s]
add esp, 0x20
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40ade6
push str.QueryFullProcessImageNameW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
mov dword [ebp - 0x654], esi
test esi, esi
je 0x40ae3d
jmp 0x40ade8
xor esi, esi
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
mov dword [ebp - 0x658], ebx
cmp ebx, 0xffffffff
jne 0x40ae17
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b330
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x650]
mov dword [ebp - 0x650], 0x22c
push eax
push ebx
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x40ae4f
test ebx, ebx
je 0x40ae3d
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b330
mov esp, ebp
pop ebp
ret
push edi
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x420], 0x104
push dword [ebp - 0x648]
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x40aea4
lea eax, [ebp - 0x420]
mov ecx, esi
push eax
lea eax, [ebp - 0x414]
push eax
push 0
push edi
call dword [0x41e358]
call esi
lea eax, [ebp - 0x414]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcslwr_s]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
add esp, 0x10
test eax, eax
jne 0x40af86
mov dword [ebp - 0x418], eax
lea eax, [ebp - 0x418]
push eax
push dword [ebp - 0x648]
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
neg eax
mov dword [ebp - 0x424], 0
mov dword [ebp - 0x41c], 0
sbb eax, eax
or esi, 0xffffffff
and dword [ebp - 0x418], eax
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x424]
push eax
push 1
push 0
push 0
call sub.WTSAPI32.dll_WTSEnumerateSessionsW
test eax, eax
jne 0x40af30
or esi, esi
jmp 0x40af7e
mov edx, dword [ebp - 0x41c]
xor ecx, ecx
mov ebx, dword [ebp - 0x424]
test edx, edx
je 0x40af72
mov eax, ebx
nop dword [eax]
nop dword [eax + eax]
cmp dword [eax + 8], 0
movq xmm0, qword [eax]
movq qword [ebp - 0x664], xmm0
je 0x40af6c
inc ecx
add eax, 0xc
cmp ecx, edx
jb 0x40af50
jmp 0x40af72
mov esi, dword [ebp - 0x664]
push ebx
call sub.WTSAPI32.dll_WTSFreeMemory
mov ebx, dword [ebp - 0x658]
cmp esi, dword [ebp - 0x418]
je 0x40afa2
lea eax, [ebp - 0x650]
push eax
push ebx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
je 0x40afaa
mov esi, dword [ebp - 0x654]
jmp 0x40ae50
mov esi, dword [ebp - 0x648]
jmp 0x40afac
xor esi, esi
test ebx, ebx
je 0x40afb7
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x40afc2
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041b330
mov esp, ebp
pop ebp
ret