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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d4
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
push str.Wtsapi32.dll
mov dword [ebp - 0x278], eax
mov dword [ebp - 0x260], ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
mov dword [ebp - 0x27c], edi
test edi, edi
je 0x4021bd
push str.WTSQueryUserToken
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x274], eax
test eax, eax
je 0x4021b6
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
je 0x4021b6
lea edx, [ebp - 0x248]
push edx
push esi
mov dword [ebp - 0x248], 0x22c
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x4021d0
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 [ebp - 4]
xor ecx, ebp
call fcn.004027e8
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
mov ebx, dword [sym.imp.KERNEL32.dll_Process32NextW]
mov dword [ebp - 0x254], 0
jmp 0x4021f0
lea eax, [ebp - 0x224]
push str.winlogon.exe
push eax
call fcn.00402b78
add esp, 8
test eax, eax
jne 0x40222d
mov edx, dword [ebp - 0x240]
lea ecx, [ebp - 0x258]
push ecx
push edx
mov dword [ebp - 0x258], eax
call edi
test eax, eax
je 0x40222d
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x258], eax
je 0x40223d
lea ecx, [ebp - 0x248]
push ecx
push esi
call ebx
test eax, eax
jne 0x4021f0
jmp 0x402249
mov edx, dword [ebp - 0x240]
mov dword [ebp - 0x254], edx
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call edi
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x25c]
xor esi, esi
push eax
push ecx
xor ebx, ebx
mov dword [ebp - 0x25c], esi
mov dword [ebp - 0x24c], esi
mov dword [ebp - 0x250], esi
call dword [ebp - 0x274]
test eax, eax
je 0x4023f8
mov edx, dword [ebp - 0x254]
push edx
push esi
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x4023f8
lea eax, [ebp - 0x250]
push eax
push 0x201eb
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4023f8
lea ecx, [ebp - 0x284]
push ecx
push str.SeDebugPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x4023f8
mov edx, dword [ebp - 0x284]
mov eax, dword [ebp - 0x280]
lea ecx, [ebp - 0x24c]
push ecx
push 1
push 1
push ebx
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x250]
push 0x2000000
push edx
mov dword [ebp - 0x14], 1
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 2
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x4023f8
mov ecx, dword [ebp - 0x24c]
push ebx
push ebx
push 0x10
lea eax, [ebp - 0x14]
push eax
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x4023f8
call fcn.00402070
test eax, eax
jne 0x402352
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x514
je 0x4023f8
push 0x44
lea edx, [ebp - 0x2d0]
push 0
push edx
call fcn.004032d0
add esp, 0xc
mov dword [ebp - 0x2d0], 0x44
call fcn.00402000
test eax, eax
je 0x402382
mov dword [ebp - 0x2c8], str.winsta0default
mov edx, dword [ebp - 0x260]
xor eax, eax
mov dword [ebp - 0x270], eax
mov dword [ebp - 0x26c], eax
mov dword [ebp - 0x268], eax
mov dword [ebp - 0x264], eax
lea eax, [ebp - 0x270]
push eax
mov eax, dword [ebp - 0x278]
lea ecx, [ebp - 0x2d0]
push ecx
mov ecx, dword [ebp - 0x24c]
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 0x4023f8
mov edx, dword [ebp - 0x270]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x26c]
push eax
call edi
mov ecx, dword [ebp - 0x270]
push ecx
call edi
mov edx, dword [ebp - 0x27c]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test esi, esi
je 0x40240c
push esi
call edi
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x402419
push eax
call edi
mov eax, dword [ebp - 0x24c]
test eax, eax
je 0x402426
push eax
call edi
mov eax, dword [ebp - 0x250]
test eax, eax
je 0x402433
push eax
call edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.004027e8
mov esp, ebp
pop ebp
ret