Function at 0x4046fc
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:
mov ebx, 0x56a2b5f0
push 0
push ebx
call ebp
cmp al, 0x24
call dword [sym.imp.ole32.dll_OleInitialize]
xor ecx, ecx
push edx
mov dword [section..bss], eax
lea eax, [ebp - 0x2cc]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0x2b4
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], 0x40c4da
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
sub esp, 0x14
mov dword [esp + 4], str.NSIS_Error
mov dword [esp], 0x42fa80
call fcn.00408365
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, dword [0x40c974]
lea ecx, [edi + 0xa000]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [ebp - 0x400], ecx
call fcn.00408365
push eax
push eax
xor eax, eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x42fa68], eax
push edx
movzx eax, word [edi + 0xa000]
lea edx, [edi + 0xa002]
cmp ax, 0x22
je 0x4047ab
mov edx, dword [ebp - 0x400]
mov eax, 0x20
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00407c43
push ebx
push ebx
mov dword [esp], eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x404], eax
push esi
xor esi, esi
cmp word [eax], 0
je 0x404888
movzx edx, word [eax]
cmp dx, 0x20
jne 0x4047e3
add eax, 2
jmp 0x4047d5
cmp dx, 0x22
jne 0x4047ee
add eax, 2
jmp 0x4047f3
mov edx, 0x20
cmp word [eax], 0x2f
jne 0x404868
cmp word [eax + 2], 0x53
lea ebx, [eax + 2]
jne 0x404815
test word [eax + 4], 0xffdf
jne 0x404815
mov dword [0x419040], 1
cmp dword [eax + 6], 0x430052
jne 0x404835
cmp dword [eax + 2], 0x43004e
jne 0x404835
test word [eax + 0xa], 0xffdf
mov ecx, 4
cmove esi, ecx
cmp dword [eax + 2], 0x3d0044
jne 0x404866
cmp dword [eax - 2], 0x2f0020
jne 0x404866
mov word [eax - 2], 0
add eax, 6
mov dword [esp + 4], eax
lea eax, [edi + 0xa800]
mov dword [esp], eax
call fcn.00408365
push ecx
push ecx
jmp 0x404888
mov eax, ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00407c43
push edx
push edx
cmp word [eax], 0x22
jne 0x4047cb
add eax, 2
jmp 0x4047cb
mov eax, dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ebx, [edi + 0xc800]
mov dword [esp], 0x400
mov dword [esp + 4], ebx
mov dword [ebp - 0x3fc], eax
call eax
push eax
push eax
call fcn.004044e4
test eax, eax
je 0x4048df
lea eax, [edi + 0xc000]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ecx
mov dword [esp], esi
call fcn.00404132
mov dword [ebp - 0x3fc], eax
push esi
xor esi, esi
test eax, eax
jne 0x404c2c
jmp 0x404980
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 edx
push edx
call fcn.004044e4
test eax, eax
jne 0x4048b1
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x3fc]
mov dword [esp], 0x3fc
call eax
push eax
push eax
mov dword [esp + 4], 0x40c4fe
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
mov edx, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push eax
push eax
mov dword [ebp - 0x3fc], edx
mov dword [esp + 4], ebx
mov dword [esp], str.TEMP
call edx
mov edx, dword [ebp - 0x3fc]
push eax
push eax
mov dword [esp + 4], ebx
mov dword [esp], 0x40c510
call edx
push eax
push eax
call fcn.004044e4
test eax, eax
jne 0x4048b1
mov dword [ebp - 0x3fc], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
jmp 0x404c2a
cmp dword [0x41b944], 0
je 0x404c17
mov eax, dword [ebp - 0x400]
xor ecx, ecx
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00407c43
push esi
push esi
mov ecx, dword [ebp - 0x400]
cmp eax, ecx
jb 0x404a14
cmp dword [eax + 4], 0x3d003f
je 0x4049bb
sub eax, 2
jmp 0x4049a3
cmp dword [eax], 0x5f0020
jne 0x4049b6
lea ebx, [eax + 8]
mov word [eax], 0
mov dword [esp], ebx
call fcn.00408536
push edx
test eax, eax
jne 0x4049e7
mov dword [ebp - 0x3fc], str.Error_launching_installer
jmp 0x404c2a
lea eax, [edi + 0xa800]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00408365
lea eax, [edi + 0xb000]
push esi
push esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00408365
push edi
push edi
jmp 0x404c17
call fcn.004086c4
mov dword [esp], ebx
lea esi, [edi + 0x2800]
mov dword [ebp - 0x410], eax
call sub.KERNEL32.dll_lstrlenW
mov dword [ebp - 0x400], eax
lea eax, [edi + 0x3000]
push edx
mov dword [ebp - 0x408], eax
mov eax, dword [ebp - 0x404]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.00408365
push ecx
push ecx
cmp word [edi + 0xa800], 0
jne 0x404a78
lea eax, [edi + 0xb800]
mov dword [esp + 4], eax
lea eax, [edi + 0xa800]
mov dword [esp], eax
call fcn.00408365
push eax
push eax
mov word [ebp - 0x404], 1
mov eax, dword [ebp - 0x400]
lea eax, [edi + eax*2 + 0xc800]
mov dword [ebp - 0x40c], eax
xor eax, eax
mov dword [ebp - 0x400], eax
movzx eax, word [ebp - 0x404]
mov dword [ebp - 0x414], eax
mov eax, dword [ebp - 0x414]
mov dword [esp + 4], str.nsu_X.tmp
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x40c]
mov dword [esp], eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [0x41b950]
mov eax, dword [eax + 0x120]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.004086ea
cmp dword [ebp - 0x410], 0
push ecx
push ecx
mov dword [esp], ebx
je 0x404af6
call fcn.00407a8c
jmp 0x404afb
call fcn.00407aec
push edx
test eax, eax
je 0x404b54
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
bt eax, 0xa
push ecx
jb 0x404c05
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edx
test eax, eax
je 0x404c05
mov dword [esp + 4], 1
mov dword [esp], ebx
call fcn.00408c7b
cmp dword [ebp - 0x400], 0
push eax
push eax
jne 0x404c05
mov dword [ebp - 0x400], 1
jmp 0x404aa9
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.00408c36
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 0x4049d8
xor eax, eax
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00408c36
push eax
push eax
mov eax, dword [0x41b950]
mov eax, dword [eax + 0x124]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x408]
mov dword [esp], eax
call fcn.004086ea
push eax
push eax
mov eax, dword [ebp - 0x408]
mov dword [esp], eax
call fcn.00407b18
push edx
test eax, eax
je 0x404be2
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
jmp 0x404c2a
cmp dword [ebp - 0x400], 0
jne 0x4049d8
mov dword [esp], esi
call fcn.004084fe
push edx
test eax, eax
je 0x404b45
jmp 0x4049d8
inc word [ebp - 0x404]
jne 0x404a94
jmp 0x4049d8
mov dword [0x41904c], 0xffffffff
call fcn.0040653f
mov esi, eax
jmp 0x404c2c
xor esi, esi
call fcn.0040453f
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [ebp - 0x3fc], 0
mov ebx, dword [sym.imp.KERNEL32.dll_ExitProcess]
je 0x404c6a
mov eax, dword [ebp - 0x3fc]
mov dword [esp + 4], 0x200010
mov dword [esp], eax
call fcn.00407bd7
push eax
push eax
mov dword [esp], 2
jmp 0x404d72
cmp dword [0x419034], 0
je 0x404d64
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 0x404d03
lea eax, [ebp - 0x2c8]
mov dword [esp + 4], str.SeShutdownPrivilege
lea edi, [ebp - 0x2cc]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp], eax
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 + 4], eax
mov eax, dword [ebp - 0x3ec]
mov dword [esp + 8], edi
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
sub esp, 0x18
mov dword [esp], 4
call fcn.00408678
push edi
test eax, eax
jne 0x404d31
mov dword [esp + 4], 0x80040002
mov dword [esp], 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push ecx
push ecx
test eax, eax
je 0x404d57
jmp 0x404d64
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 0x404d14
mov dword [esp], 9
call fcn.00403bd0
push eax
mov eax, dword [0x41904c]
cmp eax, 0xffffffff
cmove eax, esi
mov dword [esp], eax
call ebx