Function at 0x1000bf10
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x1006c32c
push 0x1979
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 2
push 0x10077880
call fcn.10012320
mov eax, dword [0x10077880]
add esp, 0x14
mov eax, dword [eax + 0xcc]
not eax
and eax, 1
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [0x100778bc]
push 0x10077880
mov eax, dword [eax + 0x458]
call eax
add esp, 0xc
mov edx, 1
call fcn.10008cb0
mov esi, eax
test esi, esi
je 0x1000bff1
mov eax, dword [0x10077880]
test eax, eax
je 0x1000bfe0
cmp dword [eax + 0x10], 0
je 0x1000bfe0
cmp dword [0x10075388], 1
jl 0x1000bfe0
cmp esi, 0xffff9700
je 0x1000bfe0
mov eax, esi
neg eax
push eax
push esi
push str.mbedtls_ssl_read_record
push str._s___returned__d___0x_04x__n
lea eax, [ebp - 0x210]
push 0x200
push eax
call fcn.1002f1c0
mov eax, dword [0x10077880]
lea ecx, [ebp - 0x210]
push ecx
push 0x197f
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push dword [eax + 0x14]
mov eax, dword [eax + 0x10]
call eax
add esp, 0x2c
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
cmp dword [0x100778f8], 0x16
je 0x1000c038
push str.bad_finished_message
push 0x1985
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push 0x10077880
call fcn.10012320
add esp, 0x14
mov dl, 2
push 0xa
call fcn.1000a220
mov eax, 0xffff8900
add esp, 4
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
mov edx, dword [0x100778f0]
cmp byte [edx], 0x14
jne 0x1000c148
mov eax, dword [0x10077880]
mov ecx, dword [eax + 0xcc]
and ecx, 2
mov eax, ecx
or eax, 4
shl eax, 2
cmp dword [0x10077920], eax
jne 0x1000c148
or ecx, 1
mov byte [ebp - 0x211], 0
lea esi, [edx + ecx*4]
xor edx, edx
mov al, byte [esi + edx]
mov cl, byte [ebp + edx - 0x10]
inc edx
xor cl, al
or cl, byte [ebp - 0x211]
mov byte [ebp - 0x211], cl
cmp edx, 0xc
jb 0x1000c078
cmp byte [ebp - 0x211], 0
je 0x1000c0ab
push str.bad_finished_message
push 0x199f
jmp 0x1000c152
mov eax, dword [ebp - 8]
movq xmm0, qword [ebp - 0x10]
mov dword [0x10077990], eax
mov eax, dword [0x100778bc]
mov dword [0x10077978], 0xc
movq qword [0x10077988], xmm0
cmp dword [eax + 0x8c8], 0
mov eax, dword [0x10077880]
je 0x1000c105
test byte [eax + 0xcc], 1
jne 0x1000c0f9
mov dword [0x10077884], 0xa
test byte [eax + 0xcc], 1
je 0x1000c10b
mov dword [0x10077884], 0xf
jmp 0x1000c10b
inc dword [0x10077884]
test byte [eax + 0xcc], 2
je 0x1000c119
call fcn.100073e0
push str.__parse_finished
push 0x19bd
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 2
push 0x10077880
call fcn.10012320
add esp, 0x14
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
push str.bad_finished_message
push 0x1996
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push 0x10077880
call fcn.10012320
add esp, 0x14
mov dl, 2
push 0x32
call fcn.1000a220
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
mov eax, 0xffff8180
pop esi
call fcn.10045387
mov esp, ebp
pop ebp
ret