Function at 0x4043f2
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
lea esi, [ebp - 0x3e8]
push ebx
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 0x404474
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 0x40446d
mov ax, word [ebp - 0x3ba]
sub eax, 0x30
mov word [ebp - 0x2d4], ax
mov ecx, dword [ebp - 0x3e4]
cmp ecx, 9
ja 0x404489
and dword [ebp - 0x3dc], 0xffff
mov eax, dword [ebp - 0x3dc]
movzx edx, byte [ebp - 0x2d4]
shl ecx, 8
mov dword [0x417058], eax
movzx eax, byte [ebp - 0x2ce]
shl edx, 8
or eax, edx
movzx edx, byte [ebp - 0x3e0]
movzx eax, ax
or edx, ecx
shl edx, 0x10
or eax, edx
mov dword [0x41705c], eax
shr eax, 0x10
cmp ax, 0x600
je 0x4044e2
xor ebx, ebx
mov dword [esp], ebx
call fcn.00408daa
push esi
test eax, eax
je 0x4044e2
mov dword [esp], 0xc00
call eax
push ecx
mov ebx, str.UXTHEME
cmp byte [ebx], 0
je 0x404505
mov dword [esp], ebx
call fcn.00408d1c
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [ebx + eax + 1]
push edx
jmp 0x4044e7
mov dword [esp], 0xb
call fcn.00408daa
push ebx
mov dword [esp], 9
call fcn.00408daa
push esi
mov dword [0x437584], eax
mov dword [esp], 7
call fcn.00408daa
push edi
test eax, eax
je 0x40454a
mov dword [esp], 0x1e
call eax
push ecx
test eax, eax
je 0x40454a
or byte [0x41705c], 0x80
call dword [sym.imp.COMCTL32.DLL_InitCommonControls]
xor ecx, ecx
xor edi, edi
xor esi, esi
mov dword [esp], ecx
call dword [sym.imp.ole32.dll_OleInitialize]
push ebx
mov dword [section..bss], eax
lea eax, [ebp - 0x2cc]
mov dword [esp + 4], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0x2b4
mov dword [esp + 8], eax
mov dword [esp], 0x40c41a
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
sub esp, 0x14
mov dword [esp + 4], str.NSIS_Error
mov dword [esp], 0x4375a0
call fcn.00408299
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, dword [0x40c8b4]
lea ecx, [edi + 0xa000]
mov dword [ebp - 0x3fc], ecx
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00408299
push eax
push eax
xor eax, eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x437588], eax
push edx
movzx eax, word [edi + 0xa000]
lea edx, [edi + 0xa002]
cmp ax, 0x22
je 0x4045fa
mov edx, dword [ebp - 0x3fc]
mov eax, 0x20
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00407b77
push esi
push esi
xor esi, esi
mov dword [esp], eax
call dword [sym.imp.USER32.dll_CharNextW]
push edx
mov dword [ebp - 0x400], eax
cmp word [eax], 0
je 0x4046d7
movzx edx, word [eax]
cmp dx, 0x20
jne 0x404632
add eax, 2
jmp 0x404624
cmp dx, 0x22
jne 0x40463d
add eax, 2
jmp 0x404642
mov edx, 0x20
cmp word [eax], 0x2f
jne 0x4046b7
cmp word [eax + 2], 0x53
lea ebx, [eax + 2]
jne 0x404664
test word [eax + 4], 0xffdf
jne 0x404664
mov dword [0x417040], 1
cmp dword [eax + 6], 0x430052
jne 0x404684
cmp dword [eax + 2], 0x43004e
jne 0x404684
test word [eax + 0xa], 0xffdf
mov ecx, 4
cmove esi, ecx
cmp dword [eax + 2], 0x3d0044
jne 0x4046b5
cmp dword [eax - 2], 0x2f0020
jne 0x4046b5
mov word [eax - 2], 0
add eax, 6
mov dword [esp + 4], eax
lea eax, [edi + 0xa800]
mov dword [esp], eax
call fcn.00408299
push ebx
push ebx
jmp 0x4046d7
mov eax, ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00407b77
push ecx
push ecx
cmp word [eax], 0x22
jne 0x40461a
add eax, 2
jmp 0x40461a
mov eax, dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ebx, [edi + 0xc800]
mov dword [esp], 0x400
mov dword [esp + 4], ebx
mov dword [ebp - 0x404], eax
call eax
push edx
push edx
call fcn.00404350
test eax, eax
jne 0x4047a7
mov dword [esp + 4], 0x3fb
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.00404350
test eax, eax
jne 0x4047a7
mov dword [esp + 4], ebx
mov dword [esp], 0x3fc
mov eax, dword [ebp - 0x404]
call eax
push ecx
push ecx
mov dword [esp + 4], 0x40c43e
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
mov edx, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push eax
push eax
mov dword [esp + 4], ebx
mov dword [esp], str.TEMP
mov dword [ebp - 0x404], edx
call edx
push eax
push eax
mov dword [esp + 4], ebx
mov dword [esp], 0x40c450
mov edx, dword [ebp - 0x404]
call edx
push eax
push eax
call fcn.00404350
test eax, eax
jne 0x4047a7
call fcn.004043ab
mov esi, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
call dword [sym.imp.ole32.dll_OleUninitialize]
jmp 0x404a97
lea eax, [edi + 0xc000]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
mov dword [esp], esi
call fcn.0040403f
mov esi, eax
push edx
test eax, eax
jne 0x404a7a
cmp dword [0x419924], 0
je 0x404a5c
xor ecx, ecx
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x3fc]
mov dword [esp], eax
call fcn.00407b77
push esi
push esi
mov ecx, dword [ebp - 0x3fc]
cmp eax, ecx
jb 0x404853
cmp dword [eax + 4], 0x3d003f
je 0x404805
sub eax, 2
jmp 0x4047ed
cmp dword [eax], 0x5f0020
jne 0x404800
lea ebx, [eax + 8]
mov word [eax], 0
mov dword [esp], ebx
call fcn.004089e3
push edx
test eax, eax
je 0x404a87
lea eax, [edi + 0xa800]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00408299
lea eax, [edi + 0xb000]
push esi
push esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00408299
push edi
push edi
jmp 0x404a5c
call fcn.00408df6
lea esi, [edi + 0x2800]
mov dword [ebp - 0x40c], eax
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrlenW
push edx
mov dword [ebp - 0x3fc], eax
lea eax, [edi + 0x3000]
mov dword [ebp - 0x404], eax
mov eax, dword [ebp - 0x400]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.00408299
push ecx
push ecx
cmp word [edi + 0xa800], 0
jne 0x4048b7
lea eax, [edi + 0xb800]
mov dword [esp + 4], eax
lea eax, [edi + 0xa800]
mov dword [esp], eax
call fcn.00408299
push eax
push eax
mov word [ebp - 0x400], 1
mov eax, dword [ebp - 0x3fc]
lea eax, [edi + eax*2 + 0xc800]
mov dword [ebp - 0x408], eax
xor eax, eax
mov dword [ebp - 0x3fc], eax
movzx eax, word [ebp - 0x400]
mov dword [ebp - 0x410], eax
mov eax, dword [ebp - 0x410]
mov dword [esp + 4], str.nsu_X.tmp
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x408]
mov dword [esp], eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [0x419930]
mov eax, dword [eax + 0x120]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00408432
push ecx
push ecx
cmp dword [ebp - 0x40c], 0
mov dword [esp], ebx
je 0x404935
call fcn.004079c0
jmp 0x40493a
call fcn.00407a20
push edx
test eax, eax
je 0x404993
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
bt eax, 0xa
push ecx
jb 0x404a4d
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edx
test eax, eax
je 0x404a4d
mov dword [esp + 4], 1
mov dword [esp], ebx
call fcn.00408a97
push eax
push eax
cmp dword [ebp - 0x3fc], 0
jne 0x404a4d
mov dword [ebp - 0x3fc], 1
jmp 0x4048e8
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.00408966
push eax
push eax
lea eax, [edi + 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 0x404a87
xor eax, eax
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00408966
push eax
push eax
mov eax, dword [0x419930]
mov eax, dword [eax + 0x124]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x404]
mov dword [esp], eax
call fcn.00408432
push eax
push eax
mov eax, dword [ebp - 0x404]
mov dword [esp], eax
call fcn.00407a4c
push edx
test eax, eax
je 0x404a31
mov dword [esp], eax
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call fcn.004043ab
call dword [sym.imp.ole32.dll_OleUninitialize]
jmp 0x404ab5
cmp dword [ebp - 0x3fc], 0
jne 0x404a87
mov dword [esp], esi
call fcn.004089ab
push edx
test eax, eax
je 0x404984
jmp 0x404a87
inc word [ebp - 0x400]
jne 0x4048d3
jmp 0x404a87
mov dword [0x41704c], 0xffffffff
call fcn.004063e2
mov ebx, eax
call fcn.004043ab
call dword [sym.imp.ole32.dll_OleUninitialize]
jmp 0x404ab5
call fcn.004043ab
call dword [sym.imp.ole32.dll_OleUninitialize]
jmp 0x404a97
call fcn.004043ab
mov esi, str.Error_launching_installer
call dword [sym.imp.ole32.dll_OleUninitialize]
mov dword [esp + 4], 0x200010
mov dword [esp], esi
call fcn.00407b0b
push eax
push eax
mov dword [esp], 2
jmp 0x404bbd
cmp dword [0x417034], 0
je 0x404baf
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edx, [ebp - 0x3ec]
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 0x404b4e
lea eax, [ebp - 0x2c8]
xor edi, edi
mov dword [esp + 4], str.SeShutdownPrivilege
lea esi, [ebp - 0x2cc]
mov dword [esp + 8], eax
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.00408daa
push esi
test eax, eax
jne 0x404b7c
mov dword [esp + 4], 0x80040002
mov dword [esp], 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push ecx
push ecx
test eax, eax
je 0x404ba2
jmp 0x404baf
xor edx, edx
mov dword [esp + 0x10], 0x80040002
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 0x404b5f
mov dword [esp], 9
call fcn.00403bb8
push eax
mov eax, dword [0x41704c]
cmp eax, 0xffffffff
cmovne ebx, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]