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

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
xor ebx, ebx
push edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov byte [esp + 0x14], 0x20
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
push str.NSIS_Error
push 0x42e820
mov dword [0x42f0d0], eax
call sub.KERNEL32.dll_lstrcpyA
mov esi, 0x436400
mov edi, 0x400
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call fcn.0040316a
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
test eax, eax
jne 0x40321b
push 0x3fb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.Temp
push esi
call ebp
call fcn.0040316a
test eax, eax
je 0x403362
mov esi, 0x435000
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp byte [0x435000], 0x22
mov dword [0x42f020], eax
jne 0x403256
mov byte [esp + 0x14], 0x22
mov esi, 0x435001
push dword [esp + 0x14]
push esi
call fcn.004054b5
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov edi, eax
mov dword [esp + 0x1c], edi
jmp 0x4032d2
cmp cl, 0x20
jne 0x40327a
inc eax
cmp byte [eax], 0x20
je 0x403274
cmp byte [eax], 0x22
mov byte [esp + 0x14], 0x20
jne 0x40328a
inc eax
mov byte [esp + 0x14], 0x22
cmp byte [eax], 0x2f
jne 0x4032c2
inc eax
cmp byte [eax], 0x53
jne 0x4032a3
mov cl, byte [eax + 1]
or cl, 0x20
cmp cl, 0x20
jne 0x4032a3
or ebx, 2
cmp dword [eax], 0x4352434e
jne 0x4032b9
mov cl, byte [eax + 4]
or cl, 0x20
cmp cl, 0x20
jne 0x4032b9
or ebx, 4
cmp dword [eax - 2], 0x3d442f20
je 0x4032da
push dword [esp + 0x14]
push eax
call fcn.004054b5
cmp byte [eax], 0x22
jne 0x4032d2
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x40326f
jmp 0x4032ec
and byte [eax - 2], 0
add eax, 2
push eax
push 0x435400
call sub.KERNEL32.dll_lstrcpyA
push ebx
call fcn.00402c57
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x403362
cmp dword [0x42f034], ebx
je 0x403352
push ebx
push edi
call fcn.004054b5
mov esi, eax
jmp 0x403318
cmp dword [esi], 0x3d3f5f20
je 0x40331c
dec esi
cmp esi, edi
jae 0x40330f
cmp esi, edi
mov dword [esp + 0x10], str.Error_launching_installer
jb 0x40338e
and byte [esi], 0
add esi, 4
push esi
call fcn.0040556a
test eax, eax
je 0x403362
push esi
push 0x435400
call sub.KERNEL32.dll_lstrcpyA
push esi
push 0x435800
call sub.KERNEL32.dll_lstrcpyA
mov dword [esp + 0x10], ebx
or dword [0x42f0cc], 0xffffffff
call fcn.00403563
mov dword [esp + 0x18], eax
call fcn.0040353e
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x10], 0
je 0x403481
push 0x200010
push dword [esp + 0x14]
call fcn.00405294
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [esp + 0x14], ebx
mov edi, 0x429059
mov esi, 0x429058
mov ebx, 0x428c58
push 0x436400
push edi
mov byte [0x429058], 0x22
call sub.KERNEL32.dll_lstrcpyA
push str.ANSISu_.exe
push esi
call ebp
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0x10], 0
je 0x403467
push 0x400
push ebx
push dword [0x42f020]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [eax + 0x428c4d]
push 0x409199
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x403362
push 0
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x403467
push 0
push edi
call fcn.004056c0
cmp byte [0x435400], 0
je 0x403425
push 0x435400
push ebx
call sub.KERNEL32.dll_lstrcpyA
jmp 0x40342b
push ebx
call fcn.004054d1
push 0x409218
push esi
call ebp
push dword [esp + 0x1c]
push esi
call ebp
push str.___
push esi
call ebp
push ebx
push esi
call ebp
push esi
call fcn.00405489
push 0x436400
push esi
call fcn.0040521c
test eax, eax
je 0x403467
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esp + 0x10], 0
inc byte [str.ANSISu_.exe]
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 0x1a
jl 0x4033a1
jmp 0x403362
cmp dword [0x42f0b4], 0
je 0x403526
push str.ADVAPI32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
je 0x403511
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.OpenProcessToken
push edi
call esi
push str.LookupPrivilegeValueA
push edi
mov ebp, eax
call esi
push str.AdjustTokenPrivileges
push edi
mov ebx, eax
call esi
test ebp, ebp
mov edi, eax
je 0x403511
test ebx, ebx
je 0x403511
test edi, edi
je 0x403511
lea eax, [esp + 0x1c]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call ebp
test eax, eax
je 0x403511
lea eax, [esp + 0x24]
xor esi, esi
push eax
push str.SeShutdownPrivilege
push esi
call ebx
push esi
push esi
lea eax, [esp + 0x28]
push esi
push eax
push esi
push dword [esp + 0x30]
mov dword [esp + 0x38], 1
mov dword [esp + 0x44], 2
call edi
push 0
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403526
push 9
call fcn.0040141b
mov eax, dword [0x42f0cc]
cmp eax, 0xffffffff
je 0x403534
mov dword [esp + 0x18], eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_ExitProcess]