Function at 0x401071
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2194
call fcn.004c6510
mov eax, dword [0x5345d0]
xor eax, esp
mov dword [esp + 0x2190], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
push edi
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x14]
xor ebx, ebx
mov edi, 0x7ff
push edi
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x95]
push ebx
push eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x20], ebx
mov byte [esp + 0x9c], bl
call fcn.004b53e0
add esp, 0xc
push edi
lea eax, [esp + 0x119d]
push ebx
push eax
mov byte [esp + 0x11a4], bl
call fcn.004b53e0
add esp, 0xc
push edi
lea eax, [esp + 0x99d]
push ebx
push eax
mov byte [esp + 0x9a4], bl
call fcn.004b53e0
add esp, 0xc
push 0x103
lea eax, [esp + 0x895]
push ebx
push eax
mov byte [esp + 0x89c], bl
call fcn.004b53e0
xor eax, eax
lea edi, [esp + 0x50]
add esp, 0xc
mov dword [esp + 0x40], ebx
mov edx, esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x48], ebx
stosd dword es:[edi], eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x10], ebx
mov dword [0x546334], ebx
call fcn.0047c3ca
test eax, eax
je 0x401166
mov dword [0x546330], ebx
xor eax, eax
jmp 0x401c39
cmp dword [esp + 0x18], ebx
je 0x401172
push dword [esp + 0x18]
jmp 0x40119d
mov edx, dword [esp + 0x30]
call fcn.0047c3ca
test eax, eax
jne 0x40119c
push dword [esp + 0x30]
mov ecx, 0x800
lea eax, [esp + 0x99c]
call fcn.0047c3fc
pop ecx
call fcn.0047c73c
jmp 0x4011af
push esi
mov ecx, 0x800
lea eax, [esp + 0x99c]
call fcn.0047c3fc
pop ecx
lea eax, [esp + 0x998]
push eax
push esi
call fcn.004b519f
test eax, eax
pop ecx
pop ecx
jne 0x4011e2
lea esi, [esp + 0x998]
call fcn.0047cc0f
mov eax, esi
push str._Unpacked
push eax
call fcn.004b4790
mov esi, dword [esp + 0x14]
pop ecx
pop ecx
push 0x159
push str..Archive.c
mov edx, 0x4d3128
mov ecx, esi
call fcn.0041cea8
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
mov dword [esp + 0x1c], edi
jne 0x401227
mov edi, esi
call fcn.0041b048
test eax, eax
je 0x401159
push ebx
push esi
push str.:5:ExpandArchive___FAILED:_fopen___s____rb___FAILED:_The_given_source_archive_exists_but_cannot_be_opened_for_reading_:_bIsTempSourceUsed_d
call fcn.004178df
add esp, 0xc
jmp 0x401159
mov esi, dword [esp + 0xc]
push str..exe
call fcn.0047cc5e
push eax
call fcn.004b519f
test eax, eax
pop ecx
pop ecx
jne 0x401267
cmp dword [ebp + 0x1c], ebx
je 0x401251
push str._nLooking_for_self_extraction...
call fcn.0040ebcf
pop ecx
mov ecx, esi
call fcn.004025ba
mov esi, eax
push ebx
push esi
push edi
call fcn.004b48ff
add esp, 0xc
jmp 0x401269
xor esi, esi
push edi
push 1
lea eax, [esp + 0x50]
push 4
push eax
call fcn.004b56f6
add esp, 0x10
cmp dword [ebp + 0x1c], ebx
je 0x40128b
push str._nValidating_CheckSum...
call fcn.0040ebcf
pop ecx
push edi
push 1
lea eax, [esp + 0x44]
push 4
push eax
call fcn.004b56f6
mov ecx, dword [esp + 0x58]
push edi
call fcn.0040382c
add esp, 0x14
push ebx
add esi, 0x10
push esi
push edi
mov dword [esp + 0x24], eax
call fcn.004b48ff
add esp, 0xc
mov esi, str.222PAULAARCHIVE222JesusIAdoreYou
push edi
call fcn.004b4b5e
pop ecx
movsx ecx, byte [esi]
cmp eax, ecx
jne 0x40132c
inc esi
cmp byte [esi], bl
jne 0x4012be
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x3c]
je 0x40137f
cmp dword [ebp + 0x1c], ebx
je 0x4012ef
push str._nERROR:_CheckSum_failed._The_given_archive_is_corrupt_
call fcn.0040ebcf
pop ecx
push dword [esp + 0x18]
lea eax, [esp + 0x99c]
push dword [esp + 0x40]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push eax
push dword [esp + 0x20]
push str.:4:A_corrupt_archive_file_was_passed_into_ExpandArchive___s_____s____d___d_:_The_CheckSum_should_be__ld_but_was_calculated_to_be__ld.
call fcn.00417db7
add esp, 0x1c
mov ecx, edi
call fcn.0041d2f0
mov dword [0x546334], 1
jmp 0x401159
mov ecx, edi
call fcn.0041d2f0
cmp dword [ebp + 0x1c], ebx
je 0x401343
push str._nERROR:_The_given_archive_is_invalid_or_corrupt_
call fcn.0040ebcf
pop ecx
mov ecx, dword [esp + 0xc]
push ebx
xor edx, edx
call fcn.0041b6bd
pop ecx
push dword [ebp + 0x1c]
test eax, eax
push dword [ebp + 0x18]
lea eax, [esp + 0x9a0]
push eax
push dword [esp + 0x18]
jne 0x40136d
push str.:4:An_invalid_archive_file_was_passed_into_ExpandArchive___s_____s____d___d_:_The_file_size_is_zero.
jmp 0x401372
push str.:4:An_invalid_archive_file_was_passed_into_ExpandArchive___s_____s____d___d_:_The_archive_validation_string_could_not_be_found.
call fcn.004178df
add esp, 0x14
jmp 0x401159
mov dword [esp + 0x18], ebx
push dword [esp + 0x1c]
lea eax, [esp + 0x18]
push 1
push 4
push eax
mov dword [esp + 0x24], ebx
call fcn.004b56f6
add esp, 0x10
cmp eax, 1
jae 0x4013e6
push dword [esp + 0x1c]
call fcn.004b53a9
test eax, eax
pop ecx
jne 0x401a0b
cmp dword [ebp + 0x1c], ebx
mov edi, str._n________ERROR__d________
je 0x4013ca
push 0x1ad
push edi
call fcn.0040ebcf
pop ecx
pop ecx
push str._GetLastError_
push dword [esp + 0x18]
push dword [esp + 0x14]
push str.:9:ExpandArchive___s___FAILED:_fread___FAILED_to_read_the_size_of_the_next_entry:_read__ld:__s
call fcn.004178df
add esp, 0x10
jmp 0x4013eb
mov edi, str._n________ERROR__d________
cmp dword [esp + 0x14], ebx
jl 0x401a27
push 0x800
lea eax, [esp + 0x94]
push ebx
push eax
call fcn.004b53e0
add esp, 0xc
xor esi, esi
push dword [esp + 0x1c]
call fcn.004b4b5e
cmp eax, ebx
pop ecx
mov byte [esp + esi + 0x90], al
je 0x40142b
inc esi
cmp esi, 0x800
jb 0x40140d
cmp esi, 0x800
jae 0x401a4b
push 8
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.004b53e0
add esp, 0xc
push dword [esp + 0x1c]
lea eax, [esp + 0x44]
push 1
push 8
push eax
call fcn.004b56f6
add esp, 0x10
cmp eax, 1
jb 0x401a7a
cmp dword [esp + 0x14], ebx
jne 0x401484
lea edx, [esp + 0x90]
call fcn.0047c3ca
test eax, eax
je 0x401484
inc dword [esp + 0x34]
jmp 0x401383
mov edx, dword [esp + 0x30]
call fcn.0047c3ca
test eax, eax
jne 0x4014aa
lea eax, [esp + 0x90]
call fcn.0047c73c
mov ecx, dword [esp + 0x30]
mov ebx, eax
call fcn.0047cb81
xor ebx, ebx
cmp dword [ebp + 0x1c], ebx
je 0x401556
cmp dword [ebp + 0x1c], 0xde
jne 0x401542
push 0x36
lea eax, [esp + 0x5d]
push ebx
push eax
mov byte [esp + 0x64], bl
call fcn.004b53e0
add esp, 0xc
push 0x7ff
lea eax, [esp + 0x199d]
push ebx
push eax
mov byte [esp + 0x19a4], bl
call fcn.004b53e0
lea eax, [esp + 0x9c]
add esp, 0xc
push eax
mov edi, 0x800
mov ecx, edi
lea eax, [esp + 0x199c]
call fcn.0047c3fc
pop ecx
mov esi, eax
call fcn.0047c6f9
call fcn.0047cc0f
push ebx
push str..dat
push str..wav
mov eax, esi
push edi
push eax
call fcn.0047dbc5
add esp, 0x14
mov eax, esi
push eax
push 0x37
pop ecx
lea eax, [esp + 0x5c]
call fcn.0047c3fc
pop ecx
jmp 0x401549
lea eax, [esp + 0x90]
push eax
push str._nExpanding:___s_
call fcn.0040ebcf
pop ecx
pop ecx
lea edx, [esp + 0x998]
lea ecx, [esp + 0x90]
call fcn.0047c986
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x119c]
push eax
call fcn.004b4780
lea eax, [esp + 0x11a0]
call fcn.0047c73c
push eax
call fcn.0041b0f5
add esp, 0xc
test eax, eax
jne 0x4015c3
push ebx
lea ecx, [esp + 0x119c]
call fcn.0041b401
pop ecx
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x1198]
push eax
call fcn.0041b0f5
test eax, eax
pop ecx
je 0x401aa2
cmp dword [ebp + 0x18], ebx
jne 0x401682
lea edi, [esp + 0x90]
call fcn.0041b048
test eax, eax
je 0x401682
push ebx
push ebx
lea eax, [esp + 0x58]
push eax
push ebx
mov eax, edi
push ebx
push eax
call fcn.0041b876
add esp, 0x18
test eax, eax
jne 0x401616
mov eax, dword [esp + 0x10]
inc dword [esp + 0x10]
cmp eax, 0xde
jge 0x401616
mov eax, edi
push eax
push str.:4:ExpandArchive___EAP:_GetFileTimeTimeOut___s___FAILED_
call fcn.004178df
pop ecx
pop ecx
push 0xea60
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x48]
push eax
call fcn.0041c93f
add esp, 0xc
test eax, eax
jge 0x401682
push 1
push dword [esp + 0x18]
push dword [esp + 0x24]
call fcn.004b48ff
add esp, 0xc
test eax, eax
je 0x401383
cmp dword [ebp + 0x1c], ebx
je 0x401661
push 0x21a
push str._n________ERROR__d________
call fcn.0040ebcf
pop ecx
pop ecx
cmp dword [esp + 0x10], 0xde
jge 0x401bdc
push str._GetLastError_
push dword [esp + 0x18]
push str.:9:ExpandArchive___encountered_a_problem:_fseek__ld__SEEK_CUR___FAILED:_entry_could_not_be_skipped:__s
jmp 0x401bd4
call fcn.004a4ba8
mov dword [esp + 0x2c], eax
xor edi, edi
push 0x22a
push str..Archive.c
mov edx, 0x4d36e8
lea ecx, [esp + 0x98]
call fcn.0041cea8
cmp eax, ebx
pop ecx
pop ecx
mov dword [esp + 0x28], eax
jne 0x4017d7
call fcn.004a4ba8
sub eax, dword [esp + 0x2c]
cmp eax, 0x1194
ja 0x4016fd
cmp dword [0x546330], ebx
jne 0x4016fd
lea esi, [esp + 0x90]
call fcn.0047cf47
mov eax, esi
push eax
call fcn.004b4450
pop ecx
mov ecx, esi
dec ecx
cmp byte [eax + ecx], 0x5c
je 0x4016fd
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0xf
jl 0x40168d
cmp dword [ebp + 0x1c], ebx
je 0x40174f
lea eax, [esp + 0x90]
push eax
call fcn.004b4450
pop ecx
lea ecx, [esp + 0x90]
dec ecx
cmp byte [eax + ecx], 0x5c
je 0x40174f
push dword [esp + 0x1c]
call fcn.004b4673
pop ecx
push eax
push 0x23e
push str._n________ERROR__d__d________
call fcn.0040ebcf
add esp, 0xc
lea eax, [esp + 0x90]
push eax
push str._n___Could_not_open_destination___s__for_writing_
call fcn.0040ebcf
pop ecx
pop ecx
cmp dword [0x546330], ebx
jne 0x401789
mov eax, dword [esp + 0x10]
inc dword [esp + 0x10]
cmp eax, 0xde
jge 0x401789
call fcn.004a4ba8
sub eax, dword [esp + 0x2c]
push eax
push dword [esp + 0x18]
lea eax, [esp + 0x98]
push eax
push str.:9:ExpandArchive___encountered_a_problem:_fopen___s____wb____ld_bytes_FAILED_:_Could_not_open_the_destination_file_after__ldms___This_file_is_being_skipped...
call fcn.004178df
add esp, 0x10
cmp dword [esp + 0x14], ebx
jle 0x401383
push 1
push dword [esp + 0x18]
push dword [esp + 0x24]
call fcn.004b48ff
add esp, 0xc
test eax, eax
je 0x401383
cmp dword [ebp + 0x1c], ebx
je 0x4017c3
push 0x248
push str._n________ERROR__d________
call fcn.0040ebcf
pop ecx
pop ecx
push str._GetLastError_
push str.:9:ExpandArchive___has_a_serious_problem:_fseek_failed_too__Entry_could_not_opened_cannot_be_skipped:__s
call fcn.004178df
jmp 0x401adb
mov edi, dword [esp + 0x24]
inc dword [esp + 0x18]
cmp edi, ebx
jne 0x4017ff
push 1
push 0xc366
call fcn.004b422c
cmp eax, ebx
pop ecx
pop ecx
mov dword [esp + 0x24], eax
je 0x401ae2
mov edi, eax
cmp dword [esp + 0x14], ebx
mov dword [esp + 0x2c], ebx
jle 0x40191f
push dword [esp + 0x1c]
lea eax, [esp + 0x24]
push 1
push 2
push eax
call fcn.004b56f6
add esp, 0x10
cmp eax, 1
jb 0x401b07
cmp word [esp + 0x20], bx
je 0x401baf
movzx eax, word [esp + 0x20]
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
fcomp qword [0x530aa8]
fnstsw ax
test ah, 0x41
je 0x401baf
movzx esi, word [esp + 0x20]
push dword [esp + 0x1c]
push esi
push 1
push edi
call fcn.004b56f6
add esp, 0x10
cmp eax, esi
jb 0x401b40
push dword [esp + 0x38]
add esi, edi
push esi
push dword [esp + 0x28]
mov eax, edi
call fcn.00402255
movzx eax, ax
add esp, 0xc
cmp ax, bx
je 0x401b7c
push dword [esp + 0x28]
movzx esi, ax
movzx eax, word [esp + 0x24]
push esi
add eax, edi
push 1
push eax
call fcn.004b43ca
add esp, 0x10
cmp eax, esi
jae 0x4018f4
cmp dword [ebp + 0x1c], ebx
je 0x4018c6
push 0x29d
push str._n________ERROR__d________
call fcn.0040ebcf
pop ecx
pop ecx
mov eax, dword [esp + 0x10]
inc dword [esp + 0x10]
cmp eax, 0xde
jge 0x4018f4
push str._GetLastError_
lea eax, [esp + 0x94]
push eax
push esi
push dword [esp + 0x18]
push str.:8:ExpandArchive___s___FAILED:_failed_to_write_a_block_of_size__ld_to_destination_file___s_:_fwrite___FAILED:__s
call fcn.004178df
add esp, 0x14
cmp dword [ebp + 0x1c], ebx
je 0x401904
push 0x4d3b84
call fcn.0040ebcf
pop ecx
movzx eax, word [esp + 0x20]
mov ecx, dword [esp + 0x2c]
lea eax, [ecx + eax + 2]
cmp eax, dword [esp + 0x14]
mov dword [esp + 0x2c], eax
jl 0x40180d
mov ecx, dword [esp + 0x28]
call fcn.0041d2f0
push ebx
push closesocket
push 3
push ebx
push 7
push 0x100
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0x44], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4019ac
cmp dword [ebp + 0x1c], ebx
je 0x401967
push 0x2c2
push str._n________ERROR__d________
call fcn.0040ebcf
pop ecx
pop ecx
mov eax, dword [esp + 0x10]
inc dword [esp + 0x10]
cmp eax, 0xde
jge 0x401383
push 0x2c4
push str.:7:________ERROR__d________
call fcn.00417db7
push str._GetLastError_
lea eax, [esp + 0x9c]
push eax
push dword [esp + 0x1c]
push str.:7:ExpandArchive___s___encountered_a_problem:_failed_to_set_the_files_time_stamp___s_:_CreateFile___FAILED:__s
call fcn.004178df
add esp, 0x18
jmp 0x401383
lea eax, [esp + 0x40]
push eax
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x401a01
cmp dword [ebp + 0x1c], ebx
je 0x4019d4
push 0x2c9
push str._n________ERROR__d________
call fcn.0040ebcf
pop ecx
pop ecx
mov eax, dword [esp + 0x10]
inc dword [esp + 0x10]
cmp eax, 0xde
jge 0x401a01
push str._GetLastError_
lea eax, [esp + 0x94]
push eax
push dword [esp + 0x14]
push str.:7:ExpandArchive___s___encountered_a_problem:_failed_to_set_the_files_time_stamp___s_:_SetFileTime___FAILED:__s
call fcn.004178df
add esp, 0x10
call fcn.0041d762
jmp 0x401383
xor esi, esi
inc esi
cmp dword [ebp + 0x1c], ebx
je 0x401bde
push str._nDone_
call fcn.0040ebcf
pop ecx
jmp 0x401bde
cmp dword [ebp + 0x1c], ebx
je 0x401a39
push 0x1b4
push edi
call fcn.0040ebcf
pop ecx
pop ecx
push dword [esp + 0x14]
push dword [esp + 0x10]
push str.:9:ExpandArchive___s___FAILED:_an_entry_size_was_read_to_be__ld_wich_is_invalid_
jmp 0x401bd4
cmp dword [ebp + 0x1c], ebx
mov byte [esp + 0x10e], bl
je 0x401a64
push 0x1ca
push edi
call fcn.0040ebcf
pop ecx
pop ecx
lea eax, [esp + 0x90]
push eax
push dword [esp + 0x10]
push str.:9:ExpandArchive___s___FAILED:_The_following_string_was_read_as_a_file_name_for_one_of_the_entries:___s_
jmp 0x401bd4
cmp dword [ebp + 0x1c], ebx
je 0x401a8c
push 0x1d3
push edi
call fcn.0040ebcf
pop ecx
pop ecx
lea eax, [esp + 0x90]
push eax
push dword [esp + 0x10]
push str.:9:ExpandArchive___s___FAILED:_fread___FAILED_to_read_the_file_time_stamp_for___s_
jmp 0x401bd4
cmp dword [ebp + 0x1c], ebx
je 0x401abb
lea eax, [esp + 0x1198]
push eax
push str._nERROR:_Could_not_create_directory___s_
call fcn.0040ebcf
pop ecx
pop ecx
cmp dword [esp + 0x10], 0xde
jge 0x401bdc
lea eax, [esp + 0x1198]
push eax
push str.:3:ExpandArchive___FAILED:_Could_not_create_the_destination_directory:___s_
call fcn.00417db7
pop ecx
pop ecx
jmp 0x401bdc
cmp dword [ebp + 0x1c], ebx
je 0x401af8
push 0x25f
push str._n________ERROR__d________
call fcn.0040ebcf
pop ecx
pop ecx
push 0x56ce
push str.:8:ExpandArchive___FAILED:_calloc___failed_to_allocate____ld__2.25f___10__bytes_of_date:_OUT_OF_MEMORY_
jmp 0x4017cd
cmp dword [ebp + 0x1c], ebx
je 0x401b1d
push 0x26b
push str._n________ERROR__d________
call fcn.0040ebcf
pop ecx
pop ecx
push str._GetLastError_
lea eax, [esp + 0x94]
push eax
push dword [esp + 0x14]
push str.:9:ExpandArchive___s___FAILED:_Unrecoverable_error:_the_next_block_size_for___s__could_not_be_read:_fread___FAILED:__s
call fcn.004178df
add esp, 0x10
jmp 0x401bdc
cmp dword [ebp + 0x1c], ebx
je 0x401b56
push 0x27d
push str._n________ERROR__d________
call fcn.0040ebcf
pop ecx
pop ecx
push str._GetLastError_
lea eax, [esp + 0x94]
push eax
movzx eax, word [esp + 0x28]
push eax
push dword [esp + 0x18]
push str.:8:ExpandArchive___s___FAILED:_Unrecoverable_error:_the_next_block_to_read_should_be__ld__but_fread___failed_to_read_this_amount_of_data_from_the_file___s_:_fread___FAILED:__s
call fcn.004178df
add esp, 0x14
jmp 0x401bdc
cmp dword [esp + 0x38], ebx
jne 0x401b90
push dword [esp + 0xc]
push str.:8:ExpandArchive___s___FAILED:_ExpandBlock___FAILED_with_no_key.
jmp 0x401ad6
push dword [esp + 0x38]
push dword [esp + 0x10]
push str.:8:ExpandArchive___s___FAILED:_ExpandBlock___FAILED_with_the_following_key:___s_.
call fcn.00417db7
xor esi, esi
add esp, 0xc
inc esi
or dword [esp + 0x18], 0xffffffff
jmp 0x401bde
cmp dword [ebp + 0x1c], ebx
je 0x401bc5
push 0x274
push str._n________ERROR__d________
call fcn.0040ebcf
pop ecx
pop ecx
movzx eax, word [esp + 0x20]
push eax
push dword [esp + 0x10]
push str.:9:ExpandArchive___s___FAILED:_Unrecoverable_error:_the_size_of_the_next_block_of_compressed_data_was_read_to_be__ld_which_is_invalid.
call fcn.004178df
add esp, 0xc
xor esi, esi
mov ecx, dword [esp + 0x1c]
call fcn.0041d2f0
mov ecx, dword [esp + 0x28]
cmp ecx, ebx
je 0x401bf4
call fcn.0041d2f0
cmp dword [esp + 0x24], ebx
je 0x401c04
push dword [esp + 0x24]
call fcn.004b4080
pop ecx
cmp dword [esp + 0x34], ebx
mov dword [0x546330], ebx
jle 0x401c2f
push dword [esp + 0x34]
push dword [esp + 0x10]
push str.:9:ExpandArchive___s___encountered__d_zero_sized_INVALID_files_in_the_archive_
call fcn.004178df
add esp, 0xc
cmp dword [esp + 0x18], ebx
jle 0x401c2f
mov dword [esp + 0x18], ebx
mov eax, esi
neg eax
sbb eax, eax
and eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x219c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004b4c95
mov esp, ebp
pop ebp
ret