Function at 0x65396e70
Capabilities:
Encode data using xor

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
test rcx, rcx
mov rbx, rcx
mov rsi, rdx
je 0x653974e7
test rdx, rdx
jne 0x65396e99
test r8d, r8d
jne 0x65397305
mov edx, dword [rbx + 0x10f8]
mov eax, 0x10
test edx, edx
je 0x65396eb5
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
cmp dword [rbx + 0x10fc], 0xf
ja 0x65396ea8
mov ecx, dword [rbx + 0x10f0]
mov dword [rsp + 0x28], r8d
call fcn.6539d710
test eax, eax
jne 0x65396ea8
mov edi, dword [rbx + 0x10fc]
mov r11d, dword [rsp + 0x28]
lea ecx, [rdi + r11]
cmp ecx, 0xc
jbe 0x65396eed
or dword [rbx + 0x10f4], 1
xor r13d, r13d
test edi, edi
jne 0x65397134
mov r12d, r11d
and r12d, 0xfffffff0
je 0x653974dd
mov dword [rsp + 0x28], eax
mov rax, qword [rsi]
lea rdi, [rbx + 0x10b0]
xor qword [rbx + 0x10b0], rax
lea ebp, [r12 - 1]
mov rcx, rbx
mov r8, qword [rsi + 8]
xor qword [rbx + 0x10b8], r8
mov rdx, rdi
shr ebp, 4
mov r13d, 0x10
mov dword [rsp + 0x2c], r11d
and ebp, 3
call fcn.65397830
sub qword [rbx + 0x1100], 0xffffffffffffff80
cmp r13d, r12d
mov eax, dword [rsp + 0x28]
mov r11d, dword [rsp + 0x2c]
jae 0x6539712e
test ebp, ebp
je 0x6539704c
cmp ebp, 1
je 0x65396ffd
cmp ebp, 2
je 0x65396fb7
mov r9, qword [rsi + 0x10]
xor qword [rbx + 0x10b0], r9
mov rdx, rdi
mov r10, qword [rsi + 0x18]
xor qword [rbx + 0x10b8], r10
mov rcx, rbx
mov dword [rsp + 0x2c], r11d
mov dword [rsp + 0x28], eax
mov r13d, 0x20
call fcn.65397830
sub qword [rbx + 0x1100], 0xffffffffffffff80
mov r11d, dword [rsp + 0x2c]
mov eax, dword [rsp + 0x28]
lea ecx, [r13 + 8]
mov dword [rsp + 0x2c], r11d
mov r11d, r13d
mov rdx, qword [rsi + r11]
add r13d, 0x10
xor qword [rbx + 0x10b0], rdx
mov rdx, rdi
mov rbp, qword [rsi + rcx]
xor qword [rbx + 0x10b8], rbp
mov rcx, rbx
mov dword [rsp + 0x28], eax
call fcn.65397830
sub qword [rbx + 0x1100], 0xffffffffffffff80
mov r11d, dword [rsp + 0x2c]
mov eax, dword [rsp + 0x28]
lea r9d, [r13 + 8]
mov dword [rsp + 0x28], eax
mov eax, r13d
mov r8, qword [rsi + rax]
mov rdx, rdi
mov rcx, rbx
xor qword [rbx + 0x10b0], r8
add r13d, 0x10
mov r10, qword [rsi + r9]
xor qword [rbx + 0x10b8], r10
mov dword [rsp + 0x2c], r11d
call fcn.65397830
sub qword [rbx + 0x1100], 0xffffffffffffff80
cmp r13d, r12d
mov eax, dword [rsp + 0x28]
mov r11d, dword [rsp + 0x2c]
jae 0x6539712e
mov edx, r13d
lea ebp, [r13 + 8]
mov dword [rsp + 0x28], eax
mov rcx, qword [rsi + rdx]
mov rdx, rdi
xor qword [rbx + 0x10b0], rcx
mov rcx, rbx
mov rax, qword [rsi + rbp]
xor qword [rbx + 0x10b8], rax
lea ebp, [r13 + 0x28]
mov dword [rsp + 0x2c], r11d
call fcn.65397830
lea r8d, [r13 + 0x10]
lea r10d, [r13 + 0x18]
sub qword [rbx + 0x1100], 0xffffffffffffff80
mov rdx, rdi
mov rcx, rbx
mov r9, qword [rsi + r8]
xor qword [rbx + 0x10b0], r9
mov r11, qword [rsi + r10]
xor qword [rbx + 0x10b8], r11
call fcn.65397830
lea edx, [r13 + 0x20]
sub qword [rbx + 0x1100], 0xffffffffffffff80
mov rcx, qword [rsi + rdx]
xor qword [rbx + 0x10b0], rcx
mov rdx, rdi
mov rax, qword [rsi + rbp]
mov rcx, rbx
xor qword [rbx + 0x10b8], rax
call fcn.65397830
lea r8d, [r13 + 0x30]
sub qword [rbx + 0x1100], 0xffffffffffffff80
lea r10d, [r13 + 0x38]
mov rdx, rdi
mov rcx, rbx
add r13d, 0x40
mov r9, qword [rsi + r8]
xor qword [rbx + 0x10b0], r9
mov r11, qword [rsi + r10]
xor qword [rbx + 0x10b8], r11
call fcn.65397830
sub qword [rbx + 0x1100], 0xffffffffffffff80
cmp r13d, r12d
mov eax, dword [rsp + 0x28]
mov r11d, dword [rsp + 0x2c]
jb 0x6539704c
mov ebp, r13d
add rsi, rbp
cmp r11d, r13d
jbe 0x65396ea8
movsxd rcx, dword [rbx + 0x10fc]
lea r12d, [r11 - 1]
sub r12d, r13d
lea r13, [rbx + 0x10b0]
lea rdi, [rsi + r12 + 1]
add rsi, 1
and r12d, 3
lea edx, [rcx + 1]
mov dword [rbx + 0x10fc], edx
movzx ebp, byte [rsi - 1]
cmp edx, 0x10
mov byte [rbx + rcx + 0x10e0], bpl
je 0x65397408
cmp rsi, rdi
je 0x65396ea8
test r12, r12
je 0x65397227
cmp r12, 1
je 0x653971f3
cmp r12, 2
je 0x653971c7
lea r9d, [rdx + 1]
add rsi, 1
movsxd rdx, edx
mov dword [rbx + 0x10fc], r9d
movzx r8d, byte [rsi - 1]
cmp r9d, 0x10
mov byte [rbx + rdx + 0x10e0], r8b
mov edx, r9d
je 0x65397496
lea r10d, [rdx + 1]
add rsi, 1
movsxd rcx, edx
mov dword [rbx + 0x10fc], r10d
movzx r11d, byte [rsi - 1]
cmp r10d, 0x10
mov edx, r10d
mov byte [rbx + rcx + 0x10e0], r11b
je 0x6539744f
lea r12d, [rdx + 1]
add rsi, 1
movsxd r9, edx
mov dword [rbx + 0x10fc], r12d
movzx ebp, byte [rsi - 1]
cmp r12d, 0x10
mov edx, r12d
mov byte [rbx + r9 + 0x10e0], bpl
je 0x653972be
cmp rsi, rdi
je 0x65396ea8
lea r11d, [rdx + 1]
add rsi, 1
movsxd r10, edx
mov dword [rbx + 0x10fc], r11d
movzx r8d, byte [rsi - 1]
cmp r11d, 0x10
mov byte [rbx + r10 + 0x10e0], r8b
je 0x653973c0
lea ebp, [r11 + 1]
movsxd rcx, r11d
mov dword [rbx + 0x10fc], ebp
movzx r12d, byte [rsi]
cmp ebp, 0x10
mov byte [rbx + rcx + 0x10e0], r12b
je 0x65397370
lea r10d, [rbp + 1]
movsxd rdx, ebp
mov dword [rbx + 0x10fc], r10d
movzx r9d, byte [rsi + 1]
cmp r10d, 0x10
mov byte [rbx + rdx + 0x10e0], r9b
je 0x65397320
lea edx, [r10 + 1]
add rsi, 3
movsxd r11, r10d
mov dword [rbx + 0x10fc], edx
movzx r8d, byte [rsi - 1]
cmp edx, 0x10
mov byte [rbx + r11 + 0x10e0], r8b
jne 0x6539721e
movdqu xmm1, xmmword [rbx + 0x10b0]
mov rdx, r13
mov rcx, rbx
mov dword [rsp + 0x28], eax
movdqu xmm0, xmmword [rbx + 0x10e0]
pxor xmm0, xmm1
movups xmmword [rbx + 0x10b0], xmm0
call fcn.65397830
mov dword [rbx + 0x10fc], 0
sub qword [rbx + 0x1100], 0xffffffffffffff80
xor edx, edx
mov eax, dword [rsp + 0x28]
jmp 0x6539721e
lea rdx, str.src_encauth_gcm_gcm_add_iv.c
lea rcx, str.IV___NULL
mov r8d, 0x21
call fcn.6539d6d0
nop
movdqu xmm1, xmmword [rbx + 0x10b0]
mov rdx, r13
mov rcx, rbx
mov dword [rsp + 0x28], eax
movdqu xmm0, xmmword [rbx + 0x10e0]
pxor xmm0, xmm1
movups xmmword [rbx + 0x10b0], xmm0
call fcn.65397830
mov dword [rbx + 0x10fc], 0
sub qword [rbx + 0x1100], 0xffffffffffffff80
xor r10d, r10d
mov eax, dword [rsp + 0x28]
jmp 0x65397297
movdqu xmm5, xmmword [rbx + 0x10b0]
mov rdx, r13
mov rcx, rbx
mov dword [rsp + 0x28], eax
xor ebp, ebp
movdqu xmm4, xmmword [rbx + 0x10e0]
pxor xmm4, xmm5
movups xmmword [rbx + 0x10b0], xmm4
call fcn.65397830
mov dword [rbx + 0x10fc], 0
sub qword [rbx + 0x1100], 0xffffffffffffff80
mov eax, dword [rsp + 0x28]
jmp 0x65397272
movdqu xmm3, xmmword [rbx + 0x10b0]
mov rdx, r13
mov rcx, rbx
mov dword [rsp + 0x28], eax
movdqu xmm2, xmmword [rbx + 0x10e0]
pxor xmm2, xmm3
movups xmmword [rbx + 0x10b0], xmm2
call fcn.65397830
mov dword [rbx + 0x10fc], 0
sub qword [rbx + 0x1100], 0xffffffffffffff80
xor r11d, r11d
mov eax, dword [rsp + 0x28]
jmp 0x65397250
movdqu xmm1, xmmword [rbx + 0x10b0]
mov rdx, r13
mov rcx, rbx
mov dword [rsp + 0x28], eax
movdqu xmm0, xmmword [rbx + 0x10e0]
pxor xmm0, xmm1
movups xmmword [rbx + 0x10b0], xmm0
call fcn.65397830
mov dword [rbx + 0x10fc], 0
sub qword [rbx + 0x1100], 0xffffffffffffff80
xor edx, edx
mov eax, dword [rsp + 0x28]
jmp 0x6539717d
movdqu xmm5, xmmword [rbx + 0x10b0]
mov rdx, r13
mov rcx, rbx
mov dword [rsp + 0x28], eax
movdqu xmm4, xmmword [rbx + 0x10e0]
pxor xmm4, xmm5
movups xmmword [rbx + 0x10b0], xmm4
call fcn.65397830
mov dword [rbx + 0x10fc], 0
sub qword [rbx + 0x1100], 0xffffffffffffff80
xor edx, edx
mov eax, dword [rsp + 0x28]
jmp 0x653971f3
movdqu xmm3, xmmword [rbx + 0x10b0]
mov rdx, r13
mov rcx, rbx
mov dword [rsp + 0x28], eax
movdqu xmm2, xmmword [rbx + 0x10e0]
pxor xmm2, xmm3
movups xmmword [rbx + 0x10b0], xmm2
call fcn.65397830
mov dword [rbx + 0x10fc], 0
sub qword [rbx + 0x1100], 0xffffffffffffff80
xor edx, edx
mov eax, dword [rsp + 0x28]
jmp 0x653971c7
mov r13d, edi
xor ebp, ebp
jmp 0x65397131
lea rdx, str.src_encauth_gcm_gcm_add_iv.c
lea rcx, [0x6540d2bd]
mov r8d, 0x1f
call fcn.6539d6d0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop