Function at 0x40316d
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:
sub esp, 0x184
push ebx
push esi
push edi
xor ebx, ebx
push 0x8001
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [esp + 0x20], ebx
mov byte [esp + 0x14], 0x20
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp ax, 6
je 0x4031b5
push ebx
call fcn.00406126
cmp eax, ebx
je 0x4031b5
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.004060b8
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x4031ba
push ebp
push 9
call fcn.00406126
push 7
call fcn.00406126
mov dword [0x423704], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
mov dword [0x4237b8], eax
push ebx
lea eax, [esp + 0x38]
push 0x160
push eax
push ebx
push 0x41ecc8
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
push str.NSIS_Error
push 0x422f00
call fcn.00405d8d
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov ebp, 0x429000
push eax
push ebp
call fcn.00405d8d
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp byte [0x429000], 0x22
mov dword [0x423700], eax
mov eax, ebp
jne 0x40324e
mov byte [esp + 0x14], 0x22
mov eax, 0x429001
push dword [esp + 0x14]
push eax
call fcn.0040582a
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov dword [esp + 0x1c], eax
jmp 0x403328
cmp cl, 0x20
jne 0x403273
inc eax
cmp byte [eax], 0x20
je 0x40326d
cmp byte [eax], 0x22
mov byte [esp + 0x14], 0x20
jne 0x403283
inc eax
mov byte [esp + 0x14], 0x22
cmp byte [eax], 0x2f
jne 0x403318
inc eax
cmp byte [eax], 0x53
jne 0x4032a8
mov cl, byte [eax + 1]
cmp cl, 0x20
je 0x40329e
cmp cl, bl
jne 0x4032a8
mov dword [0x4237a0], 1
movsx ecx, byte [0x409183]
movsx edx, byte [0x409182]
shl ecx, 8
or ecx, edx
movsx edx, byte [0x409181]
shl ecx, 8
or ecx, edx
movsx edx, byte [str.NCRC]
shl ecx, 8
or ecx, edx
cmp dword [eax], ecx
jne 0x4032e8
mov cl, byte [eax + 4]
cmp cl, 0x20
je 0x4032e3
cmp cl, bl
jne 0x4032e8
or dword [esp + 0x20], 4
movsx ecx, byte [0x40917b]
movsx edx, byte [0x40917a]
shl ecx, 8
or ecx, edx
movsx edx, byte [0x409179]
shl ecx, 8
or ecx, edx
movsx edx, byte [str.__D]
shl ecx, 8
or ecx, edx
cmp dword [eax - 2], ecx
je 0x403334
push dword [esp + 0x14]
push eax
call fcn.0040582a
cmp byte [eax], 0x22
jne 0x403328
inc eax
mov cl, byte [eax]
cmp cl, bl
jne 0x403268
jmp 0x403345
mov byte [eax - 2], bl
add eax, 2
push eax
push 0x429400
call fcn.00405d8d
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov esi, 0x42a400
push esi
push 0x400
call edi
call fcn.0040313c
test eax, eax
jne 0x4033b7
push 0x3fb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatA
call fcn.0040313c
test eax, eax
jne 0x4033b7
push esi
push 0x3fc
call edi
push 0x40916c
push esi
call sub.KERNEL32.dll_lstrcatA
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push esi
push str.TEMP
call edi
push esi
push 0x409160
call edi
call fcn.0040313c
test eax, eax
je 0x403465
push 0x42a000
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [esp + 0x20]
call fcn.00402cfa
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x403465
cmp dword [0x42371c], ebx
je 0x403455
push ebx
push ebp
call fcn.0040582a
mov edi, eax
cmp edi, ebp
jb 0x403420
movsx eax, byte [0x40915b]
movsx ecx, byte [0x40915a]
shl eax, 8
or eax, ecx
movsx ecx, byte [0x409159]
shl eax, 8
or eax, ecx
movsx ecx, byte [0x409158]
shl eax, 8
or eax, ecx
cmp dword [edi], eax
je 0x403420
dec edi
cmp edi, ebp
jae 0x403417
cmp edi, ebp
mov dword [esp + 0x10], str.Error_launching_installer
jb 0x403491
mov byte [edi], bl
add edi, 4
push edi
call fcn.004058ed
test eax, eax
je 0x403465
push edi
push 0x429400
call fcn.00405d8d
push edi
push 0x429800
call fcn.00405d8d
mov dword [esp + 0x10], ebx
or dword [0x4237ac], 0xffffffff
call fcn.0040370d
mov dword [esp + 0x18], eax
call fcn.00403633
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x10], ebx
pop ebp
je 0x403599
push 0x200010
push dword [esp + 0x10]
call fcn.00405583
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.00405506
push str.nsu
push esi
mov edi, eax
call sub.KERNEL32.dll_lstrcatA
cmp edi, ebx
je 0x4034b2
push 0x40914c
push esi
call sub.KERNEL32.dll_lstrcatA
push str..tmp
push esi
call sub.KERNEL32.dll_lstrcatA
mov ebp, 0x429c00
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x403465
cmp edi, ebx
push esi
je 0x4034da
call fcn.0040546c
jmp 0x4034df
call fcn.004054e9
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp byte [0x429400], bl
jne 0x4034f9
push ebp
push 0x429400
call fcn.00405d8d
push dword [esp + 0x1c]
push section..ndata
call fcn.00405d8d
movsx cx, byte [0x409140]
xor eax, eax
push 0x1a
mov ah, byte [0x409141]
pop ebp
or eax, ecx
mov edi, 0x41e8c8
mov word [0x424400], ax
mov eax, dword [0x423710]
push dword [eax + 0x120]
push edi
call fcn.00405daf
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0x10], ebx
je 0x403584
push 1
push edi
push 0x42ac00
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x403584
push ebx
push edi
call fcn.00405c48
mov eax, dword [0x423710]
push dword [eax + 0x124]
push edi
call fcn.00405daf
push edi
call fcn.0040551e
cmp eax, ebx
je 0x403584
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], ebx
inc byte [0x424400]
dec ebp
jne 0x403527
push ebx
push esi
call fcn.00405c48
jmp 0x403465
cmp dword [0x423794], ebx
je 0x40361b
lea eax, [esp + 0x18]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
push 2
test eax, eax
pop edi
je 0x4035ec
lea eax, [esp + 0x24]
push eax
push str.SeShutdownPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
push ebx
push ebx
lea eax, [esp + 0x28]
push ebx
push eax
push ebx
push dword [esp + 0x2c]
mov dword [esp + 0x38], 1
mov dword [esp + 0x44], edi
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.00406126
cmp eax, ebx
mov esi, 0x80040002
je 0x403608
push esi
push 0x25
push ebx
push ebx
push ebx
call eax
test eax, eax
je 0x403614
push esi
push edi
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x40361b
push 9
call fcn.0040140b
mov eax, dword [0x4237ac]
cmp eax, 0xffffffff
je 0x403629
mov dword [esp + 0x14], eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_ExitProcess]