Function at 0x4991e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b16fb
mov eax, dword fs:[0]
push eax
sub esp, 0xbc
mov eax, dword [0x68683c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x20]
movzx edx, byte [edi + 0x127]
mov eax, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x14]
mov esi, ecx
mov ecx, dword [ebp + 0x1c]
push edx
push str.encryptFragment
mov dword [ebp - 0xbc], ecx
push edi
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0xb8], ebx
mov dword [ebp - 0xb4], eax
call fcn.0045a1f0
mov dword [ebp - 4], 0
test ebx, ebx
jne 0x499279
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push str.Nothing_to_TLS_encrypt.
mov ecx, edi
call edx
lea ecx, [ebp - 0xc8]
mov dword [ebp - 4], 0xffffffff
call fcn.0045a240
xor al, al
jmp 0x499af9
cmp dword [esi + 0xb0], 0
jne 0x4992a7
cmp byte [esi + 0x98], 0
jne 0x4992a7
mov eax, dword [ebp - 0xb4]
mov ecx, dword [eax]
push ecx
mov ecx, dword [ebp - 0xbc]
push ebx
call fcn.0041ca10
mov bl, al
jmp 0x499ae5
cmp dword [ebp + 0xc], 3
jne 0x4992ba
cmp dword [ebp + 0x10], 4
mov byte [ebp - 0xad], 1
je 0x4992c1
mov byte [ebp - 0xad], 0
lea ecx, [esi + 0x24]
call fcn.0041b6b0
cmp dword [esi + 0xac], 6
jne 0x49946c
mov eax, dword [esi + 0xc4]
add eax, dword [esi + 0xc0]
cmp eax, 0xc
je 0x4992fa
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.Nonce_length_not_correct_for_GCM_mode.
mov ecx, edi
call eax
jmp 0x499260
lea ecx, [esi + 0x6b0]
call fcn.0041b6b0
lea ecx, [esi + 0xd0]
call fcn.004078c0
cmp byte [ebp - 0xad], 0
je 0x4993f0
cmp eax, 0xc
je 0x49934d
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.WriteIV_is_not_the_correct_length_for_TLS_1.3_GCM_mode.
mov ecx, edi
call eax
lea ecx, [esi + 0xd0]
call fcn.004078c0
push eax
push str.fixedIV_len
mov ecx, edi
call fcn.00459e10
jmp 0x499260
mov ecx, dword [esi + 0xec]
mov edx, dword [esi + 0xf0]
mov dword [ebp - 0x28], ecx
lea ecx, [esi + 0xd0]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], edx
call fcn.0041b6d0
mov ebx, eax
lea ecx, [ebp - 0x2c]
xor edx, edx
sub ebx, ecx
mov dword [ebp - 0x18], ebx
jmp 0x499383
mov ebx, dword [ebp - 0x18]
lea ecx, [ebp + edx - 0x2c]
movzx ebx, byte [ebx + ecx]
xor byte [ecx], bl
movzx ebx, byte [eax + edx + 1]
xor byte [ecx + 1], bl
movzx ebx, byte [eax + edx + 2]
xor byte [ecx + 2], bl
movzx ebx, byte [eax + edx + 3]
xor byte [ecx + 3], bl
movzx ebx, byte [eax + edx + 4]
xor byte [ecx + 4], bl
movzx ebx, byte [eax + edx + 5]
xor byte [ecx + 5], bl
add edx, 6
cmp edx, 0xc
jl 0x499380
push 0xc
lea edx, [ebp - 0x2c]
push edx
lea ecx, [esi + 0x24]
call fcn.0041ca10
mov eax, dword [ebp - 0xb4]
mov eax, dword [eax]
add eax, 0x11
mov ecx, eax
push 5
lea edx, [ebp - 0x20]
mov word [ebp - 0x20], 0x317
mov byte [ebp - 0x1e], 3
shr ecx, 8
mov byte [ebp - 0x1c], al
push edx
jmp 0x49945e
cmp eax, 4
je 0x499408
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push str.WriteIV_is_not_the_correct_length_for_GCM_mode.
mov ecx, edi
call edx
jmp 0x499330
push 8
lea ebx, [esi + 0xec]
push ebx
lea ecx, [esi + 0x6b0]
call fcn.0041ca10
lea eax, [esi + 0xd0]
push eax
lea ecx, [esi + 0x24]
call fcn.0041e780
push 8
push ebx
lea ecx, [esi + 0x24]
call fcn.0041ca10
mov al, byte [ebp + 8]
mov dl, byte [ebp + 0x10]
mov cl, byte [ebp + 0xc]
mov byte [ebp - 0x20], al
mov eax, dword [ebp - 0xb4]
mov byte [ebp - 0x1e], dl
movzx edx, byte [eax]
mov byte [ebp - 0x1f], cl
movzx ecx, byte [eax + 1]
push 5
lea eax, [ebp - 0x20]
mov byte [ebp - 0x1c], dl
push eax
mov byte [ebp - 0x1d], cl
lea ecx, [esi + 0x6b0]
call fcn.0041ca10
cmp dword [ebp + 0xc], 3
jne 0x499763
cmp dword [ebp + 0x10], 2
jl 0x499763
cmp dword [esi + 0xc4], 0
jbe 0x499763
lea ebx, [esi + 0x40]
mov ecx, ebx
call fcn.0041b6b0
cmp dword [esi + 0xac], 6
je 0x4994b0
mov ecx, dword [esi + 0xc4]
push ebx
push ecx
call fcn.00473240
add esp, 8
mov edx, dword [ebp - 0xb4]
mov eax, dword [edx]
mov ecx, dword [ebp - 0xb8]
push eax
push ecx
mov ecx, ebx
call fcn.0041ca10
cmp byte [ebp - 0xad], 0
je 0x4994db
mov edx, dword [ebp + 8]
push edx
mov ecx, ebx
call fcn.0041c5d0
cmp dword [esi + 0xb0], 0
je 0x49952b
cmp dword [esi + 0xac], 6
je 0x49952b
mov ecx, dword [ebp - 0xb4]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
push edi
lea eax, [ebp - 0xac]
push eax
mov eax, dword [ebp - 0xb8]
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
push 3
push edx
push 1
mov ecx, esi
call fcn.00498fe0
test eax, eax
je 0x49952b
push eax
lea eax, [ebp - 0xac]
push eax
mov ecx, ebx
call fcn.0041ca10
cmp byte [esi + 0x98], 0
je 0x499725
mov eax, dword [esi + 0xac]
cmp eax, 6
je 0x499581
cmp eax, 0x63
je 0x499581
cmp eax, 7
je 0x499581
mov ecx, dword [esi + 0xc4]
xor eax, eax
test ecx, ecx
je 0x49956f
mov dword [ebp - 0x18], ecx
mov ecx, ebx
call fcn.004078c0
mov ecx, dword [ebp - 0x18]
inc eax
xor edx, edx
div ecx
mov eax, ecx
sub eax, edx
cmp eax, ecx
jne 0x499575
xor eax, eax
lea edx, [eax + 1]
push edx
push eax
mov ecx, ebx
call fcn.0041c700
cmp dword [esi + 0xac], 6
jne 0x499599
lea eax, [esi + 0x24]
push eax
lea ecx, [esi + 0x660]
call fcn.00516c30
mov ecx, dword [ebp - 0xbc]
call fcn.004078c0
mov cl, byte [edi + 0x127]
mov dword [ebp - 0xb8], eax
mov al, byte [edi + 0x125]
mov byte [edi + 0x125], cl
mov byte [ebp - 0xae], al
xor eax, eax
cmp dword [esi + 0xac], 6
mov dword [esi + 0x100], eax
mov dword [esi + 0x104], eax
mov dword [esi + 0x108], eax
mov dword [esi + 0x10c], eax
jne 0x49963f
mov ecx, dword [esi + 0x730]
push edi
lea edx, [esi + 0x660]
push edx
lea eax, [esi + 0xf8]
push eax
call fcn.005381a0
test al, al
jne 0x499622
push str.TLS_gcm_encrypt_setup_failed.
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
mov ecx, edi
call eax
mov ecx, dword [ebp - 0xb4]
mov dword [ecx], 0
jmp 0x499260
cmp byte [ebp - 0xad], 0
jne 0x49963f
mov ecx, dword [ebp - 0xbc]
push 8
lea edx, [esi + 0xec]
push edx
call fcn.0041ca10
mov eax, dword [ebp - 0xbc]
push edi
push eax
mov ecx, ebx
call fcn.004078c0
push eax
mov ecx, ebx
call fcn.0041b6d0
mov ecx, dword [esi + 0x730]
push eax
lea eax, [esi + 0x660]
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.00516e30
mov cl, byte [ebp - 0xae]
mov byte [ebp - 0xad], al
mov byte [edi + 0x125], cl
test al, al
jne 0x499699
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.Failed_to_encrypt_TLS_fragment
mov ecx, edi
call eax
jmp 0x499260
cmp dword [esi + 0xac], 6
jne 0x49970a
mov ecx, dword [esi + 0x730]
push edi
lea eax, [esi + 0x660]
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.00538230
test al, al
jne 0x4996d3
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.TLS_gcm_encrypt_finalize_failed.
mov ecx, edi
call eax
jmp 0x499260
add esi, 0x6cc
mov ecx, esi
call fcn.004078c0
cmp eax, 0x10
je 0x4996f8
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.GCM_auth_tag_is_not_16_bytes.
mov ecx, edi
call eax
jmp 0x499260
mov ecx, dword [ebp - 0xbc]
push esi
call fcn.0041e780
mov byte [ebp - 0xad], al
mov ecx, dword [ebp - 0xbc]
call fcn.004078c0
sub eax, dword [ebp - 0xb8]
mov ecx, dword [ebp - 0xb4]
mov dword [ecx], eax
jmp 0x499746
mov ecx, dword [ebp - 0xbc]
push ebx
call fcn.0041e780
mov ecx, ebx
mov byte [ebp - 0xad], al
call fcn.004078c0
mov edx, dword [ebp - 0xb4]
mov dword [edx], eax
lea ecx, [ebp - 0xc8]
mov dword [ebp - 4], 0xffffffff
call fcn.0045a240
mov al, byte [ebp - 0xad]
jmp 0x499af9
lea ecx, [esi + 0x40]
mov dword [ebp - 0x18], ecx
call fcn.0041b6b0
mov eax, dword [ebp - 0xb4]
mov ecx, dword [eax]
mov ebx, dword [ebp - 0xb8]
push ecx
mov ecx, dword [ebp - 0x18]
push ebx
call fcn.0041ca10
cmp byte [ebp - 0xad], 0
je 0x49979b
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x18]
push edx
call fcn.0041c5d0
cmp dword [esi + 0xb0], 0
je 0x4997d9
mov ecx, dword [ebp - 0xb4]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0xc]
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebp + 0x10]
push edx
mov edx, dword [ebp + 8]
push ebx
push eax
push ecx
push edx
push 1
mov ecx, esi
call fcn.00498fe0
test eax, eax
je 0x4997d9
mov ecx, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x6c]
push eax
call fcn.0041ca10
cmp byte [esi + 0x98], 0
je 0x499ac4
mov eax, dword [esi + 0xac]
cmp eax, 6
je 0x49982b
cmp eax, 0x63
je 0x49982b
cmp eax, 7
je 0x49982b
mov ebx, dword [esi + 0xc4]
xor eax, eax
test ebx, ebx
je 0x499818
mov ecx, dword [ebp - 0x18]
call fcn.004078c0
inc eax
xor edx, edx
div ebx
mov eax, ebx
sub eax, edx
cmp eax, ebx
jne 0x49981e
xor eax, eax
lea ecx, [eax + 1]
push ecx
mov ecx, dword [ebp - 0x18]
push eax
call fcn.0041c700
cmp dword [esi + 0xac], 7
jne 0x4999c9
push 0xc
lea ecx, [esi + 0x24]
call fcn.004209c0
mov ebx, eax
mov dword [ebp - 0xb8], ebx
test ebx, ebx
je 0x4998f6
mov dword [ebx], 0
mov edx, dword [esi + 0xec]
mov dword [ebx + 4], edx
mov eax, dword [esi + 0xf0]
push 0xc
lea ecx, [esi + 0x24]
mov dword [ebx + 8], eax
call fcn.0041b6e0
lea ecx, [esi + 0xd0]
call fcn.004078c0
cmp eax, 0xc
je 0x499897
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.m_fixedIv_should_be_12_bytes
mov ecx, edi
call eax
jmp 0x499260
lea ecx, [esi + 0xd0]
call fcn.0041b6d0
lea edx, [eax + 2]
sub eax, dword [ebp - 0xb8]
mov ecx, ebx
mov dword [ebp - 0xb8], 2
jmp 0x4998c0
movzx ebx, byte [eax + ecx]
xor byte [ecx], bl
movzx ebx, byte [edx - 1]
xor byte [ecx + 1], bl
movzx ebx, byte [edx]
xor byte [ecx + 2], bl
movzx ebx, byte [edx + 1]
xor byte [ecx + 3], bl
movzx ebx, byte [edx + 2]
xor byte [ecx + 4], bl
movzx ebx, byte [edx + 3]
xor byte [ecx + 5], bl
add ecx, 6
add edx, 6
dec dword [ebp - 0xb8]
jne 0x4998c0
lea ecx, [esi + 0x6b0]
call fcn.0041b6b0
cmp byte [ebp - 0xad], 0
je 0x499932
mov ecx, dword [ebp - 0xb4]
mov eax, dword [ecx]
add eax, 0x11
mov edx, eax
mov byte [ebp - 0x1c], al
shr edx, 8
push 5
lea eax, [ebp - 0x20]
mov word [ebp - 0x20], 0x317
mov byte [ebp - 0x1e], 3
mov byte [ebp - 0x1d], dl
push eax
jmp 0x499971
push 8
lea ecx, [esi + 0xec]
push ecx
lea ecx, [esi + 0x6b0]
call fcn.0041ca10
mov al, byte [ebp + 0xc]
mov dl, byte [ebp + 8]
mov cl, byte [ebp + 0x10]
mov byte [ebp - 0x17], al
mov eax, dword [ebp - 0xb4]
mov byte [ebp - 0x18], dl
movzx edx, byte [eax + 1]
movzx eax, byte [eax]
mov byte [ebp - 0x16], cl
push 5
lea ecx, [ebp - 0x18]
mov byte [ebp - 0x15], dl
mov byte [ebp - 0x14], al
push ecx
lea ecx, [esi + 0x6b0]
call fcn.0041ca10
lea eax, [esi + 0x24]
lea ebx, [esi + 0x660]
push eax
mov ecx, ebx
call fcn.00516c30
mov ecx, dword [esi + 0x730]
mov edx, dword [ecx]
push edi
lea eax, [esi + 0xf8]
push eax
mov eax, dword [edx + 0xc]
push ebx
push 1
call eax
mov ecx, dword [esi + 0x730]
mov edx, dword [ecx]
push edi
push ebx
lea eax, [esi + 0xf8]
push eax
mov eax, dword [edx + 0x24]
call eax
test al, al
jne 0x4999c9
push str.TLS_aead_encrypt_setup_failed.
jmp 0x499608
mov ebx, dword [ebp - 0xbc]
mov ecx, ebx
call fcn.004078c0
mov dl, byte [edi + 0x125]
push edi
push ebx
mov dword [ebp - 0xb8], eax
mov al, byte [edi + 0x127]
lea ebx, [esi + 0x40]
mov ecx, ebx
mov byte [ebp - 0xae], dl
mov byte [edi + 0x125], al
call fcn.004078c0
push eax
mov ecx, ebx
call fcn.0041b6d0
mov ecx, dword [esi + 0x730]
push eax
lea eax, [esi + 0x660]
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.00516e30
mov cl, byte [ebp - 0xae]
mov bl, al
mov byte [edi + 0x125], cl
test bl, bl
jne 0x499a42
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.Failed_to_encrypt_TLS_fragment.
mov ecx, edi
call eax
cmp dword [esi + 0xac], 7
jne 0x499ab1
mov ecx, dword [esi + 0x730]
mov edx, dword [ecx]
push edi
lea eax, [esi + 0x660]
push eax
lea eax, [esi + 0xf8]
push eax
mov eax, dword [edx + 0x28]
call eax
test al, al
jne 0x499a7e
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.TLS_aead_encrypt_finalize_failed.
mov ecx, edi
call eax
jmp 0x499260
add esi, 0x6cc
mov ecx, esi
call fcn.004078c0
cmp eax, 0x10
je 0x499aa3
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.AEAD_auth_tag_is_not_16_bytes.
mov ecx, edi
call eax
jmp 0x499260
mov ecx, dword [ebp - 0xbc]
push esi
call fcn.0041e780
mov bl, al
mov ecx, dword [ebp - 0xbc]
call fcn.004078c0
sub eax, dword [ebp - 0xb8]
jmp 0x499add
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xbc]
push edx
call fcn.0041e780
mov ecx, dword [ebp - 0x18]
mov bl, al
call fcn.004078c0
mov ecx, dword [ebp - 0xb4]
mov dword [ecx], eax
lea ecx, [ebp - 0xc8]
mov dword [ebp - 4], 0xffffffff
call fcn.0045a240
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005a6cf8
mov esp, ebp
pop ebp
ret 0x1c