Function at 0x403e36
Capabilities:
Accept command line arguments
Check if file exists
Copy file
Create directory
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:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x184
push ebx
push esi
xor ebx, ebx
push edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov byte [esp + 0x14], 0x20
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
push 8
mov dword [0x792d18], eax
pop eax
call fcn.00406f49
push ebx
push 0x160
mov dword [0x792800], eax
lea eax, [esp + 0x38]
push eax
push ebx
push 0x409ae3
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
mov edi, 0x400
push edi
push str.NSIS_Error
push 0x792000
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
mov esi, 0x799000
push esi
call fcn.00406a3a
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp byte [0x799000], 0x22
mov dword [0x792808], eax
mov eax, esi
jne 0x403ee2
mov byte [esp + 0x14], 0x22
mov eax, 0x799001
push dword [esp + 0x14]
call fcn.00406538
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov dword [esp + 0x1c], eax
jmp 0x403f60
cmp cl, 0x20
jne 0x403f03
inc eax
cmp byte [eax], 0x20
je 0x403efd
cmp byte [eax], 0x22
mov byte [esp + 0x14], 0x20
jne 0x403f13
inc eax
mov byte [esp + 0x14], 0x22
cmp byte [eax], 0x2f
jne 0x403f51
inc eax
cmp byte [eax], 0x53
jne 0x403f2f
mov cl, byte [eax + 1]
cmp cl, 0x20
je 0x403f2a
cmp cl, bl
jne 0x403f2f
or dword [esp + 0x10], 2
cmp dword [eax], 0x4352434e
jne 0x403f48
mov cl, byte [eax + 4]
cmp cl, 0x20
je 0x403f43
cmp cl, bl
jne 0x403f48
or dword [esp + 0x10], 4
cmp dword [eax - 2], 0x3d442f20
je 0x403f68
push dword [esp + 0x14]
call fcn.00406538
cmp byte [eax], 0x22
jne 0x403f60
inc eax
mov cl, byte [eax]
cmp cl, bl
jne 0x403ef8
jmp 0x403f79
mov byte [eax - 2], bl
add eax, 2
push eax
push 0x799400
call fcn.00406a3a
mov esi, 0x79a400
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathA]
call edi
call fcn.00403e00
test eax, eax
jne 0x403fe9
push 0x3fb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.Temp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
call fcn.00403e00
test eax, eax
jne 0x403fe9
push esi
push 0x3fc
call edi
push 0x409af8
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push esi
push str.TEMP
call edi
push esi
push 0x409b04
call edi
call fcn.00403e00
test eax, eax
je 0x404455
push 0x79a000
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [esp + 0x10]
call fcn.00403243
mov dword [esp + 0x18], eax
cmp eax, ebx
jne 0x404455
cmp dword [0x792864], ebx
je 0x40406b
push ebx
mov eax, 0x799000
call fcn.00406538
mov edi, eax
mov eax, 0x799000
jmp 0x40402e
cmp dword [edi], 0x3d3f5f20
je 0x404032
dec edi
cmp edi, eax
jae 0x404025
mov dword [esp + 0x18], str.Error_launching_installer
cmp edi, eax
jb 0x40409d
mov byte [edi], bl
add edi, 4
push edi
call fcn.004065e1
test eax, eax
je 0x404455
push edi
push 0x799400
call fcn.00406a3a
push edi
push 0x799800
call fcn.00406a3a
mov dword [esp + 0x18], ebx
or dword [0x792d0c], 0xffffffff
mov edi, dword [0x79280c]
push 6
pop eax
call fcn.00406f49
cmp eax, ebx
je 0x404179
call eax
movzx eax, ax
push eax
push 0x79a000
call fcn.0040699d
jmp 0x4041c9
push str.nsu.tmp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edi, 0x799c00
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x404455
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp byte [0x799400], bl
jne 0x4040e0
push edi
push 0x799400
call fcn.00406a3a
push dword [esp + 0x1c]
push section..ndata
call fcn.00406a3a
push 0x41
pop eax
mov word [0x794400], ax
mov dword [esp + 0x14], 0x1a
mov edi, 0x78d198
mov eax, dword [0x79280c]
push dword [eax + 0x120]
push edi
call fcn.00406a52
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0x18], ebx
je 0x404161
push 1
push edi
push 0x79ac00
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x404161
push ebx
push edi
call fcn.004068f9
mov eax, dword [0x79280c]
push dword [eax + 0x124]
push edi
call fcn.00406a52
push edi
call fcn.004061ee
cmp eax, ebx
je 0x404161
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], ebx
inc byte [0x794400]
dec dword [esp + 0x14]
jne 0x404104
push ebx
push esi
call fcn.004068f9
jmp 0x404455
push ebx
push str.Control_PanelDesktopResourceLocale
push 0x80000001
xor eax, eax
mov esi, 0x78e5b8
mov word [0x79a000], 0x7830
mov byte [0x79a002], bl
call fcn.0040692d
cmp byte [0x78e5b8], bl
jne 0x4041bd
push 0x409b52
push str..DEFAULTControl_PanelInternational
push 0x80000003
xor eax, eax
call fcn.0040692d
push esi
push 0x79a000
call dword [sym.imp.KERNEL32.dll_lstrcatA]
call fcn.00404731
mov eax, dword [0x792c80]
and eax, 0x20
push 0x799400
mov dword [0x792ce0], eax
mov dword [0x792cfc], 0x10000
call fcn.004065e1
test eax, eax
jne 0x40427c
mov ecx, dword [edi + 0x48]
cmp ecx, ebx
je 0x40427c
mov eax, dword [0x792838]
mov edx, dword [edi + 0x4c]
add edx, eax
push edx
add ecx, eax
push ecx
push dword [edi + 0x44]
xor eax, eax
mov esi, 0x7913c0
call fcn.0040692d
mov al, byte [0x7913c0]
cmp al, bl
je 0x40427c
cmp al, 0x22
jne 0x404238
mov eax, 0x7913c1
push 0x22
mov esi, eax
call fcn.00406538
mov byte [eax], bl
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [eax + esi - 4]
cmp eax, esi
jbe 0x40426c
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40426c
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404267
test al, 0x10
jne 0x40426c
call fcn.00406553
call fcn.00406513
push eax
push 0x799400
call fcn.00406a3a
mov esi, 0x799400
push esi
call fcn.004065e1
test eax, eax
jne 0x404297
push dword [edi + 0x118]
push esi
call fcn.00406a52
test byte [0x792c80], 0x10
je 0x4042b7
cmp dword [0x792864], ebx
jne 0x4042b7
call fcn.0040470c
mov dword [0x790ba8], 1
push 0x8040
push ebx
push ebx
push 1
push 0x67
push dword [0x792808]
call dword [sym.imp.USER32.dll_LoadImageA]
cmp dword [edi + 0x50], 0xffffffff
mov dword [0x791fc8], eax
mov esi, 0x790b80
je 0x40435d
mov ecx, dword [0x792808]
mov edi, 0x409b8c
push esi
mov dword [0x790b84], 0x401000
mov dword [0x790b90], ecx
mov dword [0x790b94], eax
mov dword [0x790ba4], edi
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x40444a
push ebx
lea eax, [esp + 0x24]
push eax
push ebx
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x24]
push ebx
push dword [0x792808]
push ebx
push ebx
push eax
mov eax, dword [esp + 0x3c]
sub eax, dword [esp + 0x34]
push eax
push dword [esp + 0x3c]
push dword [esp + 0x3c]
push 0x80000000
push ebx
push edi
push 0x80
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x78d5b4], eax
xor ecx, ecx
call fcn.0040149c
test eax, eax
je 0x404375
mov dword [esp + 0x10], 2
jmp 0x40444e
call fcn.00404731
cmp dword [0x792d00], ebx
jne 0x40441f
push 5
push dword [0x78d5b4]
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.RichEd20
call edi
test eax, eax
jne 0x4043ac
push str.RichEd32
call edi
mov edi, dword [sym.imp.USER32.dll_GetClassInfoA]
push esi
push 0x409ba8
push ebx
call edi
test eax, eax
jne 0x4043d9
push esi
push str.RichEdit
push ebx
call edi
push esi
mov dword [0x790ba4], 0x409ba8
call dword [sym.imp.USER32.dll_RegisterClassA]
mov eax, dword [0x791fd4]
push ebx
push 0x404873
add eax, 0x69
movzx eax, ax
push ebx
push eax
push dword [0x792808]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push 5
pop ecx
mov edi, eax
call fcn.0040149c
mov eax, dword [0x790b58]
mov esi, eax
cmp eax, ebx
je 0x404419
push 1
call dword [esi + 4]
mov esi, dword [esi]
pop ecx
cmp esi, ebx
jne 0x40440d
mov dword [esp + 0x10], edi
jmp 0x40444e
push ebx
call fcn.00405db2
test eax, eax
je 0x404442
cmp dword [0x791fcc], ebx
jne 0x404368
push 2
pop ecx
call fcn.0040149c
jmp 0x404368
xor ecx, ecx
inc ecx
call fcn.0040149c
mov dword [esp + 0x10], ebx
push 1
call fcn.00406d7c
mov eax, dword [0x40b08c]
cmp eax, 0xffffffff
je 0x40446d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x40b08c], 0xffffffff
mov eax, dword [0x790b58]
mov esi, eax
mov edi, eax
cmp eax, ebx
je 0x40449d
push ebx
call dword [edi + 4]
mov edi, dword [edi]
pop ecx
cmp edi, ebx
jne 0x40447a
mov edi, esi
push dword [edi + 8]
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp esi, ebx
jne 0x404485
push 7
push 0x79a800
mov dword [0x790b58], ebx
call fcn.004062f6
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x18], ebx
je 0x4044d1
push dword [esp + 0x18]
mov eax, 0x200010
call fcn.0040624d
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [0x792cf4], ebx
je 0x404562
push 3
pop eax
call fcn.00406f49
push 4
mov dword [esp + 0x18], eax
pop eax
call fcn.00406f49
push 5
mov esi, eax
pop eax
call fcn.00406f49
mov edi, eax
cmp dword [esp + 0x14], ebx
je 0x40454d
cmp esi, ebx
je 0x40454d
cmp edi, ebx
je 0x40454d
lea eax, [esp + 0x1c]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [esp + 0x20]
test eax, eax
je 0x40454d
lea eax, [esp + 0x24]
push eax
push str.SeShutdownPrivilege
push ebx
call esi
push ebx
push ebx
push ebx
lea eax, [esp + 0x2c]
push eax
push ebx
push dword [esp + 0x30]
mov dword [esp + 0x38], 1
mov dword [esp + 0x44], 2
call edi
push ebx
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x404562
push 9
pop ecx
call fcn.0040149c
mov eax, dword [0x792d0c]
cmp eax, 0xffffffff
je 0x404570
mov dword [esp + 0x10], eax
push dword [esp + 0x10]
jmp 0x4044cb