Function at 0x40366b
Capabilities:
Accept command line arguments
Check os version
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:
sub esp, 0x3f8
push ebp
push esi
push edi
push 0x20
pop edi
xor ebp, ebp
push 0x8001
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [esp + 0x14], ebp
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x14c], ebp
mov dword [esp + 0x150], ebp
mov dword [esp + 0x38], 0x11c
call esi
test eax, eax
jne 0x4036f7
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0x114
push eax
call esi
mov ax, word [esp + 0x48]
mov ecx, dword [esp + 0x62]
sub ax, 0x53
add ecx, 0xffffffd0
neg ax
sbb eax, eax
mov byte [esp + 0x14e], 4
not eax
and eax, ecx
mov word [esp + 0x148], ax
cmp dword [esp + 0x38], 0xa
jae 0x403704
and word [esp + 0x42], 0
mov eax, dword [esp + 0x40]
movzx ecx, byte [esp + 0x3c]
mov dword [0x7a8358], eax
xor eax, eax
mov ah, byte [esp + 0x38]
movzx eax, ax
or eax, ecx
xor ecx, ecx
mov ch, byte [esp + 0x148]
movzx ecx, cx
shl eax, 0x10
or eax, ecx
movzx ecx, byte [esp + 0x14e]
or eax, ecx
mov dword [0x7a835c], eax
cmp word [0x7a835e], 0x600
je 0x403759
push ebp
call fcn.00406a9c
cmp eax, ebp
je 0x403759
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.00406a2c
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x40375e
push 0xc
call fcn.00406a9c
push 0xa
call fcn.00406a9c
push 8
mov dword [0x7a82a4], eax
call fcn.00406a9c
cmp eax, ebp
je 0x4037a1
push 0x1e
call eax
test eax, eax
je 0x4037a1
or byte [0x7a835c], 0x80
push ebx
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebp
call dword [sym.imp.ole32.dll_OleInitialize]
mov dword [0x7a8360], eax
push ebp
lea eax, [esp + 0x158]
push 0x2b4
push eax
push ebp
push 0x79f748
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x7a72a0
call fcn.004066a8
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ebx, 0x7b3000
push eax
push ebx
call fcn.004066a8
push 0x22
mov dword [0x7a82a0], 0x400000
pop esi
mov eax, ebx
cmp word [0x7b3000], si
jne 0x40380e
mov edi, esi
mov eax, 0x7b3002
push edi
push eax
call fcn.00405fa4
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov ecx, eax
mov dword [esp + 0x1c], ecx
jmp 0x40391d
push 0x20
pop edx
cmp ax, dx
jne 0x403836
inc ecx
inc ecx
cmp word [ecx], dx
je 0x40382f
cmp word [ecx], si
mov dword [esp + 0x10], edx
jne 0x403845
inc ecx
mov dword [esp + 0x10], esi
inc ecx
cmp word [ecx], 0x2f
jne 0x40390a
inc ecx
inc ecx
cmp word [ecx], 0x53
jne 0x40386f
mov ax, word [ecx + 2]
cmp ax, dx
je 0x403865
cmp ax, bp
jne 0x40386f
mov dword [0x7a8340], 1
movzx eax, word [0x40a372]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov edi, eax
xor esi, esi
movzx eax, word [0x40a370]
cdq
movzx edx, word [str.NCRC]
or edi, eax
movzx eax, word [0x40a36e]
shl eax, 0x10
or eax, edx
cdq
or esi, eax
mov eax, dword [ecx]
or edi, edx
cmp eax, esi
jne 0x4038c5
mov eax, dword [ecx + 4]
cmp eax, edi
jne 0x4038c5
mov ax, word [ecx + 8]
cmp ax, 0x20
je 0x4038c0
cmp ax, bp
jne 0x4038c5
or dword [esp + 0x14], 4
movzx eax, word [0x40a366]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov edi, eax
xor esi, esi
movzx eax, word [0x40a364]
cdq
movzx edx, word [str.__D]
or edi, eax
movzx eax, word [0x40a362]
shl eax, 0x10
or eax, edx
cdq
or esi, eax
mov eax, dword [ecx - 4]
or edi, edx
cmp eax, esi
jne 0x403907
mov eax, dword [ecx]
cmp eax, edi
je 0x40392b
push 0x22
pop esi
push dword [esp + 0x10]
push ecx
call fcn.00405fa4
mov ecx, eax
cmp word [ecx], si
jne 0x40391d
inc ecx
inc ecx
mov ax, word [ecx]
cmp ax, bp
jne 0x403827
jmp 0x40393d
mov word [ecx - 4], bp
add ecx, 4
push ecx
push 0x7b3800
call fcn.004066a8
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x7b5800
push esi
push 0x400
call edi
call fcn.0040363a
test eax, eax
jne 0x4039af
push 0x3fb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatW
call fcn.0040363a
test eax, eax
jne 0x4039af
push esi
push 0x3fc
call edi
push 0x40a34c
push esi
call sub.KERNEL32.dll_lstrcatW
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
push str.TEMP
call edi
push esi
push 0x40a338
call edi
call fcn.0040363a
test eax, eax
je 0x403bb6
push 0x7b5000
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x14]
call fcn.004030f5
cmp eax, ebp
mov dword [esp + 0x18], eax
jne 0x403bb6
cmp dword [0x7a82bc], ebp
je 0x403a6e
push ebp
push ebx
call fcn.00405fa4
mov edi, eax
cmp edi, ebx
jb 0x403a34
movzx eax, word [0x40a332]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov ebp, eax
movzx eax, word [0x40a330]
movzx ecx, word [0x40a32c]
cdq
or ebp, eax
movzx eax, word [0x40a32e]
shl eax, 0x10
or eax, ecx
xor ecx, ecx
cdq
or ecx, eax
mov eax, ebp
or eax, edx
mov edx, dword [edi]
cmp edx, ecx
jne 0x403a2c
mov edx, dword [edi + 4]
cmp edx, eax
je 0x403a32
dec edi
dec edi
cmp edi, ebx
jae 0x403a1f
xor ebp, ebp
cmp edi, ebx
mov dword [esp + 0x18], str.Error_launching_installer
jb 0x403a83
mov word [edi], bp
add edi, 8
push edi
call fcn.0040607f
test eax, eax
je 0x403bb6
push edi
push 0x7b3800
call fcn.004066a8
push edi
push 0x7b4000
call fcn.004066a8
mov dword [esp + 0x18], ebp
or dword [0x7a834c], 0xffffffff
call fcn.00403d7a
mov dword [esp + 0x20], eax
jmp 0x403bb6
call fcn.00405c73
push esi
mov dword [esp + 0x28], eax
call sub.KERNEL32.dll_lstrlenW
push dword [esp + 0x1c]
mov edi, eax
push section..ndata
call fcn.004066a8
cmp word [0x7b3800], bp
jne 0x403aba
push 0x7b4800
push 0x7b3800
call fcn.004066a8
lea eax, [edi*2 + 0x7b5800]
mov dword [esp + 0x14], 1
mov dword [esp + 0x1c], eax
mov edi, 0x7ab800
mov ebx, 0x7ac000
mov dword [esp + 0x10], ebp
movzx ebp, word [esp + 0x14]
push ebp
push str.nsu_X.tmp
push dword [esp + 0x24]
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [0x7a82b0]
add esp, 0xc
push dword [eax + 0x120]
push edi
call fcn.004066e5
cmp dword [esp + 0x24], 0
push esi
je 0x403b13
call fcn.00405bfc
jmp 0x403b18
call fcn.00405c56
test eax, eax
je 0x403b56
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test ah, 4
jne 0x403b47
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x403b47
push 1
push esi
call fcn.00405db4
mov eax, dword [esp + 0x10]
inc dword [esp + 0x10]
test eax, eax
je 0x403ae0
inc dword [esp + 0x14]
xor ebp, ebp
cmp word [esp + 0x14], bp
jne 0x403ad7
jmp 0x403bb6
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
push esi
call fcn.00406468
push 1
push edi
push 0x7b6800
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x403bb4
push 0
push edi
call fcn.00406468
mov eax, dword [0x7a82b0]
push dword [eax + 0x124]
push ebx
call fcn.004066e5
push ebx
call fcn.00405c8b
test eax, eax
jne 0x403bde
mov eax, dword [esp + 0x10]
inc dword [esp + 0x10]
test eax, eax
jne 0x403bb4
push edi
call fcn.00406a05
test eax, eax
je 0x403ae0
xor ebp, ebp
call fcn.00403c88
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x18], ebp
pop ebx
je 0x403bec
push 0x200010
push dword [esp + 0x18]
call fcn.00405d08
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esp + 0x18], 0
jmp 0x403bb4
cmp dword [0x7a8334], ebp
je 0x403c70
lea eax, [esp + 0x20]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x403c40
lea eax, [esp + 0x28]
push eax
push str.SeShutdownPrivilege
push ebp
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push ebp
push ebp
lea eax, [esp + 0x2c]
push ebp
push eax
push ebp
push dword [esp + 0x34]
mov dword [esp + 0x3c], 1
mov dword [esp + 0x48], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.00406a9c
cmp eax, ebp
mov esi, 0x80040002
je 0x403c5c
push esi
push 0x25
push ebp
push ebp
push ebp
call eax
test eax, eax
je 0x403c69
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403c70
push 9
call fcn.0040140b
mov eax, dword [0x7a834c]
cmp eax, 0xffffffff
je 0x403c7e
mov dword [esp + 0x1c], eax
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_ExitProcess]