Function at 0x50f970
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c7160
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x692c00]
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.00448220
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 4], 0
test eax, eax
jne 0x50fa21
mov eax, dword [edi]
mov ecx, edi
push str.Nothing_to_TLS_encrypt.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.004482f0
xor al, al
jmp 0x510308
cmp dword [esi + 0xb0], 0
jne 0x50fa55
cmp byte [esi + 0x98], 0
jne 0x50fa55
push dword [ebx]
mov ecx, dword [ebp - 0xb8]
push eax
call fcn.004354f0
lea ecx, [ebp - 0xb0]
mov bl, al
call fcn.004482f0
mov al, bl
jmp 0x510308
cmp dword [ebp + 0xc], 3
jne 0x50fa68
cmp dword [ebp + 0x10], 4
mov byte [ebp - 0xb1], 1
je 0x50fa6f
mov byte [ebp - 0xb1], 0
lea eax, [esi + 0x24]
mov ecx, eax
mov dword [ebp - 0xd0], eax
call fcn.00436dd0
cmp dword [esi + 0xac], 6
jne 0x50fc0a
mov eax, dword [esi + 0xc4]
add eax, dword [esi + 0xc0]
cmp eax, 0xc
je 0x50fabb
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.004482f0
xor al, al
jmp 0x510308
lea eax, [esi + 0x6b0]
mov ecx, eax
mov dword [ebp - 0xd4], eax
call fcn.00436dd0
lea eax, [esi + 0xd0]
mov ecx, eax
mov dword [ebp - 0xcc], eax
call fcn.00402fb0
cmp byte [ebp - 0xb1], 0
je 0x50fb93
cmp eax, 0xc
je 0x50fb29
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.00402fb0
push eax
push str.fixedIV_len
mov ecx, edi
call fcn.00448a10
lea ecx, [ebp - 0xb0]
call fcn.004482f0
xor al, al
jmp 0x510308
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.00438ea0
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 0x50fb56
mov ecx, dword [ebp - 0xd0]
lea eax, [ebp - 0x24]
push 0xc
push eax
call fcn.004354f0
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 0x50fbf3
cmp eax, 4
je 0x50fba2
push str.WriteIV_is_not_the_correct_length_for_GCM_mode.
jmp 0x50faf8
mov ecx, dword [ebp - 0xd4]
add esi, 0xec
push 8
push esi
call fcn.004354f0
mov eax, dword [ebp - 0xcc]
mov ecx, dword [ebp - 0xd0]
push eax
call fcn.00435490
mov ecx, dword [ebp - 0xd0]
push 8
push esi
call fcn.004354f0
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.004354f0
mov esi, dword [ebp - 0xbc]
cmp dword [ebp + 0xc], 3
jne 0x50ff7a
cmp dword [ebp + 0x10], 2
jl 0x50ff7a
cmp dword [esi + 0xc4], 0
jbe 0x50ff7a
lea ebx, [esi + 0x40]
mov ecx, ebx
call fcn.00436dd0
cmp dword [esi + 0xac], 6
je 0x50fc4d
push ebx
push dword [esi + 0xc4]
call fcn.0045df20
add esp, 8
mov eax, dword [ebp - 0xc4]
mov ecx, ebx
push dword [eax]
push dword [ebp - 0xc8]
call fcn.004354f0
cmp byte [ebp - 0xb1], 0
je 0x50fc75
push dword [ebp + 8]
mov ecx, ebx
call fcn.00435740
cmp dword [esi + 0xb0], 0
je 0x50fcbc
cmp dword [esi + 0xac], 6
je 0x50fcbc
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.00509240
test eax, eax
je 0x50fcbc
push eax
lea eax, [ebp - 0x64]
mov ecx, ebx
push eax
call fcn.004354f0
cmp byte [esi + 0x98], 0
je 0x50ff41
mov eax, dword [esi + 0xac]
cmp eax, 6
je 0x50fd21
cmp eax, 0x63
je 0x50fd21
cmp eax, 7
je 0x50fd21
mov eax, dword [esi + 0xc4]
xor edx, edx
test eax, eax
je 0x50fd0e
mov ecx, ebx
call fcn.00402fb0
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.004357c0
cmp dword [esi + 0xac], 6
jne 0x50fd39
lea ecx, [esi + 0x24]
push ecx
lea ecx, [esi + 0x660]
call fcn.004f6840
mov ecx, dword [ebp - 0xb8]
call fcn.00402fb0
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 0x50fdf8
mov ecx, dword [esi + 0x730]
lea eax, [esi + 0x660]
push edi
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.00594be0
test al, al
jne 0x50fddb
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.004482f0
xor al, al
jmp 0x510308
cmp byte [ebp - 0xb1], 0
jne 0x50fdf8
mov ecx, dword [ebp - 0xb8]
lea eax, [esi + 0xec]
push 8
push eax
call fcn.004354f0
push edi
push dword [ebp - 0xb8]
mov ecx, ebx
call fcn.00402fb0
push eax
mov ecx, ebx
call fcn.00438ea0
mov ecx, dword [esi + 0x730]
push eax
lea eax, [esi + 0x660]
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.004f65b0
mov bl, al
mov al, byte [ebp - 0xbd]
mov byte [ebp - 0xb1], bl
mov byte [edi + 0x129], al
test bl, bl
jne 0x50fe5e
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_encrypt_TLS_fragment
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.004482f0
xor al, al
jmp 0x510308
cmp dword [esi + 0xac], 6
jne 0x50ff10
mov ecx, dword [esi + 0x730]
lea eax, [esi + 0x660]
push edi
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.00594b20
test al, al
jne 0x50fea7
mov eax, dword [edi]
mov ecx, edi
push str.TLS_gcm_encrypt_finalize_failed.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.004482f0
xor al, al
jmp 0x510308
add esi, 0x6cc
mov ecx, esi
call fcn.00402fb0
cmp eax, 0x10
je 0x50fed7
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.004482f0
xor al, al
jmp 0x510308
mov ecx, dword [ebp - 0xb8]
push esi
call fcn.00435490
mov ecx, dword [ebp - 0xb8]
mov bl, al
call fcn.00402fb0
mov ecx, dword [ebp - 0xc4]
sub eax, dword [ebp - 0xbc]
mov dword [ecx], eax
lea ecx, [ebp - 0xb0]
call fcn.004482f0
mov al, bl
jmp 0x510308
mov ecx, dword [ebp - 0xb8]
mov bl, byte [ebp - 0xb1]
call fcn.00402fb0
mov ecx, dword [ebp - 0xc4]
sub eax, dword [ebp - 0xbc]
mov dword [ecx], eax
lea ecx, [ebp - 0xb0]
call fcn.004482f0
mov al, bl
jmp 0x510308
mov ecx, dword [ebp - 0xb8]
push ebx
call fcn.00435490
mov ecx, ebx
mov byte [ebp - 0xb1], al
call fcn.00402fb0
mov ecx, dword [ebp - 0xc4]
mov bl, byte [ebp - 0xb1]
mov dword [ecx], eax
lea ecx, [ebp - 0xb0]
call fcn.004482f0
mov al, bl
jmp 0x510308
lea eax, [esi + 0x40]
mov ecx, eax
mov dword [ebp - 0xbc], eax
call fcn.00436dd0
push dword [ebx]
lea ecx, [esi + 0x40]
push dword [ebp - 0xc8]
call fcn.004354f0
cmp byte [ebp - 0xb1], 0
je 0x50ffae
push dword [ebp + 8]
lea ecx, [esi + 0x40]
call fcn.00435740
cmp dword [esi + 0xb0], 0
je 0x50ffed
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.00509240
test eax, eax
je 0x50ffed
push eax
lea eax, [ebp - 0xa4]
push eax
lea ecx, [esi + 0x40]
call fcn.004354f0
cmp byte [esi + 0x98], 0
je 0x5102d6
mov eax, dword [esi + 0xac]
cmp eax, 6
je 0x510046
cmp eax, 0x63
je 0x510046
cmp eax, 7
je 0x510046
mov ebx, dword [esi + 0xc4]
xor eax, eax
test ebx, ebx
je 0x510032
lea ecx, [esi + 0x40]
call fcn.00402fb0
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.004357c0
cmp dword [esi + 0xac], 7
jne 0x5101c0
push 0xc
lea ecx, [esi + 0x24]
call fcn.00438e30
mov ebx, eax
test ebx, ebx
je 0x5100d3
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.00435300
lea ecx, [esi + 0xd0]
call fcn.00402fb0
cmp eax, 0xc
je 0x5100b3
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.004482f0
xor al, al
jmp 0x510308
lea ecx, [esi + 0xd0]
call fcn.00438ea0
sub eax, ebx
mov edx, 0xc
mov cl, byte [eax + ebx]
lea ebx, [ebx + 1]
xor byte [ebx - 1], cl
sub edx, 1
jne 0x5100c5
lea ecx, [esi + 0x6b0]
call fcn.00436dd0
cmp byte [ebp - 0xb1], 0
lea ecx, [esi + 0x6b0]
je 0x51010f
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 0x510146
push 8
lea eax, [esi + 0xec]
push eax
call fcn.004354f0
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.004354f0
lea ecx, [esi + 0x24]
push ecx
lea ecx, [esi + 0x660]
call fcn.004f6840
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 0x5101c0
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.004482f0
xor al, al
jmp 0x510308
mov ecx, dword [ebp - 0xb8]
call fcn.00402fb0
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.00402fb0
push eax
lea ecx, [esi + 0x40]
call fcn.00438ea0
mov ecx, dword [esi + 0x730]
push eax
lea eax, [esi + 0x660]
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.004f65b0
mov bh, al
mov byte [edi + 0x129], bl
mov byte [ebp - 0xb1], bh
test bh, bh
jne 0x510233
mov edx, dword [edi]
mov ecx, edi
push str.Failed_to_encrypt_TLS_fragment.
call dword [edx + 0x14]
cmp dword [esi + 0xac], 7
jne 0x5102bd
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 0x51027e
mov eax, dword [edi]
mov ecx, edi
push str.TLS_aead_encrypt_finalize_failed.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb0]
call fcn.004482f0
xor al, al
jmp 0x510308
add esi, 0x6cc
mov ecx, esi
call fcn.00402fb0
cmp eax, 0x10
je 0x5102ab
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.004482f0
xor al, al
jmp 0x510308
mov ecx, dword [ebp - 0xb8]
push esi
call fcn.00435490
mov byte [ebp - 0xb1], al
mov ecx, dword [ebp - 0xb8]
call fcn.00402fb0
sub eax, dword [ebp - 0xbc]
mov ebx, dword [ebp - 0xc4]
jmp 0x5102f5
mov esi, dword [ebp - 0xbc]
mov ecx, dword [ebp - 0xb8]
push esi
call fcn.00435490
mov ecx, esi
mov byte [ebp - 0xb1], al
call fcn.00402fb0
lea ecx, [ebp - 0xb0]
mov dword [ebx], eax
call fcn.004482f0
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.005b34c8
mov esp, ebp
pop ebp
ret 0x1c