Function at 0x40347f
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 [0x5931b8], 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 [0x597cf8], eax
call fcn.00405b67
mov esi, dword [sym.imp.USER32.dll_RegisterWindowMessageA]
push str.EST_INTROTEXT
mov dword [0x597c00], eax
call esi
push str.EST_PROGRESSLEN
mov dword [0x409020], eax
call esi
push str.EST_PROGRESSPOS
mov dword [0x409024], eax
call esi
push str.EST_ERRORCODE
mov dword [0x409028], eax
call esi
push str.EST_EXITCODE
mov dword [0x40902c], eax
call esi
push ebx
push 0x160
mov dword [0x409030], eax
lea eax, [ebp - 0x184]
push eax
push ebx
push 0x4074a7
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
push str.NSIS_Error
push 0x597400
call fcn.00405a84
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
mov edi, 0x59d000
push edi
call fcn.00405a84
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp byte [0x59d000], 0x22
mov dword [0x597c08], eax
mov eax, edi
jne 0x40356e
mov byte [ebp - 0xc], 0x22
mov eax, 0x59d001
push dword [ebp - 0xc]
push eax
call fcn.00405803
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
mov dword [ebp - 0x14], esi
jmp 0x40360c
cmp al, 0x20
jne 0x403592
inc esi
cmp byte [esi], 0x20
je 0x40358c
cmp byte [esi], 0x22
mov byte [ebp - 0xc], 0x20
jne 0x4035a0
inc esi
mov byte [ebp - 0xc], 0x22
cmp byte [esi], 0x2f
jne 0x4035fb
inc esi
mov al, byte [esi]
cmp al, 0x53
jne 0x4035bb
mov cl, byte [esi + 1]
or cl, 0x20
cmp cl, 0x20
jne 0x4035bb
or dword [ebp - 4], 2
cmp dword [esi], 0x4352434e
jne 0x4035d2
mov cl, byte [esi + 4]
or cl, 0x20
cmp cl, 0x20
jne 0x4035d2
or dword [ebp - 4], 4
cmp dword [esi - 2], 0x3d442f20
je 0x403618
cmp al, 0x68
je 0x4035e3
cmp al, 0x48
jne 0x4035ea
push esi
call fcn.004033a9
pop ecx
mov al, byte [esi]
cmp al, 0x51
je 0x4035f4
cmp al, 0x71
jne 0x4035fb
push esi
call fcn.004033d1
pop ecx
push dword [ebp - 0xc]
push esi
call fcn.00405803
mov esi, eax
cmp byte [esi], 0x22
jne 0x40360c
inc esi
mov al, byte [esi]
test al, al
jne 0x403588
jmp 0x403629
mov dword [esi - 2], ebx
add esi, 2
push esi
push 0x59d400
call fcn.00405a84
mov ebx, 0x59e400
push ebx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call fcn.00403409
test eax, eax
jne 0x403663
push 0x3fb
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.Temp
push ebx
call sub.KERNEL32.dll_lstrcatA
call fcn.00403409
test eax, eax
je 0x4036e1
push 0x59e000
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 4]
call fcn.004030a0
test eax, eax
mov dword [ebp - 8], eax
jne 0x4036e1
cmp dword [0x597c64], eax
je 0x4036d2
push eax
push edi
call fcn.00405803
mov esi, eax
jmp 0x403699
cmp dword [esi], 0x3d3f5f20
je 0x40369d
dec esi
cmp esi, edi
jae 0x403690
cmp esi, edi
mov dword [ebp - 8], str.Error_launching_installer
jb 0x403722
mov byte [esi], 0
add esi, 4
push esi
call fcn.00405c63
test eax, eax
je 0x4036e1
push esi
push 0x59d400
call fcn.00405a84
push esi
push 0x59d800
call fcn.00405a84
and dword [ebp - 8], 0
or dword [0x597cec], 0xffffffff
call fcn.00405418
mov dword [ebp - 0x10], eax
call fcn.0040343d
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [ebp - 8], 0
je 0x4037f7
push 0x200010
push dword [ebp - 8]
call fcn.0040579f
push dword [ebp - 8]
push dword [0x5931b8]
push dword [0x40902c]
call fcn.00403358
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 0x4036e1
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 0x403763
push esi
push 0x59d400
call fcn.00405a84
push dword [ebp - 0x14]
push section..ndata
call fcn.00405a84
mov word [0x598400], 0x41
mov dword [ebp - 4], 0x1a
mov esi, 0x592db0
mov eax, dword [0x597c0c]
push dword [eax + 0x120]
push esi
call fcn.00405d3b
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 8], edi
je 0x4037e0
push 1
push esi
push 0x59ec00
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x4037e0
push edi
push esi
call fcn.00405f91
mov eax, dword [0x597c0c]
push dword [eax + 0x124]
push esi
call fcn.00405d3b
push esi
call fcn.0040573e
cmp eax, edi
je 0x4037e0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 8], edi
inc byte [0x598400]
dec dword [ebp - 4]
jne 0x403785
push edi
push ebx
call fcn.00405f91
jmp 0x4036e1
cmp dword [0x597cd4], 0
je 0x40387a
push 3
call fcn.00405b67
push 4
mov dword [ebp - 4], eax
call fcn.00405b67
push 5
mov esi, eax
call fcn.00405b67
xor edi, edi
cmp dword [ebp - 4], edi
mov ebx, eax
je 0x403866
cmp esi, edi
je 0x403866
cmp ebx, edi
je 0x403866
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 0x403866
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 0x40387a
push 9
call fcn.0040144f
mov eax, dword [0x597cec]
cmp eax, 0xffffffff
je 0x403887
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
push dword [0x5931b8]
push dword [0x409030]
call fcn.00403358
add esp, 0xc
push dword [ebp - 0x10]
jmp 0x40371c