Function at 0x401286
Capabilities:
Accept command line arguments
Create directory
Create process on windows
Delete directory
Delete file
Get common file path
Set environment variable
Terminate process
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7be8
push ebx
push ebp
push esi
push edi
call fcn.004011b6
mov dword [esp + 0x14], eax
test eax, eax
jne 0x401811
push 6
xor ebx, ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, eax
mov edx, str._bootstrap
mov eax, 0x4020a4
mov ecx, esi
mov dword [esp + 0x1c], eax
call fcn.00401819
xor ecx, ecx
inc ecx
push 0x20
pop ebp
test eax, eax
je 0x40133c
mov byte [esp + 0x13], cl
add eax, 0x14
jmp 0x4012ea
cmp cx, bp
jne 0x4012f2
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x4012e2
movzx ecx, word [eax]
mov edx, ebx
test cx, cx
je 0x401318
mov edi, ebx
cmp cx, bp
je 0x401318
inc edx
mov word [esp + edi + 0xae0], cx
lea edi, [edx + edx]
movzx ecx, word [edi + eax]
test cx, cx
jne 0x4012fe
xor eax, eax
mov ecx, esi
mov word [esp + edx*2 + 0xae0], ax
mov edx, str._bseldlg
call fcn.00401819
test eax, eax
je 0x40134a
mov dword [esp + 0x1c], str.__bseldlg
jmp 0x40134a
xor eax, eax
mov byte [esp + 0x13], bl
mov word [esp + 0xae0], ax
mov edx, str._LQUIET
mov ecx, esi
call fcn.00401819
test eax, eax
je 0x40136a
push 0x4020a0
push str.LQUIET
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov edx, str._instby
mov ecx, esi
call fcn.00401819
test eax, eax
je 0x4013c1
add eax, 0xe
jmp 0x401387
cmp cx, bp
jne 0x40138f
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x40137f
movzx edx, word [eax]
mov ecx, ebx
test dx, dx
je 0x4013b5
mov edi, ebx
cmp dx, bp
je 0x4013b5
inc ecx
mov word [esp + edi + 0x4c8], dx
lea edi, [ecx + ecx]
movzx edx, word [edi + eax]
test dx, dx
jne 0x40139b
xor eax, eax
mov word [esp + ecx*2 + 0x4c8], ax
jmp 0x4013cb
xor eax, eax
mov word [esp + 0x4c8], ax
mov edx, str._instsvar
mov ecx, esi
call fcn.00401819
test eax, eax
je 0x401429
add eax, 0x12
jmp 0x4013e8
cmp cx, bp
jne 0x4013f0
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x4013e0
mov ecx, ebx
cmp word [eax], bx
je 0x40141d
lea edx, [esp + 0x1508]
sub edx, eax
movzx esi, word [eax]
cmp si, bp
je 0x40141d
mov word [edx + eax], si
inc ecx
add eax, 2
cmp ecx, 0x182f
jge 0x40141d
cmp word [eax], bx
jne 0x401400
xor eax, eax
mov word [esp + ecx*2 + 0x1508], ax
jmp 0x401433
xor eax, eax
mov word [esp + 0x1508], ax
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
test byte [esp + 0x9c], 1
jne 0x401453
xor eax, eax
inc eax
mov word [esp + 0xa0], ax
lea eax, [esp + 0x1300]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x63
lea ecx, [esp + 0x2c]
call fcn.004010df
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
inc eax
push eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x10fc]
push str.n_ds
push eax
call ebx
add esp, 0xc
lea eax, [esp + 0x10f8]
lea edx, [esp + 0x1300]
lea ecx, [esp + 0xb8]
push eax
call fcn.00401125
push 0
lea eax, [esp + 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.nchsetup.cab
lea edx, [esp + 0xbc]
lea ecx, [esp + 0x8dc]
call fcn.00401125
push str.nchsetup.exe
lea edx, [esp + 0xbc]
lea ecx, [esp + 0x6d4]
call fcn.00401125
xor eax, eax
push eax
push 0x80
push 1
push eax
push eax
push 0xc0000000
lea eax, [esp + 0x8f0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov eax, dword [esp + 0x18]
cmp esi, 0xffffffff
je 0x401485
push 0
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x34]
push dword [esp + 0x34]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call ebp
xor eax, eax
push eax
push 0x80
push 3
push eax
push eax
push 0x40000000
lea eax, [esp + 0x6e8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x401586
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
sete al
test al, al
je 0x401589
lea eax, [esp + 0x8d8]
push eax
call edi
mov eax, dword [esp + 0x18]
jmp 0x401485
push eax
call ebp
lea eax, [esp + 0x6d0]
push eax
call edi
lea eax, [esp + 0x6d0]
push eax
push 0x401195
push 0
lea eax, [esp + 0x8e4]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupIterateCabinetW]
push 0x5f
lea ecx, [esp + 0x24]
call fcn.004010df
push str.nchdata.cab
lea edx, [esp + 0xbc]
lea ecx, [esp + 0xef4]
call fcn.00401125
push str.nchdata.dat
lea edx, [esp + 0xbc]
lea ecx, [esp + 0x2c4]
call fcn.00401125
xor eax, eax
push eax
push 0x80
push 1
push eax
push eax
push 0xc0000000
lea eax, [esp + 0xf08]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
mov esi, eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, 0xffffffff
je 0x40162a
push esi
call ebp
lea eax, [esp + 0x2c0]
push eax
call edi
lea eax, [esp + 0x2c0]
push eax
push 0x401195
push 0
lea eax, [esp + 0xefc]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupIterateCabinetW]
lea eax, [esp + 0xef0]
push eax
call edi
push 0x103
lea eax, [esp + 0xcec]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp byte [esp + 0x13], 0
je 0x4016dd
cmp word [esp + 0x4c8], 0
je 0x4016ad
lea eax, [esp + 0x4c8]
push eax
lea eax, [esp + 0x2c4]
push eax
lea eax, [esp + 0xcf0]
push eax
push dword [esp + 0x28]
lea eax, [esp + 0xaf0]
push eax
push str._bootstrap__s_s__installer___s___instdata___s___instby__s
jmp 0x401724
lea eax, [esp + 0x2c0]
push eax
lea eax, [esp + 0xcec]
push eax
push dword [esp + 0x24]
lea eax, [esp + 0xaec]
push eax
lea eax, [esp + 0x4578]
push str._bootstrap__s_s__installer___s___instdata___s_
push eax
call ebx
add esp, 0x18
jmp 0x401755
cmp word [esp + 0x4c8], 0
je 0x401733
cmp word [esp + 0x1508], 0
lea eax, [esp + 0x1508]
push eax
mov eax, str.__instsvar
mov ecx, 0x4020a4
cmove eax, ecx
push eax
lea eax, [esp + 0x4d0]
push eax
lea eax, [esp + 0x2cc]
push eax
lea eax, [esp + 0xcf8]
push eax
push str._installer___s___instdata___s___instby__s_s_s
lea eax, [esp + 0x4580]
push eax
call ebx
add esp, 0x1c
jmp 0x401755
lea eax, [esp + 0x2c0]
push eax
lea eax, [esp + 0xcec]
push eax
lea eax, [esp + 0x4570]
push str._installer___s___instdata___s_
push eax
call ebx
add esp, 0x10
push 0x3c
pop edx
mov ecx, edx
lea eax, [esp + 0x34]
mov byte [eax], 0
inc eax
dec ecx
jne 0x40175e
lea eax, [esp + 0x6d0]
mov dword [esp + 0x34], edx
mov dword [esp + 0x44], eax
lea eax, [esp + 0xb8]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x4568]
mov dword [esp + 0x48], eax
movzx eax, word [esp + 0xa0]
mov dword [esp + 0x50], eax
xor eax, eax
inc eax
mov dword [esp + 0x38], 0x140
mov dword [esp + 0x14], eax
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x4017d5
push 0xffffffffffffffff
push dword [esp + 0x70]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x70]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [esp + 0x6c]
call ebp
lea eax, [esp + 0x6d0]
push eax
call edi
lea eax, [esp + 0x2c0]
push eax
call edi
lea eax, [esp + 0x8d8]
push eax
call edi
lea eax, [esp + 0xb8]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
call dword [sym.imp.ole32.dll_CoUninitialize]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret