Function at 0x14000c7d0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x50]
sub rsp, 0x150
mov rax, qword [0x1400c9948]
xor rax, rsp
mov qword [rbp + 0x48], rax
xor r15d, r15d
lea rax, [0x1400b9af0]
mov rsi, r8
mov dword [rsp + 0x64], r15d
mov rdi, rdx
mov qword [rsp + 0x20], rax
mov r9d, 0x478
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
lea edx, [r15 + 2]
mov r14, rcx
mov r13d, r15d
call fcn.1400196f0
test rsi, rsi
je 0x14000d2e7
mov rcx, qword [rsi + 0x10]
test rcx, rcx
je 0x14000d2e7
mov rax, qword [rsi + 0x18]
mov r9, qword [rsi + 0x20]
cmp rax, r9
jb 0x14000d2e7
mov rbx, qword [rsi + 0x28]
sub rax, r9
cmp rax, rbx
jb 0x14000d2e7
mov qword [rsp + 0x1a8], r12
lea r12, [r9 + rcx]
mov rcx, rdi
call fcn.140006190
mov r8d, eax
cmp eax, 3
jne 0x14000cb49
mov rax, qword [rdi + 0x10]
cmp qword [rdi + 8], rax
je 0x14000c90a
cmp rbx, 8
jae 0x14000c8f1
mov qword [rsp + 0x30], 8
lea rax, str.msglen___zu_____explicit_iv_len___zu_
mov qword [rsp + 0x28], rbx
mov r9d, 0x4b4
mov qword [rsp + 0x20], rax
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov edx, 1
mov rcx, r14
call fcn.1400196f0
mov eax, 0xffff8e80
mov r12, qword [rsp + 0x1a8]
mov rcx, qword [rbp + 0x48]
xor rcx, rsp
call fcn.1400946f0
add rsp, 0x150
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov r15, r12
lea rax, [r9 + 8]
add r12, 8
mov qword [rsi + 0x20], rax
add rbx, 0xfffffffffffffff8
mov qword [rsi + 0x28], rbx
jmp 0x14000c90d
mov r15, rsi
mov rax, qword [rdi + 0x20]
cmp rbx, rax
jae 0x14000c937
mov qword [rsp + 0x30], rax
mov r9d, 0x4c8
lea rax, str.msglen___zu____taglen___zu_
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
jmp 0x14000c8b2
sub rbx, rax
lea rdx, [rdi + 0x38]
xor eax, eax
mov qword [rsi + 0x28], rbx
mov r8, qword [rdi + 0x10]
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x78], rax
mov dword [rbp - 0x80], eax
call fcn.140080780
movzx eax, byte [r15]
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
xor byte [rsp + 0x7c], al
mov r9d, 0x4de
movzx eax, byte [r15 + 1]
mov edx, 4
xor byte [rsp + 0x7d], al
mov rcx, r14
movzx eax, byte [r15 + 2]
xor byte [rsp + 0x7e], al
movzx eax, byte [r15 + 3]
xor byte [rsp + 0x7f], al
movzx eax, byte [r15 + 4]
xor byte [rbp - 0x80], al
movzx eax, byte [r15 + 5]
xor byte [rbp - 0x7f], al
movzx eax, byte [r15 + 6]
xor byte [rbp - 0x7e], al
movzx eax, byte [r15 + 7]
xor byte [rbp - 0x7d], al
mov rax, qword [rsi]
mov qword [rbp - 0x78], rax
movzx eax, byte [rsi + 8]
mov byte [rbp - 0x70], al
movzx eax, word [rsi + 9]
mov word [rbp - 0x6f], ax
mov rax, rbx
shr rax, 8
mov byte [rbp - 0x6d], al
lea rax, [rbp - 0x78]
mov qword [rsp + 0x30], reloc.WS2_32.dll_listen
mov qword [rsp + 0x28], rax
lea rax, str.additional_data_used_for_AEAD
mov qword [rsp + 0x20], rax
mov byte [rbp - 0x6c], bl
call fcn.1400198c0
mov rax, qword [rdi + 8]
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x30], rax
mov r9d, 0x4e6
lea rax, [rsp + 0x78]
mov edx, 4
mov qword [rsp + 0x28], rax
mov rcx, r14
lea rax, str.IV_used
mov qword [rsp + 0x20], rax
call fcn.1400198c0
mov rax, qword [rdi + 0x20]
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov rcx, qword [rsi + 0x28]
mov r9d, 0x4e8
mov qword [rsp + 0x30], rax
add rcx, r12
mov qword [rsp + 0x28], rcx
lea rax, str.TAG_used
mov rcx, r14
mov qword [rsp + 0x20], rax
mov edx, 4
call fcn.1400198c0
mov r8, qword [rdi + 0x20]
lea rax, [rsp + 0x70]
mov r9, qword [rsi + 0x18]
lea rcx, [rdi + 0xe0]
mov rdx, qword [rsi + 0x28]
sub r9, r12
add r9, qword [rsi + 0x10]
mov qword [rsp + 0x50], r8
add rdx, r8
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r9
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], rdx
mov r8, qword [rdi + 8]
lea r9, [rbp - 0x78]
mov qword [rsp + 0x28], r12
lea rdx, [rsp + 0x78]
mov qword [rsp + 0x20], reloc.WS2_32.dll_listen
call fcn.14001d870
mov ebx, eax
test eax, eax
je 0x14000cb0a
mov dword [rsp + 0x28], eax
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
lea rax, str.mbedtls_cipher_auth_decrypt_ext
mov r9d, 0x504
mov edx, 1
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.140019800
cmp ebx, 0xffff9d00
je 0x14000c8c6
mov eax, ebx
jmp 0x14000c8cb
mov rax, qword [rsi + 0x28]
cmp qword [rsp + 0x70], rax
je 0x14000d27c
lea rax, str.should_never_happen
mov r9d, 0x512
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x20], rax
mov edx, 1
mov rcx, r14
call fcn.1400196f0
mov eax, 0xffff9400
jmp 0x14000c8cb
dec eax
cmp eax, 1
jbe 0x14000cb80
lea rax, str.should_never_happen
mov r9d, 0x661
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x20], rax
mov edx, 1
mov rcx, r14
call fcn.1400196f0
mov eax, 0xffff9400
jmp 0x14000c8cb
mov rdx, qword [rdi + 8]
lea rax, [rdx + rdx]
cmp rbx, rax
jb 0x14000d2a9
mov rcx, qword [rdi + 0x18]
inc rcx
add rcx, rdx
cmp rbx, rcx
jb 0x14000d2a9
cmp r8d, 2
jne 0x14000cee5
lea rax, str.using_encrypt_then_mac
mov r9d, 0x558
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x20], rax
mov edx, 3
mov rcx, r14
call fcn.1400196f0
mov rax, qword [rdi + 0x18]
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
sub qword [rsi + 0x28], rax
mov r9d, 0x56b
mov rax, qword [rsi]
mov edx, 4
mov rcx, qword [rsi + 0x28]
mov qword [rbp - 0x78], rax
movzx eax, byte [rsi + 8]
mov byte [rbp - 0x70], al
movzx eax, word [rsi + 9]
mov word [rbp - 0x6f], ax
mov rax, rcx
shr rax, 8
mov byte [rbp - 0x6d], al
lea rax, [rbp - 0x78]
mov qword [rsp + 0x30], reloc.WS2_32.dll_listen
mov qword [rsp + 0x28], rax
lea rax, str.MACd_meta_data
mov byte [rbp - 0x6c], cl
mov rcx, r14
mov qword [rsp + 0x20], rax
call fcn.1400198c0
lea r15, [rdi + 0x60]
test r15, r15
je 0x14000ce88
mov rax, qword [r15]
test rax, rax
je 0x14000ce88
cmp qword [r15 + 0x10], r13
je 0x14000ce88
mov eax, dword [rax + 8]
dec eax
cmp eax, 6
ja case.default.0x14000cc7f
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0xd318]
add rcx, rdx
jmp rcx
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x78]
mov r8d, reloc.WS2_32.dll_listen
call fcn.14003fcc0
mov ebx, eax
jmp 0x14000ccf9
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x78]
mov r8d, reloc.WS2_32.dll_listen
call fcn.14003ee10
mov ebx, eax
jmp 0x14000ccf9
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x78]
mov r8d, reloc.WS2_32.dll_listen
call fcn.140041380
mov ebx, eax
jmp 0x14000ccf9
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x78]
mov r8d, reloc.WS2_32.dll_listen
call fcn.140019210
mov ebx, eax
jmp 0x14000ccf9
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x78]
mov r8d, reloc.WS2_32.dll_listen
call fcn.140024cf0
mov ebx, eax
jmp 0x14000ccf9
mov ebx, 0xffffaf00
test ebx, ebx
jne 0x14000ce8d
cmp qword [r15], r13
je 0x14000ce88
cmp qword [r15 + 0x10], r13
je 0x14000ce88
mov r8, qword [rsi + 0x28]
mov rdx, r12
mov rcx, r15
call fcn.1400145c0
mov ebx, eax
test eax, eax
jne 0x14000ce8d
lea rdx, [rbp + 0x18]
mov rcx, r15
call fcn.140014a30
mov ebx, eax
test eax, eax
jne 0x14000ce8d
cmp qword [r15], r13
je 0x14000ce88
mov r9, qword [r15 + 0x10]
test r9, r9
je 0x14000ce88
mov rcx, r15
call fcn.140014360
mov ebx, eax
test eax, eax
jne 0x14000ce8d
mov rax, qword [r15]
mov rdx, r9
mov rcx, r15
movzx r8d, byte [rax + 0xd]
call fcn.1400145c0
mov r15d, eax
mov ebx, eax
test eax, eax
jne 0x14000ce8d
mov rcx, qword [rdi + 0x18]
lea rax, str.message__mac
mov rdx, qword [rsi + 0x28]
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x30], rcx
add rdx, r12
mov qword [rsp + 0x28], rdx
mov r9d, 0x590
lea edx, [rbx + 4]
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.1400198c0
mov rax, qword [rdi + 0x18]
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x30], rax
lea edx, [rbx + 4]
lea rax, [rbp + 0x18]
mov r9d, 0x592
mov qword [rsp + 0x28], rax
mov rcx, r14
lea rax, str.expected_mac
mov qword [rsp + 0x20], rax
call fcn.1400198c0
mov r9, qword [rsi + 0x28]
xor eax, eax
add r9, r12
mov byte [rsp + 0x60], r13b
mov r8d, eax
cmp qword [rdi + 0x18], rax
jbe 0x14000ce45
lea rax, [rbp + 0x18]
sub r9, rax
nop dword [rax + rax]
lea rax, [rbp + 0x18]
add rax, r8
inc r8
movzx ecx, byte [rax + r9]
movzx edx, byte [rax]
movzx eax, byte [rsp + 0x60]
xor dl, cl
or dl, al
mov byte [rsp + 0x60], dl
cmp r8, qword [rdi + 0x18]
jb 0x14000ce20
movzx eax, byte [rsp + 0x60]
test al, al
je 0x14000ce7b
lea rax, str.message_mac_does_not_match
mov r9d, 0x598
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x20], rax
mov edx, 1
mov rcx, r14
call fcn.1400196f0
mov ebx, 0xffff8e80
jmp 0x14000ce8d
mov r13d, 1
mov dword [rsp + 0x64], r13d
jmp 0x14000ce8d
mov ebx, 0xffffaf00
mov r8, qword [rdi + 0x18]
test r8, r8
je 0x14000cea5
mov rax, qword [fcn.140080540]
lea rcx, [rbp + 0x18]
xor edx, edx
call rax
test ebx, ebx
je 0x14000cee2
cmp ebx, 0xffff8e80
je 0x14000cedb
lea rax, str.mbedtls_hmac_xxx
mov dword [rsp + 0x28], ebx
mov r9d, 0x5ab
mov qword [rsp + 0x20], rax
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov edx, 1
mov rcx, r14
call fcn.140019800
mov eax, ebx
jmp 0x14000c8cb
xor r15d, r15d
mov rcx, qword [rsi + 0x28]
xor edx, edx
mov r8, qword [rdi + 8]
mov rax, rcx
div r8
test rdx, rdx
je 0x14000cf1b
mov qword [rsp + 0x30], r8
lea rax, str.msglen___zu_____ivlen___zu____0
mov qword [rsp + 0x28], rcx
mov r9d, 0x5bc
mov qword [rsp + 0x20], rax
jmp 0x14000c8b2
mov rdx, r12
lea rcx, [rdi + 0x38]
call fcn.140080780
mov rax, qword [rdi + 8]
lea rdx, [rsp + 0x70]
add qword [rsi + 0x20], rax
lea rcx, [rdi + 0xe0]
add r12, rax
mov qword [rsp + 0x30], rdx
mov rax, qword [rsi + 0x28]
lea rdx, [rdi + 0x38]
sub rax, qword [rdi + 8]
mov r9, r12
mov qword [rsi + 0x28], rax
mov r8, qword [rdi + 8]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rax
call fcn.14001d580
mov ebx, eax
test eax, eax
je 0x14000cfa0
mov dword [rsp + 0x28], eax
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
lea rax, str.mbedtls_cipher_crypt
mov r9d, 0x5ff
mov edx, 1
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.140019800
mov eax, ebx
jmp 0x14000c8cb
mov rdx, qword [rsi + 0x28]
cmp rdx, qword [rsp + 0x70]
je 0x14000cfdb
lea rax, str.should_never_happen
mov r9d, 0x607
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x20], rax
mov edx, 1
mov rcx, r14
call fcn.1400196f0
mov eax, 0xffff9400
jmp 0x14000c8cb
movzx ecx, byte [rdx + r12 - 1]
mov rax, rdx
cmp r13d, 1
je 0x14000cfee
sub rax, qword [rdi + 0x18]
sub rax, rcx
mov r9, rdx
dec rax
mov r10, r15
shr rax, 0x3f
neg rax
shr rax, 0x3f
dec rax
mov r11, rax
mov qword [rsp + 0x68], rax
and r11, rcx
mov eax, 0x100
mov rcx, rdx
lea rbx, [r11 + 1]
sub rcx, rbx
cmp rdx, rax
cmovbe rax, rdx
sub r9, rax
cmp r9, rdx
jae 0x14000d07c
mov r8, r9
lea r15, [rcx + r12]
sub r8, rcx
nop dword [rax + rax]
movzx eax, byte [r15 + r8]
mov rdx, r11
xor rdx, rax
inc r9
neg rdx
mov rax, r8
shr rax, 0x3f
inc r8
neg rax
shr rdx, 0x3f
shr rax, 0x3f
xor rdx, 1
dec rax
and rax, rdx
mov rdx, qword [rsi + 0x28]
add r10, rax
cmp r9, rdx
jb 0x14000d040
xor r10, rbx
mov r15, r10
neg r15
or r15, r10
shr r15, 0x3f
xor r15, 1
and r15, qword [rsp + 0x68]
mov rax, r15
neg rax
shr rax, 0x3f
neg rax
and rbx, rax
sub rdx, rbx
mov qword [rsi + 0x28], rdx
test r13d, r13d
jne 0x14000d23d
sub rdx, qword [rdi + 0x18]
lea rcx, [rdi + 0x60]
mov rax, qword [rsi]
xorps xmm0, xmm0
mov qword [rbp - 0x78], rax
xorps xmm1, xmm1
movzx eax, byte [rsi + 8]
mov r9, r12
mov byte [rbp - 0x70], al
lea r13, [rdx + rbx]
movzx eax, word [rsi + 9]
lea rbx, [r13 - 0x100]
mov word [rbp - 0x6f], ax
mov r8d, reloc.WS2_32.dll_listen
mov rax, rdx
mov qword [rsi + 0x28], rdx
shr rax, 8
mov byte [rbp - 0x6d], al
cmp r13, 0x100
mov eax, 0
mov byte [rbp - 0x6c], dl
cmovbe rbx, rax
lea rax, [rbp - 0x18]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rdx
lea rdx, [rbp - 0x78]
movups xmmword [rbp - 0x18], xmm0
movups xmmword [rbp - 8], xmm0
movups xmmword [rbp + 8], xmm0
movups xmmword [rbp - 0x48], xmm1
movups xmmword [rbp - 0x38], xmm1
movups xmmword [rbp - 0x28], xmm1
call fcn.14001b500
mov dword [rsp + 0x68], eax
test eax, eax
je 0x14000d183
mov dword [rsp + 0x28], eax
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
lea rax, str.mbedtls_ct_hmac
mov r9d, 0x6a2
mov edx, 1
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.140019800
mov r13d, dword [rsp + 0x64]
jmp 0x14000d201
mov rsi, qword [rsi + 0x28]
cmp rbx, r13
ja 0x14000d1b1
nop dword [rax]
mov r8, qword [rdi + 0x18]
lea rdx, [rbx + r12]
mov r9, rbx
mov qword [rsp + 0x20], rsi
lea rcx, [rbp - 0x48]
call fcn.14001b380
inc rbx
cmp rbx, r13
jbe 0x14000d190
xor r8d, r8d
mov byte [rsp + 0x60], 0
mov edx, r8d
cmp qword [rdi + 0x18], rdx
jbe 0x14000d1f0
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rbp + rdx - 0x48]
movzx ecx, byte [rbp + rdx - 0x18]
inc rdx
xor cl, al
movzx eax, byte [rsp + 0x60]
or cl, al
mov byte [rsp + 0x60], cl
cmp rdx, qword [rdi + 0x18]
jb 0x14000d1d0
movzx eax, byte [rsp + 0x60]
mov r13d, 1
test al, al
cmovne r15, r8
mov r8, qword [rdi + 0x18]
test r8, r8
je 0x14000d231
mov rax, qword [fcn.140080540]
lea rcx, [rbp - 0x48]
xor edx, edx
call rax
mov r8, qword [rdi + 0x18]
test r8, r8
je 0x14000d231
mov rax, qword [fcn.140080540]
lea rcx, [rbp - 0x18]
xor edx, edx
call rax
mov eax, dword [rsp + 0x68]
test eax, eax
jne 0x14000c8cb
test r15, r15
je 0x14000c8c6
cmp r13d, 1
je 0x14000d27c
lea rax, str.should_never_happen
mov r9d, 0x6cc
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x20], rax
mov edx, 1
mov rcx, r14
call fcn.1400196f0
mov eax, 0xffff9400
jmp 0x14000c8cb
lea rax, str.__decrypt_buf
mov r9d, 0x6e6
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x20], rax
mov edx, 2
mov rcx, r14
call fcn.1400196f0
xor eax, eax
jmp 0x14000c8cb
mov rax, qword [rdi + 0x18]
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x38], rax
mov r9d, 0x548
mov qword [rsp + 0x30], rdx
lea rax, str.msglen___zu____max__ivlen__zu___maclen___zu___1______expl_IV__
mov qword [rsp + 0x28], rbx
mov edx, 1
mov rcx, r14
mov qword [rsp + 0x20], rax
call fcn.1400196f0
jmp 0x14000c8c6
lea rax, str.bad_record_structure_provided_to_decrypt_buf
mov r9d, 0x47e
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x20], rax
mov edx, 1
mov rcx, r14
call fcn.1400196f0
mov eax, 0xffff9400
jmp 0x14000c8d3