Function at 0x140040da8
Capabilities:
Encode data using xor

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
push rdi
push r12
push r14
sub rsp, 0x50
mov rax, qword [0x140250028]
xor rax, rsp
mov qword [rsp + 0x40], rax
lea rax, [0x1402199d0]
mov r9d, 0x1f8e
lea r14, str.C:UsersMasheSourceReposPathOfExileBot.v23PathOfExileMenulibrary_ssl_tls.c
mov qword [r11 - 0x48], rax
mov r8, r14
mov edx, 2
mov rbx, rcx
call fcn.140020e04
mov rax, qword [rbx]
lea rdx, [rsp + 0x30]
mov rdi, qword [rbx + 0x70]
mov ebp, 1
mov rcx, rbx
movzx r8d, byte [rax + 8]
xor r8d, ebp
call qword [rdi + 0x28]
test eax, eax
je 0x140040e3d
mov dword [rsp + 0x28], eax
mov r9d, 0x1f92
lea rax, str.calc_finished
mov r8, r14
mov edx, ebp
mov qword [rsp + 0x20], rax
mov rcx, rbx
call fcn.140020ef4
mov edx, ebp
mov rcx, rbx
call fcn.14003b04c
mov esi, eax
mov r12d, 0xc
test eax, eax
je 0x140040e7b
mov dword [rsp + 0x28], eax
mov r9d, 0x1f96
lea rax, str.mbedtls_ssl_read_record
mov r8, r14
mov edx, ebp
mov qword [rsp + 0x20], rax
mov rcx, rbx
call fcn.140020ef4
jmp 0x140040ffa
cmp dword [rbx + 0xf0], 0x16
je 0x140040eba
lea rax, str.bad_finished_message
mov r9d, 0x1f9b
mov r8, r14
mov qword [rsp + 0x20], rax
mov edx, ebp
mov rcx, rbx
call fcn.140020e04
mov r8b, 0xa
mov dl, 2
mov rcx, rbx
call fcn.14003c4c4
mov esi, 0xffff8900
jmp 0x140040ffa
mov rcx, qword [rbx + 0xe0]
cmp byte [rcx], 0x14
jne 0x140040ea3
mov rax, qword [rbx]
mov r8b, byte [rax + 9]
mov eax, 0x18
cmp r8b, bpl
lea edx, [rax - 8]
cmovne eax, edx
cmp qword [rbx + 0x128], rax
je 0x140040f1a
lea rax, str.bad_finished_message
mov r9d, 0x1faa
mov r8, r14
mov qword [rsp + 0x20], rax
mov edx, ebp
mov rcx, rbx
call fcn.140020e04
mov r8b, 0x32
mov dl, 2
mov rcx, rbx
call fcn.14003c4c4
mov esi, 0xffff8d00
jmp 0x140040ffa
xor edx, edx
mov rdi, r12
cmp r8b, bpl
lea eax, [rdx + 4]
cmovne rdi, rax
add rdi, rcx
xor r8d, r8d
movzx eax, byte [rdi + rdx]
movzx ecx, byte [rsp + rdx + 0x30]
add rdx, rbp
xor ecx, eax
or r8d, ecx
cmp rdx, r12
jb 0x140040f2f
test r8d, r8d
je 0x140040f7d
lea rax, str.bad_finished_message
mov r9d, 0x1fb3
mov r8, r14
mov qword [rsp + 0x20], rax
mov edx, ebp
mov rcx, rbx
call fcn.140020e04
mov r8b, 0x33
mov dl, 2
mov rcx, rbx
call fcn.14003c4c4
mov esi, 0xffff9200
jmp 0x140040ffa
mov eax, dword [rsp + 0x38]
movsd xmm0, qword [rsp + 0x30]
mov qword [rbx + 0x1d0], r12
movsd qword [rbx + 0x1e4], xmm0
mov dword [rbx + 0x1ec], eax
mov rax, qword [rbx + 0x70]
cmp byte [rax], 0
je 0x140040fc4
mov rax, qword [rbx]
cmp byte [rax + 8], 0
jne 0x140040fb5
mov dword [rbx + 8], 0xa
cmp byte [rax + 8], bpl
jne 0x140040fc7
mov dword [rbx + 8], 0xf
jmp 0x140040fc7
add dword [rbx + 8], ebp
mov rax, qword [rbx]
cmp byte [rax + 9], bpl
jne 0x140040fd8
mov rcx, rbx
call fcn.1400396cc
lea rax, str.__parse_finished
mov r9d, 0x1fd4
mov r8, r14
mov qword [rsp + 0x20], rax
mov edx, 2
mov rcx, rbx
call fcn.140020e04
xor eax, eax
lea rdi, [rsp + 0x30]
mov rcx, r12
rep stosb byte [rdi], al
mov eax, esi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14014b850
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r12
pop rdi
ret