Function at 0x5f3840
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x657d5b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb0
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xe8]
mov esi, ecx
lea ecx, [esp + 0x20]
mov al, byte [edi + 0x122]
push eax
push str.encryptFragment
push edi
call fcn.004f03a0
mov ebx, dword [esp + 0xdc]
mov dword [esp + 0xc8], 0
test ebx, ebx
jne 0x5f38bb
mov edx, dword [edi]
push str.Nothing_to_TLS_encrypt.
mov ecx, edi
call dword [edx + 0x14]
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5f4221
mov eax, dword [esi + 0xb0]
test eax, eax
jne 0x5f38ed
mov al, byte [esi + 0x98]
test al, al
jne 0x5f38ed
mov eax, dword [esp + 0xe0]
mov ecx, dword [eax]
push ecx
mov ecx, dword [esp + 0xe8]
push ebx
call fcn.004e1260
mov bl, al
jmp 0x5f420b
cmp dword [esp + 0xd4], 3
jne 0x5f3908
mov eax, dword [esp + 0xd8]
mov byte [esp + 0x12], 1
cmp eax, 4
je 0x5f390d
mov byte [esp + 0x12], 0
lea ecx, [esi + 0x24]
call fcn.004dd9e0
cmp dword [esi + 0xac], 6
jne 0x5f3b17
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
add eax, edx
cmp eax, 0xc
je 0x5f395c
mov edx, dword [edi]
push str.Nonce_length_not_correct_for_GCM_mode.
mov ecx, edi
call dword [edx + 0x14]
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5f4221
lea ebx, [esi + 0x69c]
mov ecx, ebx
call fcn.004dd9e0
mov al, byte [esp + 0x12]
lea ebp, [esi + 0xd0]
test al, al
mov ecx, ebp
je 0x5f3a5c
call fcn.005a8750
cmp eax, 0xc
je 0x5f39c2
mov eax, dword [edi]
push str.WriteIV_is_not_the_correct_length_for_TLS_1.3_GCM_mode.
mov ecx, edi
call dword [eax + 0x14]
mov ecx, ebp
call fcn.005a8750
push eax
push str.fixedIV_len
mov ecx, edi
call fcn.004effe0
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5f4221
mov ecx, dword [esi + 0xec]
mov edx, dword [esi + 0xf0]
mov dword [esp + 0x38], ecx
mov ecx, ebp
mov byte [esp + 0x34], 0
mov byte [esp + 0x35], 0
mov byte [esp + 0x36], 0
mov byte [esp + 0x37], 0
mov dword [esp + 0x3c], edx
call fcn.004dda10
mov ebp, eax
lea eax, [esp + 0x34]
xor ecx, ecx
sub ebp, eax
lea eax, [esp + ecx + 0x34]
mov dl, byte [eax + ebp]
xor byte [eax], dl
inc ecx
cmp ecx, 0xc
jl 0x5f39fb
lea eax, [esp + 0x34]
push 0xc
push eax
lea ecx, [esi + 0x24]
call fcn.004e1260
mov ebp, dword [esp + 0xe0]
lea edx, [esp + 0x14]
push 5
push edx
mov eax, dword [ebp]
mov byte [esp + 0x1c], 0x17
add eax, 0x11
mov byte [esp + 0x1d], 3
mov ecx, eax
mov byte [esp + 0x1e], 3
shr ecx, 8
mov byte [esp + 0x1f], cl
mov ecx, ebx
mov byte [esp + 0x20], al
call fcn.004e1260
mov ebx, dword [esp + 0xdc]
jmp 0x5f3b1e
call fcn.005a8750
cmp eax, 4
je 0x5f3aa1
mov eax, dword [edi]
push str.WriteIV_is_not_the_correct_length_for_GCM_mode.
mov ecx, edi
call dword [eax + 0x14]
mov ecx, ebp
call fcn.005a8750
push eax
push str.fixedIV_len
mov ecx, edi
call fcn.004effe0
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5f4221
lea ebp, [esi + 0xec]
push 8
push ebp
mov ecx, ebx
call fcn.004e1260
lea eax, [esi + 0xd0]
lea ecx, [esi + 0x24]
push eax
call fcn.004de6c0
push 8
push ebp
lea ecx, [esi + 0x24]
call fcn.004e1260
mov al, byte [esp + 0xd8]
mov cl, byte [esp + 0xd0]
mov dl, byte [esp + 0xd4]
mov byte [esp + 0x16], al
mov eax, dword [esp + 0xe0]
mov byte [esp + 0x14], cl
mov byte [esp + 0x15], dl
push 5
mov ecx, dword [eax]
mov dl, byte [eax]
shr ecx, 8
lea eax, [esp + 0x18]
mov byte [esp + 0x1b], cl
push eax
mov ecx, ebx
mov byte [esp + 0x20], dl
call fcn.004e1260
mov ebx, dword [esp + 0xdc]
mov ebp, dword [esp + 0xe0]
cmp dword [esp + 0xd4], 3
jne 0x5f3e4a
cmp dword [esp + 0xd8], 2
jl 0x5f3e4a
mov eax, dword [esi + 0xc4]
test eax, eax
jbe 0x5f3e4a
lea ebp, [esi + 0x40]
mov ecx, ebp
call fcn.004dd9e0
cmp dword [esi + 0xac], 6
je 0x5f3b6b
mov ecx, dword [esi + 0xc4]
push ebp
push ecx
call fcn.0055c550
add esp, 8
mov edx, dword [esp + 0xe0]
mov ecx, ebp
mov eax, dword [edx]
push eax
push ebx
call fcn.004e1260
mov al, byte [esp + 0x12]
test al, al
je 0x5f3b94
mov ecx, dword [esp + 0xd0]
push ecx
mov ecx, ebp
call fcn.004e0da0
mov eax, dword [esi + 0xb0]
test eax, eax
je 0x5f3be4
cmp dword [esi + 0xac], 6
je 0x5f3be4
mov eax, dword [esp + 0xe0]
lea edx, [esp + 0x40]
push edi
push edx
mov ecx, dword [eax]
mov edx, dword [esp + 0xe0]
mov eax, dword [esp + 0xd8]
push ecx
push ebx
push edx
push 3
push eax
push 1
mov ecx, esi
call fcn.005f3650
test eax, eax
je 0x5f3be4
lea ecx, [esp + 0x40]
push eax
push ecx
mov ecx, ebp
call fcn.004e1260
mov al, byte [esi + 0x98]
test al, al
je 0x5f3e26
mov eax, dword [esi + 0xac]
cmp eax, 6
je 0x5f3c35
cmp eax, 0x63
je 0x5f3c35
cmp eax, 7
je 0x5f3c35
mov ebx, dword [esi + 0xc4]
xor eax, eax
test ebx, ebx
je 0x5f3c23
mov ecx, ebp
call fcn.005a8750
inc eax
xor edx, edx
div ebx
mov eax, ebx
sub eax, edx
cmp eax, ebx
jne 0x5f3c29
xor eax, eax
lea edx, [eax + 1]
mov ecx, ebp
push edx
push eax
call fcn.004e0ed0
cmp dword [esi + 0xac], 6
jne 0x5f3c4d
lea eax, [esi + 0x24]
lea ecx, [esi + 0x650]
push eax
call fcn.0052ea50
mov ecx, dword [esp + 0xe4]
call fcn.005a8750
mov cl, byte [edi + 0x122]
mov dword [esp + 0x1c], eax
mov al, byte [edi + 0x121]
mov byte [edi + 0x121], cl
mov byte [esp + 0x13], al
mov eax, dword [esi + 0xac]
xor ebx, ebx
cmp eax, 6
mov dword [esi + 0x100], ebx
mov dword [esi + 0x108], ebx
mov dword [esi + 0x104], ebx
mov dword [esi + 0x10c], ebx
jne 0x5f3d03
mov ecx, dword [esi + 0x6e0]
lea edx, [esi + 0x650]
push edi
lea eax, [esi + 0xf8]
push edx
push eax
call fcn.005b5fe0
test al, al
jne 0x5f3ce6
mov edx, dword [edi]
push str.TLS_gcm_encrypt_setup_failed.
mov ecx, edi
call dword [edx + 0x14]
mov eax, dword [esp + 0xe0]
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
mov dword [eax], ebx
call fcn.004f03e0
xor al, al
jmp 0x5f4221
mov al, byte [esp + 0x12]
test al, al
jne 0x5f3d03
lea ecx, [esi + 0xec]
push 8
push ecx
mov ecx, dword [esp + 0xec]
call fcn.004e1260
mov edx, dword [esp + 0xe4]
push edi
push edx
mov ecx, ebp
lea ebx, [esi + 0x650]
call fcn.005a8750
push eax
mov ecx, ebp
call fcn.004dda10
mov ecx, dword [esi + 0x6e0]
push eax
lea eax, [esi + 0xf8]
push ebx
push eax
call fcn.0052ec70
mov bl, al
mov al, byte [esp + 0x13]
test bl, bl
mov byte [edi + 0x121], al
jne 0x5f3d6c
mov edx, dword [edi]
push str.Failed_to_encrypt_TLS_fragment
mov ecx, edi
call dword [edx + 0x14]
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5f4221
cmp dword [esi + 0xac], 6
jne 0x5f3e06
mov ecx, dword [esi + 0x6e0]
lea eax, [esi + 0x650]
push edi
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.005b6070
test al, al
jne 0x5f3dbe
mov eax, dword [edi]
push str.TLS_gcm_encrypt_finalize_failed.
mov ecx, edi
call dword [eax + 0x14]
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5f4221
add esi, 0x6b8
mov ecx, esi
call fcn.005a8750
cmp eax, 0x10
je 0x5f3df7
mov edx, dword [edi]
push str.GCM_auth_tag_is_not_16_bytes.
mov ecx, edi
call dword [edx + 0x14]
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5f4221
mov ecx, dword [esp + 0xe4]
push esi
call fcn.004de6c0
mov bl, al
mov ecx, dword [esp + 0xe4]
call fcn.005a8750
mov ecx, dword [esp + 0x1c]
sub eax, ecx
mov ecx, dword [esp + 0xe0]
mov dword [ecx], eax
jmp 0x5f420b
mov ecx, dword [esp + 0xe4]
push ebp
call fcn.004de6c0
mov ecx, ebp
mov bl, al
call fcn.005a8750
mov edx, dword [esp + 0xe0]
mov dword [edx], eax
jmp 0x5f420b
lea ecx, [esi + 0x40]
mov dword [esp + 0x1c], ecx
call fcn.004dd9e0
mov eax, dword [ebp]
mov ecx, dword [esp + 0x1c]
push eax
push ebx
call fcn.004e1260
mov al, byte [esp + 0x12]
test al, al
je 0x5f3e7d
mov ecx, dword [esp + 0xd0]
push ecx
mov ecx, dword [esp + 0x20]
call fcn.004e0da0
mov eax, dword [esi + 0xb0]
test eax, eax
je 0x5f3ecc
mov eax, dword [ebp]
mov ecx, dword [esp + 0xd8]
lea edx, [esp + 0x80]
push edi
push edx
mov edx, dword [esp + 0xdc]
push eax
mov eax, dword [esp + 0xdc]
push ebx
push ecx
push edx
push eax
push 1
mov ecx, esi
call fcn.005f3650
test eax, eax
je 0x5f3ecc
lea ecx, [esp + 0x80]
push eax
push ecx
mov ecx, dword [esp + 0x24]
call fcn.004e1260
mov al, byte [esi + 0x98]
test al, al
je 0x5f41ee
mov eax, dword [esi + 0xac]
cmp eax, 6
je 0x5f3f21
cmp eax, 0x63
je 0x5f3f21
cmp eax, 7
je 0x5f3f21
mov ebp, dword [esi + 0xc4]
xor eax, eax
test ebp, ebp
je 0x5f3f0d
mov ecx, dword [esp + 0x1c]
call fcn.005a8750
inc eax
xor edx, edx
div ebp
mov eax, ebp
sub eax, edx
cmp eax, ebp
jne 0x5f3f13
xor eax, eax
mov ecx, dword [esp + 0x1c]
lea edx, [eax + 1]
push edx
push eax
call fcn.004e0ed0
cmp dword [esi + 0xac], 7
jne 0x5f40cd
lea ebx, [esi + 0x24]
push 0xc
mov ecx, ebx
call fcn.004dda20
mov ebp, eax
test ebp, ebp
je 0x5f3fc5
mov byte [ebp], 0
mov byte [ebp + 1], 0
mov byte [ebp + 2], 0
mov byte [ebp + 3], 0
mov eax, dword [esi + 0xec]
push 0xc
mov dword [ebp + 4], eax
mov ecx, dword [esi + 0xf0]
mov dword [ebp + 8], ecx
mov ecx, ebx
call fcn.004dda50
lea ebx, [esi + 0xd0]
mov ecx, ebx
call fcn.005a8750
cmp eax, 0xc
je 0x5f3fa8
mov edx, dword [edi]
push str.m_fixedIv_should_be_12_bytes
mov ecx, edi
call dword [edx + 0x14]
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5f4221
mov ecx, ebx
call fcn.004dda10
mov ecx, ebp
sub eax, ebp
mov ebp, 0xc
mov dl, byte [eax + ecx]
mov bl, byte [ecx]
xor bl, dl
mov byte [ecx], bl
inc ecx
dec ebp
jne 0x5f3fb8
lea ebp, [esi + 0x69c]
mov ecx, ebp
call fcn.004dd9e0
mov al, byte [esp + 0x12]
test al, al
je 0x5f400b
mov eax, dword [esp + 0xe0]
lea edx, [esp + 0x14]
push 5
mov byte [esp + 0x18], 0x17
mov eax, dword [eax]
mov byte [esp + 0x19], 3
add eax, 0x11
mov byte [esp + 0x1a], 3
mov ecx, eax
mov byte [esp + 0x1c], al
shr ecx, 8
mov byte [esp + 0x1b], cl
push edx
jmp 0x5f4059
lea eax, [esi + 0xec]
push 8
push eax
mov ecx, ebp
call fcn.004e1260
mov al, byte [esp + 0xd8]
mov cl, byte [esp + 0xd0]
mov dl, byte [esp + 0xd4]
mov byte [esp + 0x2e], al
mov eax, dword [esp + 0xe0]
mov byte [esp + 0x2c], cl
mov byte [esp + 0x2d], dl
push 5
mov ecx, dword [eax]
mov dl, byte [eax]
shr ecx, 8
lea eax, [esp + 0x30]
mov byte [esp + 0x33], cl
mov byte [esp + 0x34], dl
push eax
mov ecx, ebp
call fcn.004e1260
lea ebp, [esi + 0x650]
lea eax, [esi + 0x24]
push eax
mov ecx, ebp
call fcn.0052ea50
mov ecx, dword [esi + 0x6e0]
lea ebx, [esi + 0xf8]
push edi
push ebx
mov edx, dword [ecx]
push ebp
push 1
call dword [edx + 0xc]
mov ecx, dword [esi + 0x6e0]
push edi
push ebp
push ebx
mov eax, dword [ecx]
call dword [eax + 0x24]
test al, al
jne 0x5f40cd
mov edx, dword [edi]
push str.TLS_aead_encrypt_setup_failed.
mov ecx, edi
call dword [edx + 0x14]
mov eax, dword [esp + 0xe0]
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
mov dword [eax], 0
call fcn.004f03e0
xor al, al
jmp 0x5f4221
mov ebx, dword [esp + 0xe4]
mov ecx, ebx
call fcn.005a8750
mov cl, byte [edi + 0x121]
mov dl, byte [edi + 0x122]
push edi
push ebx
mov ebx, dword [esp + 0x24]
mov byte [esp + 0x1b], cl
mov ecx, ebx
mov dword [esp + 0x1c], eax
mov byte [edi + 0x121], dl
lea ebp, [esi + 0x650]
call fcn.005a8750
push eax
mov ecx, ebx
call fcn.004dda10
mov ecx, dword [esi + 0x6e0]
push eax
lea eax, [esi + 0xf8]
push ebp
push eax
call fcn.0052ec70
mov bl, al
mov al, byte [esp + 0x13]
test bl, bl
mov byte [edi + 0x121], al
jne 0x5f4140
mov edx, dword [edi]
push str.Failed_to_encrypt_TLS_fragment.
mov ecx, edi
call dword [edx + 0x14]
cmp dword [esi + 0xac], 7
jne 0x5f41d1
mov ecx, dword [esi + 0x6e0]
push edi
lea eax, [esi + 0xf8]
push ebp
mov edx, dword [ecx]
push eax
call dword [edx + 0x28]
test al, al
jne 0x5f418c
mov eax, dword [edi]
push str.TLS_aead_encrypt_finalize_failed.
mov ecx, edi
call dword [eax + 0x14]
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5f4221
add esi, 0x6b8
mov ecx, esi
call fcn.005a8750
cmp eax, 0x10
je 0x5f41c2
mov edx, dword [edi]
push str.AEAD_auth_tag_is_not_16_bytes.
mov ecx, edi
call dword [edx + 0x14]
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
call fcn.004f03e0
xor al, al
jmp 0x5f4221
mov ecx, dword [esp + 0xe4]
push esi
call fcn.004de6c0
mov bl, al
mov ecx, dword [esp + 0xe4]
call fcn.005a8750
mov ecx, dword [esp + 0x14]
sub eax, ecx
mov ecx, dword [esp + 0xe0]
mov dword [ecx], eax
jmp 0x5f420b
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0xe4]
push esi
call fcn.004de6c0
mov ecx, esi
mov bl, al
call fcn.005a8750
mov dword [ebp], eax
lea ecx, [esp + 0x20]
mov dword [esp + 0xc8], 0xffffffff
call fcn.004f03e0
mov al, bl
mov ecx, dword [esp + 0xc0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xbc
ret 0x1c