Function at 0x18018f4e
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
and dword [esp + 0x14], 0
push ebx
push esi
push edi
mov dword [esp + 0x28], edx
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 0x20]
push ecx
push 0xa
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x18018f8f
call fcn.18018dce
mov esi, eax
jmp 0x18019184
mov eax, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
cmp eax, 0xffffffff
jne 0x18018fa6
mov esi, 0x80070057
jmp 0x1801918c
mov ecx, dword [esi]
sub ecx, 0x10
call fcn.18009f92
add eax, 0x10
mov dword [esp + 0x40], 0x44
push 0x40
mov dword [esp + 0x14], eax
lea eax, [esp + 0x48]
push 0
push eax
call fcn.181757a0
and dword [esp + 0x30], 0
lea edi, [esp + 0x3c]
xor eax, eax
xor esi, esi
stosd dword es:[edi], eax
add esp, 0xc
mov dword [esp + 0x18], esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor edi, edi
mov dword [esp + 0x14], edi
cmp dword [esp + 0x28], esi
je 0x18019066
lea edx, [esp + 0x14]
lea ecx, [esp + 0x18]
call fcn.180169fc
mov esi, eax
test esi, esi
jns 0x1801902d
cmp dword [esp + 0x14], edi
je 0x18019010
push dword [esp + 0x14]
call ebx
cmp dword [esp + 0x18], edi
je 0x1801901c
push dword [esp + 0x18]
call ebx
mov ecx, dword [esp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.1800694d
jmp 0x18019184
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff6
mov dword [esp + 0x70], 0x100
call esi
mov edi, dword [esp + 0x14]
push 0xfffffffffffffff4
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], edi
call esi
mov esi, dword [esp + 0x18]
xor ebx, ebx
inc ebx
mov dword [esp + 0x80], eax
mov dword [esp + 0x24], ebx
jmp 0x18019069
xor ebx, ebx
inc ebx
and dword [esp + 0x14], 0
lea eax, [esp + 0x1c]
and dword [esp + 0x1c], 0
push 0
push dword [esp + 0x30]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x1801909a
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x14], 0x400
mov dword [esp + 0x18], eax
jmp 0x180190a4
xor edx, edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
mov eax, dword [esp + 0x10]
mov edx, 0x104
mov ecx, dword [eax - 8]
sub ebx, dword [eax - 4]
sub ecx, edx
or ebx, ecx
jge 0x180190c7
push edx
lea ecx, [esp + 0x14]
call fcn.1800706e
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x44]
push ecx
xor ecx, ecx
push ecx
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x38]
push ecx
push ecx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
mov ebx, eax
call fcn.18009db6
test ebx, ebx
jne 0x18019131
call fcn.18018dce
push ebx
mov dword [esp + 0x30], eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x18019118
push edi
call ebx
test esi, esi
je 0x1801911f
push esi
call ebx
mov ecx, dword [esp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.1800694d
mov esi, dword [esp + 0x2c]
jmp 0x18019184
push dword [esp + 0x34]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x1801914c
push dword [esp + 0x30]
call ebx
jmp 0x18019152
mov eax, dword [esp + 0x30]
mov dword [ecx], eax
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x18019160
mov eax, esi
xor esi, esi
mov dword [ecx], eax
push 0
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
test edi, edi
je 0x1801916f
push edi
call ebx
test esi, esi
je 0x18019176
push esi
call ebx
mov ecx, dword [esp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.1800694d
xor esi, esi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x1801918f
push eax
call ebx
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret