Function at 0x401559
Capabilities:
Create process on windows
Get file size
Query environment variable
Read file on windows
Set current directory
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0x5c
push ebx
push ebp
push esi
mov ebp, 0x400
push edi
xor ebx, ebx
push ebp
mov edi, 0x403584
push ebx
push edi
mov byte [esp + 0x1c], 0x5c
mov byte [esp + 0x1d], 0x5c
mov byte [esp + 0x1e], bl
call fcn.004010b4
add esp, 0xc
push ebp
push 0x403184
push str.COMMANDER_PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp eax, ebx
mov dword [0x403178], eax
je 0x401c2e
push ebx
push 0x403e10
push str.install.ini
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, ebx
mov dword [0x403e9c], eax
je 0x401c2e
mov esi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push eax
call esi
inc eax
cmp eax, 0xffffffff
mov dword [0x403178], eax
je 0x401c2e
push eax
call fcn.0040107b
cmp eax, ebx
pop ecx
mov dword [0x403180], eax
je 0x401c2e
mov ecx, dword [0x403178]
push ebx
dec ecx
push 0x403170
push ecx
push eax
push dword [0x403e9c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401c2e
push ebp
push ebx
push edi
call fcn.004010b4
push edi
push str.bar
push dword [0x403180]
call fcn.00401201
add esp, 0x18
cmp eax, ebx
mov dword [0x403170], eax
je 0x401c2e
push 0x403024
push edi
call fcn.00401259
pop ecx
test eax, eax
pop ecx
je 0x40165e
push 0x403184
push str._commander_path_
push edi
call fcn.00401290
add esp, 0xc
lea eax, [esp + 0x10]
push eax
push 0x40304c
push edi
call fcn.00401290
add esp, 0xc
push 2
push 0x403d88
push edi
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp dword [0x403e9c], ebx
mov dword [0x403e98], eax
je 0x401c2e
push ebx
push eax
call esi
lea eax, [eax + eax*2]
cmp eax, 0xffffffff
mov dword [0x403174], eax
je 0x401c2e
push eax
call fcn.0040107b
cmp eax, ebx
pop ecx
mov dword [0x40317c], eax
je 0x401c2e
push dword [0x403174]
push ebx
push eax
call fcn.004010b4
add esp, 0xc
push ebx
push 0x403170
push dword [0x403174]
push dword [0x40317c]
push dword [0x403e98]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401c2e
push ebp
push ebx
push edi
call fcn.004010b4
push edi
push 0x403050
push dword [0x40317c]
call fcn.00401201
push edi
mov dword [0x403170], eax
call fcn.00401471
push ebp
inc eax
push ebx
push edi
mov dword [0x403d84], eax
call fcn.004010b4
push ebp
mov esi, 0x403984
push ebx
push esi
call fcn.004010b4
add esp, 0x34
push dword [0x403d84]
push 0x403060
push esi
call fcn.00401000
push ebx
push esi
push str.Buttoncount
push dword [0x40317c]
call fcn.0040147c
push ebp
push ebx
push edi
call fcn.004010b4
push edi
push 0x403074
push dword [0x403180]
call fcn.00401201
add esp, 0x34
cmp eax, ebx
mov dword [0x403170], eax
je 0x40180d
push ebp
push ebx
push esi
call fcn.004010b4
add esp, 0xc
push 0x40307c
push dword [0x403d84]
push str.button
push 0x403088
push esi
call fcn.00401000
push edi
call fcn.00401014
add esp, 0x18
push eax
push edi
push esi
call fcn.00401014
pop ecx
add eax, esi
push eax
call fcn.00401053
push esi
call fcn.00401014
push esi
mov byte [eax + 0x403984], 0xd
call fcn.00401014
push dword [0x40317c]
mov byte [eax + 0x403984], 0xa
call fcn.00401041
push esi
mov dword [0x403170], eax
call fcn.00401014
mov ecx, dword [0x403170]
push eax
mov eax, dword [0x40317c]
push esi
add eax, ecx
push eax
call fcn.00401053
push ebp
push ebx
push esi
call fcn.004010b4
add esp, 0x34
push ebp
push ebx
push edi
call fcn.004010b4
push edi
push str.cmd
push dword [0x403180]
call fcn.00401201
add esp, 0x18
cmp eax, ebx
mov dword [0x403170], eax
je 0x4018ce
push ebp
push ebx
push esi
call fcn.004010b4
add esp, 0xc
push 0x403098
push dword [0x403d84]
push 0x40309c
push 0x4030a0
push esi
call fcn.00401000
push edi
call fcn.00401014
add esp, 0x18
push eax
push edi
push esi
call fcn.00401014
pop ecx
add eax, esi
push eax
call fcn.00401053
push esi
call fcn.00401014
push esi
mov byte [eax + 0x403984], 0xd
call fcn.00401014
push dword [0x40317c]
mov byte [eax + 0x403984], 0xa
call fcn.00401041
push esi
mov dword [0x403170], eax
call fcn.00401014
mov ecx, dword [0x403170]
push eax
mov eax, dword [0x40317c]
push esi
add eax, ecx
push eax
call fcn.00401053
push ebp
push ebx
push edi
call fcn.004010b4
push ebp
push ebx
push esi
call fcn.004010b4
add esp, 0x40
push ebp
push ebx
push edi
call fcn.004010b4
push edi
push 0x4030a8
push dword [0x403180]
call fcn.00401201
add esp, 0x18
cmp eax, ebx
mov dword [0x403170], eax
je 0x40198f
push ebp
push ebx
push esi
call fcn.004010b4
add esp, 0xc
push 0x4030b0
push dword [0x403d84]
push str.path
push 0x4030bc
push esi
call fcn.00401000
push edi
call fcn.00401014
add esp, 0x18
push eax
push edi
push esi
call fcn.00401014
pop ecx
add eax, esi
push eax
call fcn.00401053
push esi
call fcn.00401014
push esi
mov byte [eax + 0x403984], 0xd
call fcn.00401014
push dword [0x40317c]
mov byte [eax + 0x403984], 0xa
call fcn.00401041
push esi
mov dword [0x403170], eax
call fcn.00401014
mov ecx, dword [0x403170]
push eax
mov eax, dword [0x40317c]
push esi
add eax, ecx
push eax
call fcn.00401053
push ebp
push ebx
push edi
call fcn.004010b4
push ebp
push ebx
push esi
call fcn.004010b4
add esp, 0x40
push ebp
push ebx
push edi
call fcn.004010b4
push edi
push 0x4030c4
push dword [0x403180]
call fcn.00401201
add esp, 0x18
cmp eax, ebx
mov dword [0x403170], eax
je 0x401a50
push ebp
push ebx
push esi
call fcn.004010b4
add esp, 0xc
push 0x4030cc
push dword [0x403d84]
push str.param
push 0x4030d8
push esi
call fcn.00401000
push edi
call fcn.00401014
add esp, 0x18
push eax
push edi
push esi
call fcn.00401014
pop ecx
add eax, esi
push eax
call fcn.00401053
push esi
call fcn.00401014
push esi
mov byte [eax + 0x403984], 0xd
call fcn.00401014
push dword [0x40317c]
mov byte [eax + 0x403984], 0xa
call fcn.00401041
push esi
mov dword [0x403170], eax
call fcn.00401014
mov ecx, dword [0x403170]
push eax
mov eax, dword [0x40317c]
push esi
add eax, ecx
push eax
call fcn.00401053
push ebp
push ebx
push edi
call fcn.004010b4
push ebp
push ebx
push esi
call fcn.004010b4
add esp, 0x40
push ebp
push ebx
push edi
call fcn.004010b4
push edi
push 0x4030e0
push dword [0x403180]
call fcn.00401201
add esp, 0x18
cmp eax, ebx
mov dword [0x403170], eax
je 0x401b11
push ebp
push ebx
push esi
call fcn.004010b4
add esp, 0xc
push 0x4030e8
push dword [0x403d84]
push str.menu
push str._s_i_s
push esi
call fcn.00401000
push edi
call fcn.00401014
add esp, 0x18
push eax
push edi
push esi
call fcn.00401014
pop ecx
add eax, esi
push eax
call fcn.00401053
push esi
call fcn.00401014
push esi
mov byte [eax + 0x403984], 0xd
call fcn.00401014
push dword [0x40317c]
mov byte [eax + 0x403984], 0xa
call fcn.00401041
push esi
mov dword [0x403170], eax
call fcn.00401014
mov ecx, dword [0x403170]
push eax
mov eax, dword [0x40317c]
push esi
add eax, ecx
push eax
call fcn.00401053
push ebp
push ebx
push edi
call fcn.004010b4
push ebp
push ebx
push esi
call fcn.004010b4
add esp, 0x40
push ebx
push ebx
push ebx
mov dword [esp + 0x20], ebx
push dword [0x403e98]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x14]
push ebx
push eax
push dword [0x40317c]
call fcn.00401041
pop ecx
push eax
push dword [0x40317c]
push dword [0x403e98]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [0x403e98]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebp
push ebx
push edi
call fcn.004010b4
push edi
push str.run
push dword [0x403180]
call fcn.00401201
add esp, 0x18
cmp eax, ebx
mov dword [0x403170], eax
je 0x401c33
push edi
call fcn.00401014
test eax, eax
pop ecx
je 0x401c33
push ebp
push ebx
push esi
call fcn.004010b4
mov ebp, dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
add esp, 0xc
lea eax, [esp + 0x28]
push eax
call ebp
push dword [esp + 0x34]
call fcn.00401014
push eax
push dword [esp + 0x3c]
push esi
call fcn.00401053
lea eax, [esp + 0x20]
push eax
push 0x403104
push esi
call fcn.00401290
push str.install.exe
push esi
call fcn.00401136
add esp, 0x24
cmp eax, ebx
mov dword [0x403170], eax
je 0x401bf2
push esi
mov byte [eax + 0x403984], bl
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [0x403170], eax
lea eax, [esp + 0x28]
push eax
call ebp
lea eax, [esp + 0x18]
mov dword [esp + 0x34], ebx
push eax
lea eax, [esp + 0x2c]
push eax
push ebx
push ebx
push 0x10
push 1
push ebx
push ebx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401c33
push 0x10
push str.ERROR
push str.Failed_To_Run_batch_file
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
pop eax
jmp 0x401c5e
push dword [0x403e98]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [0x403e9c]
call esi
push 0x20
push 0x403138
push 0x403144
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret