Function at 0x140017cb0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x60]
sub rsp, 0x160
mov rax, qword [0x1400b34a8]
xor rax, rsp
mov qword [rbp + 0x50], rax
xor r13d, r13d
lea rax, [0x1400a3e50]
mov rsi, r8
mov dword [rsp + 0x64], r13d
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, [r13 + 2]
mov r14, rcx
lea r15d, [r13 + 1]
call fcn.140024d00
test rsi, rsi
je 0x14001876b
mov rcx, qword [rsi + 0x10]
test rcx, rcx
je 0x14001876b
mov rax, qword [rsi + 0x18]
mov r9, qword [rsi + 0x20]
cmp rax, r9
jb 0x14001876b
mov rbx, qword [rsi + 0x28]
sub rax, r9
cmp rax, rbx
jb 0x14001876b
mov qword [rsp + 0x1b8], r12
lea r12, [r9 + rcx]
mov rcx, rdi
call fcn.1400115c0
mov r8d, eax
cmp eax, 3
jne 0x140017ff5
mov rax, qword [rdi + 0x10]
cmp qword [rdi + 8], rax
je 0x140017da6
cmp rbx, 8
jae 0x140017d8b
mov qword [rsp + 0x30], 8
lea rax, str.msglen___zu_____explicit_iv_len___zu_
mov r9d, 0x4b4
jmp 0x140017dc6
mov qword [rsp + 0x68], r12
lea rax, [r9 + 8]
add r12, 8
mov qword [rsi + 0x20], rax
add rbx, 0xfffffffffffffff8
mov qword [rsi + 0x28], rbx
jmp 0x140017dab
mov qword [rsp + 0x68], rsi
mov rax, qword [rdi + 0x20]
cmp rbx, rax
jae 0x140017e0d
mov qword [rsp + 0x30], rax
mov r9d, 0x4c8
lea rax, str.msglen___zu____taglen___zu_
mov qword [rsp + 0x28], rbx
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x20], rax
mov edx, r15d
mov rcx, r14
call fcn.140024d00
mov eax, 0xffff8e80
mov r12, qword [rsp + 0x1b8]
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.140068c30
add rsp, 0x160
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret
sub rbx, rax
lea rdx, [rdi + 0x38]
xor eax, eax
mov qword [rsi + 0x28], rbx
mov r8, qword [rdi + 0x10]
lea rcx, [rbp - 0x80]
mov qword [rbp - 0x80], rax
mov dword [rbp - 0x78], eax
call fcn.14006bf10
mov rcx, qword [rsp + 0x68]
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x30], reloc.WS2_32.dll_listen
mov r9d, 0x4de
mov edx, 4
movzx eax, byte [rcx]
xor byte [rbp - 0x7c], al
movzx eax, byte [rcx + 1]
xor byte [rbp - 0x7b], al
movzx eax, byte [rcx + 2]
xor byte [rbp - 0x7a], al
movzx eax, byte [rcx + 3]
xor byte [rbp - 0x79], al
movzx eax, byte [rcx + 4]
xor byte [rbp - 0x78], al
movzx eax, byte [rcx + 5]
xor byte [rbp - 0x77], al
movzx eax, byte [rcx + 6]
xor byte [rbp - 0x76], al
movzx eax, byte [rcx + 7]
mov rcx, r14
xor byte [rbp - 0x75], al
mov rax, qword [rsi]
mov qword [rbp - 0x70], rax
movzx eax, byte [rsi + 8]
mov byte [rbp - 0x68], al
movzx eax, word [rsi + 9]
mov word [rbp - 0x67], ax
mov rax, rbx
shr rax, 8
mov byte [rbp - 0x65], al
lea rax, [rbp - 0x70]
mov qword [rsp + 0x28], rax
lea rax, str.additional_data_used_for_AEAD
mov qword [rsp + 0x20], rax
mov byte [rbp - 0x64], bl
call fcn.140024ed0
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, [rbp - 0x80]
mov edx, 4
mov qword [rsp + 0x28], rax
mov rcx, r14
lea rax, str.IV_used
mov qword [rsp + 0x20], rax
call fcn.140024ed0
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.140024ed0
mov r8, qword [rdi + 0x20]
lea rax, [rsp + 0x68]
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 r8, qword [rdi + 8]
lea r9, [rbp - 0x70]
mov qword [rsp + 0x30], rdx
lea rdx, [rbp - 0x80]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], reloc.WS2_32.dll_listen
call fcn.140028f10
mov ebx, eax
test eax, eax
je 0x140017fd3
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, r15d
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.140024e10
cmp ebx, 0xffff9d00
je 0x140017de2
mov eax, ebx
jmp 0x140017de7
mov rdx, qword [rsi + 0x28]
mov eax, r15d
mov dword [rsp + 0x64], eax
cmp qword [rsp + 0x68], rdx
je 0x140017fed
mov r9d, 0x512
jmp 0x140018002
mov rbx, r13
jmp 0x14001854e
dec eax
cmp eax, r15d
jbe 0x14001802a
mov r9d, 0x661
lea rax, str.should_never_happen
mov edx, r15d
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.140024d00
mov eax, 0xffff9400
jmp 0x140017de7
mov rdx, qword [rdi + 8]
lea rax, [rdx + rdx]
cmp rbx, rax
jb 0x14001872f
mov rcx, qword [rdi + 0x18]
inc rcx
add rcx, rdx
cmp rbx, rcx
jb 0x14001872f
cmp r8d, 2
jne 0x14001837e
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.140024d00
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 - 0x70], rax
movzx eax, byte [rsi + 8]
mov byte [rbp - 0x68], al
movzx eax, word [rsi + 9]
mov word [rbp - 0x67], ax
mov rax, rcx
shr rax, 8
mov byte [rbp - 0x65], al
lea rax, [rbp - 0x70]
mov qword [rsp + 0x30], reloc.WS2_32.dll_listen
mov qword [rsp + 0x28], rax
lea rax, str.MACd_meta_data
mov byte [rbp - 0x64], cl
mov rcx, r14
mov qword [rsp + 0x20], rax
call fcn.140024ed0
lea r15, [rdi + 0x60]
test r15, r15
je 0x140018320
mov rax, qword [r15]
test rax, rax
je 0x140018320
cmp qword [r15 + 0x10], r13
je 0x140018320
mov eax, dword [rax + 8]
dec eax
cmp eax, 6
ja case.default.0x140018129
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x1879c]
add rcx, rdx
jmp rcx
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x70]
mov r8d, reloc.WS2_32.dll_listen
call fcn.140049d90
mov ebx, eax
jmp 0x1400181a3
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x70]
mov r8d, reloc.WS2_32.dll_listen
call fcn.140048f90
mov ebx, eax
jmp 0x1400181a3
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x70]
mov r8d, reloc.WS2_32.dll_listen
call fcn.14004b940
mov ebx, eax
jmp 0x1400181a3
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x70]
mov r8d, reloc.WS2_32.dll_listen
call fcn.140024820
mov ebx, eax
jmp 0x1400181a3
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x70]
mov r8d, reloc.WS2_32.dll_listen
call fcn.140030060
mov ebx, eax
jmp 0x1400181a3
mov ebx, 0xffffaf00
test ebx, ebx
jne 0x140018325
cmp qword [r15], r13
je 0x140018320
cmp qword [r15 + 0x10], r13
je 0x140018320
mov r8, qword [rsi + 0x28]
mov rdx, r12
mov rcx, r15
call fcn.14001fa10
mov ebx, eax
test eax, eax
jne 0x140018325
lea rdx, [rbp + 0x20]
mov rcx, r15
call fcn.14001fef0
mov ebx, eax
test eax, eax
jne 0x140018325
cmp qword [r15], r13
je 0x140018320
mov r9, qword [r15 + 0x10]
test r9, r9
je 0x140018320
mov rcx, r15
call fcn.14001f7b0
mov ebx, eax
test eax, eax
jne 0x140018325
mov rax, qword [r15]
mov rdx, r9
mov rcx, r15
movzx r8d, byte [rax + 0xd]
call fcn.14001fa10
mov r15d, eax
mov ebx, eax
test eax, eax
jne 0x140018325
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.140024ed0
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 + 0x20]
mov r9d, 0x592
mov qword [rsp + 0x28], rax
mov rcx, r14
lea rax, str.expected_mac
mov qword [rsp + 0x20], rax
call fcn.140024ed0
mov r8, qword [rsi + 0x28]
mov rdx, r13
add r8, r12
mov byte [rsp + 0x60], r13b
cmp qword [rdi + 0x18], rdx
jbe 0x1400182e0
nop dword [rax]
movzx eax, byte [rdx + r8]
movzx ecx, byte [rbp + rdx + 0x20]
inc rdx
xor cl, al
movzx eax, byte [rsp + 0x60]
or cl, al
mov byte [rsp + 0x60], cl
cmp rdx, qword [rdi + 0x18]
jb 0x1400182c0
movzx eax, byte [rsp + 0x60]
test al, al
je 0x140018316
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.140024d00
mov ebx, 0xffff8e80
jmp 0x140018325
mov dword [rsp + 0x64], 1
jmp 0x140018325
mov ebx, 0xffffaf00
mov r8, qword [rdi + 0x18]
test r8, r8
je 0x14001833d
mov rax, qword [fcn.14006c5b0]
lea rcx, [rbp + 0x20]
xor edx, edx
call rax
test ebx, ebx
je 0x14001837e
cmp ebx, 0xffff8e80
je 0x14001843e
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.140024e10
mov eax, ebx
jmp 0x140017de7
mov rcx, qword [rsi + 0x28]
xor edx, edx
mov r8, qword [rdi + 8]
mov rax, rcx
div r8
test rdx, rdx
je 0x1400183c0
mov qword [rsp + 0x30], r8
lea rax, str.msglen___zu_____ivlen___zu____0
mov qword [rsp + 0x28], rcx
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov qword [rsp + 0x20], rax
mov r9d, 0x5bc
mov edx, 1
jmp 0x140017dda
mov rdx, r12
lea rcx, [rdi + 0x38]
call fcn.14006bf10
mov rax, qword [rdi + 8]
lea rdx, [rsp + 0x68]
add qword [rsi + 0x20], rax
lea rcx, [rdi + 0xe0]
add r12, rax
mov qword [rsp + 0x30], rdx
mov rax, qword [rdi + 8]
lea rdx, [rdi + 0x38]
sub qword [rsi + 0x28], rax
mov r9, r12
mov rax, qword [rsi + 0x28]
mov r8, qword [rdi + 8]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rax
call fcn.140028c20
mov ebx, eax
test eax, eax
je 0x140018445
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.140024e10
mov eax, ebx
jmp 0x140017de7
mov rdx, qword [rsi + 0x28]
cmp rdx, qword [rsp + 0x68]
je 0x140018480
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.140024d00
mov eax, 0xffff9400
jmp 0x140017de7
cmp dword [rsp + 0x64], 1
mov rax, rdx
movzx ecx, byte [rdx + r12 - 1]
je 0x140018494
sub rax, qword [rdi + 0x18]
sub rax, rcx
mov r9, rdx
dec rax
mov r10, r13
shr rax, 0x3f
neg rax
shr rax, 0x3f
dec rax
mov r11, rax
mov qword [rsp + 0x70], 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 0x14001851a
mov r8, r9
lea r15, [rcx + r12]
sub r8, rcx
movzx ecx, byte [r15 + r8]
mov rax, r8
mov rdx, qword [rsi + 0x28]
xor rcx, r11
shr rax, 0x3f
neg rcx
neg rax
shr rcx, 0x3f
shr rax, 0x3f
xor rcx, 1
dec rax
inc r9
and rax, rcx
inc r8
add r10, rax
cmp r9, rdx
jb 0x1400184e1
xor r10, rbx
mov r15, r10
neg r15
or r15, r10
shr r15, 0x3f
xor r15, 1
and r15, qword [rsp + 0x70]
mov rax, r15
neg rax
shr rax, 0x3f
neg rax
and rbx, rax
mov eax, dword [rsp + 0x64]
sub rdx, rbx
mov qword [rsi + 0x28], rdx
test eax, eax
jne 0x1400186ce
sub rdx, qword [rdi + 0x18]
lea r9, [rbp - 0x10]
mov rax, qword [rsi]
lea rcx, [rdi + 0x60]
mov qword [rbp - 0x70], rax
xorps xmm0, xmm0
movzx eax, byte [rsi + 8]
xorps xmm1, xmm1
mov byte [rbp - 0x68], al
movzx eax, word [rsi + 9]
mov qword [rsp + 0x38], r9
mov r9, r12
mov word [rbp - 0x67], ax
mov rax, rdx
shr rax, 8
mov byte [rbp - 0x65], al
lea rax, [rdx + rbx]
mov qword [rsp + 0x30], rax
lea r8, [rax - 0x100]
cmp rax, 0x100
mov qword [rsi + 0x28], rdx
mov byte [rbp - 0x64], dl
cmovbe r8, r13
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x20], rdx
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x78], r8
mov r8d, reloc.WS2_32.dll_listen
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rbp - 0x40], xmm1
movups xmmword [rbp - 0x30], xmm1
movups xmmword [rbp - 0x20], xmm1
call fcn.140026ca0
mov ebx, eax
test eax, eax
je 0x14001861e
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.140024e10
jmp 0x140018692
mov rax, qword [rdi + 0x18]
lea rcx, [rbp - 0x40]
mov r9, qword [rsp + 0x78]
mov rdx, r12
mov r8, qword [rsi + 0x28]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x20], rax
call fcn.140026b00
mov rdx, r13
mov byte [rsp + 0x60], r13b
cmp qword [rdi + 0x18], rdx
jbe 0x140018680
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rbp + rdx - 0x40]
movzx ecx, byte [rbp + rdx - 0x10]
inc rdx
xor cl, al
movzx eax, byte [rsp + 0x60]
or cl, al
mov byte [rsp + 0x60], cl
cmp rdx, qword [rdi + 0x18]
jb 0x140018660
inc dword [rsp + 0x64]
movzx eax, byte [rsp + 0x60]
test al, al
cmove r13, r15
mov r15, r13
mov r8, qword [rdi + 0x18]
test r8, r8
je 0x1400186aa
mov rax, qword [fcn.14006c5b0]
lea rcx, [rbp - 0x40]
xor edx, edx
call rax
mov r8, qword [rdi + 0x18]
test r8, r8
je 0x1400186c2
mov rax, qword [fcn.14006c5b0]
lea rcx, [rbp - 0x10]
xor edx, edx
call rax
test ebx, ebx
jne 0x14001843e
mov eax, dword [rsp + 0x64]
test r15, r15
je 0x140017de2
lea r8, str.E:mbedtls_3.2.1mbedtls_3.2.1library_ssl_msg.c
mov rcx, r14
cmp eax, 1
je 0x14001870c
lea rax, str.should_never_happen
mov r9d, 0x6cc
mov edx, 1
mov qword [rsp + 0x20], rax
call fcn.140024d00
mov eax, 0xffff9400
jmp 0x140017de7
lea rax, str.__decrypt_buf
mov r9d, 0x6e6
mov edx, 2
mov qword [rsp + 0x20], rax
call fcn.140024d00
xor eax, eax
jmp 0x140017de7
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, r15d
mov rcx, r14
mov qword [rsp + 0x20], rax
call fcn.140024d00
jmp 0x140017de2
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, r15d
mov rcx, r14
call fcn.140024d00
mov eax, 0xffff9400
jmp 0x140017def