Function at 0x14003801d
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov rax, qword [0x140230040]
xor rax, rsp
mov qword [rbp + 0x30], rax
xor eax, eax
mov qword [rbp - 0x80], rcx
mov dword [rsp + 0x60], eax
mov r14, r8
mov r15, rdx
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov r9d, 0x50b
mov r12, rcx
lea ebx, [rax + 1]
xor r13d, r13d
lea rax, [0x1401fab48]
mov esi, ebx
lea edx, [rbx + 1]
mov qword [rsp + 0x20], rax
call fcn.140020854
test r14, r14
je 0x14003828f
mov rdx, qword [r14 + 0x10]
test rdx, rdx
je 0x14003828f
mov rax, qword [r14 + 0x18]
mov rcx, qword [r14 + 0x20]
cmp rax, rcx
jb 0x14003828f
mov rdi, qword [r14 + 0x28]
sub rax, rcx
cmp rax, rdi
jb 0x14003828f
lea rbx, [rcx + rdx]
mov rcx, r15
mov qword [rsp + 0x78], rbx
call fcn.14003d5a4
mov dword [rsp + 0x70], eax
movzx eax, byte [r14 + 0x30]
cmp al, byte [r15 + 0x140]
jne 0x140038288
mov r8d, eax
lea rdx, [r15 + 0x142]
lea rcx, [r14 + 0x31]
call fcn.14013a7b5
test eax, eax
jne 0x140038288
mov edx, dword [rsp + 0x70]
cmp edx, 3
jne 0x140037c6a
mov rax, qword [r15 + 0x10]
cmp qword [r15 + 8], rax
je 0x140037a89
cmp rdi, 8
jae 0x140037a67
mov qword [rsp + 0x30], 8
lea rcx, str.msglen___zu_____explicit_iv_len___zu_
mov qword [rsp + 0x28], rdi
mov r9d, 0x540
mov qword [rsp + 0x20], rcx
mov edx, esi
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov rcx, r12
call fcn.140020854
mov eax, 0xffff8e80
jmp 0x1400382b7
add qword [r14 + 0x20], 8
mov qword [rsp + 0x68], rbx
add rbx, 8
add rdi, 0xfffffffffffffff8
mov qword [rsp + 0x78], rbx
mov rbx, qword [rsp + 0x68]
mov qword [r14 + 0x28], rdi
jmp 0x140037a8c
mov rbx, r14
mov rax, qword [r15 + 0x20]
cmp rdi, rax
jae 0x140037ab3
mov qword [rsp + 0x30], rax
mov r9d, 0x551
lea rax, str.msglen___zu____taglen___zu_
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
jmp 0x140037a4c
sub rdi, rax
lea rdx, [r15 + 0x38]
xor eax, eax
mov qword [r14 + 0x28], rdi
mov r8, qword [r15 + 0x10]
lea rcx, [rbp - 0x78]
mov qword [rbp - 0x78], rax
mov dword [rbp - 0x70], eax
call fcn.14013a522
xor ecx, ecx
mov al, byte [rbx + rcx]
xor byte [rbp + rcx - 0x74], al
inc rcx
cmp rcx, 8
jb 0x140037ad6
mov r8, r14
lea rdx, [rsp + 0x70]
lea rcx, [rbp - 0x38]
call fcn.140036ee8
mov rbx, qword [rsp + 0x70]
lea rax, [rbp - 0x38]
mov qword [rsp + 0x30], rbx
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov qword [rsp + 0x28], rax
mov edi, 4
lea rax, str.additional_data_used_for_AEAD
mov r9d, 0x567
mov edx, edi
mov qword [rsp + 0x20], rax
mov rcx, r12
call fcn.140020a00
mov rax, qword [r15 + 8]
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov qword [rsp + 0x30], rax
mov r9d, 0x56f
lea rax, [rbp - 0x78]
mov edx, edi
mov qword [rsp + 0x28], rax
mov rcx, r12
lea rax, str.IV_used
mov qword [rsp + 0x20], rax
call fcn.140020a00
mov rax, qword [r15 + 0x20]
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov rcx, qword [rsp + 0x78]
mov r9d, 0x571
add rcx, qword [r14 + 0x28]
mov edx, edi
mov qword [rsp + 0x30], rax
lea rax, str.TAG_used
mov qword [rsp + 0x28], rcx
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.140020a00
mov r9, qword [rsp + 0x78]
lea rax, [rsp + 0x68]
mov rdi, qword [r15 + 0x20]
lea rcx, [r15 + 0xe0]
mov r8, qword [r14 + 0x18]
mov rdx, qword [r14 + 0x28]
sub r8, r9
add r8, qword [r14 + 0x10]
add rdx, rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r8
mov r8, qword [r15 + 8]
mov qword [rsp + 0x38], r9
mov qword [rsp + 0x30], rdx
lea rdx, [rbp - 0x78]
mov qword [rsp + 0x28], r9
lea r9, [rbp - 0x38]
mov qword [rsp + 0x20], rbx
call fcn.14001f0c8
xor r11d, r11d
mov edi, eax
mov edx, esi
test eax, eax
je 0x140037c3f
mov dword [rsp + 0x28], eax
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
lea rax, str.mbedtls_cipher_auth_decrypt_ext
mov r9d, 0x58b
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.140020944
cmp edi, 0xffff9d00
je 0x140037a5d
mov eax, edi
jmp 0x1400382b7
mov rcx, qword [r14 + 0x28]
mov dword [rsp + 0x60], edx
cmp qword [rsp + 0x68], rcx
je 0x140037c60
lea rax, str.should_never_happen
mov r9d, 0x599
jmp 0x14003829e
mov rbx, qword [rsp + 0x78]
jmp 0x140038091
lea eax, [rdx - 1]
cmp eax, esi
jbe 0x140037c85
lea rax, str.should_never_happen
mov r9d, 0x6e1
mov edx, esi
jmp 0x14003829e
mov r8, qword [r15 + 8]
lea rax, [r8 + r8]
cmp rdi, rax
jb 0x14003824d
mov rcx, qword [r15 + 0x18]
inc rcx
add rcx, r8
cmp rdi, rcx
jb 0x14003824d
cmp edx, 2
jne 0x140037ed8
lea rax, str.using_encrypt_then_mac
mov r9d, 0x5dc
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov qword [rsp + 0x20], rax
mov edx, 3
mov rcx, r12
call fcn.140020854
mov rax, qword [r15 + 0x18]
lea rdx, [rsp + 0x70]
sub qword [r14 + 0x28], rax
lea rcx, [rbp - 0x38]
mov r8, r14
call fcn.140036ee8
mov rdi, qword [rsp + 0x70]
lea rax, [rbp - 0x38]
mov qword [rsp + 0x30], rdi
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov qword [rsp + 0x28], rax
mov r13d, 4
lea rax, str.MACd_meta_data
mov r9d, 0x5ef
mov edx, r13d
mov qword [rsp + 0x20], rax
mov rcx, r12
call fcn.140020a00
lea rsi, [r15 + 0x60]
test rsi, rsi
je 0x140037e80
cmp qword [rsi], 0
je 0x140037e80
cmp qword [rsi + 0x10], 0
je 0x140037e80
mov r8, rdi
lea rdx, [rbp - 0x38]
mov rcx, rsi
call fcn.14002a680
mov ebx, eax
test eax, eax
jne 0x140037e85
cmp qword [rsi], 0
je 0x140037e80
cmp qword [rsi + 0x10], 0
je 0x140037e80
mov rdi, qword [rsp + 0x78]
mov rcx, rsi
mov r8, qword [r14 + 0x28]
mov rdx, rdi
call fcn.14002a680
mov ebx, eax
test eax, eax
jne 0x140037e85
lea rdx, [rbp - 0x68]
mov rcx, rsi
call fcn.14002a9f4
mov ebx, eax
test eax, eax
jne 0x140037e85
mov rcx, rsi
call fcn.14002aab0
mov ebx, eax
test eax, eax
jne 0x140037e85
mov rax, qword [r15 + 0x18]
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov rcx, qword [r14 + 0x28]
mov r9d, 0x61c
mov qword [rsp + 0x30], rax
add rcx, rdi
mov qword [rsp + 0x28], rcx
lea rax, str.message__mac
mov rcx, r12
mov qword [rsp + 0x20], rax
mov edx, r13d
call fcn.140020a00
mov rax, qword [r15 + 0x18]
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov qword [rsp + 0x30], rax
mov r9d, 0x61e
lea rax, [rbp - 0x68]
mov edx, r13d
mov qword [rsp + 0x28], rax
mov rcx, r12
lea rax, str.expected_mac
mov qword [rsp + 0x20], rax
call fcn.140020a00
mov rcx, qword [r14 + 0x28]
lea rdx, [rbp - 0x68]
mov r8, qword [r15 + 0x18]
add rcx, rdi
call fcn.14001fa2c
test eax, eax
je 0x140037e76
lea rax, str.message_mac_does_not_match
mov r9d, 0x623
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov qword [rsp + 0x20], rax
lea edx, [rbx + 1]
mov rcx, r12
call fcn.140020854
mov ebx, 0xffff8e80
jmp 0x140037e85
mov dword [rsp + 0x60], 1
jmp 0x140037e85
mov ebx, 0xffffaf00
mov rcx, qword [r15 + 0x18]
test rcx, rcx
je 0x140037e96
lea rdi, [rbp - 0x68]
xor eax, eax
rep stosb byte [rdi], al
test ebx, ebx
je 0x140037ed3
cmp ebx, 0xffff8e80
je 0x140037ecc
lea rax, str.mbedtls_hmac_xxx
mov dword [rsp + 0x28], ebx
mov r9d, 0x636
mov qword [rsp + 0x20], rax
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov edx, 1
mov rcx, r12
call fcn.140020944
mov eax, ebx
jmp 0x1400382b7
mov rbx, qword [rsp + 0x78]
mov rcx, qword [r14 + 0x28]
xor edx, edx
mov r8, qword [r15 + 8]
mov rax, rcx
div r8
test rdx, rdx
je 0x140037f13
mov qword [rsp + 0x30], r8
lea rax, str.msglen___zu_____ivlen___zu____0
mov qword [rsp + 0x28], rcx
mov r9d, 0x647
mov qword [rsp + 0x20], rax
mov edx, 1
jmp 0x140037a4e
mov rdx, rbx
lea rcx, [r15 + 0x38]
call fcn.14013a522
mov rcx, qword [r15 + 8]
lea rdx, [rsp + 0x68]
add qword [r14 + 0x20], rcx
add rbx, rcx
mov rax, qword [r14 + 0x28]
lea rcx, [r15 + 0xe0]
sub rax, qword [r15 + 8]
mov r9, rbx
mov qword [rsp + 0x30], rdx
lea rdx, [r15 + 0x38]
mov qword [r14 + 0x28], rax
mov r8, qword [r15 + 8]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
call fcn.14001edac
xor r11d, r11d
mov edi, eax
test eax, eax
je 0x140037f98
mov dword [rsp + 0x28], eax
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
lea rax, str.mbedtls_cipher_crypt
mov r9d, 0x685
lea edx, [r11 + 1]
mov qword [rsp + 0x20], rax
mov rcx, r12
call fcn.140020944
jmp 0x140037c38
mov rcx, qword [r14 + 0x28]
cmp rcx, qword [rsp + 0x68]
je 0x140037fba
mov r9d, 0x68c
lea rax, str.should_never_happen
mov edx, 1
jmp 0x14003829e
mov edx, dword [rsp + 0x60]
mov rsi, rcx
movzx r13d, byte [rcx + rbx - 1]
cmp edx, 1
je 0x140037fd0
sub rsi, qword [r15 + 0x18]
sub rsi, r13
mov edi, 0x100
dec rsi
mov eax, edi
shr rsi, 0x3f
mov r10, rcx
neg rsi
mov r9, r11
shr rsi, 0x3f
dec rsi
and r13, rsi
mov qword [rsp + 0x68], r13
inc r13
sub r10, r13
cmp rcx, rdi
mov rdi, rcx
cmovbe rax, rcx
sub rdi, rax
cmp rdi, rcx
jae 0x140038063
mov r8, rdi
lea r11, [r10 + rbx]
sub r8, r10
mov r10, qword [rsp + 0x68]
movzx eax, byte [r11 + r8]
mov rdx, r10
mov rcx, qword [r14 + 0x28]
xor rdx, rax
neg rdx
mov rax, r8
shr rax, 0x3f
inc rdi
neg rax
shr rdx, 0x3f
shr rax, 0x3f
xor rdx, 1
dec rax
inc r8
and rax, rdx
add r9, rax
cmp rdi, rcx
jb 0x140038020
mov edx, dword [rsp + 0x60]
xor r11d, r11d
xor r9, r13
mov rax, r9
neg rax
or rax, r9
shr rax, 0x3f
xor rax, 1
and rsi, rax
mov rax, rsi
neg rax
shr rax, 0x3f
neg rax
and r13, rax
sub rcx, r13
mov qword [r14 + 0x28], rcx
test edx, edx
jne 0x1400381e0
sub rcx, qword [r15 + 0x18]
lea rdx, [rsp + 0x70]
xorps xmm0, xmm0
mov qword [r14 + 0x28], rcx
xorps xmm1, xmm1
lea rcx, [rbp - 0x38]
mov r8, r14
movups xmmword [rbp - 0x68], xmm0
movups xmmword [rbp - 0x58], xmm0
movups xmmword [rbp - 0x48], xmm0
movups xmmword [rbp], xmm1
movups xmmword [rbp + 0x10], xmm1
movups xmmword [rbp + 0x20], xmm1
call fcn.140036ee8
mov rdx, qword [r14 + 0x28]
lea rcx, [r15 + 0x60]
xor edi, edi
mov r9, rbx
lea r8, [rdx + r13]
lea rax, [r8 - 0x100]
mov qword [rsp + 0x68], r8
cmp r8, 0x100
cmova rdi, rax
lea rax, [rbp - 0x68]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r8
mov r8, qword [rsp + 0x70]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdx
lea rdx, [rbp - 0x38]
call fcn.14001fb84
mov dword [rsp + 0x70], eax
mov r13d, eax
test eax, eax
je 0x14003815c
mov dword [rsp + 0x28], eax
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
lea rax, str.mbedtls_ct_hmac
mov r9d, 0x720
mov edx, 1
mov qword [rsp + 0x20], rax
mov rcx, r12
call fcn.140020944
mov edx, dword [rsp + 0x60]
xor r11d, r11d
jmp 0x1400381b6
cmp rdi, qword [rsp + 0x68]
ja 0x140038196
mov r13, qword [rsp + 0x68]
mov r12, qword [r14 + 0x28]
mov r8, qword [r15 + 0x18]
lea rdx, [rdi + rbx]
mov r9, rdi
mov qword [rsp + 0x20], r12
lea rcx, [rbp]
call fcn.14001fb2c
inc rdi
cmp rdi, r13
jbe 0x14003816c
mov r12, qword [rbp - 0x80]
mov r13d, dword [rsp + 0x70]
mov r8, qword [r15 + 0x18]
lea rdx, [rbp - 0x68]
lea rcx, [rbp]
call fcn.14001fa2c
mov edx, dword [rsp + 0x60]
xor r11d, r11d
test eax, eax
cmovne rsi, r11
inc edx
mov r8, qword [r15 + 0x18]
test r8, r8
je 0x1400381d3
xor eax, eax
lea rdi, [rbp]
mov rcx, r8
rep stosb byte [rdi], al
lea rdi, [rbp - 0x68]
mov rcx, r8
rep stosb byte [rdi], al
test r13d, r13d
je 0x1400381e0
mov eax, r13d
jmp 0x1400382b7
test rsi, rsi
je 0x140037a5d
cmp edx, 1
je 0x1400381f9
mov r9d, 0x74a
jmp 0x140037fa9
cmp byte [r14 + 0x30], r11b
je 0x14003821c
mov rax, qword [r14 + 0x28]
test rax, rax
je 0x140038246
dec rax
cmp byte [rax + rbx], r11b
je 0x140038203
mov qword [r14 + 0x28], rax
mov al, byte [rax + rbx]
mov byte [r14 + 8], al
lea rax, str.__decrypt_buf
mov r9d, 0x764
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov qword [rsp + 0x20], rax
mov edx, 2
mov rcx, r12
call fcn.140020854
xor eax, eax
jmp 0x1400382b7
mov eax, 0xffff8e00
jmp 0x1400382b7
mov rax, qword [r15 + 0x18]
mov r9d, 0x5cd
mov qword [rsp + 0x38], rax
mov edx, esi
mov qword [rsp + 0x30], r8
lea rax, str.msglen___zu____max__ivlen__zu___maclen___zu___1______expl_IV__
mov qword [rsp + 0x28], rdi
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.140020854
jmp 0x140037a5d
mov eax, 0xffffa000
jmp 0x1400382b7
lea rax, str.bad_record_structure_provided_to_decrypt_buf
mov r9d, 0x510
mov edx, ebx
lea r8, str.C:Usersdword_source_reposLast_EpochPathOfExileMenulibrary_ssl_msg.c
mov qword [rsp + 0x20], rax
mov rcx, r12
call fcn.140020854
mov eax, 0xffff9400
mov rcx, qword [rbp + 0x30]
xor rcx, rsp
call fcn.140138940
mov rbx, qword [rsp + 0x198]
add rsp, 0x140
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret