Function at 0x4080c2
Capabilities:
Create process on windows
Get common file path
Terminate process
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x313a4
call fcn.00409640
push ebx
xor ebx, ebx
cmp byte [0x41aefc], bl
push esi
push edi
je 0x4084dd
mov esi, 0x30d40
lea eax, [ebp - 0x313a4]
push esi
push eax
push 0x41aefc
call fcn.00408f0e
add esp, 0xc
cmp eax, ebx
jl 0x4084af
cmp eax, 0x34
jb 0x4084af
mov ecx, dword [ebp - 0x313a4]
cmp ecx, dword [str.SIGN]
je 0x408156
push ecx
lea eax, [ebp - 0x200]
push dword [0x41b0fc]
push str.Update_to__d:_Invalid_signature__08x_on_package
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x200]
push eax
push ebx
push str.update
call fcn.004088c9
add esp, 0x1c
push str.Invalid_signature_on_package.
call fcn.004084e2
jmp 0x408381
mov edi, dword [ebp - 0x31378]
mov edx, dword [ebp - 0x31374]
lea ecx, [edi + edx + 0x34]
cmp eax, ecx
jge 0x40819f
push eax
lea eax, [ebp - 0x200]
push dword [0x41b0fc]
push str.Update_to__d:_Package_truncated__len__d_.
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x200]
push eax
push ebx
push str.update
call fcn.004088c9
add esp, 0x1c
push str.Package_truncated.
jmp 0x40814c
xor eax, eax
mov cl, byte [ebp + eax - 0x31398]
cmp cl, bl
je 0x4081c1
cmp cl, 0x5c
je 0x4081be
cmp cl, 0x2f
je 0x4081be
inc eax
cmp eax, 0x20
jl 0x4081a1
jmp 0x4081c1
push 0x20
pop eax
cmp eax, 0x20
jl 0x4081fd
push dword [0x41b0fc]
lea eax, [ebp - 0x200]
push str.Update_to__d:_Invalid_exe_name.
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x200]
push eax
push ebx
push str.update
call fcn.004088c9
add esp, 0x18
push str.Invalid_exe_name.
jmp 0x40814c
mov eax, dword [0x41b0fc]
cmp dword [ebp - 0x313a0], eax
je 0x408256
push eax
lea eax, [ebp - 0x200]
push dword [ebp - 0x313a0]
push str.Update_to__d:_Package_contains_earlier_version__d.
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x200]
push eax
push ebx
push str.update
call fcn.004088c9
add esp, 0x1c
push dword [0x41b0fc]
push dword [ebp - 0x313a0]
push str.Package_not_the_latest_build__package__d_vs_reported_latest__d_.
call fcn.004084e2
add esp, 0xc
jmp 0x4084dd
cmp edi, 0x64
ja 0x40847c
cmp edx, esi
ja 0x40847c
lea eax, [ebp - 0x31370]
push edi
push eax
lea eax, [ebp - 0x264]
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 0x31378]
push eax
lea esi, [ebp + eax - 0x31370]
lea eax, [ebp - 0x264]
push eax
push dword [ebp - 0x31374]
push esi
call fcn.0040901a
add esp, 0x1c
test al, al
jne 0x4082da
push dword [0x41b0fc]
lea eax, [ebp - 0x200]
push str.Update_to__d:_Verify_failed.
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x200]
push eax
push ebx
push str.update
call fcn.004088c9
add esp, 0x18
push str.Verify_failed____update_aborted.
jmp 0x40814c
lea eax, [ebp - 0x664]
push eax
push 0x200
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
test eax, eax
je 0x4084dd
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x464]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x31398]
push eax
lea eax, [ebp - 0x464]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x464]
push 0x417098
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x18
cmp edi, ebx
jne 0x408387
call fcn.00408edc
push eax
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x200]
push dword [0x41b0fc]
push str.Update_to__d:_Could_not_open__s_for_writing.___s_
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x200]
push eax
push ebx
push str.update
call fcn.004088c9
add esp, 0x20
lea eax, [ebp - 0x464]
push eax
push str.Could_not_open__s_for_writing.
call fcn.004084e2
pop ecx
pop ecx
jmp 0x4084dd
push edi
push dword [ebp - 0x31374]
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fwrite]
mov esi, eax
add esp, 0x10
cmp esi, dword [ebp - 0x31374]
je 0x4083ea
call fcn.00408edc
push eax
lea eax, [ebp - 0x200]
push dword [ebp - 0x31374]
push esi
push dword [0x41b0fc]
push str.Update_to__d:_Only_wrote__d_of__d_bytes.___s_
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x200]
push eax
push ebx
push str.update
call fcn.004088c9
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x28
jmp 0x4084dd
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
lea eax, [ebp - 0x664]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
mov byte [ebp + eax - 0x665], bl
pop ecx
lea eax, [ebp - 0x464]
push eax
push str.Wrote__s____executing.
call fcn.004084e2
pop ecx
lea eax, [ebp - 0x200]
pop ecx
push dword [0x41b0fc]
push str.Update_to__d:_Success.
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x200]
push eax
push 1
push str.update
call fcn.004088c9
add esp, 0x18
cmp dword [0x41b294], ebx
mov eax, str._no_ads
jne 0x408459
mov eax, 0x41a928
lea ecx, [ebp - 0x664]
push ebx
push ecx
push eax
lea eax, [ebp - 0x464]
push eax
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push ebx
call dword [sym.imp.MSVCRT.dll_exit]
push edx
push eax
lea eax, [ebp - 0x200]
push str.Update_to__d:_File_too_large.
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x200]
push eax
push ebx
push str.update
call fcn.004088c9
add esp, 0x1c
push str.Invalid_package_format_or_file_too_large.
jmp 0x40814c
push eax
lea eax, [ebp - 0x200]
push dword [0x41b0fc]
push str.Update_to__d:_Package_truncated__len__d_.
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x200]
push eax
push ebx
push str.update
call fcn.004088c9
add esp, 0x1c
pop edi
pop esi
pop ebx
leave
ret