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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xad8
mov eax, dword [0x42c008]
xor eax, esp
mov dword [esp + 0xad4], eax
push esi
push edi
push 0x800
lea eax, [esp + 0x2dc]
mov dword [esp + 0x30], edx
push 0
push eax
mov dword [esp + 0x3c], ecx
call fcn.0040ce90
add esp, 0xc
cmp dword [0x42d3bc], 0
je 0x40378a
push str.runAppAsCurrentUser___Start
lea eax, [esp + 0x2dc]
push 0x400
push eax
call fcn.00401120
add esp, 0xc
lea ecx, [esp + 0x2d8]
call fcn.004035d0
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov esi, eax
mov dword [esp + 0x1c], esi
call fcn.00401240
mov edi, eax
test edi, edi
je 0x4037c8
push esi
push str.WTSGetActiveConsoleSessionId_____08X
lea eax, [esp + 0x2e0]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x2d8]
call fcn.004035d0
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
test edi, edi
je 0x4037ff
push esi
push str.CreateToolhelp32Snapshot_hSnap__0X_
lea eax, [esp + 0x2e0]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x2d8]
call fcn.004035d0
cmp esi, 0xffffffff
jne 0x403845
push esi
push esi
push str.hSnap__0X___INVALID_HANDLE_VALUE__0X_
lea eax, [esp + 0x2e4]
push 0x400
push eax
call fcn.00401120
add esp, 0x14
lea ecx, [esp + 0x2d8]
call fcn.004035d0
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0xad4]
xor ecx, esp
call fcn.0040aea4
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0xa8]
mov dword [esp + 0xa8], 0x22c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x4038a2
push str.Process32First_fail
lea eax, [esp + 0x2dc]
push 0x400
push eax
call fcn.00401120
add esp, 0xc
lea ecx, [esp + 0x2d8]
call fcn.004035d0
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0xad4]
xor ecx, esp
call fcn.0040aea4
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x403906
lea eax, [esp + 0xcc]
push eax
push str.Process32First_procEntry.szExeFile:_s
lea eax, [esp + 0x2e0]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x2d8]
call fcn.004035d0
test edi, edi
je 0x403906
lea eax, [esp + 0xcc]
push eax
push str.Process32Next_procEntry.szExeFile:_s
lea eax, [esp + 0x2e0]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x2d8]
call fcn.004035d0
push str.winlogon.exe
lea eax, [esp + 0xd0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x403945
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0xb4]
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x403945
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x18], eax
je 0x403b7f
lea eax, [esp + 0xa8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x4038d4
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
push eax
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
push 0x44
lea eax, [esp + 0x54]
push 0
push eax
call fcn.0040ce90
add esp, 0xc
mov dword [esp + 0x50], 0x44
xorps xmm0, xmm0
mov dword [esp + 0x58], str.winsta0default
movaps xmmword [esp + 0x40], xmm0
push esi
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
lea ecx, [esp + 0x24]
mov dword [esp + 0x34], eax
push ecx
push 0x201eb
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x403a01
call esi
call esi
push eax
push 0x426fe0
call fcn.00401030
add esp, 8
call esi
push eax
push str.Process_token_open_Error:__u_n
lea eax, [esp + 0x2e0]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x2d8]
call fcn.004035d0
call dword [sym.imp.ADVAPI32.dll_RegDisablePredefinedCacheEx]
test edi, edi
je 0x403a32
push eax
push str.RegDisablePredefinedCacheEx_lResult:_08X
lea eax, [esp + 0x2e0]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x2d8]
call fcn.004035d0
lea eax, [esp + 0x38]
push eax
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x403a71
call esi
push eax
push str.Lookup_Privilege_value_Error:__u_n
lea eax, [esp + 0x2e0]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x2d8]
call fcn.004035d0
mov eax, dword [esp + 0x38]
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xa0], eax
lea eax, [esp + 0x14]
push eax
push 1
push 1
push 0
push 0
push dword [esp + 0x38]
mov dword [esp + 0xb0], 1
mov dword [esp + 0xbc], 2
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
call esi
push 4
push dword [esp + 0x20]
push 0xc
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push 0
push 0
push 0x10
lea eax, [esp + 0xa4]
push eax
push 0
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x403b11
call esi
call esi
push eax
push str.Adjust_Privilege_value_Error:__u_n
lea eax, [esp + 0x2e0]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x2d8]
call fcn.004035d0
call esi
cmp eax, 0x514
jne 0x403b40
push str.Token_does_not_have_the_provilege
lea eax, [esp + 0x2dc]
push 0x400
push eax
call fcn.00401120
add esp, 0xc
lea ecx, [esp + 0x2d8]
call fcn.004035d0
mov ecx, 0x10
mov dword [esp + 0x20], 0
test edi, edi
mov eax, 0x8000000
push 1
push dword [esp + 0x18]
cmovne eax, ecx
mov dword [esp + 0x20], eax
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
mov eax, dword [esp + 0x18]
je 0x403b8b
mov ecx, dword [esp + 0x20]
or eax, 0x400
jmp 0x403b91
mov esi, dword [esp + 0xb0]
jmp 0x403964
xor ecx, ecx
mov dword [esp + 0x20], ecx
lea edx, [esp + 0x40]
push edx
lea edx, [esp + 0x54]
push edx
push dword [esp + 0x34]
push ecx
push eax
push 0
push 0
push 0
push 0
push dword [esp + 0x54]
push dword [esp + 0x3c]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
call esi
test edi, edi
je 0x403be6
call esi
push eax
push str.CreateProcessAsUser_GetLastError__:__u_n
lea eax, [esp + 0x2e0]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x2d8]
call fcn.004035d0
push dword [esp + 0x34]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x28]
call esi
push dword [esp + 0x14]
call esi
push dword [esp + 0x24]
call esi
mov ecx, dword [esp + 0xadc]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0040aea4
mov esp, ebp
pop ebp
ret