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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2cc
mov eax, dword [0x410040]
xor eax, esp
mov dword [esp + 0x2c8], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
push str.Wtsapi32.dll
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
mov dword [esp + 0x28], edi
test edi, edi
je 0x40201e
push str.WTSQueryUserToken
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x402017
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
je 0x402017
lea edx, [esp + 0xa0]
push edx
push esi
mov dword [esp + 0xa8], 0x22c
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x402035
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2c8]
xor ecx, esp
call fcn.00402618
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
mov ebx, dword [sym.imp.KERNEL32.dll_Process32NextW]
mov dword [esp + 0x18], 0
lea esp, [esp]
lea eax, [esp + 0xc4]
push str.winlogon.exe
push eax
call fcn.004029a8
add esp, 8
test eax, eax
jne 0x402089
mov edx, dword [esp + 0xa8]
lea ecx, [esp + 0x14]
push ecx
push edx
mov dword [esp + 0x1c], eax
call edi
test eax, eax
je 0x402089
mov eax, dword [ebp + 8]
cmp dword [esp + 0x14], eax
je 0x40209a
lea ecx, [esp + 0xa0]
push ecx
push esi
call ebx
test eax, eax
jne 0x402050
jmp 0x4020a5
mov edx, dword [esp + 0xa8]
mov dword [esp + 0x18], edx
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call edi
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x1c]
xor esi, esi
push eax
push ecx
xor ebx, ebx
mov dword [esp + 0x24], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
call dword [esp + 0x44]
test eax, eax
je 0x402230
mov edx, dword [esp + 0x18]
push edx
push esi
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x402230
lea eax, [esp + 0x10]
push eax
push 0x201eb
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x402230
lea ecx, [esp + 0x40]
push ecx
push str.SeDebugPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x402230
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
lea ecx, [esp + 0xc]
push ecx
push 1
push 1
push ebx
mov dword [esp + 0xa4], edx
mov edx, dword [esp + 0x20]
push 0x2000000
push edx
mov dword [esp + 0xa8], 1
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], 2
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x402230
mov ecx, dword [esp + 0xc]
push ebx
push ebx
push 0x10
lea eax, [esp + 0x9c]
push eax
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x402230
call fcn.00401ed0
test eax, eax
jne 0x4021a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x514
je 0x402230
push 0x44
lea edx, [esp + 0x4c]
push 0
push edx
call fcn.004030d0
add esp, 0xc
mov dword [esp + 0x48], 0x44
call fcn.00401e60
test eax, eax
je 0x4021d2
mov dword [esp + 0x50], str.winsta0default
mov edx, dword [esp + 0x20]
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0x30
push 0
push 0
push 0
push edx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebx, eax
test ebx, ebx
je 0x402230
mov edx, dword [esp + 0x2c]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x30]
push eax
call edi
mov ecx, dword [esp + 0x2c]
push ecx
call edi
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test esi, esi
je 0x402242
push esi
call edi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40224d
push eax
call edi
mov eax, dword [esp + 0xc]
test eax, eax
je 0x402258
push eax
call edi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x402263
push eax
call edi
mov ecx, dword [esp + 0x2d4]
pop edi
pop esi
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.00402618
mov esp, ebp
pop ebp
ret