Function at 0x40396b
Capabilities:
Accept command line arguments
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]
and eax, 0xbfffffff
mov dword [0x4725d0], eax
mov esi, str.UXTHEME
push esi
call fcn.0040670e
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x4039a9
push 0xa
call fcn.0040677e
push 8
call fcn.0040677e
push 6
mov dword [0x4725d4], eax
call fcn.0040677e
cmp eax, ebx
je 0x4039ee
push 0x1e
call eax
test eax, eax
je 0x4039ee
or dword [0x4725d0], 0x40000000
push ebp
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
push ebx
push 0x2b4
mov dword [0x4726d8], eax
lea eax, [esp + 0x38]
push eax
push ebx
push 0x409368
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x46a5c0
call fcn.004063c4
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
mov ebp, 0x4c30a0
push ebp
call fcn.004063c4
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x22
pop esi
cmp word [0x4c30a0], si
mov dword [0x4725dc], eax
mov eax, ebp
jne 0x403a5a
mov edi, esi
mov eax, 0x4c30a2
push edi
push eax
call fcn.00405f07
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [esp + 0x18], eax
jmp 0x403af4
push 0x20
pop edi
cmp cx, di
jne 0x403a80
inc eax
inc eax
cmp word [eax], di
je 0x403a79
cmp word [eax], si
mov edx, edi
jne 0x403a8b
inc eax
inc eax
mov edx, esi
cmp word [eax], 0x2f
jne 0x403ae6
inc eax
inc eax
cmp word [eax], 0x53
jne 0x403ab1
movzx ecx, word [eax + 2]
cmp cx, di
je 0x403aa7
cmp cx, bx
jne 0x403ab1
mov dword [0x4726c0], 1
cmp dword [eax], 0x43004e
jne 0x403ad5
cmp dword [eax + 4], 0x430052
jne 0x403ad5
movzx ecx, word [eax + 8]
cmp cx, di
je 0x403ad0
cmp cx, bx
jne 0x403ad5
or dword [esp + 0x1c], 4
cmp dword [eax - 4], 0x2f0020
jne 0x403ae6
cmp dword [eax], 0x3d0044
je 0x403b02
push edx
push eax
call fcn.00405f07
cmp word [eax], si
jne 0x403af4
inc eax
inc eax
movzx ecx, word [eax]
cmp cx, bx
jne 0x403a71
jmp 0x403b14
mov word [eax - 4], bx
add eax, 4
push eax
push 0x4c70a8
call fcn.004063c4
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x4d70c8
push esi
push 0x2004
call edi
call fcn.004038f8
test eax, eax
jne 0x403b86
push 0x1fff
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatW
call fcn.004038f8
test eax, eax
jne 0x403b86
push esi
push 0x2000
call edi
push 0x40933c
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 0x409328
call edi
call fcn.004038f8
test eax, eax
je 0x403c1f
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x4d30c0
call ebx
push dword [esp + 0x1c]
call fcn.0040365d
test eax, eax
mov dword [esp + 0x10], eax
jne 0x403c1d
cmp dword [0x472644], eax
je 0x403c06
push eax
push ebp
call fcn.00405f07
mov edi, eax
jmp 0x403bca
cmp dword [edi], 0x5f0020
jne 0x403bc8
cmp dword [edi + 4], 0x3d003f
je 0x403bce
dec edi
dec edi
cmp edi, ebp
jae 0x403bb7
cmp edi, ebp
mov dword [esp + 0x10], str.Error_launching_installer
jb 0x403c4b
and word [edi], 0
add edi, 8
push edi
call fcn.0040692a
test eax, eax
je 0x403c1d
push edi
push 0x4c70a8
call fcn.004063c4
push edi
push 0x4cb0b0
call fcn.004063c4
and dword [esp + 0x10], 0
or dword [0x4726cc], 0xffffffff
call fcn.00405a92
push 1
mov dword [esp + 0x18], eax
call fcn.00406495
xor ebx, ebx
call fcn.00403929
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x10], ebx
pop ebp
je 0x403d47
push 0x200010
push dword [esp + 0x10]
call fcn.00405ea3
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.0040686f
push 0x40931c
push esi
mov edi, eax
call sub.KERNEL32.dll_lstrcatW
test edi, edi
je 0x403c6c
push 0x409318
push esi
call sub.KERNEL32.dll_lstrcatW
push str..tmp
push esi
call sub.KERNEL32.dll_lstrcatW
mov ebp, 0x4cf0b8
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x403c1d
test edi, edi
push esi
je 0x403c94
call fcn.00405d88
jmp 0x403c99
call fcn.00405e09
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x4c70a8], 0
jne 0x403cb5
push ebp
push 0x4c70a8
call fcn.004063c4
push dword [esp + 0x18]
push section..ndata
call fcn.004063c4
push 0x1a
mov dword [0x477008], 0x41
pop ebp
mov edi, 0x4331f8
mov eax, dword [0x4725e0]
push dword [eax + 0x120]
push edi
call fcn.004069b2
push edi
call ebx
cmp dword [esp + 0x10], 0
je 0x403d31
push 1
push edi
push 0x4df0d8
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x403d31
push 0
push edi
call fcn.00406da0
mov eax, dword [0x4725e0]
push dword [eax + 0x124]
push edi
call fcn.004069b2
push edi
call fcn.00405e26
test eax, eax
je 0x403d31
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esp + 0x10], 0
inc word [0x477008]
dec ebp
jne 0x403cd5
push ebp
push esi
call fcn.00406da0
jmp 0x403c1d
cmp dword [0x4726b4], ebx
je 0x403dcb
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 0x403d9b
lea eax, [esp + 0x20]
push eax
push str.SeShutdownPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push ebx
push ebx
push ebx
lea eax, [esp + 0x28]
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.0040677e
cmp eax, ebx
mov esi, 0x80040002
je 0x403db7
push esi
push 0x25
push ebx
push ebx
push ebx
call eax
test eax, eax
je 0x403dc4
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403dcb
push 9
call fcn.00401414
mov eax, dword [0x4726cc]
cmp eax, 0xffffffff
je 0x403dd9
mov dword [esp + 0x10], eax
push dword [esp + 0x10]
jmp 0x403c45