Function at 0x4040b8
Capabilities:
Accept command line arguments
Copy file
Delete file
Get common file path
Terminate process

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
xor ebx, ebx
mov byte [esp + 0x14], 0x20
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
mov esi, 0x42a400
mov edi, 0x400
push esi
push edi
mov dword [0x423fa8], eax
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call fcn.00404084
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
test eax, eax
jne 0x404122
push 0x3fb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.Temp
push esi
call ebp
call fcn.00404084
test eax, eax
je 0x404277
mov esi, 0x423720
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push str.Advantig_Error
push esi
call fcn.00406a61
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, 0x429000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp byte [0x429000], 0x22
mov dword [0x423f20], eax
jne 0x40416d
mov byte [esp + 0x14], 0x22
mov esi, 0x429001
push dword [esp + 0x14]
push esi
call fcn.00406583
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov edi, eax
mov dword [esp + 0x18], edi
mov cl, byte [eax]
test cl, cl
je 0x4041ff
cmp cl, 0x20
jne 0x404195
inc eax
cmp byte [eax], 0x20
je 0x40418f
cmp byte [eax], 0x22
mov byte [esp + 0x14], 0x20
jne 0x4041a5
inc eax
mov byte [esp + 0x14], 0x22
cmp byte [eax], 0x2f
jne 0x4041db
inc eax
cmp byte [eax], 0x53
jne 0x4041be
mov cl, byte [eax + 1]
or cl, 0x20
cmp cl, 0x20
jne 0x4041be
or ebx, 2
cmp dword [eax], 0x4352434e
jne 0x4041d4
mov cl, byte [eax + 4]
or cl, 0x20
cmp cl, 0x20
jne 0x4041d4
or ebx, 4
cmp word [eax], 0x3d44
je 0x4041ed
push dword [esp + 0x14]
push eax
call fcn.00406583
cmp byte [eax], 0x22
jne 0x404184
inc eax
jmp 0x404184
and byte [eax - 1], 0
add eax, 2
push eax
push 0x429400
call fcn.00406a61
push ebx
call fcn.004039fb
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x404277
cmp dword [0x423f38], ebx
je 0x40426e
push ebx
push edi
call fcn.00406583
mov esi, eax
cmp esi, edi
jb 0x404238
cmp byte [esi], 0x5f
jne 0x404235
cmp byte [esi + 1], 0x3f
jne 0x404235
cmp byte [esi + 2], 0x3d
je 0x404238
dec esi
jmp 0x404220
cmp esi, edi
mov dword [esp + 0x10], str.Error_launching_installer
jb 0x4042a5
and byte [esi], 0
add esi, 3
push esi
call fcn.00406642
test eax, eax
je 0x404277
push esi
push 0x429400
call fcn.00406a61
push esi
push 0x429800
call fcn.00406a61
mov dword [esp + 0x10], ebx
call fcn.004043d5
mov dword [esp + 0x18], eax
call fcn.00404398
cmp dword [esp + 0x10], 0
pop edi
pop esi
pop ebp
pop ebx
je 0x404295
push 0x100010
push dword [esp + 4]
call fcn.00406493
call dword [sym.imp.ole32.dll_OleUninitialize]
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [esp + 0x14], ebx
mov edi, 0x41f8e9
mov esi, 0x41f8e8
mov ebx, 0x41f4e8
push 0x42a400
push edi
mov byte [0x41f8e8], 0x22
call fcn.00406a61
push str.AADVANTIGu_.exe
push esi
call ebp
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0x10], 0
je 0x40437e
push 0x400
push ebx
push dword [0x423f20]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [eax + 0x41f4d9]
push 0x409275
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x404277
push 0
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40437e
push 0
push edi
call fcn.0040679d
cmp byte [0x429400], 0
je 0x40433c
push 0x429400
push ebx
call fcn.00406a61
jmp 0x404342
push ebx
call fcn.0040659f
push 0x409290
push esi
call ebp
push dword [esp + 0x18]
push esi
call ebp
push str.___
push esi
call ebp
push ebx
push esi
call ebp
push esi
call fcn.00406557
push 0x42a400
push esi
call fcn.0040640c
test eax, eax
je 0x40437e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esp + 0x10], 0
inc byte [str.AADVANTIGu_.exe]
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 0x1a
jl 0x4042b8
jmp 0x404277