Function at 0x4042ae
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, 0x30c
mov dword [esp], 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp ax, 6
je 0x4042ef
mov dword [esp], 0
call fcn.00408bda
test eax, eax
push ebx
je 0x4042ef
mov dword [esp], 0xc00
call eax
push ecx
mov ebx, str.UXTHEME
cmp byte [ebx], 0
je 0x404312
mov dword [esp], ebx
call fcn.00408b45
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [ebx + eax + 1]
push edx
jmp 0x4042f4
mov dword [esp], 9
call fcn.00408bda
push edi
mov dword [esp], 7
call fcn.00408bda
push edx
mov dword [0x473cc0], eax
call dword [sym.imp.COMCTL32.DLL_InitCommonControls]
mov dword [esp], 0
call dword [sym.imp.ole32.dll_OleInitialize]
mov dword [0x473bf0], eax
push ecx
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], 0x40b43a
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
sub esp, 0x14
mov dword [esp + 4], str.NSIS_Error
mov dword [esp], 0x473d00
call fcn.00408063
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, dword [0x40b9c8]
mov dword [esp + 4], eax
add edi, 0x50000
mov dword [esp], edi
mov dword [ebp - 0x2dc], edi
call fcn.00408063
push esi
push esi
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x473cc8], eax
mov eax, dword [0x40b9c8]
push edi
movzx eax, word [eax + 0x50000]
cmp ax, 0x22
jne 0x4043eb
mov ecx, dword [0x40b9c8]
lea edx, [ecx + 0x50002]
jmp 0x4043f6
mov edx, dword [ebp - 0x2dc]
mov eax, 0x20
mov dword [esp], edx
mov dword [esp + 4], eax
xor edi, edi
call fcn.00407a2d
push ebx
push ebx
mov dword [esp], eax
call dword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [0x40b4be]
mov dword [ebp - 0x2e0], eax
movzx eax, word [0x40b4bc]
movzx edx, word [str.NCRC]
push esi
movzx esi, word [0x40b4c4]
shl ecx, 0x10
or ecx, eax
movzx eax, word [0x40b4ba]
shl esi, 0x10
shl eax, 0x10
or eax, edx
cdq
mov ebx, eax
movzx eax, word [0x40b4c6]
or ecx, edx
mov dword [ebp - 0x2e8], ecx
movzx ecx, word [0x40b4c8]
shl ecx, 0x10
or ecx, eax
movzx eax, word [str.__D]
or esi, eax
mov eax, esi
cdq
mov eax, dword [ebp - 0x2e0]
or ecx, edx
mov dword [ebp - 0x2ec], ecx
cmp word [eax], 0
je 0x404545
mov cx, word [eax]
cmp cx, 0x20
jne 0x404496
add eax, 2
jmp 0x404488
cmp cx, 0x22
mov edx, 0x20
jne 0x4044a6
add eax, 2
mov dl, 0x22
cmp word [eax], 0x2f
jne 0x404525
cmp word [eax + 2], 0x53
lea ecx, [eax + 2]
mov dword [ebp - 0x2e4], ecx
jne 0x4044ce
test word [eax + 4], 0xffdf
jne 0x4044ce
mov dword [0x473bd8], 1
mov ecx, dword [ebp - 0x2e8]
cmp dword [eax + 6], ecx
jne 0x4044ec
cmp dword [eax + 2], ebx
jne 0x4044ec
test word [eax + 0xa], 0xffdf
mov ecx, 4
cmove edi, ecx
mov ecx, dword [ebp - 0x2ec]
cmp dword [eax + 2], ecx
jne 0x40451f
cmp dword [eax - 2], esi
jne 0x40451f
mov word [eax - 2], 0
add eax, 6
mov dword [esp + 4], eax
mov eax, dword [0x40b9c8]
add eax, 0x54000
mov dword [esp], eax
call fcn.00408063
push ecx
push ecx
jmp 0x404545
mov eax, dword [ebp - 0x2e4]
movzx edx, dx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00407a2d
push edx
push edx
lea edx, [eax + 2]
cmp word [eax], 0x22
cmove eax, edx
jmp 0x40447e
mov eax, dword [0x40b9c8]
mov dword [esp], 0x2000
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ebx, [eax + 0x64000]
mov dword [esp + 4], ebx
call esi
push ecx
push ecx
call fcn.0040420c
test eax, eax
je 0x40459c
mov eax, dword [0x40b9c8]
add eax, 0x60000
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
mov dword [esp], edi
xor edi, edi
call fcn.00403ee9
test eax, eax
push edx
mov esi, eax
jne 0x40476e
jmp 0x404626
mov dword [esp + 4], 0x1ffb
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 fcn.00408096
push eax
push eax
call fcn.0040420c
test eax, eax
jne 0x40456e
mov dword [esp + 4], ebx
mov dword [esp], 0x1ffc
call esi
push ecx
push ecx
mov dword [esp + 4], 0x40b45e
mov dword [esp], ebx
call fcn.00408096
push esi
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [esp + 4], ebx
mov dword [esp], str.TEMP
call esi
push eax
push eax
mov dword [esp + 4], ebx
mov dword [esp], 0x40b470
call esi
push eax
push eax
call fcn.0040420c
test eax, eax
jne 0x40456e
mov esi, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
jmp 0x40476c
cmp dword [0x473c88], 0
je 0x4046f1
mov eax, dword [ebp - 0x2dc]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00407a2d
push edx
push edx
movzx edx, word [0x40b4d2]
movzx ecx, word [0x40b4d0]
movzx edi, word [0x40b4ce]
shl edx, 0x10
or edx, ecx
shl edi, 0x10
mov dword [ebp - 0x2e8], edx
movzx edx, word [0x40b4cc]
or edi, edx
mov ecx, edi
mov dword [ebp - 0x2e4], edi
mov edi, dword [ebp - 0x2e8]
sar ecx, 0x1f
or edi, ecx
mov edx, edi
cmp eax, dword [ebp - 0x2dc]
jb 0x404704
cmp dword [eax + 4], edx
je 0x40469e
sub eax, 2
jmp 0x40468c
mov edi, dword [ebp - 0x2e4]
cmp dword [eax], edi
jne 0x404699
lea ebx, [eax + 8]
mov word [eax], 0
mov dword [esp], ebx
call fcn.004087f4
test eax, eax
push edx
je 0x404767
mov eax, dword [0x40b9c8]
mov dword [esp + 4], ebx
add eax, 0x54000
mov dword [esp], eax
call fcn.00408063
mov eax, dword [0x40b9c8]
push edi
push edi
add eax, 0x58000
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00408063
push eax
push eax
mov dword [0x473be4], 0xffffffff
call fcn.0040623b
mov edi, eax
jmp 0x40476e
call fcn.00408c2c
mov dword [esp + 4], str.nsu
mov esi, eax
mov dword [esp], ebx
call fcn.00408096
test esi, esi
push eax
push eax
je 0x404733
mov dword [esp + 4], 0x40b478
mov dword [esp], ebx
call fcn.00408096
push ecx
push ecx
mov dword [esp + 4], 0x40b47c
mov dword [esp], ebx
call fcn.00408096
push eax
push eax
mov eax, dword [0x40b9c8]
mov dword [esp], ebx
lea edi, [eax + 0x5c000]
mov dword [esp + 4], edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
push edx
push edx
jne 0x4048c3
mov esi, str.Error_launching_installer
xor edi, edi
call fcn.00404267
call dword [sym.imp.ole32.dll_OleUninitialize]
test esi, esi
mov ebx, dword [sym.imp.KERNEL32.dll_ExitProcess]
je 0x4047a1
mov dword [esp + 4], 0x200010
mov dword [esp], esi
call fcn.004079bf
push ecx
push ecx
mov dword [esp], 2
jmp 0x4048c1
cmp dword [0x473bcc], 0
je 0x4048b3
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edx, [ebp - 0x2d0]
mov dword [esp + 4], 0x28
mov dword [esp], eax
mov dword [esp + 8], edx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
sub esp, 0xc
test eax, eax
je 0x404848
lea eax, [ebp - 0x2c8]
mov dword [esp + 4], str.SeShutdownPrivilege
mov dword [esp], 0
lea esi, [ebp - 0x2cc]
mov dword [esp + 8], eax
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, dword [ebp - 0x2d0]
sub esp, 0xc
mov dword [ebp - 0x2cc], 1
mov dword [ebp - 0x2c0], 2
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.00408bda
test eax, eax
push edx
jne 0x404876
mov dword [esp + 4], 0x80040002
mov dword [esp], 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
push esi
push esi
je 0x4048a6
jmp 0x4048b3
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 0x404859
mov dword [esp], 9
call fcn.00403a25
push ecx
mov eax, dword [0x473be4]
cmp eax, 0xffffffff
cmovne edi, eax
mov dword [esp], edi
call ebx
test esi, esi
mov dword [esp], ebx
je 0x4048d1
call fcn.00407838
jmp 0x4048d6
call fcn.004078d3
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push eax
mov eax, dword [0x40b9c8]
cmp word [eax + 0x54000], 0
jne 0x404903
add eax, 0x54000
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.00408063
push eax
push eax
mov eax, dword [ebp - 0x2e0]
mov esi, str.Error_launching_installer
mov dword [esp + 4], eax
mov eax, dword [0x40b9c8]
mov dword [esp], eax
call fcn.00408063
push eax
push eax
movzx eax, word [0x40b4d8]
movzx edx, word [0x40b4d6]
mov edi, dword [0x40b9c8]
mov dword [ebp - 0x2dc], 0x1a
shl eax, 0x10
lea edi, [edi + 0x6c000]
or eax, edx
mov dword [edi - 0x68000], eax
mov eax, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 0x2e0], eax
mov eax, dword [0x473c00]
mov eax, dword [eax + 0x120]
mov dword [esp], 0x444d00
mov dword [esp + 4], eax
call fcn.004081cb
push ecx
push ecx
mov dword [esp], 0x444d00
call dword [ebp - 0x2e0]
test esi, esi
push eax
je 0x4049fa
mov dword [esp + 8], 1
mov dword [esp + 4], 0x444d00
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
sub esp, 0xc
test eax, eax
je 0x4049fa
mov dword [esp + 4], 0
mov dword [esp], 0x444d00
call fcn.00408777
push eax
push eax
mov eax, dword [0x473c00]
mov eax, dword [eax + 0x124]
mov dword [esp], 0x444d00
mov dword [esp + 4], eax
call fcn.004081cb
push eax
push eax
mov dword [esp], 0x444d00
call fcn.00407901
test eax, eax
push edx
je 0x4049fa
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
xor esi, esi
mov eax, dword [0x40b9c8]
inc word [eax + 0x4000]
dec dword [ebp - 0x2dc]
jne 0x40495b
mov dword [esp], ebx
mov dword [esp + 4], 0
call fcn.00408777
push ebx
push ebx
jmp 0x40476c