Function at 0x40a070
Capabilities:
Accept command line arguments
Check mutex on windows
Copy file
Create process on windows
Create thread
Delete file
Delete registry key
Hide graphical window
Schedule task via itaskscheduler

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x934
mov eax, dword [0x4b135c]
xor eax, esp
mov dword [esp + 0x930], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
push 0
mov dword [esp + 0x14], eax
mov dword [0x4ba72c], eax
call dword [sym.imp.ole32.dll_CoInitialize]
call fcn.004110d0
call fcn.00411170
xor eax, eax
mov dword [esp + 0xcc], 7
mov dword [esp + 0xc8], 0
mov word [esp + 0xb8], ax
cmp word [esi], ax
jne 0x40a0d7
xor ecx, ecx
jmp 0x40a0ef
mov ecx, esi
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a0e0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [esp + 0xc0]
call fcn.00401b00
sub esp, 8
mov dword [esp + 0x1c], 0x20
lea eax, [esp + 0x1c]
lea ecx, [esp + 0xc0]
push eax
call fcn.004061b0
mov esi, eax
lea ecx, [esp + 0xb8]
push esi
push 0
lea eax, [esp + 0x90]
push eax
call fcn.00404ca0
push dword [esp + 0xc8]
lea eax, [esi + 1]
push eax
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0xc4]
call fcn.00404ca0
cmp dword [esp + 0x84], 8
lea eax, [esp + 0x70]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
cmovae eax, dword [esp + 0x70]
push 0x4a0c30
push eax
call esi
mov ebx, 1
test eax, eax
jne 0x40a17e
mov dword [0x4ba718], ebx
jmp 0x40a1a8
cmp dword [esp + 0x84], 8
lea eax, [esp + 0x70]
push 0x4a0c38
cmovae eax, dword [esp + 0x74]
push eax
call esi
mov ecx, dword [0x4ba6d0]
test eax, eax
cmove ecx, ebx
mov dword [0x4ba6d0], ecx
push 0x208
lea eax, [esp + 0x52c]
push 0
push eax
call fcn.00421df0
add esp, 0xc
lea eax, [esp + 0x730]
push 0x208
push 0
push eax
call fcn.00421df0
add esp, 0xc
lea eax, [esp + 0x730]
push 0x208
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp dword [0x4b2a3c], 8
mov eax, 0x4b2a28
push 0x49faf8
cmovae eax, dword [0x4b2a28]
push eax
lea eax, [esp + 0x530]
push 0x49fb54
push eax
call fcn.00403350
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ebx, eax
push 0x49faf8
push ebx
call esi
mov edi, dword [sym.imp.ole32.dll_CoUninitialize]
test eax, eax
jne 0x40a367
call fcn.00410f90
test eax, eax
je 0x40a8ce
push dword [esp + 0x10]
call fcn.0043dbde
add esp, 4
push 0x340
call fcn.0041db97
mov esi, eax
add esp, 4
test esi, esi
je 0x40a356
mov ecx, esi
call fcn.00438701
push 0x53
lea ecx, [esi + 0x14]
mov dword [esi + 0x10], vtable.DuiLib::CNotifyPump.0
call fcn.00438fca
mov dword [esi + 0x20], vtable.DuiLib::INotifyUI.0
lea ecx, [esi + 0x2c]
mov dword [esi + 0x24], vtable.DuiLib::IMessageFilterUI.0
mov dword [esi + 0x28], vtable.DuiLib::IDialogBuilderCallback.0
mov dword [esi], vtable.DuiLib::WindowImplBase.1.0
mov dword [esi + 0x10], vtable.DuiLib::WindowImplBase.2.0
mov dword [esi + 0x20], vtable.DuiLib::WindowImplBase.0
mov dword [esi + 0x24], vtable.DuiLib::WindowImplBase.4.0
mov dword [esi + 0x28], vtable.DuiLib::WindowImplBase.3.0
call fcn.0043a769
push 0
push SysReAllocString
push SysReAllocString
push SysReAllocString
push SysReAllocString
push 0
push 0x96c80000
push 0
push 0
mov ecx, esi
mov dword [esi], vtable.CDlgMainWnd.3.0
mov dword [esi + 0x10], vtable.CDlgMainWnd.1.0
mov dword [esi + 0x20], vtable.CDlgMainWnd.0
mov dword [esi + 0x24], vtable.CDlgMainWnd.2.0
mov dword [esi + 0x28], vtable.CDlgMainWnd.4.0
mov dword [esi + 0x330], 0
call fcn.00438874
mov ecx, esi
call fcn.0043871e
push 1
mov ecx, esi
call fcn.0043871a
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 3
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
mov ecx, esi
call fcn.0043871a
push eax
call dword [sym.imp.USER32.dll_SetWindowPos]
mov ecx, esi
call fcn.0043871a
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
call fcn.0043d008
push dword [0x4ba728]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40a7aa
push str.uninst.exe_Silent
push ebx
call esi
test eax, eax
jne 0x40a4ae
push str.Installer
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x4ba6d4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40a3ae
push dword [0x4ba6d4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x40a8ce
push 0x208
lea eax, [esp + 0x324]
mov dword [0x4ba718], 1
push 0
push eax
call fcn.00421df0
add esp, 0xc
lea eax, [esp + 0xd0]
push 0x208
push 0
push eax
call fcn.00421df0
add esp, 0xc
lea ecx, [esp + 0xd0]
call fcn.00410990
lea eax, [esp + 0xd0]
push eax
lea eax, [esp + 0x324]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ecx, str.InpaintMAX.exe
call fcn.00411570
push 0x4ba700
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 0x403540
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebx
push 0x4ba700
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [esp + 0x320]
push eax
call esi
cmp word [esp + eax*2 + 0x31e], 0x5c
jne 0x40a48b
lea eax, [eax*2 - 2]
cmp eax, 0x208
jae 0x40a964
xor ecx, ecx
mov word [esp + eax + 0x320], cx
lea eax, [esp + 0x320]
push eax
call esi
test eax, eax
je 0x40a667
lea ecx, [esp + 0x320]
call fcn.004104e0
jmp 0x40a667
push str.uninst.exe_Update
push ebx
call esi
test eax, eax
jne 0x40a687
push str.Installer
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x4ba6d4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40a516
push dword [0x4ba6d4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.ole32.dll_CoUninitialize]
lea ecx, [esp + 0x70]
call fcn.004016a0
lea ecx, [esp + 0x88]
call fcn.004016a0
lea ecx, [esp + 0xb8]
call fcn.004016a0
jmp 0x40a94b
push 0x208
lea eax, [esp + 0xd4]
mov dword [0x4ba718], 1
push 0
push eax
call fcn.00421df0
add esp, 0xc
lea eax, [esp + 0x320]
push 0x208
push 0
push eax
call fcn.00421df0
add esp, 0xc
lea ecx, [esp + 0x320]
call fcn.00410990
lea eax, [esp + 0x320]
push eax
lea eax, [esp + 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push str.InpaintMAXSvc.exe
lea eax, [esp + 0x324]
push eax
push 0x49fb54
push eax
call fcn.00403350
add esp, 4
lea ecx, [esp + 0x32c]
mov edx, str._stop
call fcn.00410ff0
mov edx, str._uninstall
lea ecx, [esp + 0x32c]
call fcn.00410ff0
add esp, 0xc
mov ecx, str.InpaintMAXSvc.exe
call fcn.00411570
mov ecx, str.InpaintMAX.exe
call fcn.00411570
push 0x4ba700
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 0x403540
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebx
push 0x4ba700
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [esp + 0xd0]
push eax
call esi
cmp word [esp + eax*2 + 0xce], 0x5c
jne 0x40a63d
lea eax, [eax*2 - 2]
cmp eax, 0x208
jae 0x40a964
xor ecx, ecx
mov word [esp + eax + 0xd0], cx
lea eax, [esp + 0xd0]
push eax
call esi
test eax, eax
je 0x40a657
lea ecx, [esp + 0xd0]
call fcn.004104e0
push str.SoftwareInpaintMAX
push SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
call fcn.00410d60
push dword [0x4ba6d4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [0x4ba6d4]
call ebx
call edi
jmp 0x40a7aa
lea eax, [esp + 0xd0]
push eax
lea eax, [esp + 0x52c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x40a6d1
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
sub esp, 0x18
lea eax, [esp + 0x540]
mov ecx, esp
push eax
call fcn.00402600
call fcn.00404bd0
add esp, 0x18
lea eax, [esp + 0x528]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 1
lea eax, [esp + 0x52c]
push eax
lea eax, [esp + 0x738]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40a7aa
push 0x208
lea eax, [esp + 0xd4]
push 0
push eax
call fcn.00421df0
add esp, 0xc
lea eax, [esp + 0xd0]
push 0x49faf8
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [0x4ba718], 0
je 0x40a72b
push str._Silent
jmp 0x40a739
cmp dword [0x4ba6d0], 0
je 0x40a747
push str._Update
lea eax, [esp + 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x40
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0x44
push 0
push eax
call fcn.00421df0
add esp, 0xc
mov dword [esp + 0x44], 1
mov eax, 1
mov word [esp + 0x48], ax
push dword [0x4ba728]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0xf0]
push eax
lea eax, [esp + 0x54c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push 0x18
xor eax, eax
mov dword [esp + 0xb8], 7
push str._c_schtasks__delete__tn
lea ecx, [esp + 0xa8]
mov dword [esp + 0xb8], 0
mov word [esp + 0xa8], ax
call fcn.00401b00
push 1
push 0x49fd38
lea ecx, [esp + 0xa8]
call fcn.00402830
push 0x11
push str.InpaintMAX_update
lea ecx, [esp + 0xa8]
call fcn.00402830
push 1
push 0x49fd38
lea ecx, [esp + 0xa8]
call fcn.00402830
push 3
push 0x4a0d14
lea ecx, [esp + 0xa8]
call fcn.00402830
cmp dword [esp + 0xb4], 8
lea eax, [esp + 0xa0]
push 0
cmovae eax, dword [esp + 0xa4]
push 0
push eax
push 0x4a0d1c
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
js 0x40a893
lea eax, [esp + 0x10]
push eax
push 0x49facc
push 1
push 0
push 0x49fadc
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x40a884
call edi
jmp 0x40a893
mov eax, dword [esp + 0x10]
push str.InpaintMAX_update
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
call edi
cmp dword [esp + 0xb4], 8
jb 0x40a8ae
push dword [esp + 0xa0]
call fcn.0046f2be
add esp, 4
xor eax, eax
mov dword [esp + 0xb4], 7
mov dword [esp + 0xb0], 0
mov word [esp + 0xa0], ax
cmp dword [esp + 0x84], 8
jb 0x40a8e4
push dword [esp + 0x70]
call fcn.0046f2be
add esp, 4
xor eax, eax
mov dword [esp + 0x84], 7
cmp dword [esp + 0x9c], 8
mov dword [esp + 0x80], eax
mov word [esp + 0x70], ax
jb 0x40a916
push dword [esp + 0x88]
call fcn.0046f2be
add esp, 4
xor eax, eax
mov dword [esp + 0x9c], 7
cmp dword [esp + 0xcc], 8
mov dword [esp + 0x98], eax
mov word [esp + 0x88], ax
jb 0x40a94b
push dword [esp + 0xb8]
call fcn.0046f2be
add esp, 4
mov ecx, dword [esp + 0x93c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041d30f
mov esp, ebp
pop ebp
ret 0x10
call fcn.0041dea5
int3