Function at 0x414580
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
push ebx
push esi
push edi
push 0x44
pop edx
push edx
mov edi, eax
xor ebx, ebx
push ebx
lea eax, [ebp - 0x6c]
push eax
xor esi, esi
call fcn.00403e7b
mov dword [ebp - 0x6c], edx
mov dword [ebp - 0x64], edi
cmp byte [ebp + 8], bl
je 0x41473c
test byte [0x42272c], 1
jne 0x41473c
cmp edi, ebx
jne 0x4145ca
call fcn.00414774
test al, al
je 0x41473c
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402e10
push dword [0x4213c8]
mov dword [ebp - 0xc], ebx
call edi
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x414630
push 0x402e30
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp + 8], eax
cmp eax, ebx
je 0x414630
call dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x414622
push 0x402e40
push dword [ebp + 8]
call edi
cmp eax, ebx
je 0x414622
lea ecx, [ebp - 0xc]
push ecx
push dword [ebp - 0x14]
call eax
test eax, eax
je 0x414622
xor esi, esi
inc esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp esi, 1
je 0x414684
lea eax, [ebp + 8]
push eax
mov dword [ebp + 8], ebx
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
jbe 0x41467b
push dword [ebp + 8]
push ebx
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x41467b
lea ecx, [ebp - 0xc]
push ecx
push 0xb
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x414672
xor esi, esi
inc esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 1
jne 0x41473c
lea eax, [ebp - 8]
push eax
push 1
push 1
push ebx
push 0x2000000
push dword [ebp - 0xc]
mov dword [ebp - 8], ebx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x41472e
push 0x402e54
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
mov dword [ebp - 0x10], ebx
mov dword [ebp + 8], ebx
cmp esi, ebx
je 0x4146ea
push 0x402e60
push esi
call edi
push 0x402e78
push esi
mov dword [ebp - 0x14], eax
call edi
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x14], ebx
je 0x4146ea
push ebx
push dword [ebp - 8]
lea eax, [ebp + 8]
push eax
call dword [ebp - 0x14]
test eax, eax
jne 0x4146ea
mov dword [ebp + 8], ebx
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x6c]
push eax
push ebx
push dword [ebp + 8]
push 0x400
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov esi, eax
neg esi
sbb esi, esi
neg esi
cmp dword [ebp - 0x10], ebx
je 0x414725
cmp dword [ebp + 8], ebx
je 0x414725
push dword [ebp + 8]
call dword [ebp - 0x10]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 1
je 0x41475a
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x6c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x41476d
push dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x20]
call esi
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
pop ebx
leave
ret 0xc