Function at 0x409c80
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.00409bd0
mov esi, eax
cmp esi, ebx
je 0x409ebb
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 0x409ebb
push esi
push ebx
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebp, eax
cmp ebp, ebx
je 0x409ebb
cmp ebp, 0xffffffff
je 0x409ebb
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 0x409eaa
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 0x409ea3
push edi
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
push str.ConvertStringSidToSidW
push edi
mov dword [esp + 0x44], edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x409e94
mov edx, dword [esp + 0x498]
lea ecx, [esp + 0x14]
push ecx
push edx
call eax
test eax, eax
je 0x409e94
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 0x409e85
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 0x409e85
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 str.__s___s
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 0x409e7f
mov eax, dword [esp + 0x4a4]
cmp eax, ebx
jbe 0x409e67
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 0x409e85
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