Function at 0x403834
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 0x40387a
push ebx
call fcn.00406cb0
cmp eax, ebx
je 0x40387a
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.00406c40
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x40387f
push ebp
push 9
call fcn.00406cb0
push 7
call fcn.00406cb0
mov dword [0x4377c4], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
mov dword [0x437878], eax
push ebx
lea eax, [esp + 0x34]
push 0x2b4
push eax
push ebx
push 0x42c2c8
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x4367c0
call fcn.0040672e
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ebp, 0x442000
push eax
push ebp
call fcn.0040672e
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp word [0x442000], 0x22
mov dword [0x4377c0], eax
mov eax, ebp
jne 0x403913
push 0x22
mov eax, 0x442002
pop edi
push edi
push eax
call fcn.0040610f
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 0x403a44
push 0x20
pop ebx
cmp ax, bx
jne 0x403942
inc ecx
inc ecx
cmp word [ecx], bx
je 0x40393b
cmp word [ecx], 0x22
jne 0x40394d
inc ecx
push 0x22
inc ecx
pop ebx
cmp word [ecx], 0x2f
jne 0x403a10
inc ecx
inc ecx
cmp word [ecx], 0x53
jne 0x403978
mov ax, word [ecx + 2]
cmp ax, 0x20
je 0x40396e
test ax, ax
jne 0x403978
mov dword [0x437860], 1
movzx eax, word [0x40b01e]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov edi, eax
xor esi, esi
movzx eax, word [0x40b01c]
cdq
movzx edx, word [str.NCRC]
or edi, eax
movzx eax, word [0x40b01a]
shl eax, 0x10
or eax, edx
cdq
or esi, eax
mov eax, dword [ecx]
or edi, edx
cmp eax, esi
jne 0x4039ce
mov eax, dword [ecx + 4]
cmp eax, edi
jne 0x4039ce
mov ax, word [ecx + 8]
cmp ax, 0x20
je 0x4039c9
test ax, ax
jne 0x4039ce
or dword [esp + 0x1c], 4
movzx eax, word [0x40b012]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov edi, eax
xor esi, esi
movzx eax, word [0x40b010]
cdq
movzx edx, word [str.__D]
or edi, eax
movzx eax, word [0x40b00e]
shl eax, 0x10
or eax, edx
cdq
or esi, eax
mov eax, dword [ecx - 4]
or edi, edx
cmp eax, esi
jne 0x403a10
mov eax, dword [ecx]
cmp eax, edi
je 0x403a2f
push ebx
push ecx
call fcn.0040610f
mov ecx, eax
cmp word [ecx], 0x22
jne 0x403a21
inc ecx
inc ecx
mov ax, word [ecx]
test ax, ax
jne 0x403933
jmp 0x403a42
and word [ecx - 4], 0
add ecx, 4
push ecx
push 0x442800
call fcn.0040672e
xor ebx, ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x444800
push esi
push 0x400
call edi
call fcn.00403803
test eax, eax
jne 0x403ab6
push 0x3fb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatW
call fcn.00403803
test eax, eax
jne 0x403ab6
push esi
push 0x3fc
call edi
push 0x40aff8
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 0x40afe4
call edi
call fcn.00403803
test eax, eax
je 0x403b88
push 0x444000
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x1c]
call fcn.0040329d
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x403b88
cmp dword [0x4377dc], ebx
je 0x403b71
push ebx
push ebp
call fcn.0040610f
mov edi, eax
cmp edi, ebp
jb 0x403b3b
movzx eax, word [0x40afde]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov ebx, eax
movzx eax, word [0x40afdc]
movzx ecx, word [str.___]
cdq
or ebx, eax
movzx eax, word [0x40afda]
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 0x403b33
mov edx, dword [edi + 4]
cmp edx, eax
je 0x403b39
dec edi
dec edi
cmp edi, ebp
jae 0x403b26
xor ebx, ebx
cmp edi, ebp
mov dword [esp + 0x10], str.Error_launching_installer
jb 0x403bb4
mov word [edi], bx
add edi, 8
push edi
call fcn.004061ea
test eax, eax
je 0x403b88
push edi
push 0x442800
call fcn.0040672e
push edi
push 0x443000
call fcn.0040672e
mov dword [esp + 0x10], ebx
or dword [0x43786c], 0xffffffff
call fcn.00403e6d
push 1
mov dword [esp + 0x18], eax
call fcn.00406a71
call fcn.00403d5a
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x10], ebx
pop ebp
je 0x403cbe
push 0x200010
push dword [esp + 0x10]
call fcn.00405e1a
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.00405d9d
push 0x40afcc
push esi
mov edi, eax
call sub.KERNEL32.dll_lstrcatW
cmp edi, ebx
je 0x403bd5
push 0x40afc8
push esi
call sub.KERNEL32.dll_lstrcatW
push str..tmp
push esi
call sub.KERNEL32.dll_lstrcatW
mov ebp, 0x443800
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x403b88
cmp edi, ebx
push esi
je 0x403bfd
call fcn.00405d03
jmp 0x403c02
call fcn.00405d80
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x442800], bx
jne 0x403c1d
push ebp
push 0x442800
call fcn.0040672e
push dword [esp + 0x18]
push section..ndata
call fcn.0040672e
movzx eax, word [0x40afb6]
movzx ecx, word [0x40afb4]
shl eax, 0x10
or eax, ecx
push 0x1a
mov dword [0x438800], eax
pop ebp
mov edi, 0x42bac8
mov eax, dword [0x4377d0]
push dword [eax + 0x120]
push edi
call fcn.00406750
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x10], ebx
je 0x403ca8
push 1
push edi
push 0x445800
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x403ca8
push ebx
push edi
call fcn.004065cf
mov eax, dword [0x4377d0]
push dword [eax + 0x124]
push edi
call fcn.00406750
push edi
call fcn.00405db5
cmp eax, ebx
je 0x403ca8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], ebx
inc word [0x438800]
dec ebp
jne 0x403c4b
push ebx
push esi
call fcn.004065cf
jmp 0x403b88
cmp dword [0x437854], ebx
je 0x403d42
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 0x403d12
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.00406cb0
cmp eax, ebx
mov esi, 0x80040002
je 0x403d2e
push esi
push 0x25
push ebx
push ebx
push ebx
call eax
test eax, eax
je 0x403d3b
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403d42
push 9
call fcn.0040140b
mov eax, dword [0x43786c]
cmp eax, 0xffffffff
je 0x403d50
mov dword [esp + 0x10], eax
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_ExitProcess]