Function at 0x10005350
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x1006a8b0
push 0x701
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 2
push 0x10077880
mov dword [ebp - 0x298], 0
xor edi, edi
mov dword [ebp - 0x294], 1
call fcn.10012320
add esp, 0x14
cmp dword [0x100778ac], edi
je 0x10006228
mov esi, dword [0x100778c0]
test esi, esi
je 0x10006228
lea ecx, [esi + 0x90]
test ecx, ecx
je 0x100053c9
mov eax, dword [ecx]
test eax, eax
je 0x100053c9
mov eax, dword [eax + 4]
jmp 0x100053cb
xor eax, eax
mov edx, dword [esi + 8]
mov ebx, dword [0x100778fc]
cmp ebx, edx
jae 0x1000540e
push edx
push ebx
push str.in_msglen___d____minlen___d_
push 0x70e
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push 0x10077880
call fcn.10012320
add esp, 0x1c
mov eax, 0xffff8e80
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
cmp eax, 7
jne 0x100054d9
mov eax, dword [0x100778f0]
lea edx, [ebp - 0x28c]
push edx
push eax
push ebx
push eax
push dword [esi + 0xc]
mov dword [ebp - 0x28c], edi
lea edx, [esi + 0x28]
xor edi, edi
call fcn.1001b760
mov esi, eax
add esp, 0x14
test esi, esi
je 0x100054b8
mov eax, dword [0x10077880]
test eax, eax
je 0x100054a5
cmp dword [eax + 0x10], edi
je 0x100054a5
cmp dword [0x10075388], 1
jl 0x100054a5
cmp esi, 0xffff9700
je 0x100054a5
mov eax, esi
neg eax
push eax
push esi
push str.mbedtls_cipher_crypt
push str._s___returned__d___0x_04x__n
lea eax, [ebp - 0x280]
push 0x200
push eax
call fcn.1002f1c0
mov eax, dword [0x10077880]
lea ecx, [ebp - 0x280]
push ecx
push 0x720
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 edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
mov ebx, dword [0x100778fc]
cmp ebx, dword [ebp - 0x28c]
je 0x10005e2c
push str.should_never_happen
push 0x726
jmp 0x10006232
cmp eax, 6
je 0x10005a8a
cmp eax, 8
je 0x10005a8a
cmp eax, 0xa
je 0x10005a8a
cmp eax, 2
jne 0x10005a7b
mov edi, dword [0x10077894]
xor edx, edx
mov dword [ebp - 0x28c], edx
cmp edi, eax
jl 0x10005512
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x290], eax
add eax, edx
cmp ebx, eax
jb 0x10005a3d
mov eax, dword [esi + 0x14]
inc eax
add eax, edx
cmp ebx, eax
jb 0x10005a3d
mov eax, dword [0x100778f0]
mov dword [ebp - 0x294], eax
mov eax, dword [0x100778ac]
mov dword [ebp - 0x288], ebx
cmp dword [eax + 0x80], 1
jne 0x10005793
push str.using_encrypt_then_mac
push 0x7c0
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 3
push 0x10077880
call fcn.10012320
mov eax, dword [0x100778c0]
add esp, 0x14
mov edx, dword [0x100778fc]
mov eax, dword [eax + 0x14]
sub edx, eax
sub dword [ebp - 0x288], eax
mov eax, dword [0x100778e0]
mov dword [0x100778fc], edx
push 0xd
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x14], ecx
mov ecx, dword [0x100778e4]
mov dword [ebp - 0x10], eax
mov ax, word [ecx]
mov word [ebp - 0xc], ax
mov al, byte [ecx + 2]
mov ecx, 0x10077880
mov byte [ebp - 0xa], al
mov eax, edx
shr eax, 8
mov byte [ebp - 9], al
lea eax, [ebp - 0x14]
push eax
push str.MACd_meta_data
mov byte [ebp - 8], dl
mov edx, 4
push 0x7ca
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
call fcn.100123e0
mov ecx, dword [0x100778c0]
add esp, 0x14
lea eax, [ecx + 0x44]
test eax, eax
je 0x10005615
mov edx, dword [eax]
test edx, edx
je 0x10005615
cmp dword [eax + 8], 0
je 0x10005615
push 0xd
lea ecx, [ebp - 0x14]
push ecx
push dword [eax + 4]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [0x100778c0]
add esp, 0xc
lea eax, [ecx + 0x44]
test eax, eax
je 0x10005645
mov edx, dword [eax]
test edx, edx
je 0x10005645
cmp dword [eax + 8], 0
je 0x10005645
push dword [0x100778fc]
push dword [0x100778ec]
push dword [eax + 4]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [0x100778c0]
add esp, 0xc
add ecx, 0x44
lea edx, [ebp - 0x50]
call fcn.10014da0
mov esi, dword [0x100778c0]
add esi, 0x44
je 0x10005688
mov eax, dword [esi]
test eax, eax
je 0x10005688
mov edi, dword [esi + 8]
test edi, edi
je 0x10005688
push dword [esi + 4]
mov eax, dword [eax + 0x10]
call eax
add esp, 4
test eax, eax
jne 0x10005688
mov eax, dword [esi]
push dword [eax + 0xc]
mov eax, dword [eax + 0x14]
push edi
push dword [esi + 4]
call eax
add esp, 0xc
mov eax, dword [0x100778c0]
mov edx, 4
mov ecx, 0x10077880
push dword [eax + 0x14]
mov eax, dword [0x100778fc]
add eax, dword [0x100778ec]
push eax
push str.message__mac
push 0x7d3
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
call fcn.100123e0
mov eax, dword [0x100778c0]
add esp, 0x14
mov edx, 4
mov ecx, 0x10077880
push dword [eax + 0x14]
lea eax, [ebp - 0x50]
push eax
push str.expected_mac
push 0x7d5
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
call fcn.100123e0
mov eax, dword [0x100778c0]
xor edi, edi
mov ebx, dword [0x100778fc]
add esp, 0x14
add ebx, dword [0x100778ec]
mov byte [ebp - 0x281], 0
cmp dword [eax + 0x14], edi
jbe 0x1000573a
lea eax, [ebp - 0x50]
sub ebx, eax
mov edx, eax
mov esi, eax
movzx eax, byte [edx + ebx]
lea edx, [edx + 1]
mov cl, byte [esi]
lea esi, [esi + 1]
xor cl, al
inc edi
movzx eax, byte [ebp - 0x281]
or al, cl
mov byte [ebp - 0x281], al
mov eax, dword [0x100778c0]
cmp edi, dword [eax + 0x14]
jb 0x10005712
cmp byte [ebp - 0x281], 0
je 0x10005777
push str.message_mac_does_not_match
push 0x7da
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push 0x10077880
call fcn.10012320
mov eax, 0xffff8e80
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
mov ebx, dword [0x100778fc]
mov esi, dword [0x100778c0]
mov edi, dword [0x10077894]
mov dword [ebp - 0x298], 1
mov ecx, dword [esi + 0xc]
xor edx, edx
mov eax, ebx
div ecx
test edx, edx
je 0x100057d6
push ecx
push ebx
push str.msglen___d_____ivlen___d____0
push 0x7e8
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push 0x10077880
call fcn.10012320
add esp, 0x1c
mov eax, 0xffff8e80
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
cmp edi, 2
mov edi, dword [ebp - 0x288]
jl 0x10005811
sub ebx, ecx
sub edi, ecx
mov dword [0x100778fc], ebx
xor dl, dl
cmp dword [esi + 0xc], 0
jbe 0x10005811
xor ecx, ecx
mov eax, dword [0x100778ec]
inc dl
mov al, byte [ecx + eax]
mov byte [ecx + esi + 0x28], al
mov esi, dword [0x100778c0]
movzx ecx, dl
cmp ecx, dword [esi + 0xc]
jb 0x100057f5
lea eax, [ebp - 0x28c]
push eax
mov eax, dword [ebp - 0x294]
lea edx, [esi + 0x28]
push eax
push edi
push eax
push dword [esi + 0xc]
lea ecx, [esi + 0x90]
call fcn.1001b760
mov esi, eax
add esp, 0x14
test esi, esi
je 0x100058c6
mov eax, dword [0x10077880]
test eax, eax
je 0x100054a5
cmp dword [eax + 0x10], 0
je 0x100054a5
cmp dword [0x10075388], 1
jl 0x100054a5
cmp esi, 0xffff9700
je 0x100054a5
mov eax, esi
neg eax
push eax
push esi
push str.mbedtls_cipher_crypt
push str._s___returned__d___0x_04x__n
lea eax, [ebp - 0x280]
push 0x200
push eax
call fcn.1002f1c0
mov eax, dword [0x10077880]
lea ecx, [ebp - 0x280]
push ecx
push 0x801
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 edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp - 0x28c]
je 0x100058dd
push str.should_never_happen
push 0x807
jmp 0x10006232
cmp dword [0x10077894], 2
jge 0x10005902
mov ecx, dword [0x100778c0]
push dword [ecx + 0xc]
lea eax, [ecx + 0xb8]
push eax
lea eax, [ecx + 0x28]
push eax
call fcn.10047450
add esp, 0xc
mov ebx, dword [0x100778fc]
mov eax, dword [0x100778f0]
mov dword [ebp - 0x290], ebx
movzx edi, byte [eax + ebx - 1]
mov eax, dword [0x100778c0]
inc edi
mov esi, dword [eax + 0x14]
lea eax, [esi + edi]
cmp ebx, eax
jae 0x10005937
cmp dword [ebp - 0x298], 0
jne 0x10005937
xor edi, edi
xor edx, edx
jmp 0x1000593c
mov edx, 1
cmp dword [0x10077894], 0
jle 0x10005a2e
xor eax, eax
mov ecx, ebx
mov dword [ebp - 0x28c], eax
sub ecx, edi
lea eax, [esi + 0x4000]
cmp eax, ecx
sbb esi, esi
xor eax, eax
inc esi
cmp edi, ebx
mov ebx, 1
cmovbe eax, edx
and esi, eax
mov eax, esi
mov dword [ebp - 0x2a0], esi
imul eax, ecx
mov dword [ebp - 0x294], eax
xor eax, eax
mov dword [ebp - 0x288], eax
mov dword [ebp - 0x29c], eax
nop dword [eax]
mov edx, dword [0x100778f0]
cmp eax, edi
sbb esi, esi
add edx, eax
add edx, dword [ebp - 0x294]
and esi, ebx
xor ecx, ecx
lea ebx, [edi - 1]
movzx eax, byte [edx]
cmp eax, ebx
mov eax, dword [ebp - 0x288]
sete cl
inc eax
and ecx, esi
add dword [ebp - 0x28c], ecx
cmp eax, edi
movzx eax, byte [edx + 1]
lea edx, [edi - 1]
sbb ebx, ebx
xor ecx, ecx
neg ebx
and ebx, esi
cmp eax, edx
mov eax, dword [ebp - 0x288]
mov edx, dword [ebp - 0x29c]
cmove ecx, ebx
add eax, 2
add edx, ecx
mov dword [ebp - 0x29c], edx
mov dword [ebp - 0x288], eax
cmp eax, 0x100
jb 0x10005990
mov eax, dword [ebp - 0x28c]
mov ebx, dword [ebp - 0x290]
add eax, edx
xor edx, edx
cmp eax, edi
cmove edx, dword [ebp - 0x2a0]
imul eax, edx, 0x1ff
mov dword [ebp - 0x294], edx
and edi, eax
sub ebx, edi
mov dword [0x100778fc], ebx
jmp 0x10005e31
push str.should_never_happen
push 0x862
jmp 0x10006232
push dword [esi + 0x14]
push dword [ebp - 0x290]
push ebx
push str.msglen___d____max__ivlen__d___maclen___d___1______expl_IV__
push 0x7af
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push 0x10077880
call fcn.10012320
add esp, 0x20
mov eax, 0xffff8e80
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
push str.should_never_happen
push 0x86c
jmp 0x10006232
mov eax, dword [esi]
xor ecx, ecx
mov edx, dword [esi + 0xc]
sub edx, dword [esi + 0x10]
mov al, byte [eax + 0x24]
and al, 2
test al, al
mov byte [ebp - 0x281], al
mov byte [ebp - 0x2a0], al
sete cl
lea ecx, [ecx*8 + 8]
lea eax, [ecx + edx]
cmp ebx, eax
jae 0x10005aef
push ecx
push edx
push ebx
push str.msglen___d____explicit_iv_len___d___taglen___d_
push 0x745
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push 0x10077880
call fcn.10012320
add esp, 0x20
mov eax, 0xffff8e80
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
mov eax, dword [0x100778f0]
sub ebx, ecx
mov dword [ebp - 0x288], eax
sub ebx, edx
mov edx, dword [0x10077894]
mov eax, ebx
shr eax, 8
mov dword [ebp - 0x290], eax
mov eax, dword [0x100778e0]
mov dword [0x100778fc], ebx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x10], eax
mov al, byte [0x100778f8]
mov byte [ebp - 0xc], al
mov eax, dword [0x10077880]
mov dword [ebp - 0x14], ecx
mov ecx, dword [0x10077890]
test byte [eax + 0xcc], 2
je 0x10005b5d
mov al, 1
sub al, cl
cmp edx, 2
mov byte [ebp - 0xb], al
mov ecx, 1
movzx eax, dl
cmovne ecx, eax
neg cl
mov byte [ebp - 0xa], cl
jmp 0x10005b63
mov byte [ebp - 0xb], cl
mov byte [ebp - 0xa], dl
mov eax, dword [ebp - 0x290]
mov edx, 4
push 0xd
mov byte [ebp - 9], al
mov ecx, 0x10077880
lea eax, [ebp - 0x14]
mov byte [ebp - 8], bl
push eax
push str.additional_data_for_AEAD
push 0x758
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
call fcn.100123e0
add esp, 0x14
cmp dword [esi + 0xc], 0xc
jne 0x1000621c
mov eax, dword [esi + 0x10]
cmp eax, 4
jne 0x10005bc0
mov eax, dword [esi + 0x28]
mov dword [ebp - 0x20], eax
mov eax, dword [0x100778ec]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
jmp 0x10005c00
cmp eax, 0xc
jne 0x1000621c
mov eax, dword [esi + 0x30]
lea ecx, [ebp - 0x1c]
movq xmm0, qword [esi + 0x28]
mov edx, 8
mov edi, dword [0x100778e0]
mov dword [ebp - 0x18], eax
mov eax, ecx
movq qword [ebp - 0x20], xmm0
sub edi, eax
nop dword [eax + eax]
mov al, byte [edi + ecx]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
sub edx, 1
jne 0x10005bf0
xor edi, edi
push dword [esi + 0xc]
lea eax, [ebp - 0x20]
mov edx, 4
push eax
push str.IV_used
push 0x775
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
mov ecx, 0x10077880
call fcn.100123e0
mov ecx, dword [ebp - 0x288]
add esp, 0x14
add ecx, ebx
xor eax, eax
cmp byte [ebp - 0x2a0], al
mov edx, 4
mov dword [ebp - 0x28c], ecx
sete al
lea eax, [eax*8 + 8]
push eax
push ecx
push str.TAG_used
push 0x776
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
mov ecx, 0x10077880
call fcn.100123e0
mov al, byte [ebp - 0x281]
xor ecx, ecx
mov edx, dword [esi + 0xc]
add esp, 0x14
mov esi, dword [0x100778c0]
test al, al
sete cl
lea ecx, [ecx*8 + 8]
mov dword [ebp - 0x29c], ecx
mov ecx, dword [esi + 0x90]
cmp dword [ecx + 4], 6
jne 0x10005cdc
mov eax, dword [ebp - 0x288]
push eax
push eax
push dword [ebp - 0x29c]
lea eax, [ebp - 0x14]
push dword [ebp - 0x28c]
push ecx
mov ecx, dword [esi + 0xcc]
push eax
push edx
lea eax, [ebp - 0x20]
mov edx, ebx
push eax
call fcn.10035630
mov esi, eax
add esp, 0x20
mov eax, 0xffff9d00
cmp esi, 0xffffffee
cmove esi, eax
mov eax, ebx
jmp 0x10005d79
cmp dword [ecx + 4], 8
jne 0x10005d21
push dword [ebp - 0x29c]
mov eax, dword [ebp - 0x288]
push dword [ebp - 0x28c]
push eax
push eax
push ecx
mov ecx, dword [esi + 0xcc]
lea eax, [ebp - 0x14]
push eax
push edx
lea eax, [ebp - 0x20]
mov edx, ebx
push eax
call fcn.10033d10
mov esi, eax
add esp, 0x20
mov eax, 0xffff9d00
cmp esi, 0xfffffff1
cmove esi, eax
mov eax, ebx
jmp 0x10005d79
cmp dword [ecx], 0x49
jne 0x10005d6e
cmp edx, dword [ecx + 0x10]
jne 0x10005d67
test al, al
jne 0x10005d67
mov eax, dword [ebp - 0x288]
mov edx, ebx
push eax
push eax
push dword [ebp - 0x28c]
lea eax, [ebp - 0x14]
push ecx
mov ecx, dword [esi + 0xcc]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.100343c0
mov esi, eax
add esp, 0x18
mov eax, 0xffff9d00
cmp esi, 0xffffffaa
cmove esi, eax
mov eax, ebx
jmp 0x10005d79
mov esi, 0xffff9f00
jmp 0x10005d73
mov esi, 0xffff9f80
mov eax, dword [ebp - 0x290]
test esi, esi
je 0x10005e09
mov eax, dword [0x10077880]
test eax, eax
je 0x10005dea
cmp dword [eax + 0x10], 0
je 0x10005dea
cmp dword [0x10075388], 1
jl 0x10005dea
cmp esi, 0xffff9700
je 0x100054a5
mov eax, esi
neg eax
push eax
push esi
push str.mbedtls_cipher_auth_decrypt
push str._s___returned__d___0x_04x__n
lea eax, [ebp - 0x280]
push 0x200
push eax
call fcn.1002f1c0
mov ecx, dword [0x10077880]
lea eax, [ebp - 0x280]
push eax
push 0x782
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push dword [ecx + 0x14]
mov ecx, dword [ecx + 0x10]
call ecx
add esp, 0x2c
cmp esi, 0xffff9d00
je 0x100053f8
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x298], 1
cmp eax, ebx
je 0x10005e26
push str.should_never_happen
push 0x78d
jmp 0x10006232
mov ebx, dword [0x100778fc]
mov edx, 1
mov eax, dword [ebp - 0x298]
test eax, eax
jne 0x100060c4
mov eax, dword [0x100778c0]
sub ebx, dword [eax + 0x14]
mov eax, dword [0x100778e8]
mov dword [0x100778fc], ebx
shr ebx, 8
mov byte [eax], bl
mov eax, dword [0x100778e8]
mov cl, byte [0x100778fc]
mov byte [eax + 1], cl
cmp dword [0x10077894], 0
jle 0x100060ef
mov esi, dword [0x100778fc]
mov ecx, 0x100
lea ebx, [esi + edi]
cmp ecx, ebx
lea eax, [ebx - 0x100]
sbb ecx, ecx
and ecx, eax
mov dword [ebp - 0x290], ecx
mov ecx, dword [0x100778c0]
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
add eax, 0xfffffffd
cmp eax, 4
ja case.0x10005ea9.5
jmp dword [eax*4 + 0x1000625c]
lea eax, [esi + 0x15]
lea esi, [ebx + 0x15]
shr eax, 6
shr esi, 6
jmp 0x10005eca
lea eax, [esi + 0x1d]
lea esi, [ebx + 0x1d]
shr eax, 7
shr esi, 7
sub esi, eax
imul eax, edx, 0xff
and esi, eax
lea eax, [ecx + 0x44]
test eax, eax
je 0x10005f00
mov edx, dword [eax]
test edx, edx
je 0x10005f00
cmp dword [eax + 8], 0
je 0x10005f00
push 8
push dword [0x100778e0]
push dword [eax + 4]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [0x100778c0]
add esp, 0xc
lea eax, [ecx + 0x44]
test eax, eax
je 0x10005f2c
mov edx, dword [eax]
test edx, edx
je 0x10005f2c
cmp dword [eax + 8], 0
je 0x10005f2c
push 3
push dword [0x100778e4]
push dword [eax + 4]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [0x100778c0]
add esp, 0xc
lea eax, [ecx + 0x44]
test eax, eax
je 0x10005f58
mov edx, dword [eax]
test edx, edx
je 0x10005f58
cmp dword [eax + 8], 0
je 0x10005f58
push 2
push dword [0x100778e8]
push dword [eax + 4]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [0x100778c0]
add esp, 0xc
mov edx, dword [0x100778f0]
add ecx, 0x44
je 0x10005f87
mov eax, dword [ecx]
test eax, eax
je 0x10005f87
cmp dword [ecx + 8], 0
je 0x10005f87
push dword [0x100778fc]
mov eax, dword [eax + 0x14]
push edx
push dword [ecx + 4]
call eax
mov edx, dword [0x100778f0]
add esp, 0xc
mov eax, dword [0x100778fc]
xor cl, cl
add eax, edx
test edi, edi
je 0x10005f9e
xor cl, byte [eax]
lea eax, [eax + 1]
sub edi, 1
jne 0x10005f94
mov byte [ebp - 0x281], cl
lea edx, [ebp - 0x80]
mov al, byte [ebp - 0x281]
mov ecx, dword [0x100778c0]
lea ecx, [ecx + 0x44]
call fcn.10014da0
add esi, 1
je 0x10005fe6
mov eax, dword [0x100778c0]
add eax, 0x44
je 0x10005fe1
mov ecx, dword [eax]
test ecx, ecx
je 0x10005fe1
push dword [0x100778f0]
push dword [eax + 4]
mov eax, dword [ecx + 0x2c]
call eax
add esp, 8
sub esi, 1
jne 0x10005fc0
mov esi, dword [0x100778c0]
add esi, 0x44
je 0x1000601e
mov eax, dword [esi]
test eax, eax
je 0x1000601e
mov edi, dword [esi + 8]
test edi, edi
je 0x1000601e
push dword [esi + 4]
mov eax, dword [eax + 0x10]
call eax
add esp, 4
test eax, eax
jne 0x1000601e
mov eax, dword [esi]
push dword [eax + 0xc]
mov eax, dword [eax + 0x14]
push edi
push dword [esi + 4]
call eax
add esp, 0xc
mov eax, dword [0x100778c0]
xor dl, dl
mov ecx, dword [0x100778f0]
add ecx, dword [ebp - 0x290]
mov eax, dword [eax + 0x14]
sub eax, dword [ebp - 0x290]
add eax, ebx
je 0x1000604a
nop
xor dl, byte [ecx]
lea ecx, [ecx + 1]
sub eax, 1
jne 0x10006040
mov byte [ebp - 0x281], dl
xor edi, edi
mov al, byte [ebp - 0x281]
mov eax, dword [0x100778c0]
mov ebx, dword [0x100778fc]
add ebx, dword [0x100778f0]
mov byte [ebp - 0x281], 0
cmp dword [eax + 0x14], edi
jbe 0x100060a4
lea eax, [ebp - 0x80]
sub ebx, eax
mov edx, eax
mov esi, eax
nop
mov al, byte [ebx + edx]
lea edx, [edx + 1]
mov cl, byte [esi]
lea esi, [esi + 1]
xor cl, al
inc edi
or cl, byte [ebp - 0x281]
mov eax, dword [0x100778c0]
mov byte [ebp - 0x281], cl
cmp edi, dword [eax + 0x14]
jb 0x10006080
mov al, byte [ebp - 0x281]
xor ecx, ecx
mov edx, dword [ebp - 0x294]
test al, al
mov eax, dword [ebp - 0x298]
mov ebx, dword [0x100778fc]
cmovne edx, ecx
inc eax
test edx, edx
je 0x100053f8
cmp eax, 1
je 0x100060fe
push str.should_never_happen
push 0x912
jmp 0x10006232
push str.should_never_happen
push 0x8d0
jmp 0x10006232
push str.should_never_happen
push 0x8f3
jmp 0x10006232
test ebx, ebx
jne 0x10006169
cmp dword [0x10077894], 3
jne 0x1000614a
mov eax, dword [0x100778f8]
cmp eax, 0x17
je 0x1000614a
push eax
push str.invalid_zero_length_message_type:__d
push 0x91d
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push 0x10077880
call fcn.10012320
add esp, 0x18
mov eax, 0xffff8e00
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
mov eax, dword [0x10077924]
inc eax
mov dword [0x10077924], eax
cmp eax, 3
jle 0x10006173
push str.received_four_consecutive_empty_messages__possible_DoS_attack
push 0x92b
jmp 0x1000574d
mov dword [0x10077924], 0
mov esi, dword [0x10077880]
test byte [esi + 0xcc], 2
jne 0x100061eb
mov cl, 8
mov eax, dword [esi + 0xcc]
movzx edx, cl
and eax, 2
cmp edx, eax
jbe 0x100061aa
mov eax, dword [0x100778e0]
add byte [edx + eax - 1], 1
mov esi, dword [0x10077880]
jne 0x100061aa
dec cl
jmp 0x10006184
mov eax, dword [esi + 0xcc]
and eax, 2
cmp edx, eax
jne 0x100061eb
push str.incoming_message_counter_would_wrap
push 0x942
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push 0x10077880
call fcn.10012320
mov eax, 0xffff9480
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
push str.__decrypt_buf
push 0x947
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 edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10045387
mov esp, ebp
pop ebp
ret
push str.should_never_happen
push 0x771
jmp 0x10006232
push str.should_never_happen
push 0x705
push str.C:UserspentesterDownloadsxxxxxxxcs4.5externalmbedtls_2.14.1library_ssl_tls.c
push 1
push 0x10077880
call fcn.10012320
mov ecx, dword [ebp - 4]
add esp, 0x14
xor ecx, ebp
mov eax, 0xffff9400
pop edi
pop esi
pop ebx
call fcn.10045387
mov esp, ebp
pop ebp
ret