Function at 0x401014
Capabilities:
Accept command line arguments
Check os version
Create process on windows
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1cc
mov eax, dword [ebp + 8]
push ebx
mov dword [0x41865c], eax
push esi
lea eax, [ebp - 0x1cc]
push edi
push eax
mov dword [ebp - 0x1cc], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
xor ebx, ebx
test eax, eax
jne 0x401049
xor al, al
jmp 0x401053
cmp dword [ebp - 0x1bc], 2
sete al
mov byte [0x418660], al
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push 3
lea ecx, [ebp - 0x9c]
pop edi
mov dword [ebp - 0x9c], ebx
push edi
mov dword [ebp - 0x98], ebx
mov dword [ebp - 0x94], ebx
call fcn.004021fe
push edi
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call fcn.004021fe
push edi
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
call fcn.004021fe
push edi
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x6c], ebx
call fcn.004021fe
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea ecx, [ebp - 0x44]
call fcn.00401d0e
lea eax, [ebp - 0x20]
lea edx, [ebp - 0x9c]
push eax
lea ecx, [ebp - 0x44]
call fcn.00403875
push dword [ebp - 0x44]
call fcn.00403a1b
pop ecx
mov dword [ebp - 0x68], ebx
push edi
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x60], ebx
call fcn.004021fe
mov ecx, dword [0x41865c]
lea edx, [ebp - 0x68]
call fcn.0040456a
lea ecx, [ebp - 0x20]
call fcn.004023ec
lea ecx, [ebp - 0x20]
call fcn.004023b1
push 0x418254
lea ecx, [ebp - 0x44]
mov byte [ebp + 0xb], bl
call fcn.00401d0e
mov esi, eax
lea eax, [ebp - 0x10]
push 2
push eax
lea ecx, [ebp - 0x20]
call fcn.00401ec8
mov edx, dword [esi]
mov ecx, dword [eax]
call fcn.00403acf
push dword [ebp - 0x10]
mov esi, eax
call fcn.00403a1b
push dword [ebp - 0x44]
call fcn.00403a1b
pop ecx
cmp esi, ebx
pop ecx
jne 0x401184
lea eax, [ebp - 0x10]
push 2
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp + 0xb], 1
call fcn.00401ea7
push eax
lea ecx, [ebp - 0x20]
call fcn.00401e08
push dword [ebp - 0x10]
call fcn.00403a1b
pop ecx
lea ecx, [ebp - 0x20]
call fcn.004023ec
lea ecx, [ebp - 0x20]
call fcn.004023b1
push edi
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
call fcn.004024cd
mov ecx, dword [ebp - 0x68]
lea eax, [ebp - 0x5c]
push eax
push str.___InstallEnd__
mov edx, str.___Install__UTF_8_
call fcn.00401b9a
test al, al
jne 0x4011c9
cmp byte [ebp + 0xb], bl
jne 0x4011c1
mov edx, 0x418224
xor ecx, ecx
call fcn.0041025b
push 1
pop ebx
jmp 0x401aad
push 0x41821c
lea ecx, [ebp - 0xd4]
call fcn.00401d0e
push edi
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
call fcn.004021fe
cmp dword [ebp - 0x58], ebx
mov byte [ebp - 0xd8], 1
je 0x4014e2
lea ecx, [ebp - 0xb0]
call fcn.004021e3
lea edx, [ebp - 0xb0]
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0xb0], 0x4142c4
call fcn.00403cda
test al, al
jne 0x40123b
cmp byte [ebp + 0xb], bl
jne 0x401233
mov edx, str.Config_failed
xor ecx, ecx
call fcn.0041025b
push 1
pop ebx
jmp 0x40135c
push str.Title
lea ecx, [ebp - 0x10]
call fcn.00401d0e
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x44]
call fcn.00403ff3
push dword [ebp - 0x10]
call fcn.00403a1b
lea ecx, [ebp - 0x10]
mov dword [esp], str.BeginPrompt
call fcn.00401d0e
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00403ff3
push dword [ebp - 0x10]
call fcn.00403a1b
lea ecx, [ebp - 0x10]
mov dword [esp], str.Progress
call fcn.00401d0e
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0xe4]
call fcn.00403ff3
push dword [ebp - 0x10]
call fcn.00403a1b
pop ecx
mov edx, 0x4181c0
mov ecx, dword [ebp - 0xe4]
call fcn.00403acf
test eax, eax
jne 0x4012d2
mov byte [ebp - 0xd8], bl
push str.Directory
lea ecx, [ebp - 0x10]
call fcn.00401d0e
lea edx, [ebp - 0x10]
lea ecx, [ebp - 0xb0]
call fcn.00403fc1
push dword [ebp - 0x10]
mov esi, eax
call fcn.00403a1b
cmp esi, ebx
pop ecx
jl 0x401314
mov eax, dword [ebp - 0xa4]
lea ecx, [ebp - 0xd4]
mov eax, dword [eax + esi*4]
add eax, 0xc
push eax
call fcn.00401e08
cmp dword [ebp - 0x28], ebx
je 0x4013ca
cmp byte [ebp + 0xb], bl
jne 0x4013ca
push 0x24
push dword [ebp - 0x44]
push dword [ebp - 0x2c]
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
je 0x4013ca
push dword [ebp - 0xe4]
call fcn.00403a1b
push dword [ebp - 0x2c]
call fcn.00403a1b
push dword [ebp - 0x44]
call fcn.00403a1b
add esp, 0xc
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0xb0], 0x4142c4
call fcn.00404256
lea ecx, [ebp - 0xb0]
call fcn.0040422d
push dword [ebp - 0x38]
call fcn.00403a1b
push dword [ebp - 0xd4]
call fcn.00403a1b
push dword [ebp - 0x5c]
call fcn.00403a1b
push dword [ebp - 0x68]
call fcn.00403a1b
push dword [ebp - 0x74]
call fcn.00403a1b
push dword [ebp - 0x50]
call fcn.00403a1b
push dword [ebp - 0x20]
call fcn.00403a1b
push dword [ebp - 0x9c]
call fcn.00403a1b
add esp, 0x20
jmp 0x401ae3
push str.RunProgram
lea ecx, [ebp - 0x10]
call fcn.00401d0e
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0xf0]
call fcn.00403ff3
push eax
lea ecx, [ebp - 0x38]
call fcn.00401e08
push dword [ebp - 0xf0]
call fcn.00403a1b
push dword [ebp - 0x10]
call fcn.00403a1b
pop ecx
pop ecx
push str.ExecuteFile
lea ecx, [ebp - 0x10]
call fcn.00401d0e
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0xf0]
call fcn.00403ff3
push eax
lea ecx, [ebp - 0x50]
call fcn.00401e08
push dword [ebp - 0xf0]
call fcn.00403a1b
push dword [ebp - 0x10]
call fcn.00403a1b
pop ecx
pop ecx
push str.ExecuteParameters
lea ecx, [ebp - 0x10]
call fcn.00401d0e
lea eax, [ebp - 0x20]
lea edx, [ebp - 0xb0]
push eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0xbc]
call fcn.00403ff3
mov edx, eax
lea ecx, [ebp - 0xf0]
call fcn.004026c4
push eax
lea ecx, [ebp - 0x74]
call fcn.00401e08
push dword [ebp - 0xf0]
call fcn.00403a1b
push dword [ebp - 0xbc]
call fcn.00403a1b
push dword [ebp - 0x10]
call fcn.00403a1b
push dword [ebp - 0xe4]
call fcn.00403a1b
push dword [ebp - 0x2c]
call fcn.00403a1b
push dword [ebp - 0x44]
call fcn.00403a1b
add esp, 0x18
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0xb0], 0x4142c4
call fcn.00404256
lea ecx, [ebp - 0xb0]
call fcn.0040422d
lea ecx, [ebp - 0x8c]
mov byte [ebp - 0x90], bl
call fcn.00401f5b
push dword [0x418040]
lea ecx, [ebp - 0x90]
call fcn.00405240
test al, al
jne 0x401521
cmp byte [ebp + 0xb], bl
jne 0x401519
mov edx, 0x418110
xor ecx, ecx
call fcn.0041025b
push 1
pop ebx
jmp 0x401a81
push 0x1c
call fcn.004039f4
mov esi, eax
pop ecx
cmp esi, ebx
je 0x401545
lea ecx, [esi + 8]
mov dword [esi + 4], ebx
call fcn.00401f9b
mov dword [esi], 0x4142b8
mov dword [ebp - 0x14], esi
jmp 0x40154a
mov dword [ebp - 0x14], ebx
mov esi, ebx
cmp esi, ebx
je 0x401554
mov eax, dword [esi]
push esi
call dword [eax + 4]
mov ecx, esi
call fcn.00407f01
test eax, eax
je 0x401577
mov edx, 0x4180e8
xor ecx, ecx
call fcn.0041025b
cmp esi, ebx
je 0x401519
mov eax, dword [esi]
push esi
call dword [eax + 8]
jmp 0x401519
lea edx, [ebp - 0x8c]
lea ecx, [ebp - 0xc8]
call fcn.00401aec
push edi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 1], bl
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
call fcn.004021fe
lea eax, [ebp - 0x2c]
lea edx, [ebp - 0x68]
push eax
lea eax, [ebp - 1]
push eax
lea eax, [ebp - 0xc8]
push dword [ebp - 0xd8]
mov ecx, esi
push eax
call fcn.00402fa8
cmp eax, ebx
je 0x401658
cmp byte [ebp + 0xb], bl
jne 0x401630
cmp eax, 1
je 0x4015d3
cmp byte [ebp - 1], bl
je 0x4015fb
push 8
lea ecx, [ebp - 0xbc]
pop edx
call fcn.00405f67
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401e08
push dword [ebp - 0xbc]
call fcn.00403a1b
pop ecx
mov eax, 0x80004005
cmp eax, 0x80004004
je 0x401630
cmp dword [ebp - 0x28], ebx
je 0x401630
push 7
lea ecx, [ebp - 0xbc]
pop edx
call fcn.00405f67
mov eax, dword [eax]
push 0x10
push eax
push dword [ebp - 0x2c]
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [ebp - 0xbc]
call fcn.00403a1b
pop ecx
push dword [ebp - 0x2c]
call fcn.00403a1b
push dword [ebp - 0xc8]
call fcn.00403a1b
pop ecx
cmp esi, ebx
pop ecx
je 0x4019c1
mov eax, dword [esi]
push esi
call dword [eax + 8]
jmp 0x4019c1
push dword [ebp - 0x2c]
call fcn.00403a1b
pop ecx
lea ecx, [ebp - 0x80]
call fcn.00401f5b
lea ecx, [ebp - 0x80]
call fcn.00404fc5
push dword [ebp - 0x8c]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call esi
test eax, eax
jne 0x4016b3
push dword [ebp - 0x80]
call esi
push dword [ebp - 0x80]
call fcn.00403a1b
push dword [ebp - 0xc8]
call fcn.00403a1b
mov eax, dword [ebp - 0x14]
pop ecx
cmp eax, ebx
pop ecx
je 0x401519
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x401519
cmp dword [ebp - 0x4c], ebx
je 0x401817
lea edx, [ebp - 0x50]
lea ecx, [ebp - 0x44]
call fcn.00401b01
mov eax, dword [ebp - 0x44]
cmp dword [ebp - 0x1c], ebx
mov dword [ebp - 0x130], 0x3c
mov dword [ebp - 0x12c], 0x140
mov dword [ebp - 0x128], ebx
mov dword [ebp - 0x124], ebx
mov dword [ebp - 0x120], eax
je 0x401701
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x74]
push eax
call fcn.00401e71
lea edx, [ebp - 0x74]
lea ecx, [ebp - 0x2c]
call fcn.00401b01
mov eax, dword [ebp - 0x28]
push 1
neg eax
sbb eax, eax
pop edi
and eax, dword [ebp - 0x2c]
mov dword [ebp - 0x118], ebx
mov dword [ebp - 0x114], edi
mov dword [ebp - 0xf8], ebx
mov dword [ebp - 0x11c], eax
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
cmp dword [ebp - 0x110], 0x20
ja 0x4017fb
cmp byte [ebp + 0xb], bl
jne 0x40175c
mov edx, 0x4180c4
xor ecx, ecx
call fcn.0041025b
push dword [ebp - 0x2c]
call fcn.00403a1b
push dword [ebp - 0x44]
call fcn.00403a1b
pop ecx
pop ecx
push dword [ebp - 0x80]
call esi
push dword [ebp - 0x80]
call fcn.00403a1b
push dword [ebp - 0xc8]
call fcn.00403a1b
mov eax, dword [ebp - 0x14]
pop ecx
cmp eax, ebx
pop ecx
je 0x401795
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [ebp - 0x90]
call fcn.00401b16
push dword [ebp - 0x8c]
call fcn.00403a1b
push dword [ebp - 0x38]
call fcn.00403a1b
push dword [ebp - 0xd4]
call fcn.00403a1b
push dword [ebp - 0x5c]
call fcn.00403a1b
push dword [ebp - 0x68]
call fcn.00403a1b
push dword [ebp - 0x74]
call fcn.00403a1b
push dword [ebp - 0x50]
call fcn.00403a1b
push dword [ebp - 0x20]
call fcn.00403a1b
push dword [ebp - 0x9c]
call fcn.00403a1b
add esp, 0x24
mov eax, edi
jmp 0x401ae5
push dword [ebp - 0x2c]
mov edi, dword [ebp - 0xf8]
call fcn.00403a1b
push dword [ebp - 0x44]
call fcn.00403a1b
pop ecx
jmp 0x401a45
cmp dword [ebp - 0x34], ebx
jne 0x401872
push str.setup.exe
lea ecx, [ebp - 0x38]
call fcn.00401da9
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0xbc]
call fcn.00401b01
mov ecx, dword [eax]
call fcn.00405825
push dword [ebp - 0xbc]
neg al
sbb al, al
inc al
mov byte [ebp - 1], al
call fcn.00403a1b
cmp byte [ebp - 1], bl
pop ecx
je 0x401872
cmp byte [ebp + 0xb], bl
jne 0x40199a
mov edx, str.b_rN0R
xor ecx, ecx
call fcn.0041025b
jmp 0x40199a
lea eax, [ebp - 0xc8]
lea ecx, [ebp - 0x44]
push eax
call fcn.00401d6f
lea ecx, [ebp - 0x44]
call fcn.00405c4f
push str.__T_
lea ecx, [ebp - 0x10]
call fcn.00401d0e
lea eax, [ebp - 0x44]
lea ecx, [ebp - 0x38]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00401ee4
push dword [ebp - 0x10]
call fcn.00403a1b
push dword [ebp - 0x44]
call fcn.00403a1b
pop ecx
pop ecx
push 0x41806c
lea ecx, [ebp - 0x10]
call fcn.00401d0e
lea eax, [ebp - 0xc8]
lea ecx, [ebp - 0x38]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00401ee4
push dword [ebp - 0x10]
call fcn.00403a1b
cmp dword [ebp - 0x1c], ebx
pop ecx
je 0x4018fc
push 0x20
lea ecx, [ebp - 0x38]
call fcn.00401e46
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x38]
push eax
call fcn.00401e71
lea eax, [ebp - 0x38]
lea edx, [ebp - 0xd4]
push eax
lea ecx, [ebp - 0xbc]
mov dword [ebp - 0x138], 0x44
mov dword [ebp - 0x134], ebx
mov dword [ebp - 0x130], ebx
mov dword [ebp - 0x12c], ebx
mov dword [ebp - 0x10c], ebx
mov word [ebp - 0x106], bx
mov dword [ebp - 0x104], ebx
call fcn.004026c4
mov edx, eax
lea ecx, [ebp - 0xe4]
call fcn.00401b01
push dword [ebp - 0xbc]
call fcn.00403a1b
pop ecx
lea eax, [ebp - 0xf4]
push eax
lea eax, [ebp - 0x138]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0xe4]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401a28
cmp byte [ebp + 0xb], bl
jne 0x40198e
xor ecx, ecx
call fcn.004102ef
push dword [ebp - 0xe4]
call fcn.00403a1b
pop ecx
push dword [ebp - 0x80]
call esi
push dword [ebp - 0x80]
call fcn.00403a1b
push dword [ebp - 0xc8]
call fcn.00403a1b
mov eax, dword [ebp - 0x14]
pop ecx
cmp eax, ebx
pop ecx
je 0x4019c1
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [ebp - 0x90]
call fcn.00401b16
push dword [ebp - 0x8c]
call fcn.00403a1b
push dword [ebp - 0x38]
call fcn.00403a1b
push dword [ebp - 0xd4]
call fcn.00403a1b
push dword [ebp - 0x5c]
call fcn.00403a1b
push dword [ebp - 0x68]
call fcn.00403a1b
push dword [ebp - 0x74]
call fcn.00403a1b
push dword [ebp - 0x50]
call fcn.00403a1b
push dword [ebp - 0x20]
call fcn.00403a1b
push dword [ebp - 0x9c]
call fcn.00403a1b
add esp, 0x24
push 1
pop eax
jmp 0x401ae5
push dword [ebp - 0xf0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xe4]
mov edi, dword [ebp - 0xf4]
call fcn.00403a1b
cmp edi, ebx
pop ecx
je 0x401a5a
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x80]
call esi
push dword [ebp - 0x80]
call fcn.00403a1b
push dword [ebp - 0xc8]
call fcn.00403a1b
mov eax, dword [ebp - 0x14]
pop ecx
cmp eax, ebx
pop ecx
je 0x401a81
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [ebp - 0x90]
call fcn.00401b16
push dword [ebp - 0x8c]
call fcn.00403a1b
push dword [ebp - 0x38]
call fcn.00403a1b
push dword [ebp - 0xd4]
call fcn.00403a1b
add esp, 0xc
push dword [ebp - 0x5c]
call fcn.00403a1b
push dword [ebp - 0x68]
call fcn.00403a1b
push dword [ebp - 0x74]
call fcn.00403a1b
push dword [ebp - 0x50]
call fcn.00403a1b
push dword [ebp - 0x20]
call fcn.00403a1b
push dword [ebp - 0x9c]
call fcn.00403a1b
add esp, 0x18
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret 0x10