Function at 0x402450
Capabilities:
Acquire debug privileges
Create process on windows
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d8
mov eax, dword [0x41007c]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x16c], eax
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
push 0
push 2
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40249d
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040338b
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x15c]
push ecx
push edi
mov dword [ebp - 0x15c], 0x128
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x402488
mov ebx, dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
nop
lea edx, [ebp - 0x138]
push str.explorer.exe
push edx
call fcn.00403a9d
add esp, 8
test eax, eax
jne 0x4024fe
mov ecx, dword [ebp - 0x154]
mov dword [ebp - 0x164], eax
lea eax, [ebp - 0x164]
push eax
push ecx
call ebx
test eax, eax
je 0x4024fe
cmp dword [ebp - 0x164], esi
je 0x40268f
lea edx, [ebp - 0x15c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_Process32Next]
test eax, eax
jne 0x4024c0
mov edi, dword [ebp - 0x16c]
lea eax, [ebp - 0x18c]
push eax
push esi
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
push 0x44
lea ecx, [ebp - 0x1d4]
push 0
push ecx
mov dword [ebp - 0x164], 0x30
call fcn.00407c50
add esp, 0xc
xor eax, eax
push edi
push eax
push 0x2000000
mov dword [ebp - 0x1d4], 0x44
mov dword [ebp - 0x1cc], str.winsta0default
mov dword [ebp - 0x188], eax
mov dword [ebp - 0x184], eax
mov dword [ebp - 0x180], eax
mov dword [ebp - 0x17c], eax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
lea edx, [ebp - 0x170]
push edx
mov ebx, eax
push 0x201eb
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4025ab
call edi
push eax
push str.Process_token_open_Error:__u_n
call fcn.00403e01
add esp, 8
lea eax, [ebp - 0x178]
push eax
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x4025d3
call edi
push eax
push str.Lookup_Privilege_value_Error:__u_n
call fcn.00403e01
add esp, 8
mov ecx, dword [ebp - 0x178]
mov edx, dword [ebp - 0x174]
lea eax, [ebp - 0x160]
push eax
push 1
push 1
push 0
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x170]
push 0x2000000
push ecx
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], 2
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
call edi
mov edx, dword [ebp - 0x160]
push 4
push esi
push 0xc
push edx
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov ecx, dword [ebp - 0x160]
xor esi, esi
push esi
push esi
push 0x10
lea eax, [ebp - 0x18]
push eax
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x402652
call edi
push eax
push str.Adjust_Privilege_value_Error:__u_n
call fcn.00403e01
add esp, 8
call edi
cmp eax, 0x514
jne 0x402668
push str.Token_does_not_have_the_provilege_n
call fcn.00403e01
add esp, 4
mov edx, dword [ebp - 0x160]
push 1
push edx
lea eax, [ebp - 0x168]
push eax
mov dword [ebp - 0x168], esi
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x40269a
mov edi, 0x430
jmp 0x4026a6
mov edi, dword [ebp - 0x154]
jmp 0x402516
mov edi, dword [ebp - 0x164]
mov dword [ebp - 0x168], esi
lea esi, [ebp - 0x34]
call fcn.004010c0
mov esi, 0x10
cmp dword [eax + 0x14], esi
jb 0x4026ba
mov eax, dword [eax]
lea ecx, [ebp - 0x188]
push ecx
mov ecx, dword [ebp - 0x16c]
lea edx, [ebp - 0x1d4]
push edx
mov edx, dword [ebp - 0x160]
push eax
mov eax, dword [ebp - 0x168]
push eax
push edi
push 0
push 0
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
cmp dword [ebp - 0x20], esi
jb 0x4026fe
mov eax, dword [ebp - 0x34]
push eax
call fcn.00403841
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov ecx, dword [ebp - 0x160]
push ecx
call esi
mov edx, dword [ebp - 0x170]
push edx
call esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.0040338b
mov esp, ebp
pop ebp
ret 4