Function at 0x40480e
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, 0x1ac
mov dword [esp], 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0xbfffffff
mov dword [0x433220], eax
cmp ax, 6
je 0x404859
mov dword [esp], 0
call fcn.004095df
push ebx
test eax, eax
je 0x404859
mov dword [esp], 0xc00
call eax
push ecx
mov ebx, str.UXTHEME
mov dword [esp], ebx
call fcn.00409554
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [ebx + eax + 1]
push edx
cmp byte [ebx], 0
jne 0x40485e
mov dword [esp], 0xb
call fcn.004095df
push ebx
mov dword [esp], 9
call fcn.004095df
push esi
mov dword [0x433224], eax
mov dword [esp], 7
call fcn.004095df
push edi
test eax, eax
je 0x4048c2
mov dword [esp], 0x1e
call eax
push ecx
test eax, eax
je 0x4048c2
or dword [0x433220], 0x40000000
call dword [sym.imp.COMCTL32.DLL_InitCommonControls]
mov dword [esp], 0
call dword [sym.imp.ole32.dll_OleInitialize]
push edi
mov dword [section..bss], eax
lea eax, [ebp - 0x178]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x160
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x40c8fd
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
sub esp, 0x14
mov dword [esp + 4], str.NSIS_Error
mov dword [esp], 0x433240
call fcn.004086df
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov ecx, dword [0x40ced4]
add ecx, 0x28000
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [ebp - 0x18c], ecx
call fcn.004086df
push eax
push eax
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [0x433228], eax
mov eax, dword [0x40ced4]
push edx
movsx eax, byte [eax + 0x28000]
cmp al, 0x22
jne 0x40497a
mov ecx, dword [0x40ced4]
lea edx, [ecx + 0x28001]
jmp 0x404985
mov edx, dword [ebp - 0x18c]
mov eax, 0x20
mov dword [esp], edx
xor edi, edi
mov dword [esp + 4], eax
call fcn.00407f95
push ebx
push ebx
mov dword [esp], eax
call dword [sym.imp.USER32.dll_CharNextA]
mov dword [ebp - 0x190], eax
push esi
cmp byte [eax], 0
je 0x404a42
movsx edx, byte [eax]
cmp dl, 0x20
jne 0x4049b9
inc eax
jmp 0x4049ae
cmp dl, 0x22
jne 0x4049c1
inc eax
jmp 0x4049c6
mov edx, 0x20
cmp byte [eax], 0x2f
jne 0x404a25
cmp byte [eax + 1], 0x53
lea ebx, [eax + 1]
jne 0x4049e4
test byte [eax + 2], 0xdf
jne 0x4049e4
mov dword [0x415080], 1
cmp dword [eax + 1], 0x4352434e
jne 0x4049f9
test byte [eax + 5], 0xdf
mov ecx, 4
cmove edi, ecx
cmp dword [eax - 1], 0x3d442f20
jne 0x404a23
mov byte [eax - 1], 0
add eax, 3
mov dword [esp + 4], eax
mov eax, dword [0x40ced4]
add eax, 0x2a000
mov dword [esp], eax
call fcn.004086df
push ecx
push ecx
jmp 0x404a42
mov eax, ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00407f95
push edx
push edx
cmp byte [eax], 0x22
jne 0x4049a5
inc eax
jmp 0x4049a5
mov eax, dword [0x40ced4]
mov dword [esp], 0x2000
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ebx, [eax + 0x32000]
mov dword [esp + 4], ebx
call esi
push eax
push eax
call fcn.0040476c
test eax, eax
je 0x404a99
mov eax, dword [0x40ced4]
add eax, 0x30000
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edx
mov dword [esp], edi
xor edi, edi
call fcn.0040444a
mov esi, eax
push ecx
test eax, eax
jne 0x404d71
jmp 0x404b23
mov dword [esp + 4], 0x1ffb
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 eax
push eax
call fcn.0040476c
test eax, eax
jne 0x404a6b
mov dword [esp + 4], ebx
mov dword [esp], 0x1ffc
call esi
push esi
push esi
mov dword [esp + 4], 0x40c90f
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push eax
push eax
mov dword [esp + 4], ebx
mov dword [esp], str.TEMP
call esi
push eax
push eax
mov dword [esp + 4], ebx
mov dword [esp], 0x40c918
call esi
push eax
push eax
call fcn.0040476c
test eax, eax
jne 0x404a6b
mov esi, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
jmp 0x404d6f
cmp dword [0x41f104], 0
je 0x404d4f
mov eax, dword [ebp - 0x18c]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00407f95
push ecx
push ecx
cmp dword [ebp - 0x18c], eax
ja 0x404bad
cmp dword [eax], 0x3d3f5f20
je 0x404b5b
dec eax
jmp 0x404b48
lea ebx, [eax + 4]
mov byte [eax], 0
mov dword [esp], ebx
call fcn.0040919d
push edx
test eax, eax
jne 0x404b78
mov esi, str.Error_launching_installer
jmp 0x404d6f
mov eax, dword [0x40ced4]
mov dword [esp + 4], ebx
add eax, 0x2a000
mov dword [esp], eax
call fcn.004086df
push eax
push eax
mov eax, dword [0x40ced4]
add eax, 0x2c000
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.004086df
push eax
push eax
jmp 0x404d4f
call fcn.0040962b
mov dword [esp + 4], str.nsu
mov dword [esp], ebx
mov esi, eax
call sub.KERNEL32.dll_lstrcatA
push eax
push eax
test esi, esi
je 0x404bdc
mov dword [esp + 4], 0x40c921
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
push edi
push edi
mov dword [esp + 4], str..tmp
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
mov eax, dword [0x40ced4]
push edx
push edx
lea edi, [eax + 0x2e000]
mov dword [esp + 4], edi
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push ecx
push ecx
test eax, eax
je 0x404b6e
mov dword [esp], ebx
test esi, esi
je 0x404c1e
call fcn.00407d94
jmp 0x404c23
call fcn.00407e28
push eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push eax
mov eax, dword [0x40ced4]
cmp byte [eax + 0x2a000], 0
jne 0x404c4f
add eax, 0x2a000
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.004086df
push eax
push eax
mov eax, dword [ebp - 0x190]
mov edi, 0x1a
mov esi, str.Error_launching_installer
mov dword [esp + 4], eax
mov eax, dword [0x40ced4]
mov dword [esp], eax
call fcn.004086df
push eax
push eax
mov eax, dword [0x40ced4]
mov word [eax + 0x2000], 0x41
mov eax, dword [0x41f110]
mov eax, dword [eax + 0x120]
mov dword [esp], 0x437240
mov dword [esp + 4], eax
call fcn.004088d9
push ecx
push ecx
mov dword [esp], 0x437240
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push eax
test esi, esi
je 0x404d29
mov eax, dword [0x40ced4]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x437240
add eax, 0x36000
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
sub esp, 0xc
test eax, eax
je 0x404d29
mov dword [esp + 4], 0
mov dword [esp], 0x437240
call fcn.00408e22
push eax
push eax
mov eax, dword [0x41f110]
mov eax, dword [eax + 0x124]
mov dword [esp], 0x437240
mov dword [esp + 4], eax
call fcn.004088d9
push eax
push eax
mov dword [esp], 0x437240
call fcn.00407e56
push edx
test eax, eax
je 0x404d29
mov dword [esp], eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov eax, dword [0x40ced4]
inc byte [eax + 0x2000]
dec edi
jne 0x404c80
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.00408e22
push eax
push eax
jmp 0x404d6f
mov dword [0x41508c], 0xffffffff
call fcn.00406740
mov dword [esp], 1
mov edi, eax
call fcn.00408e67
push eax
jmp 0x404d71
xor edi, edi
call fcn.004047c7
call dword [sym.imp.ole32.dll_OleUninitialize]
test esi, esi
mov ebx, dword [sym.imp.KERNEL32.dll_ExitProcess]
je 0x404da4
mov dword [esp], esi
mov dword [esp + 4], 0x200010
call fcn.00407f29
push esi
push esi
mov dword [esp], 2
jmp 0x404ec4
cmp dword [0x415074], 0
je 0x404eb6
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edx, [ebp - 0x17c]
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 0x404e4b
lea eax, [ebp - 0x174]
mov dword [esp + 4], str.SeShutdownPrivilege
lea esi, [ebp - 0x178]
mov dword [esp + 8], eax
mov dword [esp], 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [ebp - 0x17c]
mov dword [ebp - 0x178], 1
mov dword [ebp - 0x16c], 2
sub esp, 0xc
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.004095df
push ecx
test eax, eax
jne 0x404e79
mov dword [esp + 4], 0x80040002
mov dword [esp], 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push edx
push edx
test eax, eax
je 0x404ea9
jmp 0x404eb6
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 0x404e5c
mov dword [esp], 9
call fcn.0040403b
push eax
mov eax, dword [0x41508c]
cmp eax, 0xffffffff
cmovne edi, eax
mov dword [esp], edi
call ebx
nop
nop