Function at 0x46c040
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xf8
movups xmmword [rsp + 0xe0], xmm6
mov rbx, r9
mov r12, rcx
mov r14, rdx
mov r13, r8
call sym.EVP_CIPHER_CTX_get_cipher_data
mov rsi, qword [rax + 0x248]
mov edi, dword [rax + 0x23c]
mov rbp, rax
mov qword [rax + 0x248], 0xffffffffffffffff
mov rax, rbx
and eax, 0xf
mov qword [rsp + 0x48], rax
je 0x46c0c0
xor r15d, r15d
movups xmm6, xmmword [rsp + 0xe0]
mov eax, r15d
add rsp, 0xf8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, r12
call sym.EVP_CIPHER_CTX_encrypting
mov r15d, eax
test eax, eax
je 0x46c358
cmp rsi, 0xffffffffffffffff
je 0x46c650
lea rax, [rsi + 0x30]
and rax, 0xfffffffffffffff0
cmp rax, rbx
jne 0x46c094
cmp dword [rbp + 0x250], 0x301
jbe 0x46c660
lea rdx, [r13 + 0x10]
mov eax, 0x10
mov rcx, qword [0x00619730]
lea r15, [rbp + 0x1d4]
test byte [rcx + 0xb], 0x20
jne 0x46c268
mov r8d, dword [rcx + 4]
test r8d, 0x10000000
je 0x46c140
mov ecx, dword [rcx]
and r8d, 0x800
and ecx, 0x40000000
or ecx, r8d
jne 0x46c268
mov qword [rsp + 0x50], rbx
mov rdi, r14
mov r8, rsi
mov rcx, r15
sub r8, rax
call sym.sha256_update
cmp rsi, rbx
je 0x46c670
cmp r13, r14
je 0x46c17c
mov rax, qword [rsp + 0x48]
mov r8, rsi
mov rcx, rdi
lea rdx, [r13 + rax]
sub r8, rax
call sym.memcpy
lea r13, [r14 + rsi]
mov rdx, r15
mov rcx, r13
call sym.SHA256_Final
movdqu xmm3, xmmword [rbp + 0x164]
mov rdx, r13
movdqu xmm4, xmmword [rbp + 0x174]
movdqu xmm5, xmmword [rbp + 0x184]
movdqu xmm6, xmmword [rbp + 0x194]
mov r8d, 0x20
mov rcx, r15
movups xmmword [rbp + 0x1d4], xmm3
movdqu xmm3, xmmword [rbp + 0x1a4]
movups xmmword [rbp + 0x1e4], xmm4
movdqu xmm4, xmmword [rbp + 0x1b4]
movups xmmword [rbp + 0x1f4], xmm5
movdqu xmm5, xmmword [rbp + 0x1c4]
movups xmmword [rbp + 0x214], xmm3
movups xmmword [rbp + 0x224], xmm4
movups xmmword [rbp + 0x234], xmm5
movups xmmword [rbp + 0x204], xmm6
call sym.sha256_update
mov rdx, r15
mov rcx, r13
call sym.SHA256_Final
lea rcx, [rsi + 0x20]
lea edx, [rbx - 1]
sub edx, ecx
cmp rbx, rcx
jbe 0x46c230
lea r8, [rbx - 0x20]
movzx edx, dl
add rcx, r14
sub r8, rsi
call sym.memset
mov rcx, r12
mov r15d, 1
call sym.EVP_CIPHER_CTX_iv_noconst
mov r8, qword [rsp + 0x50]
mov r9, rbp
mov rdx, rdi
mov dword [rsp + 0x28], 1
mov rcx, rdi
mov qword [rsp + 0x20], rax
call sym.aesni_cbc_encrypt
jmp 0x46c097
mov r8d, 0x40
sub r8d, edi
lea r10, [rax + r8]
cmp r10, rsi
jae 0x46c140
mov r11, rsi
mov qword [rsp + 0x50], rbx
mov rdi, r14
sub r11, r10
cmp r11, 0x3f
jbe 0x46c148
mov rcx, r15
mov qword [rsp + 0x58], r11
mov qword [rsp + 0x48], r10
call sym.sha256_update
mov r10, qword [rsp + 0x48]
mov rcx, r12
lea rdi, [r13 + r10]
mov qword [rsp + 0x50], r10
call sym.EVP_CIPHER_CTX_iv_noconst
mov r11, qword [rsp + 0x58]
mov rdx, r14
mov rcx, r13
mov qword [rsp + 0x30], rdi
mov r9, rbp
mov qword [rsp + 0x28], r15
mov r8, r11
mov qword [rsp + 0x20], rax
shr r8, 6
mov qword [rsp + 0x48], r11
call sym.aesni_cbc_sha256_enc
mov r11, qword [rsp + 0x48]
xor r8d, r8d
mov rdx, rbx
mov ecx, dword [rbp + 0x1f8]
mov r10, qword [rsp + 0x50]
mov rax, r11
shr r11, 0x1d
and rax, 0xffffffffffffffc0
add ecx, r11d
mov rdi, rax
mov qword [rsp + 0x48], rax
lea rax, [rax*8]
add eax, dword [rbp + 0x1f4]
setb r8b
mov dword [rbp + 0x1f4], eax
sub rdx, rdi
lea rax, [r10 + rdi]
add ecx, r8d
mov qword [rsp + 0x50], rdx
add rdi, r14
lea rdx, [r13 + rax]
mov dword [rbp + 0x1f8], ecx
jmp 0x46c148
mov rcx, r12
call sym.EVP_CIPHER_CTX_iv_noconst
mov r9, rbp
mov r8, rbx
mov rdx, r14
mov dword [rsp + 0x28], 0
mov rcx, r13
mov qword [rsp + 0x20], rax
call sym.aesni_cbc_encrypt
cmp rsi, 0xffffffffffffffff
je 0x46c6b0
movzx eax, byte [rbp + rsi + 0x24c]
movzx edx, byte [rbp + rsi + 0x24d]
mov ecx, 0x31
shl eax, 8
or eax, edx
mov edx, 0x21
cmp eax, 0x302
mov eax, 0x10
cmovl rax, qword [rsp + 0x48]
cmovge rdx, rcx
cmp rbx, rdx
jb 0x46c097
sub rbx, rax
lea rdi, [r14 + rax]
mov edx, 0xff
mov r8, rsi
lea eax, [rbx - 0x21]
movzx ecx, byte [rdi + rbx - 1]
mov qword [rsp + 0x60], rdi
mov r15, rbx
sub edx, eax
movdqu xmm2, xmmword [rbp + 0xf4]
movdqu xmm4, xmmword [rbp + 0x104]
lea r12, [rbp + 0x1d4]
shr edx, 0x18
movdqu xmm5, xmmword [rbp + 0x114]
or edx, eax
movzx edx, dl
mov eax, edx
mov edi, edx
mov dword [rsp + 0x6c], edx
sub eax, ecx
xor edi, ecx
xor eax, ecx
mov ecx, edx
or eax, edi
xor eax, edx
sar eax, 0x1f
mov edx, eax
add eax, 1
not edx
mov dword [rsp + 0x78], eax
and edi, edx
lea rdx, [rbp + 0x250]
xor edi, ecx
mov rcx, r12
lea eax, [rdi + 0x21]
sub r15, rax
mov rax, r15
mov byte [rbp + rsi + 0x24f], r15b
shr rax, 8
mov byte [rbp + rsi + 0x24e], al
movups xmmword [rbp + 0x1d4], xmm2
movdqu xmm2, xmmword [rbp + 0x124]
movups xmmword [rbp + 0x1e4], xmm4
movdqu xmm4, xmmword [rbp + 0x134]
movups xmmword [rbp + 0x1f4], xmm5
movdqu xmm5, xmmword [rbp + 0x144]
movups xmmword [rbp + 0x204], xmm2
movdqu xmm2, xmmword [rbp + 0x154]
movups xmmword [rbp + 0x214], xmm4
movups xmmword [rbp + 0x224], xmm5
movups xmmword [rbp + 0x234], xmm2
call sym.sha256_update
lea rax, [rbx - 0x20]
mov qword [rsp + 0x58], rax
cmp rax, 0x13f
ja 0x46ca2a
mov eax, dword [rbp + 0x1f4]
pxor xmm0, xmm0
lea rsi, [rsp + 0xbf]
mov edx, dword [rbp + 0x23c]
and rsi, 0xffffffffffffffc0
lea r14, [rbp + 0x1fc]
lea eax, [rax + r15*8]
movups xmmword [rsi], xmm0
bswap eax
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x58]
movups xmmword [rsi + 0x10], xmm0
test rax, rax
je 0x46ca8c
sub rax, r15
mov rbx, r15
mov dword [rsp + 0x7c], edi
mov rdi, r14
mov r13, rax
mov rax, qword [rsp + 0x60]
mov r14, r12
mov qword [rsp + 0x70], r15
neg rbx
lea r9, [rax + r15]
mov r12, r9
jmp 0x46c540
add rbx, 1
cmp r13, rbx
je 0x46c6d0
mov edx, r10d
mov rax, rbx
mov r8, rbx
movzx ecx, byte [r12 + rbx]
mov r11d, edx
neg rax
shr r8, 0x38
lea r10d, [rdx + 1]
shr rax, 0x38
and rcx, r8
or rax, r8
not rax
and eax, 0x80
or rcx, rax
mov byte [rbp + r11 + 0x1fc], cl
cmp edx, 0x3f
jne 0x46c530
mov eax, 7
mov rdx, rdi
mov rcx, r14
mov r8d, 1
sub rax, rbx
sar rax, 0x3f
mov r15, rax
mov eax, dword [rsp + 0x50]
and eax, r15d
or dword [rbp + 0x238], eax
call sym.sha256_block_data_order
lea rax, [rbx - 0x48]
add rbx, 1
mov edx, dword [rbp + 0x1e4]
sar rax, 0x3f
mov ecx, dword [rbp + 0x1ec]
and rax, r15
and edx, eax
and ecx, eax
movd xmm0, edx
mov edx, dword [rbp + 0x1e8]
movd xmm1, ecx
mov ecx, dword [rbp + 0x1f0]
and edx, eax
and ecx, eax
movd xmm2, edx
mov edx, dword [rbp + 0x1d4]
movd xmm6, ecx
mov ecx, dword [rbp + 0x1dc]
punpckldq xmm1, xmm6
punpckldq xmm0, xmm2
and edx, eax
punpcklqdq xmm0, xmm1
por xmm0, xmmword [rsi + 0x10]
and ecx, eax
movd xmm1, edx
mov edx, dword [rbp + 0x1d8]
movd xmm2, ecx
and edx, eax
and eax, dword [rbp + 0x1e0]
movups xmmword [rsi + 0x10], xmm0
movd xmm6, eax
movd xmm3, edx
punpckldq xmm2, xmm6
punpckldq xmm1, xmm3
punpcklqdq xmm1, xmm2
por xmm1, xmmword [rsi]
movups xmmword [rsi], xmm1
cmp r13, rbx
je 0x46ca6e
xor r10d, r10d
jmp 0x46c53d
mov rdx, r13
xor eax, eax
mov rsi, rbx
jmp 0x46c103
mov rdx, r13
xor eax, eax
jmp 0x46c103
mov rcx, r12
mov r15d, 1
call sym.EVP_CIPHER_CTX_iv_noconst
mov rcx, qword [rsp + 0x48]
mov r9, rbp
mov rdx, rdi
mov dword [rsp + 0x28], 1
mov r8, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
add rcx, r13
call sym.aesni_cbc_encrypt
jmp 0x46c097
lea rcx, [rbp + 0x1d4]
mov r8, rbx
mov rdx, r14
mov r15d, 1
call sym.sha256_update
jmp 0x46c097
mov r12, r14
mov r15, qword [rsp + 0x70]
mov r14, rdi
mov r9, qword [rsp + 0x58]
mov edi, dword [rsp + 0x7c]
mov ecx, r10d
cmp r10d, 0x3f
ja 0x46c94c
mov eax, 0x40
lea rdx, [rbp + rcx + 0x1fc]
xor ebx, ebx
sub rax, rcx
cmp eax, 8
jae 0x46c908
test al, 4
jne 0x46ca97
test eax, eax
je 0x46c723
mov byte [rdx], 0
test al, 2
jne 0x46caac
lea rax, [r9 + 0x40]
mov r13, 0xffffffffffffffb7
sub rax, rcx
sub r13, r15
lea rbx, [rax + r13]
mov r9, rax
sar rbx, 0x3f
cmp r10d, 0x38
ja 0x46c95e
mov eax, dword [rsp + 0x50]
mov rdx, r14
mov r8d, 1
mov rcx, r12
mov dword [rbp + 0x238], eax
call sym.sha256_block_data_order
mov eax, dword [rbp + 0x1d8]
mov r11d, dword [rbp + 0x1dc]
mov r10d, dword [rbp + 0x1e0]
mov r8d, dword [rbp + 0x1e4]
and eax, ebx
or eax, dword [rsi + 4]
mov ecx, dword [rbp + 0x1e8]
and r11d, ebx
mov edx, dword [rbp + 0x1ec]
movdqu xmm3, xmmword [rbp + 0x194]
mov r9d, eax
and r10d, ebx
mov eax, dword [rbp + 0x1f0]
or r11d, dword [rsi + 8]
and r8d, ebx
and ecx, ebx
movdqu xmm4, xmmword [rbp + 0x164]
movdqu xmm5, xmmword [rbp + 0x174]
and edx, ebx
movdqu xmm6, xmmword [rbp + 0x184]
or r10d, dword [rsi + 0xc]
and eax, ebx
or r8d, dword [rsi + 0x10]
and ebx, dword [rbp + 0x1d4]
or ecx, dword [rsi + 0x14]
or edx, dword [rsi + 0x18]
or eax, dword [rsi + 0x1c]
or ebx, dword [rsi]
bswap r9d
bswap r10d
mov dword [rsi + 4], r9d
mov dword [rsi + 0xc], r10d
bswap r11d
bswap eax
mov dword [rsi + 8], r11d
mov dword [rsi + 0x1c], eax
bswap ebx
bswap r8d
mov dword [rsi], ebx
mov dword [rsi + 0x10], r8d
mov r8d, 0x20
bswap ecx
bswap edx
mov dword [rsi + 0x14], ecx
mov rcx, r12
mov dword [rsi + 0x18], edx
mov rdx, rsi
movups xmmword [rbp + 0x204], xmm3
movups xmmword [rbp + 0x1d4], xmm4
movups xmmword [rbp + 0x1e4], xmm5
movups xmmword [rbp + 0x1f4], xmm6
movdqu xmm2, xmmword [rbp + 0x1a4]
movdqu xmm4, xmmword [rbp + 0x1b4]
movdqu xmm5, xmmword [rbp + 0x1c4]
movups xmmword [rbp + 0x214], xmm2
movups xmmword [rbp + 0x224], xmm4
movups xmmword [rbp + 0x234], xmm5
call sym.sha256_update
mov rdx, r12
mov rcx, rsi
call sym.SHA256_Final
mov r14d, dword [rsp + 0x6c]
mov r8d, 0xffffffe0
mov rbx, qword [rsp + 0x48]
mov rax, r14
not r14
add r14, qword [rsp + 0x58]
sub r15, r14
lea r9d, [rax + 0x20]
add r14, qword [rsp + 0x60]
sub r8d, r15d
add r9, r14
lea r10d, [r14 + r15 - 1]
xor eax, eax
sub r8d, r14d
movzx r11d, byte [r14]
mov edx, r10d
lea ebp, [r8 + r14]
sub edx, r14d
sar ebp, 0x1f
add r14, 1
mov ecx, r11d
sar edx, 0x1f
xor cl, byte [rsi + rbx]
xor r11d, edi
and edx, ebp
movzx ecx, cl
not ebp
and ecx, edx
and r11d, ebp
and edx, 1
or ecx, r11d
add rbx, rdx
or eax, ecx
cmp r9, r14
jne 0x46c8b0
neg eax
mov r15d, eax
sar r15d, 0x1f
not r15d
and r15d, dword [rsp + 0x78]
jmp 0x46c097
mov r8d, eax
mov qword [rdx], 0
mov qword [rdx + r8 - 8], 0
lea r8, [rdx + 8]
and r8, 0xfffffffffffffff8
sub rdx, r8
add eax, edx
and eax, 0xfffffff8
cmp eax, 8
jb 0x46c723
and eax, 0xfffffff8
xor edx, edx
mov r11d, edx
add edx, 8
mov qword [r8 + r11], rbx
cmp edx, eax
jb 0x46c939
jmp 0x46c723
mov r13, 0xffffffffffffffb7
sub r13, r15
lea rbx, [r9 + r13]
sar rbx, 0x3f
movq xmm6, rbx
lea rbx, [r15 + 8]
mov eax, dword [rsp + 0x50]
mov rdx, r14
sub rbx, r9
mov r8d, 1
punpcklqdq xmm6, xmm6
mov rcx, r12
sar rbx, 0x3f
mov qword [rsp + 0x70], r9
shufps xmm6, xmm6, 0x88
and eax, ebx
or dword [rbp + 0x238], eax
call sym.sha256_block_data_order
movq xmm0, rbx
mov r9, qword [rsp + 0x70]
movdqu xmm1, xmmword [rbp + 0x1e4]
punpcklqdq xmm0, xmm0
shufps xmm0, xmm0, 0x88
pand xmm0, xmm6
movdqu xmm6, xmmword [rbp + 0x1d4]
lea rbx, [r9 + r13 + 0x40]
pand xmm1, xmm0
por xmm1, xmmword [rsi + 0x10]
sar rbx, 0x3f
pand xmm0, xmm6
por xmm0, xmmword [rsi]
movups xmmword [rsi + 0x10], xmm1
movups xmmword [rsi], xmm0
mov qword [rbp + 0x1fc], 0
mov qword [rbp + 0x204], 0
mov qword [r14 + 0x10], 0
mov qword [r14 + 0x18], 0
mov qword [r14 + 0x20], 0
mov qword [r14 + 0x28], 0
mov qword [r14 + 0x30], 0
mov qword [r14 + 0x38], 0
jmp 0x46c749
sub rbx, 0x160
mov rsi, qword [rsp + 0x60]
mov eax, 0x40
mov rcx, r12
sub eax, dword [rbp + 0x23c]
and rbx, 0xffffffffffffffc0
add rbx, rax
mov rdx, rsi
mov r8, rbx
sub r15, rbx
call sym.sha256_update
mov rax, rsi
sub qword [rsp + 0x58], rbx
add rax, rbx
mov qword [rsp + 0x60], rax
jmp 0x46c4c3
mov r12, r14
mov r15, qword [rsp + 0x70]
mov r14, rdi
mov r9, qword [rsp + 0x58]
mov edi, dword [rsp + 0x7c]
xor ecx, ecx
xor r10d, r10d
jmp 0x46c6f1
mov r10d, edx
xor r9d, r9d
jmp 0x46c6e4
mov eax, eax
mov dword [rdx], 0
mov dword [rdx + rax - 4], 0
jmp 0x46c723
mov eax, eax
mov word [rdx + rax - 2], 0
jmp 0x46c723