Function at 0x40416e
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 - 0x214]
push ebx
sub esp, 0x24c
mov dword [esp], 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov dword [ebp - 0x214], 0x9c
push eax
xor eax, eax
mov dword [ebp - 0x200], eax
mov dword [ebp - 0x180], eax
mov dword [ebp - 0x17c], eax
mov dword [esp], esi
call ebx
push edx
test eax, eax
jne 0x4041fb
mov dword [ebp - 0x214], 0x94
mov dword [esp], esi
call ebx
cmp dword [ebp - 0x204], 2
push edi
jne 0x4041fb
xor eax, eax
cmp byte [ebp - 0x200], 0x53
mov byte [ebp - 0x17a], 4
jne 0x4041f2
movsx ax, byte [ebp - 0x1f3]
sub eax, 0x30
mov word [ebp - 0x180], ax
jmp 0x404223
cmp dword [ebp - 0x204], 1
ja 0x404223
movsx ax, byte [ebp - 0x1ff]
mov byte [ebp - 0x17a], 0
xor edx, edx
cmp al, 0x40
jle 0x40421c
lea edx, [eax - 0x40]
mov word [ebp - 0x180], dx
mov ecx, dword [ebp - 0x210]
cmp ecx, 9
ja 0x404238
and dword [ebp - 0x208], 0xffff
mov eax, dword [ebp - 0x208]
movzx edx, byte [ebp - 0x17a]
shl ecx, 8
mov dword [0x418058], eax
mov eax, dword [ebp - 0x180]
shl eax, 8
or eax, edx
movzx edx, byte [ebp - 0x20c]
movzx eax, ax
or edx, ecx
shl edx, 0x10
or eax, edx
mov dword [0x41805c], eax
shr eax, 0x10
cmp ax, 0x600
je 0x404290
xor ebx, ebx
mov dword [esp], ebx
call fcn.004081a6
push esi
test eax, eax
je 0x404290
mov dword [esp], 0xc00
call eax
push ecx
mov ebx, str.UXTHEME
cmp byte [ebx], 0
je 0x4042b3
mov dword [esp], ebx
call fcn.0040811d
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [ebx + eax + 1]
push edx
jmp 0x404295
mov dword [esp], 0xc
call fcn.004081a6
push ebx
mov dword [esp], 0xa
call fcn.004081a6
push esi
mov dword [0x7abe84], eax
mov dword [esp], 8
call fcn.004081a6
push edi
test eax, eax
je 0x4042f8
mov dword [esp], 0x1e
call eax
push ecx
test eax, eax
je 0x4042f8
or byte [0x41805c], 0x80
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
xor edi, edi
xor ebx, ebx
mov dword [esp], edi
call dword [sym.imp.ole32.dll_OleInitialize]
xor ecx, ecx
push edx
mov dword [section..bss], eax
lea eax, [ebp - 0x178]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0x160
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], 0x40b2bd
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
sub esp, 0x14
mov dword [esp + 4], str.NSIS_Error
mov dword [esp], 0x7abea0
call fcn.00407e43
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [0x40b634]
lea ecx, [edi + 0x5000]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [ebp - 0x220], ecx
call fcn.00407e43
push eax
push eax
xor eax, eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [0x7abe88], eax
push edx
movsx eax, byte [edi + 0x5000]
lea edx, [edi + 0x5001]
cmp al, 0x22
je 0x4043a6
mov edx, dword [ebp - 0x220]
mov eax, 0x20
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00407747
push ebx
push ebx
mov dword [esp], eax
call dword [sym.imp.USER32.dll_CharNextA]
mov dword [ebp - 0x224], eax
push esi
xor esi, esi
cmp byte [eax], 0
je 0x40445f
movsx edx, byte [eax]
cmp dl, 0x20
jne 0x4043da
inc eax
jmp 0x4043cf
cmp dl, 0x22
jne 0x4043e2
inc eax
jmp 0x4043e7
mov edx, 0x20
cmp byte [eax], 0x2f
jne 0x404442
cmp byte [eax + 1], 0x53
lea ebx, [eax + 1]
jne 0x404405
test byte [eax + 2], 0xdf
jne 0x404405
mov dword [0x418040], 1
cmp dword [eax + 1], 0x4352434e
jne 0x40441a
test byte [eax + 5], 0xdf
mov ecx, 4
cmove esi, ecx
cmp dword [eax - 1], 0x3d442f20
jne 0x404440
mov byte [eax - 1], 0
add eax, 3
mov dword [esp + 4], eax
lea eax, [edi + 0x5400]
mov dword [esp], eax
call fcn.00407e43
push ecx
push ecx
jmp 0x40445f
mov eax, ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00407747
push edx
push edx
cmp byte [eax], 0x22
jne 0x4043c6
inc eax
jmp 0x4043c6
mov eax, dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ebx, [edi + 0x6400]
mov dword [esp], 0x400
mov dword [esp + 4], ebx
mov dword [ebp - 0x21c], eax
call eax
push eax
push eax
call fcn.004040cc
test eax, eax
je 0x4044b6
lea eax, [edi + 0x6000]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ecx
mov dword [esp], esi
call fcn.00403dbb
mov dword [ebp - 0x21c], eax
push esi
xor esi, esi
test eax, eax
jne 0x4047f5
jmp 0x404557
mov dword [esp + 4], 0x3fb
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push eax
push eax
mov dword [esp + 4], str.Temp
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
push edx
push edx
call fcn.004040cc
test eax, eax
jne 0x404488
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x21c]
mov dword [esp], 0x3fc
call eax
push eax
push eax
mov dword [esp + 4], 0x40b2cf
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
mov edx, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push eax
push eax
mov dword [ebp - 0x21c], edx
mov dword [esp + 4], ebx
mov dword [esp], str.TEMP
call edx
mov edx, dword [ebp - 0x21c]
push eax
push eax
mov dword [esp + 4], ebx
mov dword [esp], 0x40b2d8
call edx
push eax
push eax
call fcn.004040cc
test eax, eax
jne 0x404488
mov dword [ebp - 0x21c], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
jmp 0x4047f3
cmp dword [0x419524], 0
je 0x4047e0
mov eax, dword [ebp - 0x220]
xor ecx, ecx
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00407747
push esi
push esi
mov ecx, dword [ebp - 0x220]
cmp eax, ecx
jb 0x4045de
cmp dword [eax], 0x3d3f5f20
je 0x40458f
dec eax
jmp 0x40457a
lea ebx, [eax + 4]
mov byte [eax], 0
mov dword [esp], ebx
call fcn.00408069
push edx
test eax, eax
jne 0x4045b1
mov dword [ebp - 0x21c], str.Error_launching_installer
jmp 0x4047f3
lea eax, [edi + 0x5400]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00407e43
lea eax, [edi + 0x5800]
push esi
push esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00407e43
push edi
push edi
jmp 0x4047e0
call fcn.004081f2
mov dword [esp], ebx
lea esi, [edi + 0x1400]
mov dword [ebp - 0x22c], eax
call sub.KERNEL32.dll_lstrlenA
mov dword [ebp - 0x220], eax
lea eax, [edi + 0x1800]
push edx
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x224]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.00407e43
push ecx
push ecx
cmp byte [edi + 0x5400], 0
jne 0x404641
lea eax, [edi + 0x5c00]
mov dword [esp + 4], eax
lea eax, [edi + 0x5400]
mov dword [esp], eax
call fcn.00407e43
push eax
push eax
mov word [ebp - 0x224], 1
mov eax, dword [ebp - 0x220]
lea eax, [edi + eax + 0x6400]
mov dword [ebp - 0x234], eax
xor eax, eax
mov dword [ebp - 0x220], eax
movzx eax, word [ebp - 0x224]
mov dword [ebp - 0x230], eax
mov eax, dword [ebp - 0x230]
mov dword [esp + 4], str.nsu_X.tmp
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x234]
mov dword [esp], eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x419530]
mov eax, dword [eax + 0x120]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00408218
cmp dword [ebp - 0x22c], 0
push ecx
push ecx
mov dword [esp], ebx
je 0x4046bf
call fcn.00407590
jmp 0x4046c4
call fcn.004075f0
push edx
test eax, eax
je 0x40471d
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
bt eax, 0xa
push ecx
jb 0x4047ce
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edx
test eax, eax
je 0x4047ce
mov dword [esp + 4], 1
mov dword [esp], ebx
call fcn.0040879e
cmp dword [ebp - 0x220], 0
push eax
push eax
jne 0x4047ce
mov dword [ebp - 0x220], 1
jmp 0x404672
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor eax, eax
push ecx
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00408759
push eax
push eax
lea eax, [edi + 0x6c00]
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
sub esp, 0xc
test eax, eax
je 0x4045a2
xor eax, eax
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00408759
push eax
push eax
mov eax, dword [0x419530]
mov eax, dword [eax + 0x124]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call fcn.00408218
push eax
push eax
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call fcn.0040761c
push edx
test eax, eax
je 0x4047ab
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
jmp 0x4047f3
cmp dword [ebp - 0x220], 0
jne 0x4045a2
mov dword [esp], esi
call fcn.00408031
push edx
test eax, eax
je 0x40470e
jmp 0x4045a2
inc word [ebp - 0x224]
jne 0x40465d
jmp 0x4045a2
mov dword [0x41804c], 0xffffffff
call fcn.00406059
mov esi, eax
jmp 0x4047f5
xor esi, esi
call fcn.00404127
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [ebp - 0x21c], 0
mov ebx, dword [sym.imp.KERNEL32.dll_ExitProcess]
je 0x404833
mov eax, dword [ebp - 0x21c]
mov dword [esp + 4], 0x200010
mov dword [esp], eax
call fcn.004076db
push eax
push eax
mov dword [esp], 2
jmp 0x40493b
cmp dword [0x418034], 0
je 0x40492d
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edx, [ebp - 0x218]
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 0x4048cc
lea eax, [ebp - 0x174]
mov dword [esp + 4], str.SeShutdownPrivilege
lea edi, [ebp - 0x178]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
xor eax, eax
mov dword [ebp - 0x178], 1
mov dword [ebp - 0x16c], 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 - 0x218]
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.004081a6
push edi
test eax, eax
jne 0x4048fa
mov dword [esp + 4], 0x80040002
mov dword [esp], 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push ecx
push ecx
test eax, eax
je 0x404920
jmp 0x40492d
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 0x4048dd
mov dword [esp], 9
call fcn.004039b1
push eax
mov eax, dword [0x41804c]
cmp eax, 0xffffffff
cmove eax, esi
mov dword [esp], eax
call ebx
nop
nop
nop