Function at 0x40e990
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2084
call fcn.0048c500
mov eax, dword [0x4e5114]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x40eca8
mov dword [ebp - 0x2010], 0
mov dword [ebp - 0x2018], 0
mov dword [ebp - 0x2014], 0
mov dword [ebp - 0x200c], 0
push 0x2000
push 0
lea ecx, [ebp - 0x2004]
push ecx
call fcn.0048e340
add esp, 0xc
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push str.__s___s
lea ecx, [ebp - 0x2004]
push ecx
call fcn.00401b30
add esp, 0x10
push 0x4d0c10
call fcn.0040ecf0
add esp, 4
mov dword [ebp - 0x2028], eax
mov edx, dword [ebp - 0x2028]
push edx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x2018], eax
cmp dword [ebp - 0x2018], 0
jne 0x40ea48
jmp 0x40ec31
lea eax, [ebp - 0x2014]
push eax
push 0xf01ff
mov ecx, dword [ebp - 0x2018]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40ec1d
lea edx, [ebp - 0x200c]
push edx
push 1
push 1
push 0
push 0xf01ff
mov eax, dword [ebp - 0x2014]
push eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x40ec0f
mov dword [ebp - 0x2020], 0
push 0x4d0c2c
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x2024], eax
cmp dword [ebp - 0x2024], 0
je 0x40eb19
push 0x4d0c48
mov ecx, dword [ebp - 0x2024]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x2020], eax
cmp dword [ebp - 0x2020], 0
je 0x40eb0c
call dword [ebp - 0x2020]
mov dword [ebp - 0x202c], eax
push 4
lea edx, [ebp - 0x202c]
push edx
push 0xc
mov eax, dword [ebp - 0x200c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jne 0x40eb0c
mov dword [ebp - 0x2010], 0
jmp 0x40ec31
mov ecx, dword [ebp - 0x2024]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x44
push 0
lea edx, [ebp - 0x2084]
push edx
call fcn.0048e340
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x2040], eax
mov dword [ebp - 0x203c], eax
mov dword [ebp - 0x2038], eax
mov dword [ebp - 0x2034], eax
mov dword [ebp - 0x2084], 0x44
mov dword [ebp - 0x207c], 0x4d0c68
mov ecx, 5
mov word [ebp - 0x2054], cx
mov dword [ebp - 0x2058], 1
mov dword [ebp - 0x201c], 0
mov dword [ebp - 0x2030], 0x430
push 0
mov edx, dword [ebp - 0x200c]
push edx
lea eax, [ebp - 0x201c]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x40ebad
mov dword [ebp - 0x2010], 0
jmp 0x40ec31
lea ecx, [ebp - 0x2040]
push ecx
lea edx, [ebp - 0x2084]
push edx
push 0
mov eax, dword [ebp - 0x201c]
push eax
mov ecx, dword [ebp - 0x2030]
push ecx
push 0
push 0
push 0
lea edx, [ebp - 0x2004]
push edx
push 0
mov eax, dword [ebp - 0x200c]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x40ebf7
mov dword [ebp - 0x2010], 0
jmp 0x40ec31
cmp dword [ebp - 0x201c], 0
je 0x40ec0d
mov ecx, dword [ebp - 0x201c]
push ecx
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
jmp 0x40ec1b
mov dword [ebp - 0x2010], 0
jmp 0x40ec31
jmp 0x40ec29
mov dword [ebp - 0x2010], 0
jmp 0x40ec31
xor edx, edx
jne 0x40ea0d
cmp dword [ebp - 0x200c], 0
je 0x40ec50
cmp dword [ebp - 0x200c], 0xffffffff
je 0x40ec50
mov eax, dword [ebp - 0x200c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2014], 0
je 0x40ec6f
cmp dword [ebp - 0x2014], 0xffffffff
je 0x40ec6f
mov ecx, dword [ebp - 0x2014]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2018], 0
jne 0x40ec85
mov edx, dword [ebp - 0x2018]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2010], 0
je 0x40ec97
mov byte [ebp - 0x2005], 1
jmp 0x40ec9e
mov byte [ebp - 0x2005], 0
mov al, byte [ebp - 0x2005]
jmp 0x40ecd8
push 0
push 0
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040e7b0
add esp, 0x14
test eax, eax
je 0x40eccb
mov byte [ebp - 0x2006], 1
jmp 0x40ecd2
mov byte [ebp - 0x2006], 0
mov al, byte [ebp - 0x2006]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048b588
mov esp, ebp
pop ebp
ret