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 [0x422094], 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 [0x422098], 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.00402227
push edi
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call fcn.00402227
push edi
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
call fcn.00402227
push edi
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x6c], ebx
call fcn.00402227
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea ecx, [ebp - 0x44]
call fcn.00401d40
lea eax, [ebp - 0x20]
lea edx, [ebp - 0x9c]
push eax
lea ecx, [ebp - 0x44]
call fcn.004038a6
push dword [ebp - 0x44]
call fcn.00403a29
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.00402227
mov ecx, dword [0x422094]
lea edx, [ebp - 0x68]
call fcn.0040457f
lea ecx, [ebp - 0x20]
call fcn.00402415
lea ecx, [ebp - 0x20]
call fcn.004023da
push 0x41f274
lea ecx, [ebp - 0x44]
mov byte [ebp + 0xb], bl
call fcn.00401d40
mov esi, eax
lea eax, [ebp - 0x10]
push 2
push eax
lea ecx, [ebp - 0x20]
call fcn.00401efa
mov edx, dword [esi]
mov ecx, dword [eax]
call fcn.00403adc
push dword [ebp - 0x10]
mov esi, eax
call fcn.00403a29
push dword [ebp - 0x44]
call fcn.00403a29
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.00401ed9
push eax
lea ecx, [ebp - 0x20]
call fcn.00401e3a
push dword [ebp - 0x10]
call fcn.00403a29
pop ecx
lea ecx, [ebp - 0x20]
call fcn.00402415
lea ecx, [ebp - 0x20]
call fcn.004023da
push edi
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
call fcn.004024f5
mov ecx, dword [ebp - 0x68]
lea eax, [ebp - 0x5c]
push eax
push str.___InstallEnd__
mov edx, str.___Install__UTF_8_
call fcn.00401bcd
test al, al
jne 0x4011c9
cmp byte [ebp + 0xb], bl
jne 0x4011c1
mov edx, 0x41f244
xor ecx, ecx
call fcn.0041024f
push 1
pop ebx
jmp 0x401aad
push 0x41f23c
lea ecx, [ebp - 0xd4]
call fcn.00401d40
push edi
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
call fcn.00402227
cmp dword [ebp - 0x58], ebx
mov byte [ebp - 0xd8], 1
je 0x4014e2
lea ecx, [ebp - 0xb0]
call fcn.0040220c
lea edx, [ebp - 0xb0]
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0xb0], 0x41a30c
call fcn.00403cf0
test al, al
jne 0x40123b
cmp byte [ebp + 0xb], bl
jne 0x401233
mov edx, str.Config_failed
xor ecx, ecx
call fcn.0041024f
push 1
pop ebx
jmp 0x40135c
push str.Title
lea ecx, [ebp - 0x10]
call fcn.00401d40
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x44]
call fcn.00404009
push dword [ebp - 0x10]
call fcn.00403a29
lea ecx, [ebp - 0x10]
mov dword [esp], str.BeginPrompt
call fcn.00401d40
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00404009
push dword [ebp - 0x10]
call fcn.00403a29
lea ecx, [ebp - 0x10]
mov dword [esp], 0x41f1e8
call fcn.00401d40
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0xe4]
call fcn.00404009
push dword [ebp - 0x10]
call fcn.00403a29
pop ecx
mov edx, 0x41f1e0
mov ecx, dword [ebp - 0xe4]
call fcn.00403adc
test eax, eax
jne 0x4012d2
mov byte [ebp - 0xd8], bl
push str.Directory
lea ecx, [ebp - 0x10]
call fcn.00401d40
lea edx, [ebp - 0x10]
lea ecx, [ebp - 0xb0]
call fcn.00403fd7
push dword [ebp - 0x10]
mov esi, eax
call fcn.00403a29
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.00401e3a
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.00403a29
push dword [ebp - 0x2c]
call fcn.00403a29
push dword [ebp - 0x44]
call fcn.00403a29
add esp, 0xc
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0xb0], 0x41a30c
call fcn.0040426c
lea ecx, [ebp - 0xb0]
call fcn.00404243
push dword [ebp - 0x38]
call fcn.00403a29
push dword [ebp - 0xd4]
call fcn.00403a29
push dword [ebp - 0x5c]
call fcn.00403a29
push dword [ebp - 0x68]
call fcn.00403a29
push dword [ebp - 0x74]
call fcn.00403a29
push dword [ebp - 0x50]
call fcn.00403a29
push dword [ebp - 0x20]
call fcn.00403a29
push dword [ebp - 0x9c]
call fcn.00403a29
add esp, 0x20
jmp 0x401ae3
push str.RunProgram
lea ecx, [ebp - 0x10]
call fcn.00401d40
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0xf0]
call fcn.00404009
push eax
lea ecx, [ebp - 0x38]
call fcn.00401e3a
push dword [ebp - 0xf0]
call fcn.00403a29
push dword [ebp - 0x10]
call fcn.00403a29
pop ecx
pop ecx
push str.ExecuteFile
lea ecx, [ebp - 0x10]
call fcn.00401d40
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0xf0]
call fcn.00404009
push eax
lea ecx, [ebp - 0x50]
call fcn.00401e3a
push dword [ebp - 0xf0]
call fcn.00403a29
push dword [ebp - 0x10]
call fcn.00403a29
pop ecx
pop ecx
push str.ExecuteParameters
lea ecx, [ebp - 0x10]
call fcn.00401d40
lea eax, [ebp - 0x20]
lea edx, [ebp - 0xb0]
push eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0xbc]
call fcn.00404009
mov edx, eax
lea ecx, [ebp - 0xf0]
call fcn.004026eb
push eax
lea ecx, [ebp - 0x74]
call fcn.00401e3a
push dword [ebp - 0xf0]
call fcn.00403a29
push dword [ebp - 0xbc]
call fcn.00403a29
push dword [ebp - 0x10]
call fcn.00403a29
push dword [ebp - 0xe4]
call fcn.00403a29
push dword [ebp - 0x2c]
call fcn.00403a29
push dword [ebp - 0x44]
call fcn.00403a29
add esp, 0x18
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0xb0], 0x41a30c
call fcn.0040426c
lea ecx, [ebp - 0xb0]
call fcn.00404243
lea ecx, [ebp - 0x8c]
mov byte [ebp - 0x90], bl
call fcn.00401f8d
push dword [0x41f060]
lea ecx, [ebp - 0x90]
call fcn.0040524b
test al, al
jne 0x401521
cmp byte [ebp + 0xb], bl
jne 0x401519
mov edx, 0x41f130
xor ecx, ecx
call fcn.0041024f
push 1
pop ebx
jmp 0x401a81
push 0x1c
call fcn.00403a03
mov esi, eax
pop ecx
cmp esi, ebx
je 0x401545
lea ecx, [esi + 8]
mov dword [esi + 4], ebx
call fcn.00401fcd
mov dword [esi], 0x41a300
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.00407f05
test eax, eax
je 0x401577
mov edx, 0x41f108
xor ecx, ecx
call fcn.0041024f
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.00402227
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.00402fd9
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.00405f72
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401e3a
push dword [ebp - 0xbc]
call fcn.00403a29
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.00405f72
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.00403a29
pop ecx
push dword [ebp - 0x2c]
call fcn.00403a29
push dword [ebp - 0xc8]
call fcn.00403a29
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.00403a29
pop ecx
lea ecx, [ebp - 0x80]
call fcn.00401f8d
lea ecx, [ebp - 0x80]
call fcn.00404fd0
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.00403a29
push dword [ebp - 0xc8]
call fcn.00403a29
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.00401ea3
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, 0x41f0e4
xor ecx, ecx
call fcn.0041024f
push dword [ebp - 0x2c]
call fcn.00403a29
push dword [ebp - 0x44]
call fcn.00403a29
pop ecx
pop ecx
push dword [ebp - 0x80]
call esi
push dword [ebp - 0x80]
call fcn.00403a29
push dword [ebp - 0xc8]
call fcn.00403a29
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.00403a29
push dword [ebp - 0x38]
call fcn.00403a29
push dword [ebp - 0xd4]
call fcn.00403a29
push dword [ebp - 0x5c]
call fcn.00403a29
push dword [ebp - 0x68]
call fcn.00403a29
push dword [ebp - 0x74]
call fcn.00403a29
push dword [ebp - 0x50]
call fcn.00403a29
push dword [ebp - 0x20]
call fcn.00403a29
push dword [ebp - 0x9c]
call fcn.00403a29
add esp, 0x24
mov eax, edi
jmp 0x401ae5
push dword [ebp - 0x2c]
mov edi, dword [ebp - 0xf8]
call fcn.00403a29
push dword [ebp - 0x44]
call fcn.00403a29
pop ecx
jmp 0x401a45
cmp dword [ebp - 0x34], ebx
jne 0x401872
push str.setup.exe
lea ecx, [ebp - 0x38]
call fcn.00401ddb
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0xbc]
call fcn.00401b01
mov ecx, dword [eax]
call fcn.00405830
push dword [ebp - 0xbc]
neg al
sbb al, al
inc al
mov byte [ebp - 1], al
call fcn.00403a29
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.0041024f
jmp 0x40199a
lea eax, [ebp - 0xc8]
lea ecx, [ebp - 0x44]
push eax
call fcn.00401da1
lea ecx, [ebp - 0x44]
call fcn.00405c5a
push str.__T_
lea ecx, [ebp - 0x10]
call fcn.00401d40
lea eax, [ebp - 0x44]
lea ecx, [ebp - 0x38]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00401f16
push dword [ebp - 0x10]
call fcn.00403a29
push dword [ebp - 0x44]
call fcn.00403a29
pop ecx
pop ecx
push 0x41f08c
lea ecx, [ebp - 0x10]
call fcn.00401d40
lea eax, [ebp - 0xc8]
lea ecx, [ebp - 0x38]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00401f16
push dword [ebp - 0x10]
call fcn.00403a29
cmp dword [ebp - 0x1c], ebx
pop ecx
je 0x4018fc
push 0x20
lea ecx, [ebp - 0x38]
call fcn.00401e78
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x38]
push eax
call fcn.00401ea3
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.004026eb
mov edx, eax
lea ecx, [ebp - 0xe4]
call fcn.00401b01
push dword [ebp - 0xbc]
call fcn.00403a29
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.004102e3
push dword [ebp - 0xe4]
call fcn.00403a29
pop ecx
push dword [ebp - 0x80]
call esi
push dword [ebp - 0x80]
call fcn.00403a29
push dword [ebp - 0xc8]
call fcn.00403a29
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.00403a29
push dword [ebp - 0x38]
call fcn.00403a29
push dword [ebp - 0xd4]
call fcn.00403a29
push dword [ebp - 0x5c]
call fcn.00403a29
push dword [ebp - 0x68]
call fcn.00403a29
push dword [ebp - 0x74]
call fcn.00403a29
push dword [ebp - 0x50]
call fcn.00403a29
push dword [ebp - 0x20]
call fcn.00403a29
push dword [ebp - 0x9c]
call fcn.00403a29
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.00403a29
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.00403a29
push dword [ebp - 0xc8]
call fcn.00403a29
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.00403a29
push dword [ebp - 0x38]
call fcn.00403a29
push dword [ebp - 0xd4]
call fcn.00403a29
add esp, 0xc
push dword [ebp - 0x5c]
call fcn.00403a29
push dword [ebp - 0x68]
call fcn.00403a29
push dword [ebp - 0x74]
call fcn.00403a29
push dword [ebp - 0x50]
call fcn.00403a29
push dword [ebp - 0x20]
call fcn.00403a29
push dword [ebp - 0x9c]
call fcn.00403a29
add esp, 0x18
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret 0x10