Function at 0x1016ba22
Capabilities:
Create a process with modified i/o handles and window
Query environment variable
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xf0
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov eax, dword [0x102b0014]
xor eax, ebp
mov dword [esp + 0xe8], eax
lea eax, [esp + 0x14]
push eax
call fcn.101492a0
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0xc0], xmm0
lea esi, [esp + 0x70]
push 0xf7
push str..._.._base_process_launch_win.cc
push str.LaunchProcess
push esi
call fcn.1014e3e0
add esp, 0x10
lea ecx, [esp + 0xc0]
push 0x102b5f40
push esi
call fcn.101bb700
pxor xmm0, xmm0
movdqa xmmword [esp + 0xd0], xmm0
movdqa xmmword [esp + 0x70], xmm0
movdqu xmmword [esp + 0xac], xmm0
movdqa xmmword [esp + 0xa0], xmm0
movdqa xmmword [esp + 0x90], xmm0
movdqa xmmword [esp + 0x80], xmm0
mov dword [esp + 0x74], 0x48
xor esi, esi
cmp byte [ebx + 0x42], 0
mov ecx, 0
je 0x1016b8e1
call fcn.10170970
xor ecx, ecx
cmp eax, 0xf
setg cl
mov edi, dword [ebp + 8]
mov edx, dword [ebx + 0x18]
xor eax, eax
cmp edx, dword [ebx + 0x1c]
setne al
add eax, ecx
je 0x1016b90a
lea ecx, [esp + 0x70]
push eax
call fcn.101bbca0
mov esi, 0x80000
test al, al
je 0x1016bb18
cmp byte [ebx + 0x42], 0
je 0x1016b942
call fcn.10170970
cmp eax, 0x10
jl 0x1016b942
or byte [esp + 0xdb], 0x20
lea eax, [esp + 0xd0]
lea ecx, [esp + 0x70]
push 0x10
push eax
push 0x20007
call fcn.101bbd50
test al, al
je 0x1016bb18
mov dword [esp + 0x10], esi
cmp dword [ebx + 0x14], 1
mov esi, dword [ebx + 0x18]
sete cl
mov eax, ebx
mov ebx, dword [ebx + 0x1c]
cmp esi, ebx
je 0x1016b9d1
cmp ebx, esi
js 0x1016bb18
mov edi, dword [sym.imp.kernel32.dll_SetHandleInformation]
nop
nop
nop
nop
nop
nop
nop
nop
nop
push 1
push 1
push dword [esi]
call edi
test eax, eax
je 0x1016b985
add esi, 4
cmp ebx, esi
jne 0x1016b970
jmp 0x1016b9a7
push 0x132
push str..._.._base_process_launch_win.cc
lea eax, [esp + 0x58]
push eax
call fcn.101bbd80
add esp, 0xc
lea ecx, [esp + 0x50]
call fcn.101846a0
jmp 0x1016b97c
mov esi, dword [ebp + 0x10]
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
sub edx, eax
lea ecx, [esp + 0x70]
push edx
push eax
push 0x20002
call fcn.101bbd50
mov cl, 1
test al, al
mov eax, esi
mov edi, dword [ebp + 8]
je 0x1016bb18
cmp byte [eax + 0x11], 0
mov ebx, eax
je 0x1016b9e1
or byte [esp + 0xa0], 0x80
mov byte [esp + 0xf], cl
cmp byte [ebx + 0x2c], 0
je 0x1016b9f3
mov dword [esp + 0x7c], 0x1025aa50
mov eax, dword [esp + 0xa0]
mov ecx, eax
or ecx, 1
mov dword [esp + 0xa0], ecx
mov edx, dword [ebx + 0x24]
mov cx, 0xa
cmp edx, 5
ja case.0x1016ba12.1
jmp dword [edx*4 + 0x10264e30]
movzx ecx, byte [ebx + 0x10]
xor ecx, 1
jmp case.0x1016ba12.1
mov cx, 1
jmp case.0x1016ba12.1
mov cx, 2
jmp case.0x1016ba12.1
mov cx, 7
jmp case.0x1016ba12.1
xor ecx, ecx
mov word [esp + 0xa4], cx
mov ecx, dword [ebx + 0x34]
mov edx, dword [ebx + 0x38]
mov esi, dword [ebx + 0x3c]
test ecx, ecx
jne 0x1016ba70
test edx, edx
jne 0x1016ba70
test esi, esi
jne 0x1016ba70
cmp dword [ebx + 0x30], 0
je 0x1016ba97
call fcn.10170970
mov edx, dword [esp + 0x10]
lea ecx, [edx + 0x1000000]
cmp eax, 5
cmovl edx, ecx
jmp 0x1016ba9b
or eax, 0x101
mov dword [esp + 0xa0], eax
mov dword [esp + 0xac], ecx
mov dword [esp + 0xb0], edx
mov dword [esp + 0xb4], esi
cmp dword [ebx + 0x30], 0
jne 0x1016ba59
mov edx, dword [esp + 0x10]
mov eax, edx
mov esi, edx
or esi, 0x1000000
cmp byte [ebx + 0x40], 0
cmove esi, edx
mov dword [esp + 0x6c], 2
cmp byte [ebx + 0x43], 0
je 0x1016baf2
cmp dword [esp + 0xb8], 0
jne 0x1016bb18
lea ecx, [esp + 0x70]
push 1
call fcn.101bbca0
test al, al
je 0x1016bb18
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x70]
push 4
push eax
push 0x20012
call fcn.101bbd50
test al, al
je 0x1016bb18
or esi, 0x80000
pxor xmm0, xmm0
movdqa xmmword [esp + 0x50], xmm0
movzx eax, byte [ebx + 0xf]
mov ecx, eax
test al, al
jns 0x1016bb09
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x1016bb61
lea edi, [ebx + 4]
test al, al
jns 0x1016bb63
mov edi, dword [edi]
jmp 0x1016bb63
mov ecx, edi
push 0
call fcn.1016c420
lea ecx, [esp + 0x70]
call fcn.101bbc70
lea ecx, [esp + 0xc0]
call fcn.101bb7c0
cmp byte [esp + 0x1f], 0
jns 0x1016bb49
push dword [esp + 0x14]
call fcn.10205096
add esp, 4
mov ecx, dword [esp + 0xe8]
xor ecx, ebp
call fcn.10205d16
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
xor edi, edi
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x44], 0xffffffff
mov dword [esp + 0x48], 0xffffffff
cmp byte [esp + 0x1f], 0
js 0x1016bb98
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x48], eax
movq xmm0, qword [esp + 0x14]
movq qword [esp + 0x40], xmm0
jmp 0x1016bba9
lea ecx, [esp + 0x40]
push dword [esp + 0x18]
push dword [esp + 0x18]
call fcn.10141542
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x1016bbe9
mov dword [esp + 0x20], 0
lea ecx, [esp + 0x20]
push 0
push eax
push ecx
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x1016bc7a
or esi, 0x400
mov ecx, dword [esp + 0x20]
movzx eax, byte [esp + 0xf]
cmp byte [esp + 0x4b], 0
jns 0x1016bc46
mov edx, dword [esp + 0x40]
jmp 0x1016bc4a
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], 0
cmp byte [ebx + 0x50], 0
je 0x1016bd70
lea eax, [ebx + 0x44]
lea ecx, [esp + 0x34]
push eax
push 0x10264dde
push ecx
call fcn.101bbdf0
add esp, 0xc
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x28], eax
movq xmm0, qword [esp + 0x34]
movq qword [esp + 0x20], xmm0
cmp byte [esp + 0x2b], 0
mov cl, byte [esp + 0xf]
jns 0x1016bc8b
mov eax, dword [esp + 0x20]
jmp 0x1016bc8f
lea edx, [esp + 0x40]
lea ebx, [esp + 0x50]
push ebx
lea ebx, [esp + 0x78]
push ebx
push edi
push ecx
push esi
push eax
push 0
push 0
push edx
push 0
mov esi, dword [ebp + 0x10]
push dword [esi + 0x28]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, eax
push dword [esp + 0x20]
call sub.USERENV.dll_DestroyEnvironmentBlock
test edi, edi
jne 0x1016bce2
mov edi, dword [ebp + 8]
mov ecx, edi
push 0
call fcn.1016c420
jmp 0x1016be2b
lea eax, [esp + 0x20]
or esi, 0x400
movzx ecx, cl
cmp byte [esp + 0x4b], 0
jns 0x1016bca5
mov edx, dword [esp + 0x40]
jmp 0x1016bca9
lea edx, [esp + 0x40]
lea ebx, [esp + 0x50]
push ebx
lea ebx, [esp + 0x78]
push ebx
push edi
push eax
push esi
push ecx
push 0
push 0
push edx
push 0
call dword [sym.imp.kernel32.dll_CreateProcessW]
test eax, eax
je 0x1016bdbc
cmp byte [esp + 0x2b], 0
jns 0x1016bcdf
push dword [esp + 0x20]
call fcn.10205096
add esp, 4
mov esi, dword [ebp + 0x10]
pxor xmm0, xmm0
movdqa xmmword [esp + 0x20], xmm0
lea eax, [esp + 0x50]
lea ecx, [esp + 0x20]
push eax
call fcn.101bc1c0
mov eax, dword [esi + 0x30]
test eax, eax
je 0x1016bd14
push dword [esp + 0x20]
push eax
call dword [sym.imp.kernel32.dll_AssignProcessToJobObject]
test eax, eax
je 0x1016bddd
cmp byte [esi + 0x41], 0
je 0x1016bd2d
push dword [esp + 0x20]
call fcn.1016c3f0
add esp, 4
push eax
call dword [sym.imp.USER32.dll_AllowSetForegroundWindow]
cmp byte [esi], 0
mov edi, dword [ebp + 8]
je 0x1016bd41
push 0xffffffffffffffff
push dword [esp + 0x24]
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x28]
mov ecx, dword [0x102b5184]
test ecx, ecx
je 0x1016bd5a
lea edx, [esp + 0x14]
push edx
push eax
call fcn.1014a380
lea ecx, [esp + 0x20]
call fcn.101bc390
mov ecx, edi
push eax
call fcn.1016c420
jmp 0x1016be22
cmp dword [ebx + 0x4c], 0
je 0x1016be47
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
test eax, eax
je 0x1016bc7a
lea edx, [ebx + 0x44]
lea ecx, [esp + 0x34]
push edx
push eax
push ecx
mov ebx, eax
call fcn.101bbdf0
add esp, 0xc
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x28], eax
movq xmm0, qword [esp + 0x34]
movq qword [esp + 0x20], xmm0
push ebx
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
jmp 0x1016bc35
mov edi, dword [ebp + 8]
mov ecx, edi
push 0
call fcn.1016c420
cmp byte [esp + 0x2b], 0
jns 0x1016be2b
push dword [esp + 0x20]
call fcn.10205096
add esp, 4
jmp 0x1016be2b
mov dword [esp + 0x38], 0xffffffff
mov dword [esp + 0x34], 0xffffffff
lea ecx, [esp + 0x20]
call fcn.101bc390
lea edi, [esp + 0x34]
mov ecx, edi
push eax
call fcn.1016c420
mov ecx, edi
push 1
push 1
call fcn.1016c780
mov esi, dword [ebp + 8]
mov ecx, esi
push 0
call fcn.1016c420
mov ecx, edi
mov edi, esi
call fcn.10151a70
lea ecx, [esp + 0x20]
call fcn.101bc2f0
cmp byte [esp + 0x4b], 0
jns 0x1016bb21
push dword [esp + 0x40]
call fcn.10205096
add esp, 4
jmp 0x1016bb21
xor eax, eax
mov cl, byte [esp + 0xf]
jmp 0x1016bc95