Function at 0x41e3d2
Capabilities:
Enumerate processes

Disassembly:
push 0x31c
mov eax, 0x4c0d72
call fcn.0049f5ab
mov esi, ecx
mov edi, edx
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___app_name
lea ecx, [ebp - 0x280]
mov dword [ebp - 0x284], esi
mov dword [ebp - 0x264], edi
call fcn.00404bd0
lea eax, [ebp - 0x280]
push esi
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call fcn.00401985
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x280]
call fcn.004058b3
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___parameters
lea ecx, [ebp - 0x280]
call fcn.00404bd0
lea eax, [ebp - 0x280]
push edi
push eax
mov dword [ebp - 4], esi
call fcn.00401985
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
push ebx
push esi
lea ecx, [ebp - 0x280]
call fcn.004058b3
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___session_id
lea ecx, [ebp - 0x280]
call fcn.00404bd0
push 2
pop edi
push dword [ebp + 8]
lea eax, [ebp - 0x280]
push eax
mov dword [ebp - 4], edi
call fcn.004018c5
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
push ebx
push esi
lea ecx, [ebp - 0x280]
call fcn.004058b3
push 0x4d53a8
push dword [ebp - 0x284]
lea eax, [ebp - 0x2e0]
push eax
mov dword [ebp - 0x288], ebx
mov dword [ebp - 0x28c], ebx
mov dword [ebp - 0x294], ebx
call fcn.0041011e
mov dword [ebp - 4], 3
push dword [ebp - 0x264]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00406441
add esp, 0x18
push ebx
push esi
lea ecx, [ebp - 0x2e0]
mov byte [ebp - 4], 5
call fcn.004058b3
push ebx
push edi
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, eax
cmp edi, 0xffffffff
jne 0x41e539
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___CreateToolhelp32Snapshot_failed.
lea ecx, [ebp - 0x280]
call fcn.00404bd0
mov byte [ebp - 4], 6
lea eax, [ebp - 0x280]
push eax
call fcn.004017f5
pop ecx
push ebx
push esi
lea ecx, [ebp - 0x280]
call fcn.004058b3
push ebx
push esi
lea ecx, [ebp - 0x2c]
call fcn.004058b3
mov eax, 0x3eb
call fcn.0049f62e
ret
lea eax, [ebp - 0x260]
push eax
push edi
mov dword [ebp - 0x260], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x41e56a
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___Process32First_failed.
lea ecx, [ebp - 0x280]
call fcn.00404bd0
mov byte [ebp - 4], 7
jmp 0x41e50a
lea eax, [ebp - 0x23c]
push str.explorer.exe
push eax
call fcn.004a1037
pop ecx
pop ecx
test eax, eax
jne 0x41e5a9
lea eax, [ebp - 0x264]
push eax
push dword [ebp - 0x258]
mov dword [ebp - 0x264], ebx
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x41e5a9
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x264], eax
je 0x41e5fe
lea eax, [ebp - 0x260]
push eax
push edi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x41e56a
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___didnt_get_winlogonPid.
lea ecx, [ebp - 0x280]
call fcn.00404bd0
lea eax, [ebp - 0x280]
push eax
mov byte [ebp - 4], 9
call fcn.004017f5
pop ecx
push ebx
push esi
lea ecx, [ebp - 0x280]
call fcn.004058b3
mov edi, 0x3eb
push ebx
push esi
lea ecx, [ebp - 0x2c]
call fcn.004058b3
mov eax, edi
jmp 0x41e533
mov edi, dword [ebp - 0x258]
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___winlogonPid
lea ecx, [ebp - 0x280]
mov dword [ebp - 0x290], edi
call fcn.00404bd0
lea eax, [ebp - 0x280]
push edi
push eax
mov byte [ebp - 4], 8
call fcn.004018c5
pop ecx
pop ecx
push ebx
push esi
lea ecx, [ebp - 0x280]
mov byte [ebp - 4], 5
call fcn.004058b3
push 0x44
pop edi
push edi
lea eax, [ebp - 0x328]
push ebx
push eax
mov dword [ebp - 0x284], 0x30
call fcn.0049f650
mov dword [ebp - 0x328], edi
xor eax, eax
lea edi, [ebp - 0x2a8]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0xc
push dword [ebp - 0x290]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push ebx
mov edi, 0x2000000
push edi
mov dword [ebp - 0x320], str.winsta0default
call dword [sym.imp.KERNEL32.dll_OpenProcess]
lea ecx, [ebp - 0x294]
push ecx
push 0x2000a
push eax
mov dword [ebp - 0x290], eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x41e6e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___OpenProcessToken_failed
lea ecx, [ebp - 0x280]
mov dword [ebp - 0x264], eax
call fcn.00404bd0
mov byte [ebp - 4], 0xa
push dword [ebp - 0x264]
lea eax, [ebp - 0x280]
push eax
call fcn.004018c5
pop ecx
pop ecx
lea ecx, [ebp - 0x280]
jmp 0x41e96b
lea eax, [ebp - 0x28c]
push eax
push esi
push esi
push ebx
push edi
push dword [ebp - 0x294]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x41e724
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___DuplicateTokenEx_failed
lea ecx, [ebp - 0x280]
mov dword [ebp - 0x264], eax
call fcn.00404bd0
mov byte [ebp - 4], 0xb
jmp 0x41e6c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x264], eax
cmp eax, 0x514
jne 0x41e759
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___we_got_ERROR_NOT_ALL_ASSIGNED
lea ecx, [ebp - 0x280]
call fcn.00404bd0
lea eax, [ebp - 0x280]
push eax
mov byte [ebp - 4], 0xc
call fcn.004017f5
jmp 0x41e6db
push esi
push dword [ebp - 0x28c]
lea eax, [ebp - 0x298]
push eax
mov dword [ebp - 0x298], ebx
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x41e782
mov dword [ebp - 0x284], 0x430
jmp 0x41e788
mov dword [ebp - 0x298], ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x264], eax
cmp eax, ebx
je 0x41e8f1
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___LoadLibrary_Advapi32.dll
lea ecx, [ebp - 0x280]
call fcn.00404bd0
lea eax, [ebp - 0x280]
push eax
mov byte [ebp - 4], 0xd
call fcn.004017f5
pop ecx
push ebx
push esi
lea ecx, [ebp - 0x280]
mov byte [ebp - 4], 5
call fcn.004058b3
push str.CreateProcessWithTokenW
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, ebx
je 0x41e8b3
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___CreateProcessWithTokenW
lea ecx, [ebp - 0x280]
call fcn.00404bd0
lea eax, [ebp - 0x280]
push eax
mov byte [ebp - 4], 0xe
call fcn.004017f5
pop ecx
push ebx
push esi
lea ecx, [ebp - 0x280]
mov byte [ebp - 4], 5
call fcn.004058b3
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x28]
jae 0x41e833
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x2a8]
push ecx
lea ecx, [ebp - 0x328]
push ecx
push ebx
push dword [ebp - 0x298]
push dword [ebp - 0x284]
push eax
push ebx
push esi
push dword [ebp - 0x28c]
call edi
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___CreateProcessWithTokenW_Result:
lea ecx, [ebp - 0x280]
mov dword [ebp - 0x288], eax
call fcn.00404bd0
push dword [ebp - 0x288]
lea eax, [ebp - 0x280]
push eax
mov byte [ebp - 4], 0xf
call fcn.004018c5
pop ecx
pop ecx
push ebx
push esi
lea ecx, [ebp - 0x280]
mov byte [ebp - 4], 5
call fcn.004058b3
cmp dword [ebp - 0x288], ebx
je 0x41e8b3
cmp byte [ebp + 0xc], bl
je 0x41e8b3
push 0xffffffffffffffff
push dword [ebp - 0x2a8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___FreeLibrary_Advapi32.dll
lea ecx, [ebp - 0x280]
call fcn.00404bd0
lea eax, [ebp - 0x280]
push eax
mov byte [ebp - 4], 0x10
call fcn.004017f5
pop ecx
push ebx
push esi
lea ecx, [ebp - 0x280]
mov byte [ebp - 4], 5
call fcn.004058b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___bResult
lea ecx, [ebp - 0x280]
mov dword [ebp - 0x264], eax
call fcn.00404bd0
cmp dword [ebp - 0x288], ebx
mov byte [ebp - 4], 0x11
setne al
movzx eax, al
push eax
lea eax, [ebp - 0x280]
push eax
call fcn.00401927
pop ecx
pop ecx
push ebx
push esi
lea ecx, [ebp - 0x280]
mov byte [ebp - 4], 5
call fcn.004058b3
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___error
lea ecx, [ebp - 0x2c4]
call fcn.00404bd0
mov byte [ebp - 4], 0x12
push dword [ebp - 0x264]
lea eax, [ebp - 0x2c4]
push eax
call fcn.004018c5
pop ecx
pop ecx
lea ecx, [ebp - 0x2c4]
push ebx
push esi
call fcn.004058b3
push dword [ebp - 0x290]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x28c]
call edi
push dword [ebp - 0x294]
call edi
mov edi, dword [ebp - 0x264]
jmp 0x41e5ed