Function at 0x401000
Capabilities:
Accept command line arguments
Check if file exists
Create process on windows
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x518782
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x55f550]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push esi
push edi
mov eax, dword [0x55f550]
xor eax, esp
push eax
lea eax, [esp + 0x148]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
test esi, esi
je 0x4014b6
push 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
push 0
push esi
call fcn.004050fc
test eax, eax
jne 0x401074
push str.Fatal_Error:_MFC_initialization_failed_n
jmp 0x4014bb
call dword [sym.imp.KERNEL32.dll_FreeConsole]
cmp dword [ebp + 8], 1
jne 0x40127b
lea ecx, [esp + 0x1c]
call fcn.004052a3
push 0
push 0x40
push str.C:ProgramDataSonix.txt
lea ecx, [esp + 0x28]
mov dword [esp + 0x15c], 0
call fcn.00405180
test eax, eax
jne 0x4010d5
push 0
push 0x10
push str.Cant_get_setup.exe_path.
call fcn.00405b5f
lea ecx, [esp + 0x1c]
mov dword [esp + 0x150], 0xffffffff
call fcn.00405612
jmp 0x4014c3
push 0x566bdc
lea ecx, [esp + 0x20]
call fcn.00405733
test eax, eax
je 0x4010ae
lea ecx, [esp + 0x1c]
call fcn.00405542
mov ecx, dword [0x566bdc]
mov eax, dword [ecx - 0xc]
test eax, eax
js 0x401120
push 0x542a18
push ecx
call fcn.004f5eb5
mov ecx, dword [0x566bdc]
add esp, 8
test eax, eax
je 0x401120
sub eax, ecx
cmp eax, 0xffffffff
jne 0x4011e7
cmp dword [ecx - 0xc], 0
jl 0x401199
push 0x542a1c
push ecx
call fcn.004f5eb5
mov ecx, dword [0x566bdc]
add esp, 8
test eax, eax
je 0x401149
sub eax, ecx
cmp eax, 0xffffffff
jne 0x4011e7
cmp dword [ecx - 0xc], 0
jl 0x401199
push 0x542a20
push ecx
call fcn.004f5eb5
mov ecx, dword [0x566bdc]
add esp, 8
test eax, eax
je 0x40116e
sub eax, ecx
cmp eax, 0xffffffff
jne 0x4011e7
cmp dword [ecx - 0xc], 0
jl 0x401199
push 0x542a24
push ecx
call fcn.004f5eb5
mov ecx, dword [0x566bdc]
add esp, 8
test eax, eax
je 0x401193
sub eax, ecx
cmp eax, 0xffffffff
jne 0x4011e7
cmp dword [ecx - 0xc], 0
jge 0x40119e
or eax, 0xffffffff
jmp 0x4011bb
push str.Temp.exe
push ecx
call fcn.004f5eb5
add esp, 8
test eax, eax
jne 0x4011b5
or eax, 0xffffffff
jmp 0x4011bb
sub eax, dword [0x566bdc]
add eax, 8
push eax
lea eax, [esp + 0x18]
push eax
mov ecx, 0x566bdc
call fcn.00401b40
push eax
mov ecx, 0x566bdc
mov byte [esp + 0x154], 3
call fcn.00402660
lea ecx, [esp + 0x14]
jmp 0x40125d
cmp dword [ecx - 0xc], 0
jge 0x4011f2
or eax, 0xffffffff
jmp 0x40120f
push str.Temp.exe
push ecx
call fcn.004f5eb5
add esp, 8
test eax, eax
jne 0x401209
or eax, 0xffffffff
jmp 0x40120f
sub eax, dword [0x566bdc]
add eax, 8
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ecx, 0x566bdc
call fcn.00401b40
push 0x542a18
push eax
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0x15c], 1
call fcn.00401bb0
add esp, 0xc
push eax
mov ecx, 0x566bdc
mov byte [esp + 0x154], 2
call fcn.00402660
lea ecx, [esp + 0x14]
call fcn.004026d0
lea ecx, [esp + 0x18]
call fcn.004026d0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x150], 0xffffffff
call fcn.00405612
jmp 0x401392
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x401286
xor eax, eax
jmp 0x401299
mov eax, ecx
lea esi, [eax + 1]
jmp 0x401290
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401290
sub eax, esi
push eax
push ecx
mov ecx, 0x566bdc
call fcn.00402540
call fcn.00406577
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x48]
push eax
lea ecx, [esp + 0x18]
call fcn.00402250
mov dword [esp + 0x150], 4
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
test eax, eax
js 0x4012ed
push 0x542a18
push ecx
call fcn.004f5eb5
mov ecx, dword [esp + 0x1c]
add esp, 8
test eax, eax
je 0x4012ed
sub eax, ecx
cmp eax, 0xffffffff
jne 0x401356
cmp dword [ecx - 0xc], 0
jl 0x40136b
push 0x542a1c
push ecx
call fcn.004f5eb5
mov ecx, dword [esp + 0x1c]
add esp, 8
test eax, eax
je 0x401310
sub eax, ecx
cmp eax, 0xffffffff
jne 0x401356
cmp dword [ecx - 0xc], 0
jl 0x40136b
push 0x542a20
push ecx
call fcn.004f5eb5
mov ecx, dword [esp + 0x1c]
add esp, 8
test eax, eax
je 0x401333
sub eax, ecx
cmp eax, 0xffffffff
jne 0x401356
cmp dword [ecx - 0xc], 0
jl 0x40136b
push 0x542a24
push ecx
call fcn.004f5eb5
mov ecx, dword [esp + 0x1c]
add esp, 8
test eax, eax
je 0x40136b
sub eax, ecx
cmp eax, 0xffffffff
je 0x40136b
push 3
push 0x542a18
mov ecx, 0x566bdc
call fcn.00401e40
mov ecx, dword [esp + 0x14]
lea eax, [ecx - 0x10]
mov dword [esp + 0x150], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401392
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [0x566bdc]
push 5
push ecx
call dword [sym.imp.KERNEL32.dll_WinExec]
cmp eax, 0x1f
jae 0x4013b9
push 0
push 0x10
push str.Cant_execute_setup_file.
call fcn.00405b5f
jmp 0x4014c3
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x7d0
call edi
call fcn.004014f0
test eax, eax
jne 0x4013e1
push eax
push 0x10
push str.Cant_delete_uninstall_file.
call fcn.00405b5f
jmp 0x4014c3
xor esi, esi
call fcn.00401a20
test al, al
jne 0x40140a
lea esp, [esp]
push 0xc8
call edi
inc esi
cmp esi, 0x19
je 0x40148d
call fcn.00401a20
test al, al
je 0x4013f0
push 0
push 0x26
lea edx, [esp + 0x3c]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x401489
lea ecx, [esp + 0x14]
call fcn.00402760
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x18]
push str._sInstallShield_Installation_Information399C37FB_08AF_493B_BFED_20FBD85EDF7FTemp.exe
push ecx
mov dword [esp + 0x15c], 5
call fcn.00402000
mov esi, dword [esp + 0x20]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
add esp, 0xc
push esi
call ebx
test eax, eax
jne 0x401477
jmp 0x401460
call fcn.00401a20
test al, al
je 0x401477
push 0x1f4
call edi
push esi
call ebx
test eax, eax
je 0x401460
call fcn.00401610
test eax, eax
je 0x40149d
lea ecx, [esp + 0x14]
call fcn.004026d0
xor eax, eax
jmp 0x4014c8
push 0
push 0x10
push str.Setup_is_not_executed.
call fcn.00405b5f
jmp 0x4014c3
push 0
push 0x10
push str.Cant_copy_uninstall_file.
call fcn.00405b5f
lea ecx, [esp + 0x14]
call fcn.004026d0
jmp 0x4014c3
push str.Fatal_Error:_GetModuleHandle_failed_n
call fcn.004f575d
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x148]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.004f5614
mov esp, ebp
pop ebp
ret