Function at 0x253ba4860
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
movaps xmmword [rsp + 0x20], xmm6
movaps xmmword [rsp + 0x30], xmm7
movaps xmmword [rsp + 0x40], xmm8
movaps xmmword [rsp + 0x50], xmm9
mov rsi, rcx
mov rbp, rdx
mov dword [rsp + 0xc8], r9d
call sym.EVP_CIPHER_CTX_get_key_length
mov rcx, rsi
mov r12d, eax
call sym.EVP_CIPHER_CTX_get0_cipher
mov rcx, rax
call sym.EVP_CIPHER_get_mode
test rbp, rbp
mov r13d, eax
je 0x253ba495d
lea r14d, [r12*8]
mov rcx, rsi
call sym.EVP_CIPHER_CTX_get_cipher_data
lea ebx, [r14 - 0x61]
mov rcx, rsi
mov r15, rax
call sym.EVP_CIPHER_CTX_get_cipher_data
mov ecx, 0x22
neg rax
and eax, 0xf
add r15, rax
xor eax, eax
mov rdi, r15
rep stosq qword [rdi], rax
mov eax, r14d
add eax, 0xffffff80
cmovns ebx, eax
sar ebx, 5
add ebx, 0xa
shl ebx, 4
mov dword [rdi], 0
lea edi, [r14 - 0x41]
sar bl, 4
test eax, eax
cmovns edi, eax
lea eax, [r13 - 4]
sar dil, 6
cmp eax, 1
ja 0x253ba4990
movzx eax, byte [r15 + 0x10]
and ebx, 0xf
and edi, 3
shl edi, 2
and eax, 0xfffffff0
or eax, ebx
mov byte [r15 + 0x10], al
movzx eax, byte [r15 + 0x11]
and eax, 0xfffffff3
or eax, edi
mov byte [r15 + 0x11], al
lea eax, [r14 - 0xc0]
and eax, 0xffffffb8
je 0x253ba4c00
cmp r12d, 0x10
je 0x253ba4bc8
xor eax, eax
movaps xmm6, xmmword [rsp + 0x20]
movaps xmm7, xmmword [rsp + 0x30]
movaps xmm8, xmmword [rsp + 0x40]
movaps xmm9, xmmword [rsp + 0x50]
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rsi
call sym.EVP_CIPHER_CTX_is_encrypting
movzx ecx, byte [r15 + 0x10]
test eax, eax
movzx eax, byte [r15 + 0x11]
sete r8b
and edi, 3
and ebx, 0xf
add r8d, r8d
and ecx, 0xfffffff0
and eax, 0xfffffff1
or ebx, ecx
lea ecx, [rdi*4]
or eax, r8d
mov byte [r15 + 0x10], bl
mov edi, eax
lea eax, [r14 - 0xc0]
or edi, ecx
and eax, 0xffffffb8
mov byte [r15 + 0x11], dil
jne 0x253ba4953
sub r13d, 1
cmp r13d, 1
ja 0x253ba4c00
mov eax, dword [rsp + 0xc8]
test eax, eax
jne 0x253ba4c00
lea rsi, [r15 + 0x20]
mov edx, r14d
mov rcx, rbp
mov r8, rsi
mov rbx, rsi
call sym.padlock_aes_set_encrypt_key
test eax, eax
js 0x253ba4c12
mov eax, dword [r15 + 0x110]
lea ecx, [rax*4]
test ecx, ecx
jle 0x253ba4c12
movsxd rax, ecx
mov rdx, rsi
mov r10d, ecx
lea rax, [r15 + rax*4 + 0x20]
nop dword [rax]
mov r8d, dword [rdx]
sub ecx, 4
add rdx, 0x10
sub rax, 0x10
mov r9d, dword [rax + 0x10]
mov dword [rdx - 0x10], r9d
mov r9d, dword [rax + 0x14]
mov dword [rax + 0x10], r8d
mov r8d, dword [rdx - 0xc]
mov dword [rdx - 0xc], r9d
mov r9d, dword [rax + 0x18]
mov dword [rax + 0x14], r8d
mov r8d, dword [rdx - 8]
mov dword [rdx - 8], r9d
mov r9d, dword [rax + 0x1c]
mov dword [rax + 0x18], r8d
mov r8d, dword [rdx - 4]
mov dword [rdx - 4], r9d
mov dword [rax + 0x1c], r8d
mov r8d, r10d
sub r8d, ecx
cmp ecx, r8d
jg 0x253ba4a40
cmp dword [r15 + 0x110], 1
jle 0x253ba4c12
movdqa xmm5, xmmword [0x253ba71e0]
mov eax, 1
movdqa xmm4, xmmword [str.eeeeeeeeeeeeeeee]
movdqa xmm3, xmmword [0x253ba7200]
movdqu xmm2, xmmword [rbx + 0x10]
add rbx, 0x10
add eax, 1
movdqa xmm6, xmm2
pand xmm6, xmm5
movdqa xmm0, xmm6
psrld xmm0, 7
psubd xmm6, xmm0
movdqa xmm0, xmm2
pslld xmm0, 1
pand xmm6, xmm4
pand xmm0, xmm3
pxor xmm6, xmm0
movdqa xmm0, xmm6
pand xmm0, xmm5
movdqa xmm1, xmm0
psrld xmm1, 7
psubd xmm0, xmm1
movdqa xmm1, xmm6
pslld xmm1, 1
pand xmm0, xmm4
pand xmm1, xmm3
pxor xmm0, xmm1
movdqa xmm1, xmm0
pand xmm1, xmm5
movdqa xmm7, xmm1
psrld xmm7, 7
psubd xmm1, xmm7
movdqa xmm7, xmm0
pslld xmm7, 1
pand xmm1, xmm4
pand xmm7, xmm3
pxor xmm7, xmm1
pxor xmm2, xmm7
movdqa xmm1, xmm2
movdqa xmm9, xmm2
pslld xmm1, 0x18
movdqa xmm8, xmm2
psrld xmm2, 8
pxor xmm8, xmm0
pxor xmm9, xmm6
pxor xmm0, xmm6
pxor xmm1, xmm2
pxor xmm0, xmm1
movdqa xmm1, xmm9
psrld xmm9, 0x18
pslld xmm1, 8
pxor xmm1, xmm9
pxor xmm0, xmm1
movdqa xmm1, xmm8
psrld xmm8, 0x10
pslld xmm1, 0x10
pxor xmm1, xmm8
pxor xmm0, xmm1
pxor xmm0, xmm7
movups xmmword [rbx], xmm0
cmp eax, dword [r15 + 0x110]
jl 0x253ba4ac0
jmp 0x253ba4c12
mov rax, qword [rbp]
xor edx, edx
mov qword [r15 + 0x20], rax
mov rax, qword [rbp + 8]
mov qword [r15 + 0x28], rax
movzx eax, byte [r15 + 0x10]
shl edx, 7
and eax, 0x7f
or eax, edx
mov byte [r15 + 0x10], al
call sym.padlock_reload_key
mov eax, 1
jmp 0x253ba495f
lea rsi, [r15 + 0x20]
mov edx, r14d
mov rcx, rbp
mov r8, rsi
call sym.padlock_aes_set_encrypt_key
mov rcx, rsi
call sym.padlock_key_bswap
mov edx, 1
jmp 0x253ba4bda