Function at 0x46ba40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x5b706c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push str.__parse_finished
push 0x1519
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
mov esi, ecx
push 2
push esi
call fcn.00475430
mov eax, dword [esi]
add esp, 0x14
mov ecx, dword [esi + 0x3c]
mov eax, dword [eax + 0xcc]
not eax
and eax, 1
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ecx + 0x410]
push esi
call eax
add esp, 0xc
mov ecx, esi
call fcn.00469c00
mov edi, eax
test edi, edi
je 0x46bb0f
mov eax, dword [esi]
test eax, eax
je 0x46bafd
cmp dword [eax + 0x10], 0
je 0x46bafd
cmp dword [0x5bf078], 1
jl 0x46bafd
cmp edi, 0xffff9700
je 0x46bafd
mov eax, edi
neg eax
push eax
push edi
push str.mbedtls_ssl_read_record
push str._s___returned__d___0x_04x__n
lea eax, [ebp - 0x210]
push 0x200
push eax
call fcn.004753e0
mov eax, dword [esi]
lea ecx, [ebp - 0x210]
push ecx
push 0x151f
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
push 1
push dword [eax + 0x14]
mov eax, dword [eax + 0x10]
call eax
add esp, 0x2c
mov eax, edi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x78], 0x16
je 0x46bb52
push str.bad_finished_message
push 0x1525
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
push 1
push esi
call fcn.00475430
add esp, 0x14
mov dl, 2
mov ecx, esi
push 0xa
call fcn.0046a220
mov eax, 0xffff8900
add esp, 4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x70]
cmp byte [edx], 0x14
jne 0x46bc5c
mov eax, dword [esi]
mov ecx, dword [eax + 0xcc]
and ecx, 2
mov eax, ecx
or eax, 4
shl eax, 2
cmp dword [esi + 0xa0], eax
jne 0x46bc5c
or ecx, 1
mov byte [ebp - 0x211], 0
lea eax, [ebp - 0x10]
lea edi, [edx + ecx*4]
xor edx, edx
sub edi, eax
lea ecx, [ebp - 0x10]
add ecx, edx
inc edx
movzx eax, byte [edi + ecx]
movzx ecx, byte [ecx]
xor ecx, eax
mov al, byte [ebp - 0x211]
or eax, ecx
mov byte [ebp - 0x211], al
cmp edx, 0xc
jb 0x46bb91
cmp byte [ebp - 0x211], 0
je 0x46bbcb
push str.bad_finished_message
push 0x153f
jmp 0x46bc66
movq xmm0, qword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov dword [esi + 0xec], 0xc
movq qword [esi + 0xfc], xmm0
mov dword [esi + 0x104], eax
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi]
cmp dword [eax + 0x880], 0
je 0x46bc1d
mov eax, dword [ecx + 0xcc]
test al, 1
jne 0x46bc14
mov dword [esi + 4], 0xa
mov eax, dword [ecx + 0xcc]
test al, 1
je 0x46bc20
mov dword [esi + 4], 0xf
jmp 0x46bc20
inc dword [esi + 4]
test byte [ecx + 0xcc], 2
je 0x46bc30
mov ecx, esi
call fcn.004687b0
push 0x58c124
push 0x155d
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
push 2
push esi
call fcn.00475430
add esp, 0x14
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret
push str.bad_finished_message
push 0x1536
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
push 1
push esi
call fcn.00475430
add esp, 0x14
mov dl, 2
mov ecx, esi
push 0x32
call fcn.0046a220
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
mov eax, 0xffff8180
pop edi
pop esi
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret