Function at 0x48000e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1048
call fcn.004d7290
sub esp, eax
mov dword [ebp - 0x23], 0x2e676d2e
mov dword [ebp - 0x1f], 0x58585858
mov dword [ebp - 0x1c], 0x585858
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x500a68
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dbg._jailfile
test eax, eax
jns 0x48008e
mov dword [esp + 0x14], str.uncompress__
mov dword [esp + 0x10], str._8126_:_At__s:_Invalid_file_name.
mov dword [esp + 0xc], str._uncompress
mov dword [esp + 8], 0x1dd
mov dword [esp + 4], str.wazuh_modules_agent_upgrade_agent_wm_agent_upgrade_com.c
mov dword [esp], str.wazuh_modulesd:agent_upgrade
call dbg._mterror
mov eax, 0xffffffff
jmp 0x480303
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
add eax, 0xa
cmp eax, 0x104
jbe 0x4800e7
mov dword [esp + 0x14], str.uncompress__
mov dword [esp + 0x10], str._8137_:_At__s:_Too_long_temp_file.
mov dword [esp + 0xc], str._uncompress
mov dword [esp + 8], 0x1e5
mov dword [esp + 4], str.wazuh_modules_agent_upgrade_agent_wm_agent_upgrade_com.c
mov dword [esp], str.wazuh_modulesd:agent_upgrade
call dbg._mterror
mov eax, 0xffffffff
jmp 0x480303
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0xc]
add eax, edx
mov edx, dword [ebp - 0x23]
mov dword [eax], edx
mov edx, dword [ebp - 0x1f]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x1c]
mov dword [eax + 7], edx
mov dword [esp + 4], 0x500b0b
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._gzopen
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x480161
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], str.uncompress__
mov dword [esp + 0x10], str._8140_:_At__s:_Unable_to_open__s
mov dword [esp + 0xc], str._uncompress
mov dword [esp + 8], 0x1ed
mov dword [esp + 4], str.wazuh_modules_agent_upgrade_agent_wm_agent_upgrade_com.c
mov dword [esp], str.wazuh_modulesd:agent_upgrade
call dbg._mterror
mov eax, 0xffffffff
jmp 0x480303
mov dword [esp + 4], 0x5007a8
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x480260
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._gzclose
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], str.uncompress__
mov dword [esp + 0x10], str._8140_:_At__s:_Unable_to_open__s
mov dword [esp + 0xc], str._uncompress
mov dword [esp + 8], 0x1f3
mov dword [esp + 4], str.wazuh_modules_agent_upgrade_agent_wm_agent_upgrade_com.c
mov dword [esp], str.wazuh_modulesd:agent_upgrade
call dbg._mterror
mov eax, 0xffffffff
jmp 0x480303
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
lea eax, [ebp - 0x1023]
mov dword [esp], eax
call sym._fwrite
cmp dword [ebp - 0x18], eax
je 0x480260
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym._unlink
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._gzclose
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], str.uncompress__
mov dword [esp + 0x10], str._8129_:_At__s:_Cannot_write_on__s
mov dword [esp + 0xc], str._uncompress
mov dword [esp + 8], 0x1ff
mov dword [esp + 4], str.wazuh_modules_agent_upgrade_agent_wm_agent_upgrade_com.c
mov dword [esp], str.wazuh_modulesd:agent_upgrade
call dbg._mterror
mov eax, 0xffffffff
jmp 0x480303
mov dword [esp + 8], 0x1000
lea eax, [ebp - 0x1023]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._gzread
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jg 0x4801d1
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._gzclose
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fclose
cmp dword [ebp - 0x18], 0
jns 0x4802f3
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym._unlink
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], str.uncompress__
mov dword [esp + 0x10], str._8141_:_At__s:_Unable_to_read__s
mov dword [esp + 0xc], str._uncompress
mov dword [esp + 8], 0x209
mov dword [esp + 4], str.wazuh_modules_agent_upgrade_agent_wm_agent_upgrade_com.c
mov dword [esp], str.wazuh_modulesd:agent_upgrade
call dbg._mterror
mov eax, 0xffffffff
jmp 0x480303
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._unlink
mov eax, 0
leave
ret