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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42e858
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x4411c4]
xor eax, ebp
mov dword [ebp - 0x44], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x64], eax
push str.wtsapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x19c], eax
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x1f0], 0
mov dword [ebp - 0x1e8], 0
mov dword [ebp - 0x198], 0
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4261df
xor eax, eax
jmp 0x4267d7
mov dword [ebp - 0x194], 0x128
lea eax, [ebp - 0x194]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call sub.KERNEL32.dll_Process32First
test eax, eax
jne 0x426204
xor eax, eax
jmp 0x4267d7
push 0x43b6b8
lea edx, [ebp - 0x170]
push edx
call fcn.00415d01
add esp, 8
test eax, eax
jne 0x42625f
mov dword [ebp - 0x1f4], 0
lea eax, [ebp - 0x1f4]
push eax
mov ecx, dword [ebp - 0x18c]
push ecx
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x42625f
cmp dword [ebp - 0x1f4], 0
je 0x42625f
mov edx, dword [ebp - 0x18c]
mov dword [ebp - 0x24], edx
push str.Get_win_logon_PID
call fcn.0042a0d0
add esp, 4
jmp 0x426273
lea eax, [ebp - 0x194]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x426204
lea ecx, [ebp - 0x60]
call fcn.004012b0
mov dword [ebp - 4], 0
push str.winlogon.exe
lea ecx, [ebp - 0x60]
call fcn.004013a0
mov dword [ebp - 0x1c], 1
cmp dword [ebp - 0x19c], 0
je 0x426336
cmp dword [ebp - 0x64], 0
je 0x426336
push str.WTSGetActiveConsoleSessionId
mov edx, dword [ebp - 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x68], eax
push str.WTSQueryUserToken
mov eax, dword [ebp - 0x19c]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x2c], eax
push str.WTSEnumerateSessionsA
mov ecx, dword [ebp - 0x19c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1f0], eax
push str.WTSFreeMemory
mov edx, dword [ebp - 0x19c]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1e8], eax
cmp dword [ebp - 0x1f0], 0
je 0x426322
cmp dword [ebp - 0x68], 0
je 0x426322
cmp dword [ebp - 0x2c], 0
je 0x426322
cmp dword [ebp - 0x1e8], 0
jne 0x426336
push str.GetProcAddress_pointer_is_NULL
call fcn.0042a070
add esp, 4
mov dword [ebp - 0x1c], 0
cmp dword [ebp - 0x19c], 0
je 0x4267a7
cmp dword [ebp - 0x1c], 0
je 0x4267a7
push str.it_run_only_XP_or_Vista_and_DCSMGR_call_process.
call fcn.0042a0d0
add esp, 4
call dword [ebp - 0x68]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x426377
mov eax, dword [ebp - 0x30]
push eax
push 0x43b79c
call fcn.0042a070
add esp, 8
mov ecx, dword [ebp - 0x30]
push ecx
push str.dwSessionid___d
call fcn.0042a0d0
add esp, 8
mov dword [ebp - 0x1f8], 0
push str.pfnWTSQueryUserToken_______________1
call fcn.0042a0d0
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.pfnWTSQueryUserToken______________0
call fcn.0042a0d0
add esp, 4
mov edx, dword [ebp - 0x2c]
push edx
push str.pfnWTSQueryUserToken_____d
call fcn.0042a0d0
add esp, 8
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
call dword [ebp - 0x2c]
mov dword [ebp - 0x200], eax
push str.pfnWTSQueryUserToken__
call fcn.0042a0d0
add esp, 4
cmp dword [ebp - 0x200], 0
jne 0x426524
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x43b844
call fcn.0042a070
add esp, 8
mov dword [ebp - 0x220], 0
lea edx, [ebp - 0x220]
push edx
lea eax, [ebp - 0x224]
push eax
push 1
push 0
push 0
call dword [ebp - 0x1f0]
mov dword [ebp - 0x200], eax
cmp dword [ebp - 0x200], 0
jne 0x42647f
push str.WTSEnumerateSessions_failed.
call fcn.0042a070
add esp, 4
mov ecx, dword [ebp - 0x64]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, dword [ebp - 0x19c]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x22c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00401360
mov eax, dword [ebp - 0x22c]
jmp 0x4267d7
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x228], 0
jmp 0x4264a2
mov eax, dword [ebp - 0x228]
add eax, 1
mov dword [ebp - 0x228], eax
mov ecx, dword [ebp - 0x228]
cmp ecx, dword [ebp - 0x220]
jae 0x426517
lea edx, [ebp - 0x1f8]
push edx
mov eax, dword [ebp - 0x228]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x224]
mov edx, dword [ecx + eax]
push edx
call dword [ebp - 0x2c]
mov dword [ebp - 0x200], eax
cmp dword [ebp - 0x200], 1
jne 0x4264fe
mov eax, dword [ebp - 0x228]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x224]
mov edx, dword [ecx + eax]
push edx
push str.find_out_the_token_dwSessionid___d
call fcn.0042a0d0
add esp, 8
jmp 0x426512
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WTSQueryUserToken_error_GetLastError___d.
call fcn.0042a070
add esp, 8
jmp 0x426493
mov eax, dword [ebp - 0x224]
push eax
call dword [ebp - 0x1e8]
mov dword [ebp - 0x10], 0x30
push 0x44
push 0
lea ecx, [ebp - 0x1e4]
push ecx
call fcn.004097d0
add esp, 0xc
mov dword [ebp - 0x1e4], 0x44
mov dword [ebp - 0x1dc], str.winsta0default
push 0x10
push 0
lea edx, [ebp - 0x40]
push edx
call fcn.004097d0
add esp, 0xc
mov eax, dword [ebp - 0x24]
push eax
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x28]
push ecx
push 0x201eb
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4265a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Open_process_token_error_:__d
call fcn.0042a070
add esp, 8
jmp 0x4265b0
push str.open_process_SUS
call fcn.0042a0d0
add esp, 4
lea eax, [ebp - 0x20c]
push eax
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x4265de
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Lookup_provilege_value_error_:_u
call fcn.0042a070
add esp, 8
jmp 0x4265eb
push str.Look_up_provileges_SUS
call fcn.0042a0d0
add esp, 4
mov dword [ebp - 0x21c], 1
mov ecx, dword [ebp - 0x20c]
mov dword [ebp - 0x218], ecx
mov edx, dword [ebp - 0x208]
mov dword [ebp - 0x214], edx
mov dword [ebp - 0x210], 2
lea eax, [ebp - 0x1ec]
push eax
push 1
push 1
push 0
push 0x2000000
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
push 4
mov edx, dword [ebp - 0x30]
push edx
push 0xc
mov eax, dword [ebp - 0x1ec]
push eax
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push 0
push 0
push 0x10
lea ecx, [ebp - 0x21c]
push ecx
push 0
mov edx, dword [ebp - 0x1ec]
push edx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x42667c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Adjust_Privileges_value_ERROR:__d
call fcn.0042a070
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x514
jne 0x426696
push str.Token_does_not_have_the_privilege
call fcn.0042a070
add esp, 4
mov dword [ebp - 0x204], 0
push 1
mov eax, dword [ebp - 0x1ec]
push eax
lea ecx, [ebp - 0x204]
push ecx
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x4266c8
mov edx, dword [ebp - 0x10]
or edx, 0x400
mov dword [ebp - 0x10], edx
jmp 0x4266d2
mov dword [ebp - 0x204], 0
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x1e4]
push ecx
push 0
mov edx, dword [ebp - 0x204]
push edx
mov eax, dword [ebp - 0x10]
push eax
push 0
push 0
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x1ec]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
mov dword [ebp - 0x198], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x426729
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_process_as_user_error:__d
call fcn.0042a010
add esp, 8
cmp dword [ebp + 0x10], 0
je 0x42674c
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea edx, [ebp - 0x1fc]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [ebp - 0x204]
push ecx
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1ec]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x230], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00401360
mov eax, dword [ebp - 0x230]
jmp 0x4267d7
mov dword [ebp - 0x234], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00401360
mov eax, dword [ebp - 0x234]
jmp 0x4267d7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x44]
xor ecx, ebp
call fcn.00407a6c
mov esp, ebp
pop ebp
ret