Function at 0x50e370
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c30c0
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x68cc00]
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 esi, ecx
mov dword [ebp - 0xbc], esi
mov edi, dword [ebp + 0x20]
lea ecx, [ebp - 0xb0]
mov eax, dword [ebp + 0x14]
xorps xmm0, xmm0
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0xb8], eax
movzx eax, byte [edi + 0x12a]
push eax
push str.encryptFragment
push edi
mov dword [ebp - 0xc4], ebx
movq qword [ebp - 0xb0], xmm0
mov dword [ebp - 0xa8], 0
call fcn.00447f20
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 4], 0
test eax, eax
jne 0x50e421
mov eax, dword [edi]
mov ecx, edi
push str.Nothing_to_TLS_encrypt.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
xor al, al
jmp 0x50ed08
cmp dword [esi + 0xb0], 0
jne 0x50e455
cmp byte [esi + 0x98], 0
jne 0x50e455
push dword [ebx]
mov ecx, dword [ebp - 0xb8]
push eax
call fcn.004351f0
lea ecx, [ebp - 0xb0]
mov bl, al
call fcn.00447ff0
mov al, bl
jmp 0x50ed08
cmp dword [ebp + 0xc], 3
jne 0x50e468
cmp dword [ebp + 0x10], 4
mov byte [ebp - 0xb1], 1
je 0x50e46f
mov byte [ebp - 0xb1], 0
lea eax, [esi + 0x24]
mov ecx, eax
mov dword [ebp - 0xd0], eax
call fcn.00436ad0
cmp dword [esi + 0xac], 6
jne 0x50e60a
mov eax, dword [esi + 0xc4]
add eax, dword [esi + 0xc0]
cmp eax, 0xc
je 0x50e4bb
mov eax, dword [edi]
mov ecx, edi
push str.Nonce_length_not_correct_for_GCM_mode.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
xor al, al
jmp 0x50ed08
lea eax, [esi + 0x6b0]
mov ecx, eax
mov dword [ebp - 0xd4], eax
call fcn.00436ad0
lea eax, [esi + 0xd0]
mov ecx, eax
mov dword [ebp - 0xcc], eax
call fcn.00402f10
cmp byte [ebp - 0xb1], 0
je 0x50e593
cmp eax, 0xc
je 0x50e529
push str.WriteIV_is_not_the_correct_length_for_TLS_1.3_GCM_mode.
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x14]
mov ecx, dword [ebp - 0xcc]
call fcn.00402f10
push eax
push str.fixedIV_len
mov ecx, edi
call fcn.00448710
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
xor al, al
jmp 0x50ed08
mov eax, dword [esi + 0xec]
lea ecx, [esi + 0xd0]
mov edx, dword [esi + 0xf0]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
call fcn.00438b90
mov esi, eax
xor edx, edx
lea eax, [ebp - 0x24]
sub esi, eax
lea ecx, [ebp - 0x24]
add ecx, edx
inc edx
mov al, byte [esi + ecx]
xor byte [ecx], al
cmp edx, 0xc
jl 0x50e556
mov ecx, dword [ebp - 0xd0]
lea eax, [ebp - 0x24]
push 0xc
push eax
call fcn.004351f0
mov edx, dword [ebx]
add edx, 0x11
mov word [ebp - 0x18], 0x317
mov eax, edx
mov byte [ebp - 0x16], 3
shr eax, 8
mov byte [ebp - 0x15], al
mov byte [ebp - 0x14], dl
jmp 0x50e5f3
cmp eax, 4
je 0x50e5a2
push str.WriteIV_is_not_the_correct_length_for_GCM_mode.
jmp 0x50e4f8
mov ecx, dword [ebp - 0xd4]
add esi, 0xec
push 8
push esi
call fcn.004351f0
mov eax, dword [ebp - 0xcc]
mov ecx, dword [ebp - 0xd0]
push eax
call fcn.00435190
mov ecx, dword [ebp - 0xd0]
push 8
push esi
call fcn.004351f0
mov eax, dword [ebp + 8]
mov byte [ebp - 0x18], al
mov eax, dword [ebp + 0xc]
mov byte [ebp - 0x17], al
mov eax, dword [ebp + 0x10]
mov byte [ebp - 0x16], al
mov al, byte [ebx + 1]
mov byte [ebp - 0x15], al
mov al, byte [ebx]
mov byte [ebp - 0x14], al
mov ecx, dword [ebp - 0xd4]
lea eax, [ebp - 0x18]
push 5
push eax
call fcn.004351f0
mov esi, dword [ebp - 0xbc]
cmp dword [ebp + 0xc], 3
jne 0x50e97a
cmp dword [ebp + 0x10], 2
jl 0x50e97a
cmp dword [esi + 0xc4], 0
jbe 0x50e97a
lea ebx, [esi + 0x40]
mov ecx, ebx
call fcn.00436ad0
cmp dword [esi + 0xac], 6
je 0x50e64d
push ebx
push dword [esi + 0xc4]
call fcn.0045c720
add esp, 8
mov eax, dword [ebp - 0xc4]
mov ecx, ebx
push dword [eax]
push dword [ebp - 0xc8]
call fcn.004351f0
cmp byte [ebp - 0xb1], 0
je 0x50e675
push dword [ebp + 8]
mov ecx, ebx
call fcn.00435440
cmp dword [esi + 0xb0], 0
je 0x50e6bc
cmp dword [esi + 0xac], 6
je 0x50e6bc
push edi
lea eax, [ebp - 0x64]
mov ecx, esi
push eax
mov eax, dword [ebp - 0xc4]
push dword [eax]
push dword [ebp - 0xc8]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push 1
call fcn.00507c40
test eax, eax
je 0x50e6bc
push eax
lea eax, [ebp - 0x64]
mov ecx, ebx
push eax
call fcn.004351f0
cmp byte [esi + 0x98], 0
je 0x50e941
mov eax, dword [esi + 0xac]
cmp eax, 6
je 0x50e721
cmp eax, 0x63
je 0x50e721
cmp eax, 7
je 0x50e721
mov eax, dword [esi + 0xc4]
xor edx, edx
test eax, eax
je 0x50e70e
mov ecx, ebx
call fcn.00402f10
mov ecx, dword [esi + 0xc4]
inc eax
xor edx, edx
div ecx
mov eax, ecx
sub eax, edx
mov dword [ebp - 0xbc], eax
mov eax, ecx
mov edx, dword [ebp - 0xbc]
xor ecx, ecx
cmp edx, eax
cmovne ecx, edx
lea eax, [ecx + 1]
push eax
push ecx
mov ecx, ebx
call fcn.004354c0
cmp dword [esi + 0xac], 6
jne 0x50e739
lea ecx, [esi + 0x24]
push ecx
lea ecx, [esi + 0x660]
call fcn.004de480
mov ecx, dword [ebp - 0xb8]
call fcn.00402f10
mov cl, byte [edi + 0x12a]
mov dword [ebp - 0xbc], eax
mov al, byte [edi + 0x129]
mov byte [edi + 0x129], cl
mov dword [esi + 0x100], 0
mov dword [esi + 0x104], 0
mov dword [esi + 0x108], 0
mov dword [esi + 0x10c], 0
cmp dword [esi + 0xac], 6
mov byte [ebp - 0xbd], al
jne 0x50e7f8
mov ecx, dword [esi + 0x730]
lea eax, [esi + 0x660]
push edi
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.00590cc0
test al, al
jne 0x50e7db
mov eax, dword [edi]
mov ecx, edi
push str.TLS_gcm_encrypt_setup_failed.
call dword [eax + 0x14]
mov eax, dword [ebp - 0xc4]
lea ecx, [ebp - 0xb0]
mov dword [eax], 0
call fcn.00447ff0
xor al, al
jmp 0x50ed08
cmp byte [ebp - 0xb1], 0
jne 0x50e7f8
mov ecx, dword [ebp - 0xb8]
lea eax, [esi + 0xec]
push 8
push eax
call fcn.004351f0
push edi
push dword [ebp - 0xb8]
mov ecx, ebx
call fcn.00402f10
push eax
mov ecx, ebx
call fcn.00438b90
mov ecx, dword [esi + 0x730]
push eax
lea eax, [esi + 0x660]
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.004de1f0
mov bl, al
mov al, byte [ebp - 0xbd]
mov byte [ebp - 0xb1], bl
mov byte [edi + 0x129], al
test bl, bl
jne 0x50e85e
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_encrypt_TLS_fragment
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
xor al, al
jmp 0x50ed08
cmp dword [esi + 0xac], 6
jne 0x50e910
mov ecx, dword [esi + 0x730]
lea eax, [esi + 0x660]
push edi
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.00590c00
test al, al
jne 0x50e8a7
mov eax, dword [edi]
mov ecx, edi
push str.TLS_gcm_encrypt_finalize_failed.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
xor al, al
jmp 0x50ed08
add esi, 0x6cc
mov ecx, esi
call fcn.00402f10
cmp eax, 0x10
je 0x50e8d7
mov eax, dword [edi]
mov ecx, edi
push str.GCM_auth_tag_is_not_16_bytes.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
xor al, al
jmp 0x50ed08
mov ecx, dword [ebp - 0xb8]
push esi
call fcn.00435190
mov ecx, dword [ebp - 0xb8]
mov bl, al
call fcn.00402f10
mov ecx, dword [ebp - 0xc4]
sub eax, dword [ebp - 0xbc]
mov dword [ecx], eax
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
mov al, bl
jmp 0x50ed08
mov ecx, dword [ebp - 0xb8]
mov bl, byte [ebp - 0xb1]
call fcn.00402f10
mov ecx, dword [ebp - 0xc4]
sub eax, dword [ebp - 0xbc]
mov dword [ecx], eax
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
mov al, bl
jmp 0x50ed08
mov ecx, dword [ebp - 0xb8]
push ebx
call fcn.00435190
mov ecx, ebx
mov byte [ebp - 0xb1], al
call fcn.00402f10
mov ecx, dword [ebp - 0xc4]
mov bl, byte [ebp - 0xb1]
mov dword [ecx], eax
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
mov al, bl
jmp 0x50ed08
lea eax, [esi + 0x40]
mov ecx, eax
mov dword [ebp - 0xbc], eax
call fcn.00436ad0
push dword [ebx]
lea ecx, [esi + 0x40]
push dword [ebp - 0xc8]
call fcn.004351f0
cmp byte [ebp - 0xb1], 0
je 0x50e9ae
push dword [ebp + 8]
lea ecx, [esi + 0x40]
call fcn.00435440
cmp dword [esi + 0xb0], 0
je 0x50e9ed
push edi
lea eax, [ebp - 0xa4]
mov ecx, esi
push eax
push dword [ebx]
push dword [ebp - 0xc8]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push 1
call fcn.00507c40
test eax, eax
je 0x50e9ed
push eax
lea eax, [ebp - 0xa4]
push eax
lea ecx, [esi + 0x40]
call fcn.004351f0
cmp byte [esi + 0x98], 0
je 0x50ecd6
mov eax, dword [esi + 0xac]
cmp eax, 6
je 0x50ea46
cmp eax, 0x63
je 0x50ea46
cmp eax, 7
je 0x50ea46
mov ebx, dword [esi + 0xc4]
xor eax, eax
test ebx, ebx
je 0x50ea32
lea ecx, [esi + 0x40]
call fcn.00402f10
mov ebx, dword [esi + 0xc4]
inc eax
xor edx, edx
div ebx
mov eax, ebx
sub eax, edx
xor ecx, ecx
cmp eax, ebx
cmovne ecx, eax
lea eax, [ecx + 1]
push eax
push ecx
lea ecx, [esi + 0x40]
call fcn.004354c0
cmp dword [esi + 0xac], 7
jne 0x50ebc0
push 0xc
lea ecx, [esi + 0x24]
call fcn.00438b20
mov ebx, eax
test ebx, ebx
je 0x50ead3
mov dword [ebx], 0
mov ecx, dword [esi + 0xf0]
mov eax, dword [esi + 0xec]
mov dword [ebx + 8], ecx
lea ecx, [esi + 0x24]
push 0xc
mov dword [ebx + 4], eax
call fcn.00435000
lea ecx, [esi + 0xd0]
call fcn.00402f10
cmp eax, 0xc
je 0x50eab3
mov eax, dword [edi]
mov ecx, edi
push str.m_fixedIv_should_be_12_bytes
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
xor al, al
jmp 0x50ed08
lea ecx, [esi + 0xd0]
call fcn.00438b90
sub eax, ebx
mov edx, 0xc
mov cl, byte [eax + ebx]
lea ebx, [ebx + 1]
xor byte [ebx - 1], cl
sub edx, 1
jne 0x50eac5
lea ecx, [esi + 0x6b0]
call fcn.00436ad0
cmp byte [ebp - 0xb1], 0
lea ecx, [esi + 0x6b0]
je 0x50eb0f
mov ebx, dword [ebp - 0xc4]
mov word [ebp - 0x18], 0x317
mov byte [ebp - 0x16], 3
mov edx, dword [ebx]
add edx, 0x11
mov eax, edx
mov byte [ebp - 0x14], dl
shr eax, 8
mov byte [ebp - 0x15], al
jmp 0x50eb46
push 8
lea eax, [esi + 0xec]
push eax
call fcn.004351f0
mov eax, dword [ebp + 8]
lea ecx, [esi + 0x6b0]
mov ebx, dword [ebp - 0xc4]
mov byte [ebp - 0x18], al
mov eax, dword [ebp + 0xc]
mov byte [ebp - 0x17], al
mov eax, dword [ebp + 0x10]
mov byte [ebp - 0x16], al
mov al, byte [ebx + 1]
mov byte [ebp - 0x15], al
mov al, byte [ebx]
mov byte [ebp - 0x14], al
push 5
lea eax, [ebp - 0x18]
push eax
call fcn.004351f0
lea ecx, [esi + 0x24]
push ecx
lea ecx, [esi + 0x660]
call fcn.004de480
mov ecx, dword [esi + 0x730]
lea edx, [esi + 0xf8]
push edi
push edx
lea edx, [esi + 0x660]
mov eax, dword [ecx]
push edx
push 1
call dword [eax + 0xc]
mov ecx, dword [esi + 0x730]
lea edx, [esi + 0x660]
push edi
push edx
lea edx, [esi + 0xf8]
mov eax, dword [ecx]
push edx
mov eax, dword [eax + 0x24]
call eax
test al, al
jne 0x50ebc0
mov eax, dword [edi]
mov ecx, edi
push str.TLS_aead_encrypt_setup_failed.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
mov dword [ebx], 0
call fcn.00447ff0
xor al, al
jmp 0x50ed08
mov ecx, dword [ebp - 0xb8]
call fcn.00402f10
mov dl, byte [edi + 0x12a]
lea ecx, [esi + 0x40]
mov bl, byte [edi + 0x129]
push edi
push dword [ebp - 0xb8]
mov dword [ebp - 0xbc], eax
mov byte [edi + 0x129], dl
call fcn.00402f10
push eax
lea ecx, [esi + 0x40]
call fcn.00438b90
mov ecx, dword [esi + 0x730]
push eax
lea eax, [esi + 0x660]
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.004de1f0
mov bh, al
mov byte [edi + 0x129], bl
mov byte [ebp - 0xb1], bh
test bh, bh
jne 0x50ec33
mov edx, dword [edi]
mov ecx, edi
push str.Failed_to_encrypt_TLS_fragment.
call dword [edx + 0x14]
cmp dword [esi + 0xac], 7
jne 0x50ecbd
mov ecx, dword [esi + 0x730]
lea edx, [esi + 0x660]
push edi
push edx
lea edx, [esi + 0xf8]
mov eax, dword [ecx]
push edx
mov eax, dword [eax + 0x28]
call eax
test al, al
jne 0x50ec7e
mov eax, dword [edi]
mov ecx, edi
push str.TLS_aead_encrypt_finalize_failed.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
xor al, al
jmp 0x50ed08
add esi, 0x6cc
mov ecx, esi
call fcn.00402f10
cmp eax, 0x10
je 0x50ecab
mov eax, dword [edi]
mov ecx, edi
push str.AEAD_auth_tag_is_not_16_bytes.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.00447ff0
xor al, al
jmp 0x50ed08
mov ecx, dword [ebp - 0xb8]
push esi
call fcn.00435190
mov byte [ebp - 0xb1], al
mov ecx, dword [ebp - 0xb8]
call fcn.00402f10
sub eax, dword [ebp - 0xbc]
mov ebx, dword [ebp - 0xc4]
jmp 0x50ecf5
mov esi, dword [ebp - 0xbc]
mov ecx, dword [ebp - 0xb8]
push esi
call fcn.00435190
mov ecx, esi
mov byte [ebp - 0xb1], al
call fcn.00402f10
lea ecx, [ebp - 0xb0]
mov dword [ebx], eax
call fcn.00447ff0
mov al, byte [ebp - 0xb1]
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.005af5a8
mov esp, ebp
pop ebp
ret 0x1c