Function at 0x4044f0
Capabilities:
Accept command line arguments
Check os version
Copy file
Delete file
Get common file path
Get file attributes
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, 0x30c
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 [0x4305e0], eax
cmp ax, 6
je 0x40453b
mov dword [esp], 0
call fcn.00408ecb
push ebx
test eax, eax
je 0x40453b
mov dword [esp], 0xc00
call eax
push ecx
mov ebx, str.UXTHEME
mov dword [esp], ebx
call fcn.00408e3b
push edi
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [ebx + eax + 1]
push edx
cmp byte [ebx], 0
jne 0x404540
mov dword [esp], 0xa
call fcn.00408ecb
push ecx
mov dword [esp], 8
call fcn.00408ecb
push ebx
mov dword [0x4305e4], eax
mov dword [esp], 6
call fcn.00408ecb
push esi
test eax, eax
je 0x4045a4
mov dword [esp], 0x1e
call eax
push edx
test eax, eax
je 0x4045a4
or dword [0x4305e0], 0x40000000
call dword [sym.imp.COMCTL32.DLL_InitCommonControls]
mov dword [esp], 0
call dword [sym.imp.ole32.dll_OleInitialize]
push edx
mov dword [0x430558], eax
lea eax, [ebp - 0x2cc]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x2b4
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x40c4da
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
sub esp, 0x14
mov dword [esp + 4], str.NSIS_Error
mov dword [esp], 0x430600
call fcn.004083b4
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ebx, dword [0x40c974]
lea ecx, [ebx + 0xa000]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [ebp - 0x2e0], ecx
call fcn.004083b4
push esi
push esi
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea edx, [ebx + 0xa002]
push edi
mov dword [0x4305ec], eax
movzx eax, word [ebx + 0xa000]
cmp ax, 0x22
je 0x40465c
lea edx, [ebx + 0xa000]
mov eax, 0x20
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00407c41
push esi
push esi
xor esi, esi
mov dword [esp], eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x2e4], eax
push edi
cmp word [eax], 0
je 0x404739
movzx edx, word [eax]
cmp dx, 0x20
jne 0x404694
add eax, 2
jmp 0x404686
cmp dx, 0x22
jne 0x40469f
add eax, 2
jmp 0x4046a4
mov edx, 0x20
cmp word [eax], 0x2f
jne 0x404719
cmp word [eax + 2], 0x53
lea edi, [eax + 2]
jne 0x4046c6
test word [eax + 4], 0xffdf
jne 0x4046c6
mov dword [0x430540], 1
cmp dword [eax + 6], 0x430052
jne 0x4046e6
cmp dword [eax + 2], 0x43004e
jne 0x4046e6
test word [eax + 0xa], 0xffdf
mov ecx, 4
cmove esi, ecx
cmp dword [eax + 2], 0x3d0044
jne 0x404717
cmp dword [eax - 2], 0x2f0020
jne 0x404717
mov word [eax - 2], 0
add eax, 6
mov dword [esp + 4], eax
lea eax, [ebx + 0xa800]
mov dword [esp], eax
call fcn.004083b4
push ecx
push ecx
jmp 0x404739
mov eax, edi
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00407c41
push edx
push edx
cmp word [eax], 0x22
jne 0x40467c
add eax, 2
jmp 0x40467c
mov eax, dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edi, [ebx + 0xc800]
mov dword [esp], 0x400
mov dword [esp + 4], edi
mov dword [ebp - 0x2dc], eax
call eax
push eax
push eax
call fcn.00404430
test eax, eax
je 0x404790
lea eax, [ebx + 0xc000]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edx
mov dword [esp], esi
xor esi, esi
call fcn.0040406a
mov dword [ebp - 0x2dc], eax
push ecx
test eax, eax
jne 0x404aeb
jmp 0x404831
mov dword [esp + 4], 0x3fb
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push eax
push eax
mov dword [esp + 4], str.Temp
mov dword [esp], edi
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
call fcn.00404430
test eax, eax
jne 0x404762
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x2dc]
mov dword [esp], 0x3fc
call eax
push eax
push eax
mov dword [esp + 4], 0x40c4fe
mov dword [esp], edi
call sub.KERNEL32.dll_lstrcatW
mov edx, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push eax
push eax
mov dword [ebp - 0x2dc], edx
mov dword [esp + 4], edi
mov dword [esp], str.TEMP
call edx
mov edx, dword [ebp - 0x2dc]
push eax
push eax
mov dword [esp + 4], edi
mov dword [esp], 0x40c510
call edx
push eax
push eax
call fcn.00404430
test eax, eax
jne 0x404762
mov dword [ebp - 0x2dc], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
jmp 0x404ae9
cmp dword [0x4305c8], 0
je 0x404ad6
mov eax, dword [ebp - 0x2e0]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00407c41
push ecx
push ecx
cmp dword [ebp - 0x2e0], eax
ja 0x4048c5
cmp dword [eax + 4], 0x3d003f
je 0x40486c
sub eax, 2
jmp 0x404856
cmp dword [eax], 0x5f0020
jne 0x404867
lea esi, [eax + 8]
mov word [eax], 0
mov dword [esp], esi
call fcn.00408b02
push edx
test eax, eax
jne 0x404898
mov dword [ebp - 0x2dc], str.Error_launching_installer
jmp 0x404ae9
lea eax, [ebx + 0xa800]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.004083b4
lea eax, [ebx + 0xb000]
push edi
push edi
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.004083b4
push eax
push eax
jmp 0x404ad6
call fcn.00408f17
mov dword [esp], edi
lea esi, [ebx + 0x2800]
mov dword [ebp - 0x2f0], eax
call sub.KERNEL32.dll_lstrlenW
mov dword [ebp - 0x2e0], eax
lea eax, [ebx + 0x3000]
push edx
mov dword [ebp - 0x2e8], eax
mov eax, dword [ebp - 0x2e4]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.004083b4
push ecx
push ecx
cmp word [ebx + 0xa800], 0
jne 0x404929
lea eax, [ebx + 0xb800]
mov dword [esp + 4], eax
lea eax, [ebx + 0xa800]
mov dword [esp], eax
call fcn.004083b4
push eax
push eax
mov word [ebp - 0x2e4], 1
mov eax, dword [ebp - 0x2e0]
lea eax, [ebx + eax*2 + 0xc800]
mov dword [ebp - 0x2ec], eax
cmp word [ebp - 0x2e4], 0
je 0x404889
movzx eax, word [ebp - 0x2e4]
mov dword [ebp - 0x2e0], 0
mov dword [ebp - 0x2f4], eax
mov eax, dword [ebp - 0x2f4]
mov dword [esp + 4], str.nsu_X.tmp
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2ec]
mov dword [esp], eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [0x430560]
mov eax, dword [eax + 0x120]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.0040850d
cmp dword [ebp - 0x2f0], 0
push ecx
push ecx
mov dword [esp], edi
je 0x4049b7
call fcn.00407a70
jmp 0x4049bc
call fcn.00407ad4
push edx
test eax, eax
je 0x404a15
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
bt eax, 0xa
push ecx
jb 0x404aca
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edx
test eax, eax
je 0x404aca
mov dword [esp + 4], 1
mov dword [esp], edi
call fcn.00408bb6
cmp dword [ebp - 0x2e0], 0
push eax
push eax
jne 0x404aca
mov dword [ebp - 0x2e0], 1
jmp 0x40496a
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ecx
mov dword [esp + 4], 0
mov dword [esp], edi
call fcn.00408a85
push eax
push eax
lea eax, [ebx + 0xd800]
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
sub esp, 0xc
test eax, eax
je 0x404889
mov dword [esp + 4], 0
mov dword [esp], esi
call fcn.00408a85
push eax
push eax
mov eax, dword [0x430560]
mov eax, dword [eax + 0x124]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2e8]
mov dword [esp], eax
call fcn.0040850d
push eax
push eax
mov eax, dword [ebp - 0x2e8]
mov dword [esp], eax
call fcn.00407b02
push edx
test eax, eax
je 0x404aa7
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
jmp 0x404ae9
cmp dword [ebp - 0x2e0], 0
jne 0x404889
mov dword [esp], esi
call fcn.00408aca
push edx
test eax, eax
je 0x404a06
jmp 0x404889
inc word [ebp - 0x2e4]
jmp 0x404945
mov dword [0x43054c], 0xffffffff
call fcn.0040647e
mov esi, eax
jmp 0x404aeb
xor esi, esi
call fcn.0040448b
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [ebp - 0x2dc], 0
mov ebx, dword [sym.imp.KERNEL32.dll_ExitProcess]
je 0x404b29
mov eax, dword [ebp - 0x2dc]
mov dword [esp + 4], 0x200010
mov dword [esp], eax
call fcn.00407bd5
push esi
push esi
mov dword [esp], 2
jmp 0x404c49
cmp dword [0x430534], 0
je 0x404c3b
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edx, [ebp - 0x2d0]
mov dword [esp + 4], 0x28
mov dword [esp + 8], edx
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
sub esp, 0xc
test eax, eax
je 0x404bd0
lea eax, [ebp - 0x2c8]
mov dword [esp + 4], str.SeShutdownPrivilege
lea edi, [ebp - 0x2cc]
mov dword [esp + 8], eax
mov dword [esp], 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, dword [ebp - 0x2d0]
mov dword [ebp - 0x2cc], 1
mov dword [ebp - 0x2c0], 2
sub esp, 0xc
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
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.00408ecb
push ecx
test eax, eax
jne 0x404bfe
mov dword [esp + 4], 0x80040002
mov dword [esp], 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push edx
push edx
test eax, eax
je 0x404c2e
jmp 0x404c3b
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 0x404be1
mov dword [esp], 9
call fcn.00403aca
push eax
mov eax, dword [0x43054c]
cmp eax, 0xffffffff
cmovne esi, eax
mov dword [esp], esi
call ebx
nop