Function at 0x40ea70
Capabilities:
Enumerate processes
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x5c2b50]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x240], eax
push 0x228
lea eax, [ebp - 0x22c]
mov dword [ebp - 0x234], ebx
push ebx
xor esi, esi
mov dword [ebp - 0x230], ebx
push eax
mov dword [ebp - 0x238], esi
call fcn.00537300
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40eb66
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str._n______________________________________________________________________________________________n
call edi
push 0x800
call fcn.005369fe
push 0x800
mov esi, eax
push ebx
push esi
call fcn.00537300
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
call ebx
push eax
push str.ImpersonateAsExplorer
push 0xba
push str.c:devdragon_release_sync_srccore_newapiprocess_api.h
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push esi
call fcn.00406430
add esp, 0x20
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push 0xba
push str.ImpersonateAsExplorer
call fcn.00404610
add esp, 0xc
test esi, esi
je 0x40eb4a
push esi
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call edi
call ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00536ab6
mov esp, ebp
pop ebp
ret 4
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0x23c], eax
cmp eax, 0xffffffff
jne 0x40ebe5
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str._n______________________________________________________________________________________________n
call edi
push 0x800
call fcn.005369fe
push 0x800
mov esi, eax
push 0
push esi
call fcn.00537300
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
call ebx
push eax
push str.ImpersonateAsExplorer
push 0xc0
push str.c:devdragon_release_sync_srccore_newapiprocess_api.h
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push esi
call fcn.00406430
add esp, 0x20
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push 0xc0
jmp 0x40eb30
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x230], 0x22c
push ecx
push eax
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x40ec6e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x40ee76
push str._n______________________________________________________________________________________________n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x800
call fcn.005369fe
push 0x800
mov edi, eax
push 0
push edi
call fcn.00537300
push esi
push str.ImpersonateAsExplorer
push 0xc7
push str.c:devdragon_release_sync_srccore_newapiprocess_api.h
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push edi
call fcn.00406430
add esp, 0x30
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
push 0xc7
jmp 0x40ee51
mov ebx, dword [ebp - 0x23c]
lea eax, [ebp - 0x20c]
push str.explorer.exe
push eax
call fcn.005380f0
add esp, 8
test eax, eax
jne 0x40ecb5
lea eax, [ebp - 0x238]
mov dword [ebp - 0x238], esi
push eax
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x40ecb5
cmp dword [ebp - 0x238], edi
je 0x40ed47
lea eax, [ebp - 0x230]
push eax
push ebx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x40ec74
push eax
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
jne 0x40ed52
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x40ee76
push str._n______________________________________________________________________________________________n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x800
call fcn.005369fe
push 0x800
mov edi, eax
push ebx
push edi
call fcn.00537300
push esi
push str.ImpersonateAsExplorer
push 0xdd
push str.c:devdragon_release_sync_srccore_newapiprocess_api.h
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push edi
call fcn.00406430
add esp, 0x30
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
push 0xdd
jmp 0x40ee51
mov eax, dword [ebp - 0x228]
jmp 0x40ecc6
lea eax, [ebp - 0x234]
push eax
push 0x201eb
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40edd4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x40ee76
push str._n______________________________________________________________________________________________n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x800
call fcn.005369fe
push 0x800
mov edi, eax
push 0
push edi
call fcn.00537300
push esi
push str.ImpersonateAsExplorer
push 0xeb
push str.c:devdragon_release_sync_srccore_newapiprocess_api.h
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push edi
call fcn.00406430
add esp, 0x30
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
push 0xeb
jmp 0x40ee51
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x40ee76
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x40ee76
push str._n______________________________________________________________________________________________n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x800
call fcn.005369fe
push 0x800
mov edi, eax
push 0
push edi
call fcn.00537300
push esi
push str.ImpersonateAsExplorer
push 0xf3
push str.c:devdragon_release_sync_srccore_newapiprocess_api.h
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push edi
call fcn.00406430
add esp, 0x30
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
push 0xf3
push str.ImpersonateAsExplorer
call fcn.00404610
add esp, 0xc
test edi, edi
je 0x40ee6b
push edi
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push dword [ebp - 0x23c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
cmp ebx, 0xffffffff
je 0x40ee8c
push ebx
call edi
mov ecx, dword [ebp - 0x240]
mov eax, dword [ebp - 0x234]
test ecx, ecx
jne 0x40eea6
cmp eax, 0xffffffff
je 0x40eea8
push eax
call edi
jmp 0x40eea8
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00536ab6
mov esp, ebp
pop ebp
ret 4