Function at 0x40335a
Capabilities:
Accept command line arguments
Copy file
Create directory
Delete file
Get common file path
Get file system object information
Set current directory
Set environment variable
Shutdown system
Terminate process

Disassembly:
sub esp, 0x2d8
push ebx
push ebp
push esi
push edi
push 0x20
xor ebp, ebp
pop esi
mov dword [esp + 0x18], ebp
mov dword [esp + 0x10], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [esp + 0x14], ebp
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push ebp
call dword [sym.imp.ole32.dll_OleInitialize]
push 9
mov dword [0x4292b8], eax
call fcn.004062b2
mov dword [0x429204], eax
push ebp
lea eax, [esp + 0x38]
push 0x2b4
push eax
push ebp
push 0x4206a8
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x428200
call fcn.00405f48
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ebx, 0x434000
push eax
push ebx
call fcn.00405f48
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x22
mov dword [0x429200], eax
pop edi
mov eax, ebx
cmp word [0x434000], di
jne 0x4033fb
mov esi, edi
mov eax, 0x434002
push esi
push eax
call fcn.004059c0
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov ecx, eax
mov dword [esp + 0x1c], ecx
jmp 0x40350a
push 0x20
pop edx
cmp ax, dx
jne 0x403423
inc ecx
inc ecx
cmp word [ecx], dx
je 0x40341c
cmp word [ecx], di
mov dword [esp + 0x20], edx
jne 0x403432
inc ecx
mov dword [esp + 0x20], edi
inc ecx
cmp word [ecx], 0x2f
jne 0x4034f7
inc ecx
inc ecx
cmp word [ecx], 0x53
jne 0x40345c
mov ax, word [ecx + 2]
cmp ax, dx
je 0x403452
cmp ax, bp
jne 0x40345c
mov dword [0x4292a0], 1
movzx eax, word [0x409376]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov edi, eax
xor esi, esi
movzx eax, word [0x409374]
cdq
movzx edx, word [str.NCRC]
or edi, eax
movzx eax, word [0x409372]
shl eax, 0x10
or eax, edx
cdq
or esi, eax
mov eax, dword [ecx]
or edi, edx
cmp eax, esi
jne 0x4034b2
mov eax, dword [ecx + 4]
cmp eax, edi
jne 0x4034b2
mov ax, word [ecx + 8]
cmp ax, 0x20
je 0x4034ad
cmp ax, bp
jne 0x4034b2
or dword [esp + 0x14], 4
movzx eax, word [0x40936a]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov edi, eax
xor esi, esi
movzx eax, word [0x409368]
cdq
movzx edx, word [str.__D]
or edi, eax
movzx eax, word [0x409366]
shl eax, 0x10
or eax, edx
cdq
or esi, eax
mov eax, dword [ecx - 4]
or edi, edx
cmp eax, esi
jne 0x4034f4
mov eax, dword [ecx]
cmp eax, edi
je 0x403518
push 0x22
pop edi
push dword [esp + 0x20]
push ecx
call fcn.004059c0
mov ecx, eax
cmp word [ecx], di
jne 0x40350a
inc ecx
inc ecx
mov ax, word [ecx]
cmp ax, bp
jne 0x403414
jmp 0x40352a
mov word [ecx - 4], bp
add ecx, 4
push ecx
push 0x434800
call fcn.00405f48
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, 0x436800
push edi
push 0x400
call esi
call fcn.00403326
test eax, eax
jne 0x40359c
push 0x3fb
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push edi
call sub.KERNEL32.dll_lstrcatW
call fcn.00403326
test eax, eax
jne 0x40359c
push edi
push 0x3fc
call esi
push 0x409350
push edi
call sub.KERNEL32.dll_lstrcatW
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
push str.TEMP
call esi
push edi
push 0x40933c
call esi
call fcn.00403326
test eax, eax
je 0x403667
push 0x436000
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x14]
call fcn.00402dbc
cmp eax, ebp
mov dword [esp + 0x10], eax
jne 0x403667
cmp dword [0x42921c], ebp
je 0x403657
push ebp
push ebx
call fcn.004059c0
mov esi, eax
cmp esi, ebx
jb 0x403621
movzx eax, word [0x409336]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov ebp, eax
movzx eax, word [0x409334]
movzx ecx, word [0x409330]
cdq
or ebp, eax
movzx eax, word [0x409332]
shl eax, 0x10
or eax, ecx
xor ecx, ecx
cdq
or ecx, eax
mov eax, ebp
or eax, edx
mov edx, dword [esi]
cmp edx, ecx
jne 0x403619
mov edx, dword [esi + 4]
cmp edx, eax
je 0x40361f
dec esi
dec esi
cmp esi, ebx
jae 0x40360c
xor ebp, ebp
cmp esi, ebx
mov dword [esp + 0x10], str.Error_launching_installer
jb 0x403692
mov word [esi], bp
add esi, 8
push esi
call fcn.00405a9b
test eax, eax
je 0x403667
push esi
push 0x434800
call fcn.00405f48
push esi
push 0x435000
call fcn.00405f48
mov dword [esp + 0x10], ebp
or dword [0x4292ac], 0xffffffff
call fcn.0040391f
mov dword [esp + 0x18], eax
call fcn.0040382d
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x10], ebp
je 0x403772
push 0x200010
push dword [esp + 0x14]
call fcn.00405724
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push str.nsu.tmp
push edi
call sub.KERNEL32.dll_lstrcatW
mov esi, 0x435800
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x403667
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x434800], bp
jne 0x4036d1
push esi
push 0x434800
call fcn.00405f48
push dword [esp + 0x1c]
push section..ndata
call fcn.00405f48
movzx eax, word [0x409316]
movzx ecx, word [0x409314]
shl eax, 0x10
or eax, ecx
push 0x1a
mov dword [0x42a800], eax
pop ebx
mov esi, 0x41fea8
mov eax, dword [0x429210]
push dword [eax + 0x120]
push esi
call fcn.00405f6a
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x10], ebp
je 0x40375c
push 1
push esi
push 0x437800
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40375c
push ebp
push esi
call fcn.00405de2
mov eax, dword [0x429210]
push dword [eax + 0x124]
push esi
call fcn.00405f6a
push esi
call fcn.004056c3
cmp eax, ebp
je 0x40375c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], ebp
inc word [0x42a800]
dec ebx
jne 0x4036ff
push ebp
push edi
call fcn.00405de2
jmp 0x403667
cmp dword [0x429294], ebp
je 0x403815
push 4
call fcn.004062b2
push 5
mov ebx, eax
call fcn.004062b2
push 6
mov esi, eax
call fcn.004062b2
cmp ebx, ebp
mov edi, eax
je 0x4037e5
cmp esi, ebp
je 0x4037e5
cmp edi, ebp
je 0x4037e5
lea eax, [esp + 0x1c]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call ebx
test eax, eax
je 0x4037e5
lea eax, [esp + 0x28]
push eax
push str.SeShutdownPrivilege
push ebp
call esi
push ebp
push ebp
lea eax, [esp + 0x2c]
push ebp
push eax
push ebp
push dword [esp + 0x30]
mov dword [esp + 0x3c], 1
mov dword [esp + 0x48], 2
call edi
push 7
call fcn.004062b2
cmp eax, ebp
mov esi, 0x80040002
je 0x403801
push esi
push 0x25
push ebp
push ebp
push ebp
call eax
test eax, eax
je 0x40380e
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403815
push 9
call fcn.0040140b
mov eax, dword [0x4292ac]
cmp eax, 0xffffffff
je 0x403823
mov dword [esp + 0x18], eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_ExitProcess]