Function at 0x404b79
Capabilities:
Delete file
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push 0x540
mov eax, 0x40675b
call fcn.00405e37
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [0x40b0e8]
cmp eax, ebx
je 0x404bab
cmp byte [eax + 0x24], bl
je 0x404bab
push str._I___unpack__Starting_unpack
call fcn.00404212
pop ecx
mov eax, dword [0x40b0e8]
cmp byte [eax + 0x7c], bl
jne 0x404bdd
mov dword [ebp - 0x53c], 0x10
cmp dword [ebp - 0x53c], ebx
jle 0x404bdd
cmp dword [0x40b0f4], ebx
jne 0x404bdd
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
dec dword [ebp - 0x53c]
jmp 0x404bba
push str.PACKAGE
push 0x96
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
cmp esi, ebx
jne 0x404c20
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str._E___unpack__Could_not_find_package:__u
call fcn.00404212
mov edi, str.Find_resource_error
push esi
mov ecx, str.Could_not_extract_package_to_install:
call fcn.00404393
add esp, 0xc
call fcn.00405e93
ret
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x534], eax
cmp eax, ebx
jne 0x404c4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str._E___unpack__Could_not_get_package_size:__u
call fcn.00404212
mov edi, str.Size_resource_error
jmp 0x404c0c
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
jne 0x404c72
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str._E___unpack__Could_not_load_package:__u
call fcn.00404212
mov edi, str.Load_resource_error
jmp 0x404c0c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
cmp edi, ebx
jne 0x404c9c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str._E___unpack__Could_not_lock_package:__u
call fcn.00404212
mov edi, str.Lock_resource_error
jmp 0x404c0c
mov eax, dword [0x40b0e8]
cmp eax, ebx
je 0x404cba
cmp byte [eax + 0x24], bl
je 0x404cba
push str._I___unpack__Will_save_msi_file
call fcn.00404212
pop ecx
mov eax, dword [0x40b0e8]
cmp dword [eax + 0x80], 2
jne 0x404cd4
mov dword [ebp - 0x51c], str.automatos.msi
mov esi, 0x80
jmp 0x404d49
lea eax, [ebp - 0x518]
push eax
push 0x504
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x404cfd
push 0x407aac
lea eax, [ebp - 0x518]
push eax
call sub.MSVCR100.dll_strcpy
pop ecx
pop ecx
lea eax, [ebp - 0x518]
mov dword [ebp - 0x51c], eax
push eax
call sub.MSVCR100.dll_strlen
pop ecx
lea ecx, [ebp - 0x518]
cmp byte [eax + ecx - 1], 0x5c
je 0x404d2c
push 0x407aa8
mov eax, ecx
push eax
call sub.MSVCR100.dll_strcat
pop ecx
pop ecx
push str.automatos.msi
lea eax, [ebp - 0x518]
push eax
call sub.MSVCR100.dll_strcat
pop ecx
pop ecx
mov esi, 0x100
mov eax, dword [0x40b0e8]
cmp eax, ebx
je 0x404d64
cmp byte [eax + 0x24], bl
je 0x404d64
push dword [ebp - 0x51c]
push str._I___unpack__Save_to:__s
call fcn.00404212
pop ecx
pop ecx
push ebx
push esi
push 2
push ebx
push 3
push 0x40000000
push dword [ebp - 0x51c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x540], eax
cmp eax, 0xffffffff
jne 0x404da4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str._E___unpack__Could_not_create_package_file:__u
call fcn.00404212
mov edi, str.Create_file_error
jmp 0x404c0c
push eax
lea ecx, [ebp - 0x528]
call fcn.004041d6
mov byte [ebp - 4], 1
mov dword [ebp - 0x52c], ebx
mov eax, dword [0x40b0f4]
cmp eax, ebx
je 0x404dd5
push 0x3e8
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
mov dword [ebp - 0x52c], eax
mov eax, dword [0x40b0e8]
cmp eax, ebx
je 0x404dee
cmp byte [eax + 0x24], bl
je 0x404dee
push str._I___unpack__Extracting
call fcn.00404212
pop ecx
mov eax, dword [ebp - 0x534]
mov dword [ebp - 0x520], eax
mov dword [ebp - 0x538], edi
mov edi, 0x10000
cmp dword [ebp - 0x520], ebx
je 0x404f2b
cmp byte [0x40b0fc], bl
jne 0x404f2b
mov esi, edi
cmp dword [ebp - 0x520], edi
jae 0x404e2d
mov esi, dword [ebp - 0x520]
push ebx
lea eax, [ebp - 0x548]
push eax
push esi
push dword [ebp - 0x538]
push dword [ebp - 0x540]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x404edd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str._E___unpack__Could_not_write_to_package_file:__u
call fcn.00404212
push esi
mov ecx, str.Could_not_extract_package_to_install:
mov edi, str.Write_file_error
call fcn.00404393
add esp, 0xc
or dword [ebp - 0x544], 0xffffffff
mov byte [ebp - 0x540], bl
mov byte [ebp - 4], 2
lea eax, [ebp - 0x544]
push eax
lea ecx, [ebp - 0x528]
call fcn.004042f5
mov byte [ebp - 4], 1
cmp byte [ebp - 0x540], bl
je 0x404eb1
push dword [ebp - 0x544]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x51c]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov byte [ebp - 4], bl
cmp byte [ebp - 0x524], bl
je 0x404c1a
push dword [ebp - 0x528]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x404c1a
sub dword [ebp - 0x520], esi
add dword [ebp - 0x538], esi
cmp dword [ebp - 0x52c], ebx
je 0x404e05
mov eax, dword [ebp - 0x534]
sub eax, dword [ebp - 0x520]
imul eax, eax, 0x64
xor edx, edx
div dword [ebp - 0x534]
cmp eax, ebx
jne 0x404f13
push 0x64
pop eax
push ebx
push eax
push 0x402
push dword [ebp - 0x52c]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x404e05
or dword [ebp - 0x530], 0xffffffff
mov byte [ebp - 0x52c], bl
mov byte [ebp - 4], 3
lea eax, [ebp - 0x530]
push eax
lea ecx, [ebp - 0x528]
call fcn.004042f5
mov byte [ebp - 4], 1
cmp byte [ebp - 0x52c], bl
je 0x404f66
push dword [ebp - 0x530]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x40b0fc], bl
je 0x404f94
mov eax, dword [0x40b0e8]
cmp eax, ebx
je 0x404eb1
cmp byte [eax + 0x24], bl
je 0x404eb1
push str._I___unpack__Cancel_request
call fcn.00404212
pop ecx
jmp 0x404eb1
mov eax, dword [0x40b0f4]
cmp eax, ebx
je 0x404fa5
push ebx
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x40b0e8]
cmp eax, ebx
je 0x404fc3
cmp byte [eax + 0x24], bl
je 0x404fc3
push str._I___unpack__Processing_msi_request
call fcn.00404212
pop ecx
mov eax, dword [0x40b0e8]
cmp dword [eax + 0x80], 2
je 0x4050f9
mov ecx, dword [ebp - 0x51c]
call fcn.00404464
test al, al
je 0x404eb1
mov eax, dword [0x40b0e8]
cmp byte [eax + 0x7d], bl
je 0x405002
cmp byte [eax + 0x24], bl
je 0x404ffd
push str._I___unpack__Setting_silent_mode
call fcn.00404212
pop ecx
push ebx
push 2
jmp 0x405015
cmp byte [eax + 0x24], bl
je 0x405012
push str._I___unpack__Setting_full_ui_mode
call fcn.00404212
pop ecx
push ebx
push 5
call dword [0x40b0f0]
mov esi, dword [0x40b0e8]
mov ecx, esi
call fcn.0040437e
test eax, eax
je 0x405046
push ebx
mov ecx, esi
call fcn.0040437e
push eax
push 0x151e
call dword [0x40b0d0]
mov esi, dword [0x40b0e8]
lea edi, [esi + 4]
mov esi, str._USINGAUTOMATOS1
push esi
call sub.MSVCR100.dll_strlen
pop ecx
push eax
push esi
mov ecx, edi
call fcn.004029b0
mov eax, dword [0x40b0e8]
cmp dword [eax + 0x80], 1
jne 0x405089
lea edi, [eax + 4]
mov esi, str._REMOVEALL
push esi
call sub.MSVCR100.dll_strlen
pop ecx
push eax
push esi
mov ecx, edi
call fcn.004029b0
mov eax, dword [0x40b0e8]
add eax, 4
cmp dword [eax + 0x14], 0x10
jb 0x405094
mov eax, dword [eax]
push eax
push dword [ebp - 0x51c]
call dword [0x40b0c8]
mov esi, eax
cmp esi, ebx
je 0x4050da
push esi
push str._E___unpack__Process_msi_request:__u
call fcn.00404212
pop ecx
pop ecx
cmp esi, 0x644
je 0x4050da
cmp esi, 0x642
je 0x4050da
cmp esi, 0x643
je 0x4050da
push esi
xor ecx, ecx
mov edi, str.MSI_error
call fcn.00404393
pop ecx
mov eax, dword [0x40b0e8]
cmp dword [eax + 0x80], 2
je 0x4050f9
push dword [ebp - 0x51c]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [0x40b0e8]
cmp eax, ebx
je 0x40510d
cmp byte [eax + 0x24], bl
je 0x40510d
push str._I___unpack__The_end
call fcn.00404212
pop ecx
mov byte [ebp - 4], bl
cmp byte [ebp - 0x524], bl
je 0x405124
push dword [ebp - 0x528]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
jmp 0x404c1a