Function at 0x42df30
Capabilities:
Acquire debug privileges
Create process on windows
Enumerate processes
Print debug messages
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4d5bf3
mov eax, dword fs:[0]
push eax
sub esp, 0x284
mov eax, dword [0x54d158]
xor eax, esp
mov dword [esp + 0x280], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x54d158]
xor eax, esp
push eax
lea eax, [esp + 0x298]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2a8]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
push 0
push 2
mov dword [esp + 0x2a8], 0
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
or edi, 0xffffffff
cmp esi, edi
je 0x42dfcd
push 0x228
lea ecx, [esp + 0x6c]
push 0
push ecx
call fcn.004b0770
add esp, 0xc
lea edx, [esp + 0x64]
push edx
push esi
mov dword [esp + 0x6c], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x42dffe
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x2a0], edi
mov eax, dword [esp + 0x2ac]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x42dff4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x42e315
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
lea ecx, [esp + 0x64]
push ecx
push esi
mov ebx, eax
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x42e037
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x2a0], edi
mov eax, dword [esp + 0x2ac]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
lock xadd dword [edx], edi
dec edi
jmp 0x42dfe6
push str.explorer.exe
lea ecx, [esp + 0x1c]
xor edi, edi
call fcn.00410140
mov byte [esp + 0x2a0], 1
mov ebp, dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
jmp 0x42e060
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x88]
push ecx
push edx
call fcn.004ad47d
add esp, 8
test eax, eax
jne 0x42e093
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
push ecx
call ebp
test eax, eax
je 0x42e093
cmp dword [esp + 0x1c], ebx
je 0x42e0f2
lea edx, [esp + 0x64]
push edx
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x42e060
lea eax, [esp + 0x64]
push eax
push esi
call sub.KERNEL32.dll_Process32FirstW
lea ecx, [ecx]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x88]
push ecx
push edx
call fcn.004ad47d
add esp, 8
test eax, eax
jne 0x42e0dd
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
push ecx
call ebp
test eax, eax
jne 0x42e0ee
lea edx, [esp + 0x64]
push edx
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x42e0b0
jmp 0x42e0f6
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x6c]
lea eax, [esp + 0x40]
push eax
push ebx
call sub.WTSAPI32.dll_WTSQueryUserToken
push edi
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebp, eax
test ebp, ebp
jne 0x42e13d
push str.Failed_to_OpenProcess
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [esp + 0x18]
call fcn.00410230
lea ecx, [esp + 0x2ac]
call fcn.00410230
or eax, 0xffffffff
jmp 0x42e315
lea ecx, [esp + 0x28]
push ecx
push 0x201eb
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jne 0x42e15f
push str.Failed_to_OpenProcessToken
call esi
lea edx, [esp + 0x4c]
push edx
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x42e17c
push str.Failed_to_LookupPrivilegeValue
call esi
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
lea edx, [esp + 0x24]
push edx
push 1
push 1
push 0
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x38]
push 0x2000000
push eax
mov dword [esp + 0x6c], 1
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], 2
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov ecx, dword [esp + 0x24]
push 4
push ebx
push 0xc
push ecx
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov eax, dword [esp + 0x24]
xor ebx, ebx
push ebx
push ebx
push 0x10
lea edx, [esp + 0x60]
push edx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x42e1f1
push str.Failed_to_AdjustTokenPrivileges
call esi
call edi
cmp eax, 0x514
jne 0x42e201
push str.Token_does_not_have_the_provilege_n
call esi
mov ecx, dword [esp + 0x24]
push 1
push ecx
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x2c], ebx
mov esi, 0x20
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x42e227
mov esi, 0x420
jmp 0x42e22b
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x44]
test ebx, ebx
je 0x42e23a
mov dword [ebx + 8], str.winsta0default
mov ecx, dword [esp + 0x2ac]
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
cmp dword [ecx - 4], 1
jle 0x42e270
mov eax, dword [ecx - 0xc]
push eax
lea ecx, [esp + 0x2b0]
call fcn.0040f900
mov ecx, dword [esp + 0x2ac]
mov edx, dword [esp + 0x3c]
mov eax, dword [edx]
lea edx, [esp + 0x2c]
push edx
mov edx, dword [esp + 0x4c]
push ebx
push edx
mov edx, dword [esp + 0x2c]
push edx
push esi
push 0
push 0
push 0
push ecx
push eax
mov eax, dword [esp + 0x4c]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebx, eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
mov edi, eax
call esi
mov ecx, dword [esp + 0x40]
push ecx
call esi
mov edx, dword [esp + 0x24]
push edx
call esi
mov eax, dword [esp + 0x28]
push eax
call esi
mov eax, dword [esp + 0x20]
xor ebp, ebp
cmp eax, ebp
je 0x42e2cf
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov eax, dword [esp + 0x30]
cmp eax, ebp
mov dword [esp + 0x20], ebp
je 0x42e2e2
push eax
call esi
mov dword [esp + 0x30], ebp
mov eax, dword [esp + 0x2c]
cmp eax, ebp
je 0x42e2f1
push eax
call esi
mov dword [esp + 0x2c], ebp
lea ecx, [esp + 0x18]
call fcn.00410230
lea ecx, [esp + 0x2ac]
call fcn.00410230
cmp ebx, ebp
jne 0x42e313
mov eax, edi
or eax, 0x80070000
jmp 0x42e315
xor eax, eax
mov ecx, dword [esp + 0x298]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x280]
xor ecx, esp
call fcn.004ac89d
add esp, 0x290
ret