Function at 0x40406c
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, 0x1ac
call sub.COMCTL32.DLL_InitCommonControls
mov dword [esp], 0x8001
call sub.KERNEL32.dll_SetErrorMode
push esi
mov dword [esp], 0
call sub.OLE32.dll_OleInitialize
push ebx
mov dword [0x430814], eax
mov dword [esp], 8
call fcn.004072e6
mov dword [0x4308c4], eax
lea eax, [ebp - 0x17c]
push ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x160
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x40b2a4
call sub.SHELL32.DLL_SHGetFileInfoA
sub esp, 0x14
mov dword [esp + 4], str.NSIS_Error
mov dword [esp], 0x4308f4
call fcn.0040756a
push edx
push edx
call sub.KERNEL32.dll_GetCommandLineA
mov dword [esp], 0x439000
mov dword [esp + 4], eax
call fcn.0040756a
push eax
push eax
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleHandleA
cmp byte [0x439000], 0x22
push edi
mov dword [0x4308e4], eax
je 0x404130
mov eax, 0x439000
mov dl, 0x20
jmp 0x404137
mov eax, 0x439001
mov dl, 0x22
movsx edx, dl
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040736c
push esi
push esi
mov dword [esp], eax
call fcn.004096c0
mov esi, eax
push ebx
xor ebx, ebx
jmp 0x4041df
inc eax
mov dl, byte [eax]
cmp dl, 0x20
je 0x40415a
cmp dl, 0x22
mov cl, 0x20
jne 0x40416c
inc eax
mov cl, 0x22
cmp byte [eax], 0x2f
jne 0x4041c4
inc eax
cmp byte [eax], 0x53
jne 0x404185
mov dl, byte [eax + 1]
or edx, 0x20
cmp dl, 0x20
jne 0x404185
or ebx, 2
cmp dword [eax], 0x4352434e
jne 0x40419b
mov dl, byte [eax + 4]
or edx, 0x20
cmp dl, 0x20
jne 0x40419b
or ebx, 4
cmp dword [eax - 2], 0x3d442f20
lea edx, [eax - 2]
jne 0x4041c4
mov dword [edx], 0
add eax, 2
mov dword [esp + 4], eax
mov dword [esp], 0x439400
call fcn.0040756a
push ecx
push ecx
jmp 0x4041e8
movsx ecx, cl
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040736c
push edx
push edx
xor edx, edx
cmp byte [eax], 0x22
sete dl
add eax, edx
cmp byte [eax], 0
jne 0x40415b
mov dword [esp + 4], 0x43a400
mov dword [esp], 0x400
call sub.KERNEL32.dll_GetTempPathA
push edi
push edi
call fcn.00404009
test eax, eax
jne 0x404243
mov dword [esp + 4], 0x3fb
mov dword [esp], 0x43a400
call sub.KERNEL32.dll_GetWindowsDirectoryA
push ecx
push ecx
mov dword [esp + 4], str.Temp
mov dword [esp], 0x43a400
call fcn.004074d6
push edx
push edx
call fcn.00404009
test eax, eax
jne 0x404243
mov ebx, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
jmp 0x40425f
mov dword [esp], 0x43a000
call sub.KERNEL32.dll_DeleteFileA
push eax
mov dword [esp], ebx
call fcn.00403af6
test eax, eax
push edi
je 0x404266
mov ebx, eax
xor esi, esi
jmp 0x404441
cmp dword [0x4308a4], 0
je 0x40442e
mov dword [esp + 4], 0
mov dword [esp], 0x439000
call fcn.0040736c
push ebx
push ebx
jmp 0x40428c
dec eax
cmp eax, 0x439000
jb 0x4042a0
cmp dword [eax], 0x3d3f5f20
jne 0x40428b
jmp 0x40459a
mov dword [esp + 4], str.nsu.tmp
mov dword [esp], 0x43a400
call fcn.004074d6
push ecx
push ecx
mov dword [esp + 4], 0x439c00
mov dword [esp], 0x43a400
call sub.KERNEL32.dll_lstrcmpiA
test eax, eax
push edx
push edx
je 0x4045b1
jmp 0x4042ff
mov dword [esp + 4], ebx
mov dword [esp], 0x439400
call fcn.0040756a
push edi
push edi
mov dword [esp + 4], ebx
mov dword [esp], 0x439800
call fcn.0040756a
push esi
push esi
jmp 0x40442e
mov dword [esp + 4], 0
mov dword [esp], 0x43a400
call sub.KERNEL32.dll_CreateDirectoryA
push ebx
push ebx
mov dword [esp], 0x43a400
call sub.KERNEL32.dll_SetCurrentDirectoryA
cmp byte [0x439400], 0
push ecx
jne 0x404341
mov dword [esp + 4], 0x439c00
mov dword [esp], 0x439400
call fcn.0040756a
push edx
push edx
mov dword [esp + 4], esi
mov ebx, str.Error_launching_installer
xor esi, esi
mov dword [esp], section..ndata
call fcn.0040756a
mov word [0x434400], 0x41
push eax
push eax
mov eax, dword [0x430834]
mov eax, dword [eax + 0x120]
mov dword [esp], 0x42b820
mov dword [esp + 4], eax
call fcn.0040765b
push edi
push edi
mov dword [esp], 0x42b820
call sub.KERNEL32.dll_DeleteFileA
test ebx, ebx
push ecx
je 0x404403
mov dword [esp + 8], 1
mov dword [esp + 4], 0x42b820
mov dword [esp], 0x43ac00
call sub.KERNEL32.dll_CopyFileA
sub esp, 0xc
test eax, eax
je 0x404403
mov dword [esp + 4], 0
mov dword [esp], 0x42b820
call fcn.00407b44
mov eax, dword [0x430834]
push edx
push edx
mov eax, dword [eax + 0x124]
mov dword [esp], 0x42b820
mov dword [esp + 4], eax
call fcn.0040765b
push eax
push eax
mov dword [esp], 0x42b820
call fcn.00408152
test eax, eax
push edi
je 0x404403
mov dword [esp], eax
xor ebx, ebx
call sub.KERNEL32.dll_CloseHandle
push ecx
inc esi
inc byte [0x434400]
cmp esi, 0x1a
jne 0x404363
mov dword [esp + 4], 0
xor si, si
mov dword [esp], 0x43a400
call fcn.00407b44
push edx
push edx
jmp 0x404441
mov dword [0x430800], 0xffffffff
xor ebx, ebx
call fcn.00406d5b
mov esi, eax
call fcn.00403fac
call sub.OLE32.dll_OleUninitialize
test ebx, ebx
je 0x40446d
mov dword [esp + 4], 0x200010
mov dword [esp], ebx
call fcn.004080a7
push eax
push eax
mov dword [esp], 2
jmp 0x404595
cmp dword [0x4307e8], 0
je 0x404586
mov dword [esp], 3
call fcn.004072e6
push edi
mov dword [ebp - 0x18c], eax
mov dword [esp], 4
call fcn.004072e6
push ebx
mov edi, eax
mov dword [esp], 5
call fcn.004072e6
test edi, edi
mov ebx, eax
push ecx
je 0x40455f
cmp dword [ebp - 0x18c], 0
je 0x40455f
test eax, eax
je 0x40455f
call sub.KERNEL32.dll_GetCurrentProcess
lea edx, [ebp - 0x1c]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x28
mov dword [esp], eax
call dword [ebp - 0x18c]
sub esp, 0xc
test eax, eax
je 0x40455f
lea edx, [ebp - 0x17c]
lea eax, [ebp - 0x178]
mov dword [ebp - 0x190], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str.SeShutdownPrivilege
mov dword [esp], 0
call edi
mov edx, dword [ebp - 0x190]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x17c], 1
mov dword [ebp - 0x170], 2
sub esp, 0xc
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call ebx
sub esp, 0x18
mov dword [esp + 4], 0
mov dword [esp], 2
call sub.USER32.dll_ExitWindowsEx
test eax, eax
push edx
push edx
jne 0x404586
mov dword [esp], 9
call fcn.004035b2
push edi
mov eax, dword [0x430800]
cmp eax, 0xffffffff
jne 0x404592
mov eax, esi
mov dword [esp], eax
call sub.KERNEL32.dll_ExitProcess
mov byte [eax], 0
lea ebx, [eax + 4]
mov dword [esp], ebx
call fcn.00407999
test eax, eax
push esi
jne 0x4042d6
mov ebx, str.Error_launching_installer
jmp 0x40425f