Function at 0x6708c3a0
Capabilities:
Encrypt data using speck

Disassembly:
sub esp, 0x10
cmp dword [esp + 0x18], 0
je 0x6708c5e0
push ebx
mov ebx, dword [esp + 0x18]
movzx edx, word [ebx]
push ebp
push esi
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edx
call fcn.67092780
mov ecx, dword [esp + 0x18]
add esp, 0xc
cmp ecx, 0x1e
jne 0x6708c405
mov ecx, 0x1f
mov dword [esp + 0xc], ecx
mov al, 1
mov dl, byte [edi]
and al, 1
or al, 2
add al, al
add al, al
and dl, 0xfb
or al, dl
mov byte [edi], al
mov eax, dword [esp + 0x24]
mov esi, 1
mov ebp, ecx
cmp eax, esi
jbe 0x6708c5d8
jmp 0x6708c417
cmp ecx, 0x1c
je 0x6708c3dd
cmp ecx, 0x1f
je 0x6708c3dd
xor al, al
jmp 0x6708c3df
mov ebx, dword [esp + 0x20]
movzx eax, byte [esi + edi]
and al, 0xfb
or al, 8
lea ecx, [esp + 0x10]
mov byte [esi + edi], al
movzx eax, word [ebx + esi*2]
push ecx
lea edx, [esp + 0x18]
push edx
push eax
call fcn.67092780
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
lea ecx, [eax + eax*4]
movzx eax, byte [edx + ecx*2 + 0x671d2558]
mov edx, dword [esp + 0x1c]
add al, al
add al, al
add al, al
xor al, byte [esi + edi]
add esp, 0xc
and al, 8
xor byte [esi + edi], al
cmp edx, 0x1b
jne 0x6708c4e8
movzx ecx, word [ebx + esi*2]
mov eax, ecx
and eax, 0xfc00
mov edx, 0xd800
cmp ax, dx
jne 0x6708c4a0
mov edx, dword [esp + 0x24]
dec edx
cmp esi, edx
jae 0x6708c4a0
mov dx, word [ebx + esi*2 + 2]
mov ebx, 0xfc00
and dx, bx
mov ebx, 0xdc00
cmp dx, bx
je 0x6708c5c9
mov edx, 0xdc00
cmp ax, dx
jne 0x6708c503
mov eax, dword [esp + 0x20]
movzx eax, word [eax + esi*2 - 2]
mov edx, eax
and edx, 0xfc00
cmp edx, 0xd800
jne 0x6708c503
lea edx, [esp + 0x10]
push edx
lea edx, [esp + 0x18]
push edx
shl eax, 0xa
lea edx, [eax + ecx - 0x35fdc00]
push edx
call fcn.67092780
mov edx, dword [esp + 0x1c]
add esp, 0xc
and byte [esi + edi], 0xf7
cmp edx, 0x1c
jl 0x6708c4f1
or byte [esi + edi], 4
mov ecx, dword [esp + 0xc]
xor eax, eax
cmp ecx, 0x1e
jl 0x6708c50e
mov eax, 3
jmp 0x6708c51d
mov edx, 0xb
mov dword [esp + 0x10], edx
jmp 0x6708c4f1
cmp ecx, 0x1d
jne 0x6708c51d
lea eax, [edx - 0x1e]
neg eax
sbb eax, eax
and eax, 3
cmp edx, 0x1c
je 0x6708c5b2
cmp edx, 0x1d
jge case.default.0x6708c55a
mov ebx, edx
cmp edx, 0x1a
jl 0x6708c53b
mov ebx, 0xb
cmp ecx, 0x1a
jl 0x6708c549
mov ecx, 0xb
mov dword [esp + 0xc], ecx
imul ecx, ecx, 0x1a
movzx ecx, byte [ecx + ebx + 0x671d22a8]
dec ecx
cmp ecx, 3
ja case.default.0x6708c55a
jmp dword [ecx*4 + 0x6708c5e4]
mov ebx, dword [esp + 0x20]
mov ecx, 0xad
mov eax, 2
cmp word [ebx + esi*2 - 2], cx
jne case.default.0x6708c55a
mov eax, 1
jmp case.default.0x6708c55a
xor eax, eax
cmp ebp, 0x1c
setne al
dec eax
and eax, 2
jmp case.default.0x6708c55a
xor eax, eax
cmp ebp, 0x1c
jne 0x6708c5b2
cmp esi, 1
jbe case.default.0x6708c55a
mov cl, byte [esi + edi - 2]
and cl, 0xfe
or cl, 2
mov byte [esi + edi - 2], cl
jmp case.default.0x6708c55a
xor eax, eax
cmp ebp, 0x1c
jne 0x6708c5b2
mov dword [esp + 0xc], edx
mov cl, byte [esi + edi - 1]
xor cl, al
mov ebp, edx
mov edx, dword [esp + 0x14]
and cl, 3
xor byte [esi + edi - 1], cl
mov dword [esp + 0x18], edx
inc esi
cmp esi, dword [esp + 0x24]
jb 0x6708c413
mov eax, dword [esp + 0x24]
or byte [eax + edi - 1], 3
pop esi
pop ebp
pop ebx
add esp, 0x10
ret