Function at 0x10066760
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4168
call fcn.10081bc0
mov eax, dword [0x100d5134]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1f00], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1eb8], eax
xor eax, eax
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x1efc], eax
mov dword [ebp - 0x1ed0], eax
mov dword [ebp - 0x1ef8], eax
mov dword [ebp - 0x1ef4], eax
xor al, al
mov byte [ebp - 0x1ebd], al
mov al, byte [ebx + 0x120c]
inc dword [ebx + 0x120c]
and al, 3
mov byte [ebx + 0x12a2], al
lea esi, [ebx + 0x1c0c]
mov eax, dword [ebx + 0x11f0]
push dword [ebx + 0x11e8]
shl eax, 2
lea edi, [ebp - 0xac4]
add esi, eax
mov dword [ebp - 0x1f08], ebx
add edi, eax
mov dword [ebp - 0x1edc], esi
lea eax, [ebx + 0x13ea]
mov dword [ebp - 0x1ee8], edi
push eax
lea eax, [ebx + 0x10]
push eax
call fcn.1006d730
mov eax, dword [ebx + 0x11e0]
add esp, 0xc
lea eax, [eax + eax*4]
lea esi, [esi + eax*4]
mov eax, dword [ebx + 0x11e8]
mov dword [ebp - 0x1eec], esi
lea ecx, [eax - 1]
test ecx, ecx
js 0x100668ea
cmp eax, 4
jl 0x100668c2
lea edi, [ecx + 1]
shr edi, 2
lea edx, [ecx - 2]
mov eax, edi
lea edx, [esi + edx*4]
neg eax
lea esi, [ebx + 0x13e8]
lea esi, [esi + ecx*2]
lea ecx, [ecx + eax*4]
lea ecx, [ecx]
movsx eax, word [esi + 2]
lea esi, [esi - 8]
mov dword [ebp - 0x1ebc], eax
fild dword [ebp - 0x1ebc]
fstp dword [edx + 8]
movsx eax, word [esi + 8]
mov dword [ebp - 0x1ebc], eax
fild dword [ebp - 0x1ebc]
fstp dword [edx + 4]
movsx eax, word [esi + 6]
mov dword [ebp - 0x1ebc], eax
fild dword [ebp - 0x1ebc]
fstp dword [edx]
movsx eax, word [esi + 4]
mov dword [ebp - 0x1ebc], eax
fild dword [ebp - 0x1ebc]
fstp dword [edx - 4]
sub edx, 0x10
sub edi, 1
jne 0x10066860
mov esi, dword [ebp - 0x1eec]
mov edi, dword [ebp - 0x1ee8]
test ecx, ecx
js 0x100668ea
lea edx, [ebx + 0x13ea]
lea edx, [edx + ecx*2]
nop
movsx eax, word [edx]
lea edx, [edx - 2]
mov dword [ebp - 0x1ebc], eax
fild dword [ebp - 0x1ebc]
fstp dword [esi + ecx*4]
sub ecx, 1
jns 0x100668d0
mov eax, dword [ebx + 0x11e0]
mov esi, dword [ebp - 0x1edc]
lea eax, [eax + eax*4]
fld dword [esi + eax*4]
fld dword [0x100b1e80]
fadd st(1), st(0)
fxch st(1)
fstp dword [esi + eax*4]
mov eax, dword [ebx + 0x11e0]
lea ecx, [eax + eax*4]
mov eax, dword [ebx + 0x11e8]
sar eax, 3
add ecx, eax
fld dword [esi + ecx*4]
fadd st(1)
fstp dword [esi + ecx*4]
mov eax, dword [ebx + 0x11e0]
mov ecx, dword [ebx + 0x11e8]
sar ecx, 3
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
fld dword [eax + ecx*8]
fsub st(1)
fstp dword [eax + ecx*8]
mov eax, dword [ebx + 0x11e8]
sar eax, 3
lea ecx, [eax + eax*2]
mov eax, dword [ebx + 0x11e0]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
fld dword [eax + ecx*4]
fsub st(1)
fstp dword [eax + ecx*4]
mov ecx, dword [ebx + 0x11e8]
mov eax, dword [ebx + 0x11e0]
sar ecx, 3
shl ecx, 4
add ecx, esi
lea eax, [eax + eax*4]
fld dword [ecx + eax*4]
fadd st(1)
fstp dword [ecx + eax*4]
mov eax, dword [ebx + 0x11e8]
sar eax, 3
add eax, dword [ebx + 0x11e0]
lea eax, [eax + eax*4]
fld dword [esi + eax*4]
fadd st(1)
fstp dword [esi + eax*4]
mov eax, dword [ebx + 0x11e8]
sar eax, 3
lea ecx, [eax + eax*2]
mov eax, dword [ebx + 0x11e0]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
fld dword [eax + ecx*8]
fsub st(1)
fstp dword [eax + ecx*8]
mov eax, dword [ebx + 0x11e8]
sar eax, 3
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [ebx + 0x11e0]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
fsubr dword [eax + ecx*4]
fstp dword [eax + ecx*4]
cmp dword [ebx + 0x1248], 0
jne 0x10066e78
push dword [ebx + 0x13e4]
lea eax, [ebp - 0xac4]
push esi
push eax
lea eax, [ebp - 0xdb0]
push eax
push ebx
call fcn.1006e3d0
push esi
push edi
lea eax, [ebp - 0xdb0]
push eax
push ebx
call fcn.1006d7d0
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 0xdb0]
push esi
push dword [ebp - 0x1edc]
push edi
push eax
push ebx
call fcn.1006e670
push esi
lea eax, [ebp - 0xdb0]
push eax
push ebx
call fcn.1006e8f0
mov ecx, dword [ebx + 0x1674]
add esp, 0x44
lea edi, [ecx*8 + 0x5f5]
add edi, ecx
cmp dword [ebx + 0x17cc], 0
lea edi, [ebx + edi*4]
mov dword [ebp - 0x1ed8], edi
je 0x10066ba2
cmp dword [ebx + 0x11b4], 0x4d
jle 0x10066ba2
push 0x1100
lea eax, [ebx + 0x94]
mov dword [ebx + ecx*4 + 0x1274], 1
push eax
lea eax, [ebp - 0x1eb0]
push eax
call fcn.10082c30
lea esi, [ebx + 0x1280]
mov ecx, 9
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebx + 0x11e4]
lea eax, [edi*4]
push eax
lea eax, [ebp - 0xdb0]
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.10082c30
mov eax, dword [ebx + 0x1674]
add esp, 0x18
test eax, eax
je 0x10066ae4
cmp dword [ebx + eax*4 + 0x1270], 0
je 0x10066ae4
mov esi, dword [ebp - 0x1ed8]
lea ecx, [ebx + 0x11bc]
jmp 0x10066b17
movzx eax, byte [ebx + 0x1c00]
lea ecx, [ebx + 0x11bc]
mov esi, dword [ebp - 0x1ed8]
mov byte [ecx], al
movzx eax, byte [ebx + 0x17d0]
add al, byte [esi]
movsx eax, al
cmp eax, 0x3f
jl 0x10066b0f
mov eax, 0x3f
mov byte [esi], al
mov edi, dword [ebx + 0x11e4]
xor eax, eax
cmp dword [ebp + 0x14], 2
push edi
sete al
push eax
push ecx
lea eax, [ebp - 0x24]
push esi
push eax
call fcn.1006d2f0
mov ecx, dword [ebx + 0x11e4]
add esp, 0x14
xor eax, eax
test ecx, ecx
jle 0x10066b56
fld dword [0x100cca58]
fild dword [ebp + eax*4 - 0x24]
fmul st(1)
fstp dword [ebp + eax*4 - 0xdb0]
inc eax
cmp eax, ecx
jl 0x10066b42
fstp st(0)
mov eax, dword [ebx + 0x1674]
push dword [ebp - 0x1edc]
lea eax, [eax + eax*4]
shl eax, 6
add eax, 0x1840
add eax, ebx
push eax
lea eax, [ebp - 0x1eb0]
push eax
push esi
lea eax, [ebp - 0xdb0]
push eax
push ebx
call fcn.1006ec60
mov eax, dword [ebx + 0x11e4]
shl eax, 2
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0xdb0]
push eax
call fcn.10082c30
add esp, 0x24
push dword [ebx + 0x11e4]
lea eax, [ebx + 0x1280]
mov dword [ebp - 0x1eb4], 0x100
push eax
mov dword [ebp - 0x1ecc], 0
mov dword [ebp - 0x1ed8], 0
call fcn.1006d2c0
mov esi, dword [ebp - 0x1eb8]
lea edi, [ebp - 0x1f68]
mov dword [ebp - 0x1ec4], eax
or edx, 0xffffffff
lea eax, [ebx + 0x94]
mov dword [ebp - 0x1ee0], edx
push 0x1100
push eax
lea eax, [ebp - 0x3068]
mov dword [ebp - 0x1ef0], edx
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.10082c30
mov al, byte [ebx + 0x12a2]
add esp, 0x14
mov edx, dword [ebp - 0x1ec4]
xor esi, esi
mov byte [ebp - 0x1ec5], al
movzx eax, word [ebx + 0x168c]
mov dword [ebp - 0x1f04], eax
mov eax, dword [ebx + 0x1688]
mov dword [ebp - 0x1ee8], eax
mov edi, dword [ebp - 0x1ee0]
mov dword [ebp - 0x1ed4], esi
cmp edx, edi
jne 0x10066c63
mov ecx, dword [ebp - 0x1ef4]
mov dword [ebp - 0x1ee4], ecx
jmp 0x10066ee7
cmp edx, dword [ebp - 0x1ef0]
jne 0x10066c7c
mov ecx, dword [ebp - 0x1ef8]
mov dword [ebp - 0x1ee4], ecx
jmp 0x10066ee7
test esi, esi
jle 0x10066cd9
mov edi, dword [ebp - 0x1eb8]
lea eax, [ebp - 0x3068]
push 0x1100
push eax
lea eax, [ebx + 0x94]
mov ecx, 0xc
lea esi, [ebp - 0x1f68]
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.10082c30
mov al, byte [ebp - 0x1ec5]
add esp, 0xc
mov esi, dword [ebp - 0x1ed4]
mov byte [ebx + 0x12a2], al
mov eax, dword [ebp - 0x1f04]
mov word [ebx + 0x168c], ax
mov eax, dword [ebp - 0x1ee8]
mov dword [ebx + 0x1688], eax
push dword [ebp - 0x1edc]
lea eax, [ebx + 0x12a4]
push eax
lea eax, [ebx + 0x94]
push eax
lea eax, [ebx + 0x1280]
push eax
lea eax, [ebp - 0xdb0]
push eax
push ebx
call fcn.1006ec60
add esp, 0x18
cmp esi, 6
jne 0x10066d2b
cmp dword [ebp - 0x1ecc], 0
jne 0x10066d2b
mov esi, dword [ebp - 0x1eb8]
lea edi, [ebp - 0x1f38]
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x1ed4]
push dword [ebp + 0x14]
mov edi, dword [ebp - 0x1eb8]
push 0
push dword [ebx + 0x1674]
push edi
push ebx
call fcn.100661a0
push dword [ebx + 0x11e8]
lea eax, [ebx + 0x12a4]
push eax
movsx eax, byte [ebx + 0x129e]
push eax
movsx eax, byte [ebx + 0x129d]
push eax
push edi
call fcn.10065d80
bsr eax, dword [edi + 0x1c]
mov ecx, dword [edi + 0x14]
add esp, 0x28
sub ecx, eax
mov eax, dword [ebp + 0x18]
dec ecx
mov dword [ebp - 0x1ee4], ecx
cmp esi, 6
jne 0x10066e66
cmp dword [ebp - 0x1ecc], 0
jne 0x10066e66
cmp ecx, eax
jle 0x10066e66
mov ecx, 0xc
lea esi, [ebp - 0x1f38]
rep movsd dword es:[edi], dword [esi]
mov cl, byte [ebp - 0xac8]
lea edx, [ebx + 0x1280]
xor eax, eax
mov byte [ebx + 0x1c00], cl
cmp dword [ebx + 0x11e4], eax
jle 0x10066dd0
mov byte [edx + eax], 4
inc eax
cmp eax, dword [ebx + 0x11e4]
jl 0x10066dc3
mov esi, dword [ebp + 0x14]
cmp esi, 2
je 0x10066dda
mov byte [edx], cl
mov eax, dword [ebp - 0x1f04]
mov word [ebx + 0x168c], ax
mov eax, dword [ebp - 0x1ee8]
mov dword [ebx + 0x1688], eax
xor eax, eax
cmp dword [ebx + 0x11e8], eax
jle 0x10066e11
lea ecx, [ecx]
mov byte [ebx + eax + 0x12a4], 0
inc eax
cmp eax, dword [ebx + 0x11e8]
jl 0x10066e00
push esi
mov esi, dword [ebp - 0x1eb8]
push 0
push dword [ebx + 0x1674]
push esi
push ebx
call fcn.100661a0
push dword [ebx + 0x11e8]
lea eax, [ebx + 0x12a4]
push eax
movsx eax, byte [ebx + 0x129e]
push eax
movsx eax, byte [ebx + 0x129d]
push eax
push esi
call fcn.10065d80
bsr eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x14]
add esp, 0x28
mov esi, dword [ebp - 0x1ed4]
sub ecx, eax
mov eax, dword [ebp + 0x18]
dec ecx
mov dword [ebp - 0x1ee4], ecx
cmp dword [ebp + 0x1c], 0
jne 0x10066edb
test esi, esi
jne 0x10066edb
cmp ecx, eax
jg 0x10066efb
mov esi, dword [ebp - 0x1eb8]
mov eax, dword [ebx + 0x11e0]
lea eax, [eax + eax*4]
add eax, dword [ebx + 0x11f0]
shl eax, 2
push eax
mov eax, dword [ebx + 0x11e8]
add eax, 0x703
lea eax, [ebx + eax*4]
push eax
lea eax, [ebx + 0x1c0c]
push eax
call fcn.10082c30
add esp, 0xc
cmp dword [ebx + 0x1248], 0
je 0x100672ee
mov eax, dword [ebp - 0x1f00]
pop edi
pop esi
pop ebx
mov dword [eax], 0
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10080e96
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x1ee0]
mov edx, dword [ebp - 0x1ec4]
cmp esi, 6
je 0x1006727b
mov eax, dword [ebp + 0x18]
cmp ecx, eax
jle 0x10067041
cmp dword [ebp - 0x1ecc], 0
jne 0x10066f49
cmp esi, 2
jl 0x10066f49
fld dword [ebp - 0xafc]
fld dword [0x100ccadc]
fmul st(1), st(0)
fcom st(1)
fnstsw ax
test ah, 5
jp 0x10066f24
fstp st(0)
jmp 0x10066f26
fstp st(1)
fstp dword [ebp - 0xafc]
mov byte [ebx + 0x129e], 0
mov dword [ebp - 0x1ed8], 0
mov dword [ebp - 0x1ef0], 0xffffffff
jmp 0x10066f7f
cmp dword [ebp - 0x1ecc], 0
mov eax, dword [ebp - 0x1eb4]
cwde
mov dword [ebp - 0x1efc], eax
mov eax, dword [ebp - 0x1ec4]
mov dword [ebp - 0x1ed8], 1
mov dword [ebp - 0x1ef8], ecx
mov dword [ebp - 0x1ef0], eax
jne 0x100670c2
xor eax, eax
mov dword [ebp - 0x1ec4], eax
cmp dword [ebx + 0x11e4], eax
jle 0x100670c2
mov ecx, dword [ebx + 0x11ec]
xor edx, edx
mov dword [ebp - 0x1eec], edx
mov esi, ecx
mov dword [ebp - 0x1ebc], ecx
lea esp, [esp]
xor edi, edi
cmp edx, esi
jge 0x10066fea
lea ecx, [ebx + 0x12a4]
add ecx, edx
sub esi, edx
movsx eax, byte [ecx]
lea ecx, [ecx + 1]
cdq
xor eax, edx
sub eax, edx
add edi, eax
sub esi, 1
jne 0x10066fc0
mov eax, dword [ebp - 0x1ec4]
mov edx, dword [ebp - 0x1eec]
mov esi, dword [ebp - 0x1ebc]
mov ecx, dword [ebx + 0x11ec]
cmp dword [ebp - 0x1ed4], 0
je 0x1006700a
cmp edi, dword [ebp + eax*4 - 0x34]
jge 0x10067000
cmp dword [ebp + eax*4 - 0x14], 0
je 0x1006700a
mov dword [ebp + eax*4 - 0x14], 1
jmp 0x10067019
mov dword [ebp + eax*4 - 0x34], edi
mov edi, dword [ebp - 0x1eb4]
mov word [ebp + eax*2 - 0x1c], di
inc eax
add edx, ecx
add esi, ecx
mov dword [ebp - 0x1ec4], eax
mov dword [ebp - 0x1eec], edx
mov dword [ebp - 0x1ebc], esi
cmp eax, dword [ebx + 0x11e4]
jl 0x10066fb0
jmp 0x100670c2
add eax, 0xfffffffb
cmp ecx, eax
jge 0x10066e78
mov esi, dword [ebp - 0x1eb4]
movsx eax, si
mov dword [ebp - 0x1ecc], 1
mov dword [ebp - 0x1ef4], ecx
mov dword [ebp - 0x1ed0], eax
cmp edx, edi
je 0x100670ce
mov eax, dword [ebp - 0x1eb8]
lea edi, [ebp - 0x1f38]
mov esi, eax
mov dword [ebp - 0x1ee0], edx
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
push dword [eax + 0x18]
push dword [eax]
lea eax, [ebp - 0x12ac]
push eax
call fcn.10082c30
push 0x1100
lea eax, [ebx + 0x94]
push eax
lea eax, [ebp - 0x4168]
push eax
call fcn.10082c30
mov al, byte [ebx + 0x1c00]
add esp, 0x18
mov byte [ebp - 0x1ebd], al
mov eax, dword [ebp - 0x1ed0]
mov esi, dword [ebp - 0x1eb4]
mov ecx, dword [ebp - 0x1ecc]
test dword [ebp - 0x1ed8], ecx
jne 0x1006713d
mov eax, dword [ebp - 0x1ee4]
mov ecx, dword [ebp + 0x18]
cmp eax, ecx
jle 0x1006710a
mov eax, 0x4000
cmp si, ax
jge 0x100670fb
lea eax, [esi + esi]
jmp 0x10067197
mov dword [ebp - 0x1eb4], 0x7fff
jmp 0x100671a0
sub eax, ecx
shl eax, 7
cdq
idiv dword [ebx + 0x11e8]
add eax, 0x800
push eax
call fcn.1005afb0
movzx edx, ax
add esp, 4
movsx ecx, si
sar eax, 0x10
imul edx, ecx
imul eax, esi
sar edx, 0x10
add edx, eax
movzx eax, dx
jmp 0x1006719a
mov esi, dword [ebp - 0x1efc]
mov ecx, dword [ebp - 0x1ef8]
sub esi, eax
sub ecx, dword [ebp - 0x1ef4]
movzx edi, ax
mov eax, dword [ebp + 0x18]
sub eax, dword [ebp - 0x1ef4]
imul eax, esi
sar esi, 2
cdq
idiv ecx
add eax, edi
movzx edx, ax
mov eax, dword [ebp - 0x1ed0]
movsx ecx, dx
add eax, esi
mov dword [ebp - 0x1eb4], edx
cmp ecx, eax
jle 0x10067185
lea eax, [esi + edi]
jmp 0x10067197
mov edx, dword [ebp - 0x1efc]
mov eax, edx
sub eax, esi
cmp ecx, eax
jge 0x100671a0
mov eax, edx
sub eax, esi
movzx eax, ax
mov dword [ebp - 0x1eb4], eax
mov edi, dword [ebx + 0x11e4]
xor esi, esi
test edi, edi
jle 0x10067208
mov ebx, dword [ebp - 0x1eb4]
cmp dword [ebp + esi*4 - 0x14], 0
je 0x100671c0
movzx eax, word [ebp + esi*2 - 0x1c]
jmp 0x100671c3
movzx eax, bx
mov edx, dword [ebp + esi*4 - 0xad8]
cwde
movzx ecx, dx
imul ecx, eax
sar edx, 0x10
imul eax, edx
sar ecx, 0x10
add eax, ecx
cmp eax, 0x7fffff
jle 0x100671ea
mov eax, 0x7fffff
jmp 0x100671f6
cmp eax, 0xff800000
jge 0x100671f6
mov eax, 0xff800000
shl eax, 8
mov dword [ebp + esi*4 - 0x44], eax
inc esi
cmp esi, edi
jl 0x100671b2
mov ebx, dword [ebp - 0x1f08]
mov al, byte [ebp - 0xac8]
lea ecx, [ebx + 0x1c00]
mov byte [ecx], al
lea esi, [ebx + 0x1280]
xor eax, eax
cmp dword [ebp + 0x14], 2
push edi
sete al
push eax
push ecx
lea eax, [ebp - 0x44]
push eax
push esi
call fcn.1006d3a0
push dword [ebx + 0x11e4]
push esi
call fcn.1006d2c0
mov ecx, dword [ebx + 0x11e4]
mov edx, eax
add esp, 0x1c
mov dword [ebp - 0x1ec4], edx
xor eax, eax
test ecx, ecx
jle 0x1006726f
fld dword [0x100cca58]
fild dword [ebp + eax*4 - 0x44]
fmul st(1)
fstp dword [ebp + eax*4 - 0xdb0]
inc eax
cmp eax, ecx
jl 0x1006725b
fstp st(0)
mov esi, dword [ebp - 0x1ed4]
inc esi
jmp 0x10066c42
cmp dword [ebp - 0x1ecc], 0
je 0x10066e78
cmp edx, edi
je 0x10067295
cmp ecx, dword [ebp + 0x18]
jle 0x10066e78
mov edi, dword [ebp - 0x1eb8]
lea esi, [ebp - 0x1f38]
push dword [ebp - 0x1f20]
mov ecx, 0xc
lea eax, [ebp - 0x12ac]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x1eb8]
push eax
push dword [esi]
call fcn.10082c30
push 0x1100
lea eax, [ebp - 0x4168]
push eax
lea eax, [ebx + 0x94]
push eax
call fcn.10082c30
mov al, byte [ebp - 0x1ebd]
add esp, 0x18
mov byte [ebx + 0x1c00], al
jmp 0x10066e7e
mov eax, dword [ebx + 0x11e4]
mov dword [ebx + 0x1238], 0
pop edi
mov eax, dword [ebp + eax*4 - 0xcd0]
mov dword [ebx + 0x11c0], eax
mov al, byte [ebx + 0x129d]
mov byte [ebx + 0x11bd], al
bsr eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x14]
sub ecx, eax
mov eax, dword [ebp - 0x1f00]
add ecx, 6
sar ecx, 3
pop esi
mov dword [eax], ecx
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.10080e96
mov esp, ebp
pop ebp
ret