Function at 0x18015b31
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 0x18015b72
call fcn.18015f1f
mov esi, eax
jmp 0x18015d67
mov eax, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
cmp eax, 0xffffffff
jne 0x18015b89
mov esi, 0x80070057
jmp 0x18015d6f
mov ecx, dword [esi]
sub ecx, 0x10
call fcn.180060dc
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.180a89f0
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 0x18015c49
lea edx, [esp + 0x14]
lea ecx, [esp + 0x18]
call fcn.18014792
mov esi, eax
test esi, esi
jns 0x18015c10
cmp dword [esp + 0x14], edi
je 0x18015bf3
push dword [esp + 0x14]
call ebx
cmp dword [esp + 0x18], edi
je 0x18015bff
push dword [esp + 0x18]
call ebx
mov ecx, dword [esp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.18003140
jmp 0x18015d67
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 0x18015c4c
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 0x18015c7d
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x14], 0x400
mov dword [esp + 0x18], eax
jmp 0x18015c87
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 0x18015caa
push edx
lea ecx, [esp + 0x14]
call fcn.18006135
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.18005c62
test ebx, ebx
jne 0x18015d14
call fcn.18015f1f
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 0x18015cfb
push edi
call ebx
test esi, esi
je 0x18015d02
push esi
call ebx
mov ecx, dword [esp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.18003140
mov esi, dword [esp + 0x2c]
jmp 0x18015d67
push dword [esp + 0x34]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x18015d2f
push dword [esp + 0x30]
call ebx
jmp 0x18015d35
mov eax, dword [esp + 0x30]
mov dword [ecx], eax
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x18015d43
mov eax, esi
xor esi, esi
mov dword [ecx], eax
push 0
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
test edi, edi
je 0x18015d52
push edi
call ebx
test esi, esi
je 0x18015d59
push esi
call ebx
mov ecx, dword [esp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.18003140
xor esi, esi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x18015d72
push eax
call ebx
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret