Function at 0x1401c1a70
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x38]
sub rsp, 0x138
mov rax, qword [0x140353c70]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov edi, r9d
mov dword [rsp + 0x54], r9d
mov ebx, r8d
mov dword [rsp + 0x5c], ebx
mov dword [rsp + 0x58], edx
mov rsi, rcx
mov r13, qword [rbp + 0xa0]
mov qword [rsp + 0x60], r13
mov r15, qword [rbp + 0xa8]
mov r12, qword [rbp + 0xb0]
mov r14, qword [rbp + 0xb8]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x78], rax
movzx r9d, byte [r14 + 0x16a]
lea r8, str.encryptFragment
mov rdx, r14
lea rcx, [rsp + 0x68]
call fcn.14004cec0
nop
test r13, r13
jne 0x1401c1b21
lea rdx, str.Nothing_to_TLS_encrypt.
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x28]
nop
lea rcx, [rsp + 0x68]
call fcn.14004d020
xor al, al
jmp 0x1401c2354
cmp dword [rsi + 0x124], 0
jne 0x1401c1b56
cmp byte [rsi + 0x104], 0
jne 0x1401c1b56
mov r8d, dword [r15]
mov rdx, r13
mov rcx, r12
call fcn.14003e880
movzx ebx, al
lea rcx, [rsp + 0x68]
call fcn.14004d020
movzx eax, bl
jmp 0x1401c2354
cmp ebx, 3
jne 0x1401c1b64
cmp edi, 4
jne 0x1401c1b64
mov bl, 1
jmp 0x1401c1b66
xor bl, bl
mov byte [rsp + 0x50], bl
lea rcx, [rsi + 0x40]
call fcn.140040520
mov edi, reloc.WS2_32.dll_inet_ntoa
cmp dword [rsi + 0x120], 6
jne 0x1401c1c7d
mov eax, dword [rsi + 0x138]
add eax, dword [rsi + 0x134]
cmp eax, edi
je 0x1401c1ba1
lea rdx, str.Nonce_length_not_correct_for_GCM_mode.
jmp 0x1401c1b06
lea rcx, [rsi + 0x788]
call fcn.140040520
lea r13, [rsi + 0x148]
mov rcx, r13
call fcn.140042d30
test bl, bl
je 0x1401c1e43
cmp eax, edi
je 0x1401c1bf7
lea rdx, str.WriteIV_is_not_the_correct_length_for_TLS_1.3_GCM_mode.
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x28]
mov rcx, r13
call fcn.140042d30
mov r8d, eax
lea rdx, str.fixedIV_len
mov rcx, r14
call fcn.14004d750
jmp 0x1401c1b10
mov dword [rbp - 0x78], 0
mov rax, qword [rsi + 0x178]
mov qword [rbp - 0x74], rax
mov rcx, r13
call fcn.1400428d0
xor r9d, r9d
lea rcx, [rbp - 0x78]
sub rax, rcx
nop dword [rax + rax]
lea r8, [rbp - 0x78]
add r8, r9
movzx edx, byte [r8 + rax]
xor byte [r8], dl
inc r9
cmp r9, rdi
jl 0x1401c1c20
mov r8d, edi
lea rdx, [rbp - 0x78]
lea rcx, [rsi + 0x40]
call fcn.14003e880
mov word [rbp - 0x80], 0x317
mov byte [rbp - 0x7e], 3
mov edx, dword [r15]
add edx, 0x11
mov eax, edx
shr eax, 8
mov byte [rbp - 0x7d], al
mov byte [rbp - 0x7c], dl
mov r8d, 5
lea rdx, [rbp - 0x80]
lea rcx, [rsi + 0x788]
call fcn.14003e880
mov r13, qword [rsp + 0x60]
mov ebx, dword [rsp + 0x5c]
cmp ebx, 3
jne 0x1401c1feb
cmp dword [rsp + 0x54], 2
jl 0x1401c1feb
cmp dword [rsi + 0x138], 0
jbe 0x1401c1feb
lea rcx, [rsi + 0x70]
call fcn.140040520
cmp dword [rsi + 0x120], 6
je 0x1401c1cc3
lea rdx, [rsi + 0x70]
mov ecx, dword [rsi + 0x138]
call fcn.14007ea80
mov r8d, dword [r15]
mov rdx, r13
lea rcx, [rsi + 0x70]
call fcn.14003e880
movzx edi, byte [rsp + 0x50]
test dil, dil
je 0x1401c1cea
movzx edx, byte [rsp + 0x58]
lea rcx, [rsi + 0x70]
call fcn.14003eaf0
cmp dword [rsi + 0x124], 0
je 0x1401c1d46
cmp dword [rsi + 0x120], 6
je 0x1401c1d46
mov qword [rsp + 0x40], r14
lea rax, [rbp - 0x60]
mov qword [rsp + 0x38], rax
mov eax, dword [r15]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r13
mov eax, dword [rsp + 0x54]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x5c]
mov r8d, dword [rsp + 0x58]
mov dl, 1
mov rcx, rsi
call fcn.1401c08b0
test eax, eax
je 0x1401c1d46
lea rcx, [rsi + 0x70]
mov r8d, eax
lea rdx, [rbp - 0x60]
call fcn.14003e880
cmp byte [rsi + 0x104], 0
je 0x1401c1fbe
mov ecx, dword [rsi + 0x120]
lea eax, [rcx - 6]
cmp eax, 1
jbe 0x1401c1d9f
cmp ecx, 0x63
je 0x1401c1d9f
xor eax, eax
mov ecx, dword [rsi + 0x138]
test ecx, ecx
je 0x1401c1d8b
lea rcx, [rsi + 0x70]
call fcn.140042d30
inc eax
mov ecx, dword [rsi + 0x138]
xor edx, edx
div ecx
mov eax, ecx
sub eax, edx
xor edx, edx
cmp eax, ecx
cmovne edx, eax
lea r8d, [rdx + 1]
lea rcx, [rsi + 0x70]
call fcn.14003eb80
cmp dword [rsi + 0x120], 6
jne 0x1401c1db8
lea rdx, [rsi + 0x40]
lea rcx, [rsi + 0x708]
call fcn.1400f63d0
mov rcx, r12
call fcn.140042d30
mov dword [rsp + 0x54], eax
movzx eax, byte [r14 + 0x169]
mov byte [rsp + 0x50], al
movzx ecx, byte [r14 + 0x16a]
mov byte [r14 + 0x169], cl
mov qword [rsi + 0x188], 0
mov qword [rsi + 0x190], 0
cmp dword [rsi + 0x120], 6
jne 0x1401c1eed
lea r8, [rsi + 0x708]
lea rdx, [rsi + 0x180]
mov r9, r14
mov rcx, qword [rsi + 0x830]
call fcn.140166580
test al, al
jne 0x1401c1ed3
mov rax, qword [r14]
lea rdx, str.TLS_gcm_encrypt_setup_failed.
mov rcx, r14
call qword [rax + 0x28]
mov dword [r15], 0
jmp 0x1401c1b10
cmp eax, 4
je 0x1401c1e54
lea rdx, str.WriteIV_is_not_the_correct_length_for_GCM_mode.
jmp 0x1401c1bcf
mov r8d, 8
lea rdx, [rsi + 0x178]
lea rcx, [rsi + 0x788]
call fcn.14003e880
mov rdx, r13
lea rcx, [rsi + 0x40]
call fcn.14003e810
mov r8d, 8
lea rdx, [rsi + 0x178]
lea rcx, [rsi + 0x40]
call fcn.14003e880
mov eax, dword [rsp + 0x58]
mov byte [rbp - 0x80], al
mov ebx, dword [rsp + 0x5c]
mov byte [rbp - 0x7f], bl
mov eax, dword [rsp + 0x54]
mov byte [rbp - 0x7e], al
movzx eax, byte [r15 + 1]
mov byte [rbp - 0x7d], al
movzx eax, byte [r15]
mov byte [rbp - 0x7c], al
mov r8d, 5
lea rdx, [rbp - 0x80]
lea rcx, [rsi + 0x788]
call fcn.14003e880
mov r13, qword [rsp + 0x60]
jmp 0x1401c1c81
test dil, dil
jne 0x1401c1eed
lea rdx, [rsi + 0x178]
mov r8d, 8
mov rcx, r12
call fcn.14003e880
lea rcx, [rsi + 0x70]
call fcn.140042d30
mov ebx, eax
lea rcx, [rsi + 0x70]
call fcn.1400428d0
mov r9, rax
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], ebx
lea r8, [rsi + 0x708]
lea rdx, [rsi + 0x180]
mov rcx, qword [rsi + 0x830]
call fcn.1400f4b00
movzx ebx, al
movzx eax, byte [rsp + 0x50]
mov byte [r14 + 0x169], al
test bl, bl
jne 0x1401c1f4b
lea rdx, str.Failed_to_encrypt_TLS_fragment
jmp 0x1401c1b06
cmp dword [rsi + 0x120], 6
jne 0x1401c1fb0
mov r9, r14
lea r8, [rsi + 0x708]
lea rdx, [rsi + 0x180]
mov rcx, qword [rsi + 0x830]
call fcn.1401664d0
test al, al
jne 0x1401c1f81
lea rdx, str.TLS_gcm_encrypt_finalize_failed.
jmp 0x1401c1b06
lea rcx, [rsi + 0x7b8]
call fcn.140042d30
cmp eax, 0x10
je 0x1401c1f9e
lea rdx, str.GCM_auth_tag_is_not_16_bytes.
jmp 0x1401c1b06
lea rdx, [rsi + 0x7b8]
mov rcx, r12
call fcn.14003e810
movzx ebx, al
mov rcx, r12
call fcn.140042d30
sub eax, dword [rsp + 0x54]
jmp 0x1401c1fd6
lea rdx, [rsi + 0x70]
mov rcx, r12
call fcn.14003e810
movzx ebx, al
lea rcx, [rsi + 0x70]
call fcn.140042d30
mov dword [r15], eax
lea rcx, [rsp + 0x68]
call fcn.14004d020
movzx eax, bl
jmp 0x1401c2354
lea rcx, [rsi + 0x70]
call fcn.140040520
mov r8d, dword [r15]
mov rdx, r13
lea rcx, [rsi + 0x70]
call fcn.14003e880
cmp byte [rsp + 0x50], 0
je 0x1401c2018
movzx edx, byte [rsp + 0x58]
lea rcx, [rsi + 0x70]
call fcn.14003eaf0
cmp dword [rsi + 0x124], 0
je 0x1401c206b
mov qword [rsp + 0x40], r14
lea rax, [rbp - 0x20]
mov qword [rsp + 0x38], rax
mov eax, dword [r15]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r13
mov eax, dword [rsp + 0x54]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x5c]
mov r8d, dword [rsp + 0x58]
mov dl, 1
mov rcx, rsi
call fcn.1401c08b0
test eax, eax
je 0x1401c206b
mov r8d, eax
lea rdx, [rbp - 0x20]
lea rcx, [rsi + 0x70]
call fcn.14003e880
cmp byte [rsi + 0x104], 0
je 0x1401c232a
mov ecx, dword [rsi + 0x120]
lea eax, [rcx - 6]
cmp eax, 1
jbe 0x1401c20c4
cmp ecx, 0x63
je 0x1401c20c4
xor eax, eax
mov ecx, dword [rsi + 0x138]
test ecx, ecx
je 0x1401c20b0
lea rcx, [rsi + 0x70]
call fcn.140042d30
inc eax
mov ecx, dword [rsi + 0x138]
xor edx, edx
div ecx
mov eax, ecx
sub eax, edx
xor edx, edx
cmp eax, ecx
cmovne edx, eax
lea r8d, [rdx + 1]
lea rcx, [rsi + 0x70]
call fcn.14003eb80
cmp dword [rsi + 0x120], 7
jne 0x1401c2233
lea rcx, [rsi + 0x40]
mov edx, edi
call fcn.140042850
mov rbx, rax
test rax, rax
je 0x1401c2140
mov dword [rax], 0
mov rcx, qword [rsi + 0x178]
mov qword [rax + 4], rcx
lea rcx, [rsi + 0x40]
mov edx, edi
call fcn.14003e750
lea rcx, [rsi + 0x148]
call fcn.140042d30
cmp eax, edi
je 0x1401c211c
lea rdx, str.m_fixedIv_should_be_12_bytes
jmp 0x1401c1b06
lea rcx, [rsi + 0x148]
call fcn.1400428d0
sub rax, rbx
nop dword [rax + rax]
movzx ecx, byte [rbx + rax]
xor byte [rbx], cl
lea rbx, [rbx + 1]
sub rdi, 1
jne 0x1401c2130
lea rcx, [rsi + 0x788]
call fcn.140040520
lea rcx, [rsi + 0x788]
cmp byte [rsp + 0x50], 0
je 0x1401c2177
mov word [rbp - 0x80], 0x317
mov byte [rbp - 0x7e], 3
mov edx, dword [r15]
add edx, 0x11
mov eax, edx
shr eax, 8
mov byte [rbp - 0x7d], al
mov byte [rbp - 0x7c], dl
jmp 0x1401c21b4
lea rdx, [rsi + 0x178]
mov r8d, 8
call fcn.14003e880
mov eax, dword [rsp + 0x58]
mov byte [rbp - 0x80], al
mov eax, dword [rsp + 0x5c]
mov byte [rbp - 0x7f], al
mov eax, dword [rsp + 0x54]
mov byte [rbp - 0x7e], al
movzx eax, byte [r15 + 1]
mov byte [rbp - 0x7d], al
movzx eax, byte [r15]
mov byte [rbp - 0x7c], al
lea rcx, [rsi + 0x788]
mov r8d, 5
lea rdx, [rbp - 0x80]
call fcn.14003e880
lea rdx, [rsi + 0x40]
lea rcx, [rsi + 0x708]
call fcn.1400f63d0
mov rcx, qword [rsi + 0x830]
mov rax, qword [rcx]
mov qword [rsp + 0x20], r14
lea r9, [rsi + 0x180]
lea r8, [rsi + 0x708]
mov dl, 1
call qword [rax + 0x18]
mov rcx, qword [rsi + 0x830]
mov rax, qword [rcx]
mov r9, r14
lea r8, [rsi + 0x708]
lea rdx, [rsi + 0x180]
call qword [rax + 0x48]
test al, al
jne 0x1401c2233
mov rax, qword [r14]
lea rdx, str.TLS_aead_encrypt_setup_failed.
mov rcx, r14
call qword [rax + 0x28]
mov dword [r15], 0
jmp 0x1401c1b10
mov rcx, r12
call fcn.140042d30
mov dword [rsp + 0x54], eax
movzx edi, byte [r14 + 0x169]
movzx ecx, byte [r14 + 0x16a]
mov byte [r14 + 0x169], cl
lea rcx, [rsi + 0x70]
call fcn.140042d30
mov ebx, eax
lea rcx, [rsi + 0x70]
call fcn.1400428d0
mov r9, rax
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], ebx
lea r8, [rsi + 0x708]
lea rdx, [rsi + 0x180]
mov rcx, qword [rsi + 0x830]
call fcn.1400f4b00
movzx r13d, al
mov byte [r14 + 0x169], dil
test al, al
jne 0x1401c22b5
mov r9, qword [r14]
lea rdx, str.Failed_to_encrypt_TLS_fragment.
mov rcx, r14
call qword [r9 + 0x28]
cmp dword [rsi + 0x120], 7
jne 0x1401c231c
mov rcx, qword [rsi + 0x830]
mov rax, qword [rcx]
mov r9, r14
lea r8, [rsi + 0x708]
lea rdx, [rsi + 0x180]
call qword [rax + 0x50]
test al, al
jne 0x1401c22ec
lea rdx, str.TLS_aead_encrypt_finalize_failed.
jmp 0x1401c1b06
lea rcx, [rsi + 0x7b8]
call fcn.140042d30
cmp eax, 0x10
je 0x1401c2309
lea rdx, str.AEAD_auth_tag_is_not_16_bytes.
jmp 0x1401c1b06
lea rdx, [rsi + 0x7b8]
mov rcx, r12
call fcn.14003e810
movzx r13d, al
mov rcx, r12
call fcn.140042d30
sub eax, dword [rsp + 0x54]
jmp 0x1401c2343
lea rdx, [rsi + 0x70]
mov rcx, r12
call fcn.14003e810
movzx r13d, al
lea rcx, [rsi + 0x70]
call fcn.140042d30
mov dword [r15], eax
lea rcx, [rsp + 0x68]
call fcn.14004d020
movzx eax, r13b
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.1402474e0
add rsp, 0x138
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret