Function at 0x40326a
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, 0x2d4
push ebx
push esi
push edi
push 0x20
pop edi
xor ebx, ebx
push 0x8001
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp ax, 6
je 0x4032b0
push ebx
call fcn.004063f4
cmp eax, ebx
je 0x4032b0
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.00406384
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x4032b5
push ebp
push 9
call fcn.004063f4
push 7
call fcn.004063f4
mov dword [0x429204], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
mov dword [0x4292b8], eax
push ebx
lea eax, [esp + 0x34]
push 0x2b4
push eax
push ebx
push 0x4206a8
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x428200
call fcn.0040601a
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ebp, 0x434000
push eax
push ebp
call fcn.0040601a
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp word [0x434000], 0x22
mov dword [0x429200], eax
mov eax, ebp
jne 0x403349
push 0x22
mov eax, 0x434002
pop edi
push edi
push eax
call fcn.004059fb
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov ecx, eax
mov dword [esp + 0x18], ecx
mov ax, word [ecx]
cmp ax, bx
je 0x40347a
push 0x20
pop ebx
cmp ax, bx
jne 0x403378
inc ecx
inc ecx
cmp word [ecx], bx
je 0x403371
cmp word [ecx], 0x22
jne 0x403383
inc ecx
push 0x22
inc ecx
pop ebx
cmp word [ecx], 0x2f
jne 0x403446
inc ecx
inc ecx
cmp word [ecx], 0x53
jne 0x4033ae
mov ax, word [ecx + 2]
cmp ax, 0x20
je 0x4033a4
test ax, ax
jne 0x4033ae
mov dword [0x4292a0], 1
movzx eax, word [0x4092c2]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov edi, eax
xor esi, esi
movzx eax, word [0x4092c0]
cdq
movzx edx, word [str.NCRC]
or edi, eax
movzx eax, word [0x4092be]
shl eax, 0x10
or eax, edx
cdq
or esi, eax
mov eax, dword [ecx]
or edi, edx
cmp eax, esi
jne 0x403404
mov eax, dword [ecx + 4]
cmp eax, edi
jne 0x403404
mov ax, word [ecx + 8]
cmp ax, 0x20
je 0x4033ff
test ax, ax
jne 0x403404
or dword [esp + 0x1c], 4
movzx eax, word [0x4092b6]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov edi, eax
xor esi, esi
movzx eax, word [0x4092b4]
cdq
movzx edx, word [str.__D]
or edi, eax
movzx eax, word [0x4092b2]
shl eax, 0x10
or eax, edx
cdq
or esi, eax
mov eax, dword [ecx - 4]
or edi, edx
cmp eax, esi
jne 0x403446
mov eax, dword [ecx]
cmp eax, edi
je 0x403465
push ebx
push ecx
call fcn.004059fb
mov ecx, eax
cmp word [ecx], 0x22
jne 0x403457
inc ecx
inc ecx
mov ax, word [ecx]
test ax, ax
jne 0x403369
jmp 0x403478
and word [ecx - 4], 0
add ecx, 4
push ecx
push 0x434800
call fcn.0040601a
xor ebx, ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x436800
push esi
push 0x400
call edi
call fcn.00403239
test eax, eax
jne 0x4034ec
push 0x3fb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatW
call fcn.00403239
test eax, eax
jne 0x4034ec
push esi
push 0x3fc
call edi
push 0x40929c
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 0x409288
call edi
call fcn.00403239
test eax, eax
je 0x4035b7
push 0x436000
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x1c]
call fcn.00402dee
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x4035b7
cmp dword [0x42921c], ebx
je 0x4035a7
push ebx
push ebp
call fcn.004059fb
mov edi, eax
cmp edi, ebp
jb 0x403571
movzx eax, word [0x409282]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov ebx, eax
movzx eax, word [0x409280]
movzx ecx, word [str.___]
cdq
or ebx, eax
movzx eax, word [0x40927e]
shl eax, 0x10
or eax, ecx
xor ecx, ecx
cdq
or ecx, eax
mov eax, ebx
or eax, edx
mov edx, dword [edi]
cmp edx, ecx
jne 0x403569
mov edx, dword [edi + 4]
cmp edx, eax
je 0x40356f
dec edi
dec edi
cmp edi, ebp
jae 0x40355c
xor ebx, ebx
cmp edi, ebp
mov dword [esp + 0x10], str.Error_launching_installer
jb 0x4035e3
mov word [edi], bx
add edi, 8
push edi
call fcn.00405ad6
test eax, eax
je 0x4035b7
push edi
push 0x434800
call fcn.0040601a
push edi
push 0x435000
call fcn.0040601a
mov dword [esp + 0x10], ebx
or dword [0x4292ac], 0xffffffff
call fcn.00403863
mov dword [esp + 0x14], eax
call fcn.00403789
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x10], ebx
pop ebp
je 0x4036ed
push 0x200010
push dword [esp + 0x10]
call fcn.0040575f
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.004056e2
push 0x409270
push esi
mov edi, eax
call sub.KERNEL32.dll_lstrcatW
cmp edi, ebx
je 0x403604
push 0x40926c
push esi
call sub.KERNEL32.dll_lstrcatW
push str..tmp
push esi
call sub.KERNEL32.dll_lstrcatW
mov ebp, 0x435800
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4035b7
cmp edi, ebx
push esi
je 0x40362c
call fcn.00405648
jmp 0x403631
call fcn.004056c5
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x434800], bx
jne 0x40364c
push ebp
push 0x434800
call fcn.0040601a
push dword [esp + 0x18]
push section..ndata
call fcn.0040601a
movzx eax, word [0x40925a]
movzx ecx, word [0x409258]
shl eax, 0x10
or eax, ecx
push 0x1a
mov dword [0x42a800], eax
pop ebp
mov edi, 0x41fea8
mov eax, dword [0x429210]
push dword [eax + 0x120]
push edi
call fcn.0040603c
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x10], ebx
je 0x4036d7
push 1
push edi
push 0x437800
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4036d7
push ebx
push edi
call fcn.00405ebb
mov eax, dword [0x429210]
push dword [eax + 0x124]
push edi
call fcn.0040603c
push edi
call fcn.004056fa
cmp eax, ebx
je 0x4036d7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], ebx
inc word [0x42a800]
dec ebp
jne 0x40367a
push ebx
push esi
call fcn.00405ebb
jmp 0x4035b7
cmp dword [0x429294], ebx
je 0x403771
lea eax, [esp + 0x14]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x403741
lea eax, [esp + 0x20]
push eax
push str.SeShutdownPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push ebx
push ebx
lea eax, [esp + 0x24]
push ebx
push eax
push ebx
push dword [esp + 0x28]
mov dword [esp + 0x34], 1
mov dword [esp + 0x40], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.004063f4
cmp eax, ebx
mov esi, 0x80040002
je 0x40375d
push esi
push 0x25
push ebx
push ebx
push ebx
call eax
test eax, eax
je 0x40376a
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403771
push 9
call fcn.0040140b
mov eax, dword [0x4292ac]
cmp eax, 0xffffffff
je 0x40377f
mov dword [esp + 0x10], eax
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_ExitProcess]