Function at 0x40a980
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x484
push ebx
push ebp
xor ebx, ebx
push esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], ebx
call fcn.0040a8d0
mov esi, eax
cmp esi, ebx
je 0x40abbb
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x40abbb
push esi
push ebx
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebp, eax
cmp ebp, ebx
je 0x40abbb
cmp ebp, 0xffffffff
je 0x40abbb
lea ecx, [esp + 0x14]
push ecx
push 0x2000000
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40abaa
mov eax, dword [esp + 0x14]
lea edx, [esp + 0xc]
push edx
push 1
push 2
push ebx
push 0x2000000
push eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x40aba3
push edi
push 0x42187c
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
push 0x421864
push edi
mov dword [esp + 0x44], edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40ab94
mov edx, dword [esp + 0x498]
lea ecx, [esp + 0x14]
push ecx
push edx
call eax
test eax, eax
je 0x40ab94
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
lea ecx, [esp + 0x20]
push 4
push ecx
push 0xc
push edx
mov dword [esp + 0x38], 0x20
mov dword [esp + 0x34], eax
call edi
test eax, eax
je 0x40ab85
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edx, dword [esp + 0x10]
add eax, 8
lea ecx, [esp + 0x24]
push eax
push ecx
push 0x19
push edx
call edi
test eax, eax
je 0x40ab85
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x44]
mov dword [esp + 0x40], 0x44
rep stosd dword es:[edi], eax
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x49c]
mov dword [esp + 0x34], eax
mov ecx, 0x103
lea edi, [esp + 0x86]
mov dword [esp + 0x38], eax
mov word [esp + 0x84], bx
mov dword [esp + 0x2c], ebx
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x4a0]
push ecx
push edx
stosw word es:[edi], ax
push 0x421778
lea eax, [esp + 0x90]
push 0x207
push eax
call sub.MSVCRT.dll__snwprintf
add esp, 0x14
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x40]
lea eax, [esp + 0x84]
push ecx
mov ecx, dword [esp + 0x14]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x40ab7f
mov eax, dword [esp + 0x4a4]
cmp eax, ebx
jbe 0x40ab67
mov edx, dword [esp + 0x2c]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x2c]
push eax
call esi
mov ecx, dword [esp + 0x30]
push ecx
call esi
mov dword [esp + 0x1c], 1
jmp 0x40ab85
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [esp + 0x3c]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x10]
push eax
call esi
pop edi
mov ecx, dword [esp + 0x14]
push ecx
call esi
push ebp
call esi
mov eax, dword [esp + 0x18]
pop esi
pop ebp
pop ebx
add esp, 0x484
ret
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x484
ret