Function at 0x10016290
Capabilities:
Create process on windows
Get common file path
Set current directory
Terminate process

Disassembly:
mov eax, 0x4654
call fcn.1001ac40
mov eax, dword [esp + 0x4664]
mov dword [esp + 4], ecx
mov ecx, 1
cmp eax, ecx
mov dword [esp + 8], 0xffffffff
mov dword [esp + 0xc], ecx
mov dword [esp], ecx
jl 0x100162c0
mov dword [esp], eax
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x664]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, dword [esp + 0x4678]
mov edi, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, dword [sym.imp.KERNEL32.dll_FindClose]
lea ebx, [ebx]
mov ecx, dword [esp + 0x466c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x10016332
mov eax, dword [esp + 0x4668]
lea edx, [esp + 0x124]
push edx
push eax
xor bl, bl
call edi
cmp eax, 0xffffffff
je 0x10016332
test byte [esp + 0x124], 0x10
jne 0x10016327
mov bl, 1
push eax
call ebp
test bl, bl
jne 0x100163d0
push 0x400
lea ecx, [esp + 0x1a68]
push ecx
push 0x2f
call fcn.1000f520
lea edx, [esp + 0x2c]
push edx
call fcn.1000ec60
movsx eax, byte [esp + 0x30]
push eax
push esi
lea ecx, [esp + 0x1a7c]
push ecx
lea edx, [esp + 0x280]
push edx
call fcn.1001b3f7
add esp, 0x20
push 1
push 0x100397e3
lea eax, [esp + 0x26c]
push eax
push 0
call dword [0x1004bf88]
cmp eax, 2
jne 0x100162f0
push 0x400
lea ecx, [esp + 0x268]
push ecx
push 0x2e
call fcn.1000f520
add esp, 0xc
push 0x124
push 0x100397e3
lea edx, [esp + 0x26c]
push edx
push 0
call dword [0x1004bf88]
cmp eax, 6
jne 0x100162f0
push 0
call fcn.1001bf24
mov eax, dword [esp + 0x4668]
push eax
lea ecx, [esp + 0xa68]
push str.__s_
push ecx
call fcn.1001b3f7
mov eax, dword [esp + 0x467c]
add esp, 0xc
mov edi, 0x100397e3
mov esi, eax
mov ecx, 1
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x1001644d
lea edi, [esp + 0xa64]
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10016410
mov cx, word [0x1003bfbc]
mov word [edi], cx
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10016424
lea edi, [esp + 0xa64]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10016435
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x14]
cmp byte [edx], 0
je 0x1001646d
push 0
push str.CreateProcess
lea eax, [esp + 0xa6c]
push eax
push 0
call dword [0x1004bf88]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x10016545
mov ebp, dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [esp + 0x4674]
test esi, esi
je 0x10016491
dec edi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x1001653d
mov edx, dword [esp + 0x4668]
push 0x100505dc
push 0x10050598
push 0
push 0
push 0x30
push 0
push 0
push 0
lea ecx, [esp + 0xa84]
push ecx
push edx
call ebp
test eax, eax
je 0x10016527
mov edi, esi
mov dword [esp + 0x10], edi
jmp 0x100164e0
mov ecx, dword [0x100505dc]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x10016564
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10016506
mov dword [esp + 0x1c], 0
push 1
call ebx
test esi, esi
je 0x10016517
dec edi
test edi, edi
mov dword [esp + 0x10], edi
jle 0x10016545
cmp dword [esp + 0x18], 0x103
je 0x100164e0
mov edi, dword [esp + 0x10]
jmp 0x1001653d
cmp edi, 1
jl 0x1001656e
test esi, esi
jne 0x10016539
mov edx, dword [esp + 0x14]
cmp byte [edx], 0
jne 0x1001656e
push 1
call ebx
test edi, edi
jg 0x10016485
lea eax, [esp + 0x664]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4654
ret 0x14
mov dword [esp + 0x18], 0
jmp 0x10016545
push 0
push 0
lea eax, [esp + 0x1c]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x4668]
push ecx
push edx
lea eax, [esp + 0x1e6c]
push str.Error_executing__s_n_s
push eax
call fcn.1001b3f7
add esp, 0x10
push 0x40
push str.Exec_And_Wait
lea ecx, [esp + 0x1e6c]
push ecx
push 0
call dword [0x1004bf88]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x10016545