Function at 0x58c430
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x638510
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x717f80]
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 - 0xd8], esi
mov edi, dword [ebp + 0x20]
lea ecx, [ebp - 0xb8]
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 - 0xc0], eax
movzx eax, byte [edi + 0x12a]
push eax
push str.encryptFragment
push edi
mov dword [ebp - 0xd0], ebx
mov dword [ebp - 0xcc], edi
movq qword [ebp - 0xb8], xmm0
mov dword [ebp - 0xb0], 0
call fcn.004b24c0
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 4], 0
test eax, eax
jne 0x58c4e7
mov eax, dword [edi]
mov ecx, edi
push str.Nothing_to_TLS_encrypt.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb8]
call fcn.004b2630
xor al, al
jmp 0x58cd65
cmp dword [esi + 0xb0], 0
jne 0x58c51b
cmp byte [esi + 0x98], 0
jne 0x58c51b
push dword [ebx]
mov ecx, dword [ebp - 0xc0]
push eax
call fcn.0049f210
lea ecx, [ebp - 0xb8]
mov bl, al
call fcn.004b2630
mov al, bl
jmp 0x58cd65
cmp dword [ebp + 0xc], 3
jne 0x58c52e
cmp dword [ebp + 0x10], 4
mov byte [ebp - 0xb9], 1
je 0x58c535
mov byte [ebp - 0xb9], 0
lea eax, [esi + 0x24]
mov ecx, eax
mov dword [ebp - 0xdc], eax
call fcn.004a0bb0
cmp dword [esi + 0xac], 6
jne 0x58c6e2
mov eax, dword [esi + 0xc4]
add eax, dword [esi + 0xc0]
cmp eax, 0xc
je 0x58c581
mov eax, dword [edi]
mov ecx, edi
push str.Nonce_length_not_correct_for_GCM_mode.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb8]
call fcn.004b2630
xor al, al
jmp 0x58cd65
lea eax, [esi + 0x6b0]
mov ecx, eax
mov dword [ebp - 0x20], eax
call fcn.004a0bb0
lea eax, [esi + 0xd0]
mov ecx, eax
mov dword [ebp - 0xd4], eax
call fcn.0046e290
cmp byte [ebp - 0xb9], 0
je 0x58c671
cmp eax, 0xc
je 0x58c5ec
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 - 0xd4]
call fcn.0046e290
push eax
push str.fixedIV_len
mov ecx, edi
call fcn.004b2d90
lea ecx, [ebp - 0xb8]
call fcn.004b2630
xor al, al
jmp 0x58cd65
mov eax, dword [esi + 0xec]
lea ecx, [esi + 0xd0]
mov edx, dword [esi + 0xf0]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
call fcn.004a2ca0
mov edi, eax
xor ecx, ecx
lea eax, [ebp - 0x2c]
sub edi, eax
nop dword [eax]
lea edx, [ebp - 0x2c]
add edx, ecx
inc ecx
mov al, byte [edi + edx]
xor byte [edx], al
cmp ecx, 0xc
jl 0x58c620
push 0xc
lea eax, [ebp - 0x2c]
push eax
lea ecx, [esi + 0x24]
call fcn.0049f210
mov edx, dword [ebx]
lea ecx, [esi + 0x6b0]
add edx, 0x11
mov word [ebp - 0x20], 0x317
mov eax, edx
mov byte [ebp - 0x1e], 3
shr eax, 8
mov byte [ebp - 0x1d], al
lea eax, [ebp - 0x20]
push 5
push eax
mov byte [ebp - 0x1c], dl
call fcn.0049f210
mov edi, dword [ebp - 0xcc]
jmp 0x58c6e2
cmp eax, 4
je 0x58c680
push str.WriteIV_is_not_the_correct_length_for_GCM_mode.
jmp 0x58c5bb
mov ecx, dword [ebp - 0x20]
add esi, 0xec
push 8
push esi
call fcn.0049f210
mov eax, dword [ebp - 0xd4]
mov ecx, dword [ebp - 0xdc]
push eax
call fcn.0049f1b0
mov ecx, dword [ebp - 0xdc]
push 8
push esi
call fcn.0049f210
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x20]
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
lea eax, [ebp - 0x18]
push 5
push eax
call fcn.0049f210
mov esi, dword [ebp - 0xd8]
cmp dword [ebp + 0xc], 3
jne 0x58c9d2
cmp dword [ebp + 0x10], 2
jl 0x58c9d2
cmp dword [esi + 0xc4], 0
jbe 0x58c9d2
lea ecx, [esi + 0x40]
call fcn.004a0bb0
cmp dword [esi + 0xac], 6
je 0x58c726
lea eax, [esi + 0x40]
push eax
push dword [esi + 0xc4]
call fcn.004eccf0
add esp, 8
push dword [ebx]
lea ecx, [esi + 0x40]
push dword [ebp - 0xc8]
call fcn.0049f210
cmp byte [ebp - 0xb9], 0
je 0x58c74a
push dword [ebp + 8]
lea ecx, [esi + 0x40]
call fcn.0049f460
cmp dword [esi + 0xb0], 0
je 0x58c78c
cmp dword [esi + 0xac], 6
je 0x58c78c
push edi
lea eax, [ebp - 0x6c]
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.0058ae80
test eax, eax
je 0x58c78c
push eax
lea eax, [ebp - 0x6c]
push eax
lea ecx, [esi + 0x40]
call fcn.0049f210
cmp byte [esi + 0x98], 0
je 0x58c9bb
mov eax, dword [esi + 0xac]
cmp eax, 6
je 0x58c7ed
cmp eax, 0x63
je 0x58c7ed
cmp eax, 7
je 0x58c7ed
mov eax, dword [esi + 0xc4]
xor edx, edx
test eax, eax
je 0x58c7d9
lea ecx, [esi + 0x40]
call fcn.0046e290
mov ecx, dword [esi + 0xc4]
inc eax
xor edx, edx
div ecx
mov eax, ecx
sub eax, edx
mov dword [ebp - 0x20], eax
mov eax, ecx
mov edx, dword [ebp - 0x20]
xor ecx, ecx
cmp edx, eax
cmovne ecx, edx
lea eax, [ecx + 1]
push eax
push ecx
lea ecx, [esi + 0x40]
call fcn.0049f4e0
cmp dword [esi + 0xac], 6
jne 0x58c805
lea eax, [esi + 0x24]
push eax
lea ecx, [esi + 0x660]
call fcn.0057a7f0
mov ecx, dword [ebp - 0xc0]
call fcn.0046e290
mov cl, byte [edi + 0x12a]
mov dword [ebp - 0x20], 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 - 0xc1], al
jne 0x58c8bb
mov ecx, dword [esi + 0x730]
lea eax, [esi + 0x660]
push edi
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.0060bcc0
test al, al
jne 0x58c89e
mov eax, dword [edi]
mov ecx, edi
push str.TLS_gcm_encrypt_setup_failed.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb8]
mov dword [ebx], 0
call fcn.004b2630
xor al, al
jmp 0x58cd65
cmp byte [ebp - 0xb9], 0
jne 0x58c8bb
mov ecx, dword [ebp - 0xc0]
lea eax, [esi + 0xec]
push 8
push eax
call fcn.0049f210
push edi
push dword [ebp - 0xc0]
lea ecx, [esi + 0x40]
call fcn.0046e290
push eax
lea ecx, [esi + 0x40]
call fcn.004a2ca0
mov ecx, dword [esi + 0x730]
push eax
lea eax, [esi + 0x660]
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.00579830
mov cl, byte [ebp - 0xc1]
mov byte [ebp - 0xb9], al
mov byte [edi + 0x129], cl
test al, al
jne 0x58c921
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_encrypt_TLS_fragment
call dword [eax + 0x14]
lea ecx, [ebp - 0xb8]
call fcn.004b2630
xor al, al
jmp 0x58cd65
cmp dword [esi + 0xac], 6
jne 0x58c9a8
mov ecx, dword [esi + 0x730]
lea eax, [esi + 0x660]
push edi
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.0060bc00
test al, al
jne 0x58c966
mov eax, dword [edi]
mov ecx, edi
push str.TLS_gcm_encrypt_finalize_failed.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb8]
call fcn.004b2630
xor al, al
jmp 0x58cd65
add esi, 0x6cc
mov ecx, esi
call fcn.0046e290
cmp eax, 0x10
je 0x58c996
mov eax, dword [edi]
mov ecx, edi
push str.GCM_auth_tag_is_not_16_bytes.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb8]
call fcn.004b2630
xor al, al
jmp 0x58cd65
mov ecx, dword [ebp - 0xc0]
push esi
call fcn.0049f1b0
mov byte [ebp - 0xb9], al
mov ecx, dword [ebp - 0xc0]
call fcn.0046e290
sub eax, dword [ebp - 0x20]
jmp 0x58cd52
mov ecx, dword [ebp - 0xc0]
lea eax, [esi + 0x40]
push eax
call fcn.0049f1b0
lea ecx, [esi + 0x40]
jmp 0x58cd47
lea eax, [esi + 0x40]
mov ecx, eax
mov dword [ebp - 0x20], eax
call fcn.004a0bb0
push dword [ebx]
lea ecx, [esi + 0x40]
push dword [ebp - 0xc8]
call fcn.0049f210
cmp byte [ebp - 0xb9], 0
je 0x58ca03
push dword [ebp + 8]
lea ecx, [esi + 0x40]
call fcn.0049f460
cmp dword [esi + 0xb0], 0
je 0x58ca42
push edi
lea eax, [ebp - 0xac]
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.0058ae80
test eax, eax
je 0x58ca42
push eax
lea eax, [ebp - 0xac]
push eax
lea ecx, [esi + 0x40]
call fcn.0049f210
cmp byte [esi + 0x98], 0
je 0x58cd36
mov eax, dword [esi + 0xac]
cmp eax, 6
je 0x58ca9b
cmp eax, 0x63
je 0x58ca9b
cmp eax, 7
je 0x58ca9b
mov ebx, dword [esi + 0xc4]
xor eax, eax
test ebx, ebx
je 0x58ca87
lea ecx, [esi + 0x40]
call fcn.0046e290
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.0049f4e0
cmp dword [esi + 0xac], 7
jne 0x58cc2a
push 0xc
lea ecx, [esi + 0x24]
call fcn.004a2c20
mov ebx, eax
test ebx, ebx
je 0x58cb2e
mov dword [ebx], 0
mov ecx, dword [esi + 0xec]
mov edx, dword [esi + 0xf0]
mov dword [ebx + 4], ecx
lea ecx, [esi + 0x24]
push 0xc
mov dword [ebx + 8], edx
call fcn.0049f0d0
lea ecx, [esi + 0xd0]
call fcn.0046e290
cmp eax, 0xc
je 0x58cb08
mov eax, dword [edi]
mov ecx, edi
push str.m_fixedIv_should_be_12_bytes
call dword [eax + 0x14]
lea ecx, [ebp - 0xb8]
call fcn.004b2630
xor al, al
jmp 0x58cd65
lea ecx, [esi + 0xd0]
call fcn.004a2ca0
sub eax, ebx
mov edx, 0xc
nop word [eax + eax]
mov cl, byte [ebx + eax]
lea ebx, [ebx + 1]
xor byte [ebx - 1], cl
sub edx, 1
jne 0x58cb20
lea ecx, [esi + 0x6b0]
call fcn.004a0bb0
cmp byte [ebp - 0xb9], 0
lea ecx, [esi + 0x6b0]
je 0x58cb6a
mov edx, dword [ebp - 0xd0]
mov word [ebp - 0x18], 0x317
mov byte [ebp - 0x16], 3
mov edx, dword [edx]
add edx, 0x11
mov eax, edx
mov byte [ebp - 0x14], dl
shr eax, 8
mov byte [ebp - 0x15], al
jmp 0x58cba1
push 8
lea eax, [esi + 0xec]
push eax
call fcn.0049f210
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xd0]
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 [ecx + 1]
mov byte [ebp - 0x15], al
mov al, byte [ecx]
lea ecx, [esi + 0x6b0]
mov byte [ebp - 0x14], al
push 5
lea eax, [ebp - 0x18]
push eax
call fcn.0049f210
lea eax, [esi + 0x24]
lea edi, [esi + 0x660]
push eax
mov ecx, edi
call fcn.0057a7f0
mov ebx, dword [ebp - 0xd8]
add esi, 0xf8
push dword [ebp - 0xcc]
push esi
mov ecx, dword [ebx + 0x730]
push edi
push 1
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [ebx + 0x730]
mov ebx, dword [ebp - 0xcc]
push ebx
push edi
mov eax, dword [ecx]
push esi
mov eax, dword [eax + 0x24]
call eax
test al, al
jne 0x58cc22
mov eax, dword [ebx]
mov ecx, ebx
push str.TLS_aead_encrypt_setup_failed.
call dword [eax + 0x14]
mov eax, dword [ebp - 0xd0]
lea ecx, [ebp - 0xb8]
mov dword [eax], 0
call fcn.004b2630
xor al, al
jmp 0x58cd65
mov esi, dword [ebp - 0xd8]
mov edi, ebx
mov ecx, dword [ebp - 0xc0]
call fcn.0046e290
mov cl, byte [edi + 0x12a]
mov bl, byte [edi + 0x129]
push edi
push dword [ebp - 0xc0]
mov byte [edi + 0x129], cl
lea ecx, [esi + 0x40]
mov dword [ebp - 0x20], eax
call fcn.0046e290
push eax
lea ecx, [esi + 0x40]
call fcn.004a2ca0
mov ecx, dword [esi + 0x730]
push eax
lea eax, [esi + 0x660]
push eax
lea eax, [esi + 0xf8]
push eax
call fcn.00579830
mov bh, al
mov byte [edi + 0x129], bl
mov byte [ebp - 0xb9], bh
test bh, bh
jne 0x58cc9a
mov edx, dword [edi]
mov ecx, edi
push str.Failed_to_encrypt_TLS_fragment.
call dword [edx + 0x14]
cmp dword [esi + 0xac], 7
jne 0x58cd20
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 0x58cce1
mov eax, dword [edi]
mov ecx, edi
push str.TLS_aead_encrypt_finalize_failed.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb8]
call fcn.004b2630
xor al, al
jmp 0x58cd65
add esi, 0x6cc
mov ecx, esi
call fcn.0046e290
cmp eax, 0x10
je 0x58cd0e
mov eax, dword [edi]
mov ecx, edi
push str.AEAD_auth_tag_is_not_16_bytes.
call dword [eax + 0x14]
lea ecx, [ebp - 0xb8]
call fcn.004b2630
xor al, al
jmp 0x58cd65
mov ecx, dword [ebp - 0xc0]
push esi
call fcn.0049f1b0
mov byte [ebp - 0xb9], al
mov ecx, dword [ebp - 0xc0]
call fcn.0046e290
sub eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0xd0]
jmp 0x58cd52
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc0]
push esi
call fcn.0049f1b0
mov ecx, esi
mov byte [ebp - 0xb9], al
call fcn.0046e290
lea ecx, [ebp - 0xb8]
mov dword [ebx], eax
call fcn.004b2630
mov al, byte [ebp - 0xb9]
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.00622073
mov esp, ebp
pop ebp
ret 0x1c