Function at 0x404c4c
Capabilities:
Accept command line arguments
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
lea esi, [ebp - 0x3e8]
sub esp, 0x42c
mov dword [esp], 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersionExW]
push eax
xor eax, eax
mov dword [ebp - 0x3d4], eax
mov dword [ebp - 0x2d4], eax
mov dword [ebp - 0x2d0], eax
mov dword [ebp - 0x3e8], 0x11c
mov dword [esp], esi
call ebx
push edx
test eax, eax
jne 0x404cd1
mov dword [ebp - 0x3e8], 0x114
mov dword [esp], esi
call ebx
xor eax, eax
push edi
cmp word [ebp - 0x3d4], 0x53
mov byte [ebp - 0x2ce], 4
jne 0x404cca
mov ax, word [ebp - 0x3ba]
sub eax, 0x30
movzx eax, ax
mov word [ebp - 0x2d4], ax
mov edx, dword [ebp - 0x3e4]
cmp edx, 9
ja 0x404ce6
and dword [ebp - 0x3dc], 0xffff
mov eax, dword [ebp - 0x3dc]
shl edx, 8
movzx ecx, byte [ebp - 0x2d4]
mov dword [0x40e058], eax
movzx eax, byte [ebp - 0x2ce]
shl ecx, 8
or eax, ecx
movzx ecx, byte [ebp - 0x3e0]
or edx, ecx
shl edx, 0x10
or eax, edx
mov dword [0x40e05c], eax
shr eax, 0x10
cmp eax, 0x600
je 0x404d3d
xor ebx, ebx
mov dword [esp], ebx
call fcn.004092c7
push esi
test eax, eax
je 0x404d3d
mov dword [esp], 0xc00
call eax
push ecx
mov ebx, str.UXTHEME
cmp byte [ebx], 0
je 0x404d60
mov dword [esp], ebx
call fcn.00409239
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [ebx + eax + 1]
push edx
jmp 0x404d42
mov dword [esp], 0xc
call fcn.004092c7
push ebx
mov dword [esp], 0xa
call fcn.004092c7
push esi
mov dword [esp], 8
mov dword [0x7aaa84], eax
call fcn.004092c7
push edi
test eax, eax
je 0x404da5
mov dword [esp], 0x1e
call eax
push ecx
test eax, eax
je 0x404da5
or byte [0x40e05c], 0x80
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
xor ecx, ecx
xor esi, esi
mov dword [esp], ecx
xor edi, edi
call dword [sym.imp.ole32.dll_OleInitialize]
mov dword [section..bss], eax
lea eax, [ebp - 0x2cc]
push ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0x2b4
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], 0x40d17a
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
sub esp, 0x14
mov dword [esp + 4], str.NSIS_Error
mov dword [esp], 0x7aaaa0
call fcn.00408c58
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, dword [0x40dad4]
lea ecx, [esi + 0x28000]
mov dword [ebp - 0x3fc], ecx
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00408c58
push eax
push eax
xor eax, eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push edx
lea edx, [esi + 0x28002]
mov dword [0x7aaa88], eax
movzx eax, word [esi + 0x28000]
cmp eax, 0x22
je 0x404e54
mov edx, dword [ebp - 0x3fc]
mov eax, 0x20
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.0040854b
push ebx
push ebx
mov dword [esp], eax
call dword [sym.imp.USER32.dll_CharNextW]
xor edx, edx
push edi
mov dword [ebp - 0x404], eax
mov dword [ebp - 0x400], edx
cmp word [eax], 0
je 0x404f4b
movzx edx, word [eax]
cmp edx, 0x20
jne 0x404e91
add eax, 2
jmp 0x404e84
cmp edx, 0x22
jne 0x404e9b
add eax, 2
jmp 0x404ea0
mov edx, 0x20
cmp word [eax], 0x2f
jne 0x404f2b
cmp word [eax + 2], 0x53
lea ebx, [eax + 2]
jne 0x404eca
mov cx, word [eax + 4]
and ecx, 0xffdf
jne 0x404eca
mov dword [0x40e040], 1
cmp dword [eax + 6], 0x430052
jne 0x404ef8
cmp dword [eax + 2], 0x43004e
jne 0x404ef8
mov cx, word [eax + 0xa]
and ecx, 0xffdf
mov ecx, 4
cmovne ecx, dword [ebp - 0x400]
mov dword [ebp - 0x400], ecx
cmp dword [eax + 2], 0x3d0044
jne 0x404f29
cmp dword [eax - 2], 0x2f0020
jne 0x404f29
mov word [eax - 2], 0
add eax, 6
mov dword [esp + 4], eax
lea eax, [esi + 0x2a000]
mov dword [esp], eax
call fcn.00408c58
push ecx
push ecx
jmp 0x404f4b
mov eax, ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040854b
push edx
push edx
cmp word [eax], 0x22
jne 0x404e7a
add eax, 2
jmp 0x404e7a
mov dword [esp], 0x1000
lea ebx, [esi + 0x32000]
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [esp + 4], ebx
call edi
push eax
push eax
call fcn.00404b8c
test eax, eax
jne 0x405004
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.00404b8c
test eax, eax
jne 0x405004
mov dword [esp + 4], ebx
mov dword [esp], 0xffc
call edi
push ecx
push ecx
mov dword [esp + 4], 0x40d19e
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
push edi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [esp + 4], ebx
mov dword [esp], str.TEMP
call edi
push eax
push eax
mov dword [esp + 4], ebx
mov dword [esp], 0x40d1b0
call edi
push eax
push eax
call fcn.00404b8c
test eax, eax
jne 0x405004
call fcn.00404be7
mov edi, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
call dword [sym.imp.ole32.dll_OleUninitialize]
jmp 0x405306
lea eax, [esi + 0x30000]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
mov eax, dword [ebp - 0x400]
mov dword [esp], eax
call fcn.004047d1
test eax, eax
mov edi, eax
push edx
jne 0x4052e9
cmp dword [0x418124], 0
je 0x4052be
xor ecx, ecx
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x3fc]
mov dword [esp], eax
call fcn.0040854b
push edi
push edi
mov ecx, dword [ebp - 0x3fc]
cmp eax, ecx
jb 0x4050b6
cmp dword [eax + 4], 0x3d003f
je 0x405068
sub eax, 2
jmp 0x405050
cmp dword [eax], 0x5f0020
jne 0x405063
mov word [eax], 0
lea ebx, [eax + 8]
mov dword [esp], ebx
call fcn.00409187
push edx
test eax, eax
je 0x4052f6
mov dword [esp + 4], ebx
lea eax, [esi + 0x2a000]
mov dword [esp], eax
call fcn.00408c58
lea eax, [esi + 0x2c000]
push edi
push edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00408c58
push eax
push eax
jmp 0x4052be
call fcn.00409313
lea edi, [esi + 0xa000]
mov dword [ebp - 0x40c], eax
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrlenW
push edx
mov dword [ebp - 0x3fc], eax
lea eax, [esi + 0xc000]
mov dword [ebp - 0x408], eax
mov eax, dword [ebp - 0x404]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00408c58
push ecx
push ecx
cmp word [esi + 0x2a000], 0
jne 0x40511a
lea eax, [esi + 0x2e000]
mov dword [esp + 4], eax
lea eax, [esi + 0x2a000]
mov dword [esp], eax
call fcn.00408c58
push eax
push eax
mov eax, dword [ebp - 0x3fc]
mov dword [ebp - 0x400], 1
lea eax, [esi + eax*2 + 0x32000]
mov dword [ebp - 0x404], eax
xor eax, eax
mov dword [ebp - 0x3fc], eax
mov eax, dword [ebp - 0x400]
mov dword [esp + 4], str.nsu_X.tmp
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x404]
mov dword [esp], eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [0x418130]
mov eax, dword [eax + 0x120]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.0040933a
push ecx
push ecx
cmp dword [ebp - 0x40c], 0
mov dword [esp], ebx
je 0x40518c
call fcn.00408394
jmp 0x405191
call fcn.004083f4
test eax, eax
push edx
je 0x4051ea
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push ecx
bt eax, 0xa
jb 0x4052a4
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edx
test eax, eax
je 0x4052a4
mov dword [esp + 4], 1
mov dword [esp], ebx
call fcn.004098bc
push eax
push eax
cmp dword [ebp - 0x3fc], 0
jne 0x4052a4
mov dword [ebp - 0x3fc], 1
jmp 0x40513f
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
push ecx
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00409877
push eax
push eax
lea eax, [esi + 0x36000]
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
sub esp, 0xc
test eax, eax
je 0x4052f6
mov dword [esp], edi
xor eax, eax
mov dword [esp + 4], eax
call fcn.00409877
push eax
push eax
mov eax, dword [0x418130]
mov eax, dword [eax + 0x124]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x408]
mov dword [esp], eax
call fcn.0040933a
push eax
push eax
mov eax, dword [ebp - 0x408]
mov dword [esp], eax
call fcn.00408420
push edx
test eax, eax
je 0x405288
mov dword [esp], eax
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call fcn.00404be7
call dword [sym.imp.ole32.dll_OleUninitialize]
jmp 0x405324
cmp dword [ebp - 0x3fc], 0
jne 0x4052f6
mov dword [esp], edi
call fcn.0040914f
push edx
test eax, eax
je 0x4051db
jmp 0x4052f6
mov eax, dword [ebp - 0x400]
inc eax
and eax, 0xffff
mov dword [ebp - 0x400], eax
jne 0x405137
jmp 0x4052f6
mov dword [0x40e04c], 0xffffffff
call fcn.00406d49
mov dword [esp], 1
mov ebx, eax
call fcn.00408ded
push eax
call fcn.00404be7
call dword [sym.imp.ole32.dll_OleUninitialize]
jmp 0x405324
call fcn.00404be7
call dword [sym.imp.ole32.dll_OleUninitialize]
jmp 0x405306
call fcn.00404be7
mov edi, str.Error_launching_installer
call dword [sym.imp.ole32.dll_OleUninitialize]
mov dword [esp + 4], 0x200010
mov dword [esp], edi
call fcn.004084df
push eax
push eax
mov dword [esp], 2
jmp 0x40542c
cmp dword [0x40e034], 0
je 0x40541e
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edx, [ebp - 0x3ec]
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 0x4053bd
mov dword [esp + 4], str.SeShutdownPrivilege
lea eax, [ebp - 0x2c8]
xor edi, edi
mov dword [esp + 8], eax
lea esi, [ebp - 0x2cc]
mov dword [esp], edi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
xor eax, eax
mov dword [ebp - 0x2cc], 1
mov dword [ebp - 0x2c0], 2
sub esp, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3ec]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
sub esp, 0x18
mov dword [esp], 4
call fcn.004092c7
push esi
test eax, eax
jne 0x4053eb
mov dword [esp + 4], 0x80040002
mov dword [esp], 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push ecx
test eax, eax
push ecx
je 0x405411
jmp 0x40541e
mov dword [esp + 0x10], 0x80040002
xor edx, edx
mov dword [esp + 0xc], 0x25
mov dword [esp + 8], edx
mov dword [esp + 4], edx
mov dword [esp], edx
call eax
sub esp, 0x14
test eax, eax
jne 0x4053ce
mov dword [esp], 9
call fcn.0040426a
push eax
mov eax, dword [0x40e04c]
cmp eax, 0xffffffff
cmovne ebx, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]