Function at 0x404046
Capabilities:
Accept command line arguments
Check for time delay via gettickcount
Copy file
Delete file
Get common file path
Get file size
Terminate process

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [0x409290]
add eax, 0x3e8
mov dword [esp + 0x14], eax
mov bl, 0x20
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
mov edi, 0x400
push 0x42bf60
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
push dword [0x409290]
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp byte [esi], 0x22
jne 0x404098
add bl, 2
inc esi
mov ebp, dword [sym.imp.USER32.dll_CharNextA]
jmp 0x4040a9
cmp al, bl
je 0x4040af
push esi
call ebp
mov esi, eax
mov al, byte [esi]
test al, al
jne 0x4040a0
push esi
call ebp
mov ebx, eax
mov dword [esp + 0x18], ebx
jmp 0x4040bf
push ebx
call ebp
mov ebx, eax
cmp byte [ebx], 0x20
je 0x4040ba
cmp byte [ebx], 0x2f
jne 0x404114
inc ebx
cmp byte [ebx], 0x53
jne 0x4040de
mov al, byte [ebx + 1]
or al, 0x20
cmp al, 0x20
jne 0x4040de
inc byte [0x422e90]
cmp dword [ebx], 0x4352434e
jne 0x4040f5
mov al, byte [ebx + 4]
or al, 0x20
cmp al, 0x20
jne 0x4040f5
inc byte [0x422e91]
cmp word [ebx], 0x3d44
jne 0x40416e
and byte [ebx - 2], 0
add ebx, 2
push ebx
push dword [0x409294]
call sub.KERNEL32.dll_lstrcpyA
mov ebx, 0x40c460
push str.NSIS_ERROR
push 0x42c3c0
call sub.KERNEL32.dll_lstrcpyA
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push edi
mov dword [0x425358], eax
push dword [0x40929c]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 3
push 0x80000000
push dword [0x40929c]
call fcn.004067e4
cmp eax, 0xffffffff
mov dword [0x42cbd4], eax
jne 0x40417b
mov dword [0x422030], str.Error_launching_installer
jmp 0x4043f7
push ebx
call ebp
mov ebx, eax
mov al, byte [ebx]
or al, 0x20
cmp al, 0x20
jne 0x404169
jmp 0x4040bf
push dword [0x40929c]
call fcn.00406663
push 0
push dword [0x42cbd4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [0x42cbcc], eax
test esi, esi
jle 0x4042df
mov ebp, 0x422e98
mov eax, 0x200
mov edi, esi
cmp esi, eax
jbe 0x4041b5
mov edi, eax
push edi
push 0x422038
call fcn.00403f7e
test eax, eax
je 0x4042bc
cmp dword [0x42cbc4], 0
jne 0x404234
push 0x422038
call fcn.00403ccf
test eax, eax
je 0x404271
mov ecx, dword [0x42cbc0]
cmp eax, esi
mov dword [0x42cbc4], ecx
jg 0x4042f9
mov cl, byte [0x422038]
test cl, 4
je 0x404208
inc byte [0x422e90]
cmp byte [0x422e91], 0
je 0x40421a
test cl, 8
je 0x4042df
test cl, 1
je 0x4042df
inc byte [0x422238]
lea esi, [eax - 4]
cmp edi, esi
jbe 0x404271
mov edi, esi
jmp 0x404271
cmp byte [0x422e90], 0
jne 0x404271
cmp dword [0x422688], 0
jne 0x4042a8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, dword [esp + 0x14]
jbe 0x404271
push str.verifying_installer:__d__
push 0x403fc9
push 0
push 0x6f
push dword [0x425358]
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [0x422688], eax
cmp esi, dword [0x42cbcc]
jge 0x40428f
push edi
push 0x422038
push dword [0x422640]
call fcn.00402209
mov dword [0x422640], eax
add dword [0x42cbc0], edi
sub esi, edi
test esi, esi
jg 0x4041a8
jmp 0x4042df
push ebp
call dword [sym.imp.USER32.dll_DispatchMessageA]
xor eax, eax
push 1
push eax
push eax
push eax
push ebp
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
jne 0x4042a1
jmp 0x404271
mov eax, dword [0x422688]
mov dword [0x422030], 0x4090d0
test eax, eax
je 0x4043dd
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
jmp 0x4043dd
mov eax, dword [0x422688]
xor esi, esi
cmp eax, esi
je 0x4042f1
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
cmp dword [0x42cbc4], esi
jne 0x404308
mov dword [0x422030], str.Installer_corrupted_or_incomplete._r_n_r_nThis_could_be_the_result_of_a_failed_download_or_corruption_from_a_virus._r_n_r_nIf_desperate__try_the__NCRC_command_line_switch__NOT_recommended_
jmp 0x4043dd
cmp byte [0x422238], 0
je 0x404338
push esi
push dword [0x42cbc0]
call fcn.00403fb0
lea eax, [esp + 0x14]
push 4
push eax
call fcn.00403f7e
test eax, eax
je 0x4042f9
mov eax, dword [0x422640]
cmp eax, dword [esp + 0x14]
jne 0x4042f9
push esi
push dword [0x42cbc4]
call fcn.00403fb0
call fcn.00403d09
cmp eax, esi
mov dword [0x422030], eax
jne 0x4043dd
xor eax, eax
cmp dword [0x42c38c], eax
je 0x4043bf
cmp byte [ebx], al
mov esi, ebx
je 0x404374
inc esi
cmp byte [esi], 0
jne 0x404366
cmp esi, ebx
jb 0x404439
cmp byte [esi], 0x5f
jne 0x404385
cmp byte [esi + 1], 0x3f
jne 0x404385
cmp byte [esi + 2], 0x3d
je 0x40438a
dec esi
cmp esi, ebx
jae 0x404374
cmp esi, ebx
jb 0x404439
and byte [esi - 1], 0
add esi, 3
push esi
call fcn.004066e2
test eax, eax
je 0x40454c
push esi
push dword [0x409294]
call sub.KERNEL32.dll_lstrcpyA
push esi
push dword [0x409298]
call sub.KERNEL32.dll_lstrcpyA
mov eax, dword [0x42c380]
cmp byte [eax + 0x42], 0
jne 0x4043d3
mov cl, byte [0x422e90]
mov byte [eax + 0x42], cl
call fcn.0040455b
mov dword [0x422e94], eax
mov eax, dword [0x42cbd4]
cmp eax, 0xffffffff
je 0x4043ee
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x422030], 0
je 0x404404
push 0x10
push dword [0x422030]
call fcn.004065b0
cmp byte [0x40c060], 0
pop edi
pop esi
pop ebp
pop ebx
je 0x40441d
push 1
push 0x40c060
call fcn.004065db
mov eax, dword [0x42c398]
test eax, eax
je 0x40442d
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [0x422e94]
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov ebx, 0x422691
mov esi, 0x422690
mov ebp, 0x422240
push 0x42bf60
push ebx
mov byte [0x422690], 0x22
call sub.KERNEL32.dll_lstrcpyA
push str.ANSISu_.exe
push esi
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0x14], 0
jne 0x40452c
push 0x400
push ebp
push dword [0x425358]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [eax + 0x422235]
push 0x40918d
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40454c
push 0
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40452c
push 0
push ebx
call fcn.00406800
mov eax, dword [0x409294]
cmp byte [eax], 0
je 0x4044d7
push eax
push ebp
call sub.KERNEL32.dll_lstrcpyA
jmp 0x4044dd
push ebp
call fcn.00406663
push ebp
call fcn.004066e2
test eax, eax
je 0x40454c
push 0x4091c0
push esi
mov dword [esp + 0x1c], 1
call edi
push dword [esp + 0x18]
push esi
call edi
push str.___
push esi
call edi
push ebp
push esi
call edi
push 0x42bf60
push esi
call fcn.0040653a
test eax, eax
je 0x404522
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40452c
mov eax, dword [str.Error_launching_installer]
mov dword [0x422030], eax
inc byte [str.ANSISu_.exe]
inc dword [esp + 0x10]
cmp dword [esp + 0x10], 0x1a
jl 0x404456
cmp dword [esp + 0x14], 0
jne 0x4043dd
mov eax, dword [str.Error_launching_installer]
mov dword [0x422030], eax
jmp 0x4043dd