Function at 0x405da4
Capabilities:
Accept command line arguments
Check os version
Copy file
Delete file
Get common file path
Get file system object information
Set current directory
Set environment variable
Shutdown system
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2fc
mov dword [esp], 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0xbfffffff
mov dword [0x44eae0], eax
cmp ax, 6
je 0x405def
mov dword [esp], 0
call fcn.00409dd0
push ebx
test eax, eax
je 0x405def
mov dword [esp], 0xc00
call eax
push ecx
mov ebx, str.UXTHEME
mov dword [esp], ebx
call fcn.00405c0c
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [ebx + eax + 1]
push edx
cmp byte [ebx], 0
jne 0x405df4
mov dword [esp], 0xa
call fcn.00409dd0
push ebx
mov dword [esp], 8
call fcn.00409dd0
push esi
mov dword [esp], 6
mov dword [0x44eae4], eax
call fcn.00409dd0
push edi
test eax, eax
je 0x405e58
mov dword [esp], 0x1e
call eax
push ecx
test eax, eax
je 0x405e58
or dword [0x44eae0], 0x40000000
call dword [sym.imp.COMCTL32.DLL_InitCommonControls]
mov dword [esp], 0
call dword [sym.imp.ole32.dll_OleInitialize]
mov dword [0x44ea58], eax
lea eax, [ebp - 0x2cc]
push edi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x2b4
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x40d0ba
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
sub esp, 0x14
mov dword [esp + 4], str.NSIS_Error
mov dword [esp], 0x44eb00
call fcn.0040a0ec
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ecx, dword [0x40da14]
add ecx, 0x28000
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [ebp - 0x2dc], ecx
call fcn.0040a0ec
push eax
push eax
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x44eaec], eax
mov eax, dword [0x40da14]
push edx
movzx eax, word [eax + 0x28000]
cmp eax, 0x22
jne 0x405f11
mov edx, dword [0x40da14]
add edx, 0x28002
jmp 0x405f1c
mov edx, dword [ebp - 0x2dc]
mov eax, 0x20
mov dword [esp], edx
xor edi, edi
mov dword [esp + 4], eax
call fcn.004080a4
push ebx
push ebx
mov dword [esp], eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x2e0], eax
push esi
cmp word [eax], 0
je 0x406003
movzx edx, word [eax]
cmp edx, 0x20
jne 0x405f53
add eax, 2
jmp 0x405f46
cmp edx, 0x22
jne 0x405f5d
add eax, 2
jmp 0x405f62
mov edx, 0x20
cmp word [eax], 0x2f
jne 0x405fe3
cmp word [eax + 2], 0x53
lea ebx, [eax + 2]
jne 0x405f88
mov cx, word [eax + 4]
and ecx, 0xffdf
jne 0x405f88
mov dword [0x44ea40], 1
cmp dword [eax + 6], 0x430052
jne 0x405fac
cmp dword [eax + 2], 0x43004e
jne 0x405fac
mov cx, word [eax + 0xa]
and ecx, 0xffdf
mov ecx, 4
cmove edi, ecx
cmp dword [eax + 2], 0x3d0044
jne 0x405fe1
cmp dword [eax - 2], 0x2f0020
jne 0x405fe1
mov word [eax - 2], 0
add eax, 6
mov dword [esp + 4], eax
mov eax, dword [0x40da14]
add eax, 0x2a000
mov dword [esp], eax
call fcn.0040a0ec
push ecx
push ecx
jmp 0x406003
mov eax, ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004080a4
push edx
push edx
cmp word [eax], 0x22
jne 0x405f3c
add eax, 2
jmp 0x405f3c
mov dword [esp], 0x1000
mov eax, dword [0x40da14]
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ebx, [eax + 0x32000]
mov dword [esp + 4], ebx
call esi
push eax
push eax
call fcn.0040786c
test eax, eax
je 0x40605a
mov eax, dword [0x40da14]
add eax, 0x30000
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edx
mov dword [esp], edi
xor edi, edi
call fcn.00409568
test eax, eax
mov esi, eax
push ecx
jne 0x406342
jmp 0x4060e4
mov dword [esp + 4], 0xffb
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push eax
push eax
mov dword [esp + 4], str.Temp
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
call fcn.0040786c
test eax, eax
jne 0x40602c
mov dword [esp + 4], ebx
mov dword [esp], 0xffc
call esi
push esi
push esi
mov dword [esp + 4], 0x40d0de
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push eax
push eax
mov dword [esp + 4], ebx
mov dword [esp], str.TEMP
call esi
push eax
push eax
mov dword [esp + 4], ebx
mov dword [esp], 0x40d0f0
call esi
push eax
push eax
call fcn.0040786c
test eax, eax
jne 0x40602c
mov esi, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
jmp 0x406340
cmp dword [0x44eac8], 0
je 0x406320
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x2dc]
mov dword [esp], eax
call fcn.004080a4
push ecx
push ecx
cmp dword [ebp - 0x2dc], eax
ja 0x40617b
cmp dword [eax + 4], 0x3d003f
je 0x40611f
sub eax, 2
jmp 0x406109
cmp dword [eax], 0x5f0020
jne 0x40611a
mov word [eax], 0
lea ebx, [eax + 8]
mov dword [esp], ebx
call fcn.004094b4
push edx
test eax, eax
jne 0x406146
mov esi, str.Error_launching_installer
jmp 0x406340
mov dword [esp + 4], ebx
mov eax, dword [0x40da14]
add eax, 0x2a000
mov dword [esp], eax
call fcn.0040a0ec
push eax
push eax
mov eax, dword [0x40da14]
mov dword [esp + 4], ebx
add eax, 0x2c000
mov dword [esp], eax
call fcn.0040a0ec
push eax
push eax
jmp 0x406320
call fcn.00407844
mov dword [esp + 4], str.nsu
mov dword [esp], ebx
mov esi, eax
call sub.KERNEL32.dll_lstrcatW
test esi, esi
push eax
push eax
je 0x4061aa
mov dword [esp + 4], 0x40d102
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
push edi
push edi
mov dword [esp + 4], str..tmp
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
mov eax, dword [0x40da14]
lea edi, [eax + 0x2e000]
push edx
push edx
mov dword [esp + 4], edi
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push ecx
test eax, eax
push ecx
je 0x40613c
test esi, esi
mov dword [esp], ebx
je 0x4061ec
call fcn.0040139c
jmp 0x4061f1
call fcn.0040136c
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push eax
mov eax, dword [0x40da14]
cmp word [eax + 0x2a000], 0
jne 0x40621e
mov dword [esp + 4], edi
add eax, 0x2a000
mov dword [esp], eax
call fcn.0040a0ec
push eax
push eax
mov eax, dword [ebp - 0x2e0]
mov edi, 0x1a
mov esi, str.Error_launching_installer
mov dword [esp + 4], eax
mov eax, dword [0x40da14]
mov dword [esp], eax
call fcn.0040a0ec
push eax
push eax
mov eax, dword [0x40da14]
mov dword [eax + 0x2000], 0x41
mov eax, dword [0x44ea60]
mov eax, dword [eax + 0x120]
mov dword [esp], 0x435c80
mov dword [esp + 4], eax
call fcn.00404e40
push ecx
push ecx
mov dword [esp], 0x435c80
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test esi, esi
push eax
je 0x4062f9
mov eax, dword [0x40da14]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x435c80
add eax, 0x36000
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
sub esp, 0xc
test eax, eax
je 0x4062f9
mov dword [esp + 4], 0
mov dword [esp], 0x435c80
call fcn.00405ce8
push eax
push eax
mov eax, dword [0x44ea60]
mov eax, dword [eax + 0x124]
mov dword [esp], 0x435c80
mov dword [esp + 4], eax
call fcn.00404e40
push eax
push eax
mov dword [esp], 0x435c80
call fcn.00409a60
push edx
test eax, eax
je 0x4062f9
mov dword [esp], eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov eax, dword [0x40da14]
inc word [eax + 0x2000]
dec edi
jne 0x406250
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.00405ce8
push eax
push eax
jmp 0x406340
mov dword [0x44ea4c], 0xffffffff
call fcn.0040a554
mov dword [esp], 1
mov edi, eax
call fcn.00409948
push eax
jmp 0x406342
xor edi, edi
call fcn.00401324
call dword [sym.imp.ole32.dll_OleUninitialize]
test esi, esi
mov ebx, dword [sym.imp.KERNEL32.dll_ExitProcess]
je 0x406375
mov dword [esp], esi
mov dword [esp + 4], 0x200010
call fcn.0040a070
push esi
push esi
mov dword [esp], 2
jmp 0x406495
cmp dword [0x44ea34], 0
je 0x406487
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edx, [ebp - 0x2d0]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x28
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
sub esp, 0xc
test eax, eax
je 0x40641c
mov dword [esp + 4], str.SeShutdownPrivilege
lea eax, [ebp - 0x2c8]
mov dword [esp + 8], eax
lea esi, [ebp - 0x2cc]
mov dword [esp], 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, dword [ebp - 0x2d0]
mov dword [ebp - 0x2c0], 2
mov dword [ebp - 0x2cc], 1
sub esp, 0xc
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
sub esp, 0x18
mov dword [esp], 4
call fcn.00409dd0
push ecx
test eax, eax
jne 0x40644a
mov dword [esp + 4], 0x80040002
mov dword [esp], 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push edx
test eax, eax
push edx
je 0x40647a
jmp 0x406487
mov dword [esp + 0x10], 0x80040002
mov dword [esp + 0xc], 0x25
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call eax
sub esp, 0x14
test eax, eax
jne 0x40642d
mov dword [esp], 9
call fcn.00402210
push eax
mov eax, dword [0x44ea4c]
cmp eax, 0xffffffff
cmovne edi, eax
mov dword [esp], edi
call ebx
nop