Function at 0x40f820
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4ea450
mov eax, dword fs:[0]
push eax
sub esp, 0x128
mov eax, dword [0x53450c]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push esi
push edi
mov eax, dword [0x53450c]
xor eax, esp
push eax
lea eax, [esp + 0x138]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
xor edi, edi
mov dword [esp + 0x4c], eax
xor eax, eax
push 0x40
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
lea eax, [esp + 0x9c]
push edi
push eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x8c], edx
mov dword [esp + 0x24], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], edi
mov dword [esp + 0x68], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0xa0], edi
call fcn.0045f2d0
add esp, 0xc
mov dword [esp + 0x84], edi
mov dword [esp + 0x88], edi
mov dword [esp + 0x8c], edi
mov dword [esp + 0x90], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 0x18]
push ecx
push 0x60000
push eax
mov dword [esp + 0x5c], eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40f9e2
push edi
xor eax, eax
push 1
push 0xf01ff
push str.CURRENT_USER
lea edx, [esp + 0x70]
push edx
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
call dword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameA]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push edi
push edi
push 4
push ecx
call dword [sym.imp.ADVAPI32.dll_GetKernelObjectSecurity]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
jne 0x40f9f8
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x7a
jne 0x40f9ef
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edx
push 8
call esi
push eax
call ebx
mov dword [esp + 0x20], eax
cmp eax, edi
je 0x40f9e2
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x14]
push ecx
push edx
push eax
mov eax, dword [esp + 0x24]
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_GetKernelObjectSecurity]
test eax, eax
jne 0x40f9fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
jmp 0x40fd70
call esi
xor eax, eax
jmp 0x40fd70
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea ecx, [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x5c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x40f9e2
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x58]
push edx
push eax
lea ecx, [esp + 0x68]
push ecx
push 1
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclA]
cmp eax, edi
jne 0x40f9e2
lea edx, [esp + 0x40]
push edx
push edi
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0x28]
push edi
lea ecx, [esp + 0x54]
push ecx
push edi
lea edx, [esp + 0x54]
push edx
mov edx, dword [esp + 0x3c]
push eax
lea ecx, [esp + 0x34]
push ecx
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_MakeAbsoluteSD]
test eax, eax
jne 0x40fb36
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40f9e2
mov eax, dword [esp + 0x3c]
push eax
push 8
call esi
push eax
call ebx
mov ecx, dword [esp + 0x44]
push ecx
push 8
mov dword [esp + 0x24], eax
call esi
push eax
call ebx
mov edx, dword [esp + 0x48]
push edx
push 8
mov dword [esp + 0x2c], eax
call esi
push eax
call ebx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x40]
push eax
push 8
call esi
push eax
call ebx
mov ecx, dword [esp + 0x14]
push ecx
push 8
mov dword [esp + 0x40], eax
call esi
push eax
call ebx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x30], eax
cmp ecx, edi
je 0x40f9e2
cmp dword [esp + 0x24], edi
je 0x40f9e2
mov esi, dword [esp + 0x2c]
cmp esi, edi
je 0x40f9e2
mov edx, dword [esp + 0x38]
cmp edx, edi
je 0x40f9e2
cmp eax, edi
je 0x40f9e2
lea ebx, [esp + 0x40]
push ebx
push edx
lea edx, [esp + 0x50]
push edx
push esi
lea edx, [esp + 0x54]
push edx
mov edx, dword [esp + 0x38]
push edx
lea edx, [esp + 0x54]
push edx
mov edx, dword [esp + 0x3c]
push ecx
lea ecx, [esp + 0x34]
push ecx
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_MakeAbsoluteSD]
test eax, eax
je 0x40f9e2
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x30]
push eax
push ecx
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x40f9e2
mov eax, dword [esp + 0x18]
push esi
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
test eax, eax
je 0x40f9e2
mov edx, dword [esp + 0x50]
lea ecx, [esp + 0x18]
push ecx
push 0xf01ff
push edx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40f9e2
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x28]
push eax
push 1
push 2
push edi
push 0xf01ff
push ecx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x40f9e2
push 0x44
lea edx, [esp + 0x98]
push edi
push edx
call fcn.0045f2d0
mov eax, dword [esp + 0x34]
add esp, 0xc
push eax
mov dword [esp + 0x98], 0x44
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov ebx, dword [esp + 0x4c]
lea ecx, [esp + 0xf8]
push ecx
call fcn.0040fda0
add esp, 4
mov ecx, eax
lea esi, [esp + 0x114]
mov dword [esp + 0x140], edi
call fcn.0040fe50
mov ecx, eax
mov eax, dword [esp + 0x80]
lea esi, [esp + 0xdc]
mov byte [esp + 0x140], 1
call fcn.0040fe90
lea ecx, [esp + 0x114]
call fcn.00403de0
lea ecx, [esp + 0xf8]
call fcn.00403de0
mov eax, dword [esp + 0x34]
mov esi, 8
cmp dword [eax + 0x14], esi
jb 0x40fc44
mov eax, dword [eax]
mov edx, dword [esp + 0xdc]
cmp dword [esp + 0xf0], esi
jae 0x40fc5b
lea edx, [esp + 0xdc]
mov ecx, dword [esp + 0x4c]
cmp dword [ecx + 0x14], esi
jb 0x40fc66
mov ecx, dword [ecx]
lea esi, [esp + 0x84]
push esi
lea esi, [esp + 0x98]
push esi
push eax
push edi
push edi
push edi
push edi
push edi
push edx
mov edx, dword [esp + 0x4c]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x40fca6
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0xdc]
call fcn.00403de0
xor eax, eax
jmp 0x40fd70
mov eax, dword [esp + 0x84]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x20]
cmp eax, edi
je 0x40fccc
push eax
push edi
call ebx
push eax
call esi
mov eax, dword [esp + 0x30]
cmp eax, edi
je 0x40fcdb
push eax
push edi
call ebx
push eax
call esi
mov eax, dword [esp + 0x38]
cmp eax, edi
je 0x40fcea
push eax
push edi
call ebx
push eax
call esi
mov eax, dword [esp + 0x2c]
cmp eax, edi
je 0x40fcf9
push eax
push edi
call ebx
push eax
call esi
mov eax, dword [esp + 0x24]
cmp eax, edi
je 0x40fd08
push eax
push edi
call ebx
push eax
call esi
mov eax, dword [esp + 0x1c]
cmp eax, edi
je 0x40fd17
push eax
push edi
call ebx
push eax
call esi
mov eax, dword [esp + 0x88]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, edi
je 0x40fd30
cmp eax, 0xffffffff
je 0x40fd30
push eax
call esi
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x40fd40
cmp eax, 0xffffffff
je 0x40fd40
push eax
call esi
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x40fd50
cmp eax, 0xffffffff
je 0x40fd50
push eax
call esi
mov eax, dword [esp + 0x50]
cmp eax, edi
je 0x40fd60
cmp eax, 0xffffffff
je 0x40fd60
push eax
call esi
lea ecx, [esp + 0xdc]
call fcn.00403de0
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x138]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.0045f14f
mov esp, ebp
pop ebp
ret