Function at 0x403987
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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x17c
call sub.COMCTL32.DLL_InitCommonControls
sub esp, 0xc
push 0x8001
call sub.KERNEL32.dll_SetErrorMode
push 0
call sub.OLE32.dll_OleInitialize
mov dword [0x424c78], eax
push 8
call fcn.004060ef
mov dword [0x424d28], eax
lea eax, [ebp - 0x170]
push 0
push 0x160
push eax
push 0
push 0x40a2a4
call sub.SHELL32.DLL_SHGetFileInfoA
sub esp, 0xc
push str.NSIS_Error
push 0x424d58
call fcn.00406340
add esp, 0x18
call sub.KERNEL32.dll_GetCommandLineA
push edx
push edx
push eax
push 0x42d000
call fcn.00406340
push edi
push 0
call sub.KERNEL32.dll_GetModuleHandleA
add esp, 0xc
mov dword [0x424d48], eax
cmp byte [0x42d000], 0x22
je 0x403a20
mov edx, 0x42d000
mov al, 0x20
jmp 0x403a27
mov edx, 0x42d001
mov al, 0x22
movsx eax, al
push esi
push esi
push eax
push edx
call fcn.00406171
push ebx
push eax
call fcn.00407fa0
xor ebx, ebx
mov edi, eax
mov edx, eax
add esp, 0xc
jmp 0x403ac0
inc edx
mov al, byte [edx]
cmp al, 0x20
je 0x403a45
mov cl, 0x20
cmp al, 0x22
jne 0x403a55
inc edx
mov cl, 0x22
cmp byte [edx], 0x2f
jne 0x403aa6
inc edx
cmp byte [edx], 0x53
jne 0x403a6d
mov al, byte [edx + 1]
or eax, 0x20
cmp al, 0x20
jne 0x403a6d
or ebx, 2
cmp dword [edx], 0x4352434e
jne 0x403a82
mov al, byte [edx + 4]
or eax, 0x20
cmp al, 0x20
jne 0x403a82
or ebx, 4
cmp dword [edx - 2], 0x3d442f20
jne 0x403aa6
mov dword [edx - 2], 0
lea eax, [edx + 2]
push ecx
push ecx
push eax
push 0x42d400
call fcn.00406340
pop eax
pop edx
jmp 0x403ac5
push eax
push eax
movsx eax, cl
push eax
push edx
call fcn.00406171
mov edx, eax
pop esi
pop eax
xor eax, eax
cmp byte [edx], 0x22
sete al
add edx, eax
cmp byte [edx], 0
jne 0x403a46
push ecx
push ecx
push 0x42e400
push 0x400
call sub.KERNEL32.dll_GetTempPathA
pop eax
pop edx
call fcn.00403930
test eax, eax
jne 0x403b20
push eax
push eax
push 0x3fb
push 0x42e400
call sub.KERNEL32.dll_GetWindowsDirectoryA
push str.Temp
push 0x42e400
call fcn.004062bc
pop esi
pop eax
call fcn.00403930
test eax, eax
jne 0x403b20
mov esi, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [ebp - 0x180], 0
jmp 0x403d03
sub esp, 0xc
push 0x42e000
call sub.KERNEL32.dll_DeleteFileA
push ebx
call fcn.00403530
mov dword [ebp - 0x180], 0
add esp, 0xc
mov esi, eax
test eax, eax
jne 0x403d03
cmp dword [0x424d08], 0
je 0x403cee
push ebx
push ebx
push 0
push 0x42d000
call fcn.00406171
pop edx
pop ecx
jmp 0x403b6a
dec eax
cmp eax, 0x42d000
jb 0x403bae
cmp dword [eax], 0x3d3f5f20
jne 0x403b69
sub esp, 0xc
mov byte [eax], 0
lea ebx, [eax + 4]
push ebx
call fcn.0040670e
add esp, 0xc
test eax, eax
je 0x403bd4
push eax
push eax
push ebx
push 0x42d400
call fcn.00406340
push ebx
push 0x42d800
call fcn.00406340
pop edi
pop eax
jmp 0x403cee
push ebx
push ebx
push str.nsu.tmp
push 0x42e400
call fcn.004062bc
push 0x42dc00
push 0x42e400
call sub.KERNEL32.dll_lstrcmpiA
pop edx
test eax, eax
pop ecx
jne 0x403be8
mov esi, str.Error_launching_installer
mov dword [ebp - 0x180], 0
jmp 0x403d03
push eax
push eax
push 0
push 0x42e400
call sub.KERNEL32.dll_CreateDirectoryA
push eax
push 0x42e400
call sub.KERNEL32.dll_SetCurrentDirectoryA
add esp, 0xc
cmp byte [0x42d400], 0
jne 0x403c20
push eax
push eax
push 0x42dc00
push 0x42d400
call fcn.00406340
pop ebx
pop esi
push ecx
push ecx
push edi
push section..ndata
call fcn.00406340
mov esi, str.Error_launching_installer
pop eax
mov word [0x428400], 0x41
xor ebx, ebx
pop edx
push eax
push eax
mov eax, dword [0x424c98]
push dword [eax + 0x120]
push 0x420d60
call fcn.004063f7
push edi
push 0x420d60
call sub.KERNEL32.dll_DeleteFileA
add esp, 0xc
test esi, esi
je 0x403cc2
push ecx
push 1
push 0x420d60
push 0x42ec00
call sub.KERNEL32.dll_CopyFileA
pop edx
test eax, eax
je 0x403cc2
push eax
push eax
push 0
push 0x420d60
call fcn.00406897
mov eax, dword [0x424c98]
push dword [eax + 0x124]
push 0x420d60
call fcn.004063f7
push edi
push 0x420d60
call fcn.00406d9a
add esp, 0xc
test eax, eax
je 0x403cc2
sub esp, 0xc
xor esi, esi
push eax
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
inc ebx
inc byte [0x428400]
cmp ebx, 0x1a
jne 0x403c3f
push ecx
push ecx
push 0
push 0x42e400
call fcn.00406897
mov dword [ebp - 0x180], 0
pop eax
pop edx
jmp 0x403d03
mov dword [0x424c64], 0xffffffff
call fcn.00405c46
mov dword [ebp - 0x180], eax
call fcn.004038d8
call sub.OLE32.dll_OleUninitialize
test esi, esi
je 0x403d26
push edi
push edi
push 0x200010
push esi
call fcn.00406d03
push ebx
push 2
jmp 0x403de7
cmp dword [0x424c4c], 0
je 0x403dce
sub esp, 0xc
push 3
call fcn.004060ef
mov ebx, eax
push 4
call fcn.004060ef
mov esi, eax
push 5
call fcn.004060ef
add esp, 0xc
mov edi, eax
test ebx, ebx
je 0x403db0
test esi, esi
je 0x403db0
test eax, eax
je 0x403db0
call sub.KERNEL32.dll_GetCurrentProcess
lea edx, [ebp - 0x10]
push ecx
push edx
push 0x28
push eax
call ebx
pop edx
test eax, eax
je 0x403db0
lea eax, [ebp - 0x16c]
push ebx
push eax
push str.SeShutdownPrivilege
push 0
call esi
lea ebx, [ebp - 0x170]
mov dword [ebp - 0x170], 1
push ecx
push 0
push 0
push 0
push ebx
push 0
push dword [ebp - 0x10]
mov dword [ebp - 0x164], 2
call edi
pop eax
pop edx
push edi
push edi
push 0
push 2
call sub.USER32.dll_ExitWindowsEx
pop ebx
test eax, eax
pop esi
jne 0x403dce
sub esp, 0xc
push 9
call fcn.004030ef
add esp, 0xc
mov eax, dword [0x424c64]
cmp eax, 0xffffffff
je 0x403dde
mov dword [ebp - 0x180], eax
sub esp, 0xc
push dword [ebp - 0x180]
call sub.KERNEL32.dll_ExitProcess