Function at 0x403317
Capabilities:
Accept command line arguments
Copy file
Create directory
Delete file
Get common file path
Get file system object information
Set current directory
Shutdown system
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x184
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [ebp - 4], ebx
mov byte [ebp - 0xc], 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x5931a8], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
push 8
mov dword [0x597cd8], eax
call fcn.004059ff
mov esi, dword [sym.imp.USER32.dll_RegisterWindowMessageA]
push str.EST_INTROTEXT
mov dword [0x597be0], eax
call esi
push str.EST_PROGRESSLEN
mov dword [0x40901c], eax
call esi
push str.EST_PROGRESSPOS
mov dword [0x409020], eax
call esi
push str.EST_ERRORCODE
mov dword [0x409024], eax
call esi
push str.EST_EXITCODE
mov dword [0x409028], eax
call esi
push ebx
push 0x160
mov dword [0x40902c], eax
lea eax, [ebp - 0x184]
push eax
push ebx
push 0x407447
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
push str.NSIS_Error
push 0x5973e0
call fcn.0040591c
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
mov edi, 0x59d000
push edi
call fcn.0040591c
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp byte [0x59d000], 0x22
mov dword [0x597be8], eax
mov eax, edi
jne 0x403406
mov byte [ebp - 0xc], 0x22
mov eax, 0x59d001
push dword [ebp - 0xc]
push eax
call fcn.0040569b
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
mov dword [ebp - 0x14], esi
jmp 0x4034a4
cmp al, 0x20
jne 0x40342a
inc esi
cmp byte [esi], 0x20
je 0x403424
cmp byte [esi], 0x22
mov byte [ebp - 0xc], 0x20
jne 0x403438
inc esi
mov byte [ebp - 0xc], 0x22
cmp byte [esi], 0x2f
jne 0x403493
inc esi
mov al, byte [esi]
cmp al, 0x53
jne 0x403453
mov cl, byte [esi + 1]
or cl, 0x20
cmp cl, 0x20
jne 0x403453
or dword [ebp - 4], 2
cmp dword [esi], 0x4352434e
jne 0x40346a
mov cl, byte [esi + 4]
or cl, 0x20
cmp cl, 0x20
jne 0x40346a
or dword [ebp - 4], 4
cmp dword [esi - 2], 0x3d442f20
je 0x4034b0
cmp al, 0x68
je 0x40347b
cmp al, 0x48
jne 0x403482
push esi
call fcn.00403259
pop ecx
mov al, byte [esi]
cmp al, 0x51
je 0x40348c
cmp al, 0x71
jne 0x403493
push esi
call fcn.00403281
pop ecx
push dword [ebp - 0xc]
push esi
call fcn.0040569b
mov esi, eax
cmp byte [esi], 0x22
jne 0x4034a4
inc esi
mov al, byte [esi]
test al, al
jne 0x403420
jmp 0x4034c1
mov dword [esi - 2], ebx
add esi, 2
push esi
push 0x59d400
call fcn.0040591c
mov ebx, 0x59e400
push ebx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call fcn.004032b9
test eax, eax
jne 0x4034fb
push 0x3fb
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.Temp
push ebx
call sub.KERNEL32.dll_lstrcatA
call fcn.004032b9
test eax, eax
je 0x403579
push 0x59e000
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 4]
call fcn.00402fa6
test eax, eax
mov dword [ebp - 8], eax
jne 0x403579
cmp dword [0x597c44], eax
je 0x40356a
push eax
push edi
call fcn.0040569b
mov esi, eax
jmp 0x403531
cmp dword [esi], 0x3d3f5f20
je 0x403535
dec esi
cmp esi, edi
jae 0x403528
cmp esi, edi
mov dword [ebp - 8], str.Error_launching_installer
jb 0x4035ba
mov byte [esi], 0
add esi, 4
push esi
call fcn.00405afb
test eax, eax
je 0x403579
push esi
push 0x59d400
call fcn.0040591c
push esi
push 0x59d800
call fcn.0040591c
and dword [ebp - 8], 0
or dword [0x597ccc], 0xffffffff
call fcn.004052b0
mov dword [ebp - 0x10], eax
call fcn.004032ed
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [ebp - 8], 0
je 0x40368f
push 0x200010
push dword [ebp - 8]
call fcn.00405637
push dword [ebp - 8]
push dword [0x5931a8]
push dword [0x409028]
call fcn.00403208
add esp, 0xc
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push str.nsu.tmp
push ebx
call sub.KERNEL32.dll_lstrcatA
mov esi, 0x59dc00
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x403579
xor edi, edi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp byte [0x59d400], 0
jne 0x4035fb
push esi
push 0x59d400
call fcn.0040591c
push dword [ebp - 0x14]
push section..ndata
call fcn.0040591c
mov word [0x598400], 0x41
mov dword [ebp - 4], 0x1a
mov esi, 0x592da0
mov eax, dword [0x597bec]
push dword [eax + 0x120]
push esi
call fcn.00405bd3
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 8], edi
je 0x403678
push 1
push esi
push 0x59ec00
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x403678
push edi
push esi
call fcn.00405e29
mov eax, dword [0x597bec]
push dword [eax + 0x124]
push esi
call fcn.00405bd3
push esi
call fcn.004055d6
cmp eax, edi
je 0x403678
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 8], edi
inc byte [0x598400]
dec dword [ebp - 4]
jne 0x40361d
push edi
push ebx
call fcn.00405e29
jmp 0x403579
cmp dword [0x597cb4], 0
je 0x403712
push 3
call fcn.004059ff
push 4
mov dword [ebp - 4], eax
call fcn.004059ff
push 5
mov esi, eax
call fcn.004059ff
xor edi, edi
cmp dword [ebp - 4], edi
mov ebx, eax
je 0x4036fe
cmp esi, edi
je 0x4036fe
cmp ebx, edi
je 0x4036fe
lea eax, [ebp - 0x14]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp - 4]
test eax, eax
je 0x4036fe
lea eax, [ebp - 0x20]
push eax
push str.SeShutdownPrivilege
push edi
call esi
push edi
push edi
push edi
lea eax, [ebp - 0x24]
push eax
push edi
push dword [ebp - 0x14]
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 2
call ebx
push edi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403712
push 9
call fcn.0040144f
mov eax, dword [0x597ccc]
cmp eax, 0xffffffff
je 0x40371f
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
push dword [0x5931a8]
push dword [0x40902c]
call fcn.00403208
add esp, 0xc
push dword [ebp - 0x10]
jmp 0x4035b4