Function at 0x408684
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.00409bf0
push ebx
xor ebx, ebx
cmp byte [0x444744], bl
push esi
push edi
je 0x408a9f
mov esi, 0x30d40
lea eax, [ebp - 0x313a4]
push esi
push eax
push 0x444744
call fcn.004094bc
add esp, 0xc
cmp eax, ebx
jl 0x408a71
cmp eax, 0x34
jb 0x408a71
mov ecx, dword [ebp - 0x313a4]
cmp ecx, dword [str.SIGN]
je 0x408718
push ecx
lea eax, [ebp - 0x200]
push dword [0x444944]
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.00408e8a
add esp, 0x1c
push str.Invalid_signature_on_package.
call fcn.0040be8f
jmp 0x408943
mov edi, dword [ebp - 0x31378]
mov edx, dword [ebp - 0x31374]
lea ecx, [edi + edx + 0x34]
cmp eax, ecx
jge 0x408761
push eax
lea eax, [ebp - 0x200]
push dword [0x444944]
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.00408e8a
add esp, 0x1c
push str.Package_truncated.
jmp 0x40870e
xor eax, eax
mov cl, byte [ebp + eax - 0x31398]
cmp cl, bl
je 0x408783
cmp cl, 0x5c
je 0x408780
cmp cl, 0x2f
je 0x408780
inc eax
cmp eax, 0x20
jl 0x408763
jmp 0x408783
push 0x20
pop eax
cmp eax, 0x20
jl 0x4087bf
push dword [0x444944]
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.00408e8a
add esp, 0x18
push str.Invalid_exe_name.
jmp 0x40870e
mov eax, dword [0x444944]
cmp dword [ebp - 0x313a0], eax
je 0x408818
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.00408e8a
add esp, 0x1c
push dword [0x444944]
push dword [ebp - 0x313a0]
push str.Package_not_the_latest_build__package__d_vs_reported_latest__d_.
call fcn.0040be8f
add esp, 0xc
jmp 0x408a9f
cmp edi, 0x64
ja 0x408a3e
cmp edx, esi
ja 0x408a3e
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.004095c8
add esp, 0x1c
test al, al
jne 0x40889c
push dword [0x444944]
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.00408e8a
add esp, 0x18
push str.Verify_failed____update_aborted.
jmp 0x40870e
lea eax, [ebp - 0x664]
push eax
push 0x200
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x408a9f
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 0x4110a8
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x18
cmp edi, ebx
jne 0x408949
call fcn.0040948a
push eax
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x200]
push dword [0x444944]
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.00408e8a
add esp, 0x20
lea eax, [ebp - 0x464]
push eax
push str.Could_not_open__s_for_writing.
call fcn.0040be8f
pop ecx
pop ecx
jmp 0x408a9f
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 0x4089ac
call fcn.0040948a
push eax
lea eax, [ebp - 0x200]
push dword [ebp - 0x31374]
push esi
push dword [0x444944]
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.00408e8a
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x28
jmp 0x408a9f
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.0040be8f
pop ecx
lea eax, [ebp - 0x200]
pop ecx
push dword [0x444944]
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.00408e8a
add esp, 0x18
cmp dword [0x444adc], ebx
mov eax, str._no_ads
jne 0x408a1b
mov eax, 0x444170
lea ecx, [ebp - 0x664]
push ebx
push ecx
push eax
lea eax, [ebp - 0x464]
push eax
push 0x411168
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.00408e8a
add esp, 0x1c
push str.Invalid_package_format_or_file_too_large.
jmp 0x40870e
push eax
lea eax, [ebp - 0x200]
push dword [0x444944]
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.00408e8a
add esp, 0x1c
pop edi
pop esi
pop ebx
leave
ret