Function at 0x4039ac
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
push 8
mov dword [0x424c88], eax
call fcn.0040628e
push 0
push 0x160
mov dword [0x424d38], eax
lea eax, [ebp - 0x170]
push eax
push 0
push 0x40a2a4
call sub.SHELL32.DLL_SHGetFileInfoA
sub esp, 0xc
push str.NSIS_Error
push 0x424d68
call fcn.004064fd
add esp, 0x18
call sub.KERNEL32.dll_GetCommandLineA
push edx
push edx
push eax
push 0x42d000
call fcn.004064fd
push edi
push 0
call sub.KERNEL32.dll_GetModuleHandleA
add esp, 0xc
cmp byte [0x42d000], 0x22
mov dword [0x424d58], eax
je 0x403a45
mov edx, 0x42d000
mov al, 0x20
jmp 0x403a4c
mov edx, 0x42d001
mov al, 0x22
push esi
movsx eax, al
push esi
push eax
push edx
call fcn.00406310
push ebx
xor ebx, ebx
push eax
call fcn.00407e6c
mov esi, eax
mov edx, eax
add esp, 0xc
jmp 0x403ae7
inc edx
mov al, byte [edx]
cmp al, 0x20
je 0x403a6a
cmp al, 0x22
mov cl, 0x20
jne 0x403a7a
inc edx
mov cl, 0x22
cmp byte [edx], 0x2f
jne 0x403acd
inc edx
cmp byte [edx], 0x53
jne 0x403a92
mov al, byte [edx + 1]
or eax, 0x20
cmp al, 0x20
jne 0x403a92
or ebx, 2
cmp dword [edx], 0x4352434e
jne 0x403aa7
mov al, byte [edx + 4]
or eax, 0x20
cmp al, 0x20
jne 0x403aa7
or ebx, 4
cmp dword [edx - 2], 0x3d442f20
lea eax, [edx - 2]
jne 0x403acd
mov dword [eax], 0
lea eax, [edx + 2]
push ecx
push ecx
push eax
push 0x42d400
call fcn.004064fd
pop eax
pop edx
jmp 0x403af0
push eax
push eax
movsx eax, cl
push eax
push edx
call fcn.00406310
pop edi
mov edx, eax
pop eax
xor eax, eax
cmp byte [edx], 0x22
sete al
add edx, eax
cmp byte [edx], 0
jne 0x403a6b
push ecx
push ecx
push 0x42e400
push 0x400
call sub.KERNEL32.dll_GetTempPathA
pop eax
pop edx
call fcn.00403955
test eax, eax
jne 0x403b43
push eax
push eax
push 0x3fb
push 0x42e400
call sub.KERNEL32.dll_GetWindowsDirectoryA
push str.Temp
push 0x42e400
call fcn.00406479
pop edi
pop eax
call fcn.00403955
test eax, eax
jne 0x403b43
xor esi, esi
mov ebx, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
jmp 0x403cf7
sub esp, 0xc
push 0x42e000
call sub.KERNEL32.dll_DeleteFileA
push ebx
call fcn.0040351b
add esp, 0xc
test eax, eax
je 0x403b66
mov ebx, eax
xor esi, esi
jmp 0x403cf7
cmp dword [0x424d18], 0
je 0x403ce4
push ebx
push ebx
push 0
push 0x42d000
call fcn.00406310
pop edx
pop ecx
jmp 0x403b86
dec eax
cmp eax, 0x42d000
jb 0x403b9a
cmp dword [eax], 0x3d3f5f20
jne 0x403b85
jmp 0x403ddf
push eax
push eax
push str.nsu.tmp
push 0x42e400
call fcn.00406479
push 0x42dc00
push 0x42e400
call sub.KERNEL32.dll_lstrcmpiA
pop ebx
pop edi
test eax, eax
je 0x403df9
jmp 0x403be5
push ecx
push ecx
push ebx
push 0x42d400
call fcn.004064fd
push ebx
push 0x42d800
call fcn.004064fd
pop eax
pop edx
jmp 0x403ce4
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 0x403c1d
push eax
push eax
push 0x42dc00
push 0x42d400
call fcn.004064fd
pop ebx
pop edi
push ecx
mov ebx, str.Error_launching_installer
push ecx
push esi
xor esi, esi
push section..ndata
call fcn.004064fd
mov word [0x428400], 0x41
pop eax
pop edx
push eax
push eax
mov eax, dword [0x424ca8]
push dword [eax + 0x120]
push 0x420d60
call fcn.004065b4
push edi
push 0x420d60
call sub.KERNEL32.dll_DeleteFileA
add esp, 0xc
test ebx, ebx
je 0x403cbf
push ecx
push 1
push 0x420d60
push 0x42ec00
call sub.KERNEL32.dll_CopyFileA
pop edx
test eax, eax
je 0x403cbf
push eax
push eax
push 0
push 0x420d60
call fcn.00406a6b
mov eax, dword [0x424ca8]
push dword [eax + 0x124]
push 0x420d60
call fcn.004065b4
push eax
push 0x420d60
call fcn.00406f74
add esp, 0xc
test eax, eax
je 0x403cbf
sub esp, 0xc
xor ebx, ebx
push eax
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
inc esi
inc byte [0x428400]
cmp esi, 0x1a
jne 0x403c3c
push eax
xor si, si
push eax
push 0
push 0x42e400
call fcn.00406a6b
pop edi
pop eax
jmp 0x403cf7
mov dword [0x424c74], 0xffffffff
xor ebx, ebx
call fcn.00405dd6
mov esi, eax
call fcn.004038f8
call sub.OLE32.dll_OleUninitialize
test ebx, ebx
je 0x403d1a
push esi
push esi
push 0x200010
push ebx
call fcn.00406edd
push ebx
push 2
jmp 0x403dda
cmp dword [0x424c5c], 0
je 0x403dca
sub esp, 0xc
push 3
call fcn.0040628e
push 4
mov ebx, eax
call fcn.0040628e
push 5
mov edi, eax
call fcn.0040628e
add esp, 0xc
test ebx, ebx
mov dword [ebp - 0x180], eax
je 0x403dac
test edi, edi
je 0x403dac
test eax, eax
je 0x403dac
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 0x403dac
lea eax, [ebp - 0x16c]
push ebx
push eax
push str.SeShutdownPrivilege
push 0
call edi
lea ebx, [ebp - 0x170]
mov dword [ebp - 0x170], 1
mov dword [ebp - 0x164], 2
push ecx
push 0
push 0
push 0
push ebx
push 0
push dword [ebp - 0x10]
call dword [ebp - 0x180]
pop eax
pop edx
push eax
push eax
push 0
push 2
call sub.USER32.dll_ExitWindowsEx
pop ebx
pop edi
test eax, eax
jne 0x403dca
sub esp, 0xc
push 9
call fcn.004030d7
add esp, 0xc
mov eax, dword [0x424c74]
cmp eax, 0xffffffff
jne 0x403dd6
mov eax, esi
sub esp, 0xc
push eax
call sub.KERNEL32.dll_ExitProcess
sub esp, 0xc
lea ebx, [eax + 4]
mov byte [eax], 0
push ebx
call fcn.004068dc
add esp, 0xc
test eax, eax
jne 0x403bc6
xor esi, esi
mov ebx, str.Error_launching_installer
jmp 0x403cf7