Function at 0x67089d00
Capabilities:
Encrypt data using speck

Disassembly:
sub esp, 0x10
cmp dword [esp + 0x18], 0
je 0x67089f40
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.670903d0
mov ecx, dword [esp + 0x18]
add esp, 0xc
cmp ecx, 0x1e
jne 0x67089d65
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 0x67089f38
jmp 0x67089d77
cmp ecx, 0x1c
je 0x67089d3d
cmp ecx, 0x1f
je 0x67089d3d
xor al, al
jmp 0x67089d3f
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.670903d0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
lea ecx, [eax + eax*4]
movzx eax, byte [edx + ecx*2 + 0x671c4020]
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 0x67089e48
movzx ecx, word [ebx + esi*2]
mov eax, ecx
and eax, 0xfc00
mov edx, 0xd800
cmp ax, dx
jne 0x67089e00
mov edx, dword [esp + 0x24]
dec edx
cmp esi, edx
jae 0x67089e00
mov dx, word [ebx + esi*2 + 2]
mov ebx, 0xfc00
and dx, bx
mov ebx, 0xdc00
cmp dx, bx
je 0x67089f29
mov edx, 0xdc00
cmp ax, dx
jne 0x67089e63
mov eax, dword [esp + 0x20]
movzx eax, word [eax + esi*2 - 2]
mov edx, eax
and edx, 0xfc00
cmp edx, 0xd800
jne 0x67089e63
lea edx, [esp + 0x10]
push edx
lea edx, [esp + 0x18]
push edx
shl eax, 0xa
lea edx, [eax + ecx - 0x35fdc00]
push edx
call fcn.670903d0
mov edx, dword [esp + 0x1c]
add esp, 0xc
and byte [esi + edi], 0xf7
cmp edx, 0x1c
jl 0x67089e51
or byte [esi + edi], 4
mov ecx, dword [esp + 0xc]
xor eax, eax
cmp ecx, 0x1e
jl 0x67089e6e
mov eax, 3
jmp 0x67089e7d
mov edx, 0xb
mov dword [esp + 0x10], edx
jmp 0x67089e51
cmp ecx, 0x1d
jne 0x67089e7d
lea eax, [edx - 0x1e]
neg eax
sbb eax, eax
and eax, 3
cmp edx, 0x1c
je 0x67089f12
cmp edx, 0x1d
jge case.default.0x67089eba
mov ebx, edx
cmp edx, 0x1a
jl 0x67089e9b
mov ebx, 0xb
cmp ecx, 0x1a
jl 0x67089ea9
mov ecx, 0xb
mov dword [esp + 0xc], ecx
imul ecx, ecx, 0x1a
movzx ecx, byte [ecx + ebx + 0x671c3d70]
dec ecx
cmp ecx, 3
ja case.default.0x67089eba
jmp dword [ecx*4 + 0x67089f44]
mov ebx, dword [esp + 0x20]
mov ecx, 0xad
mov eax, 2
cmp word [ebx + esi*2 - 2], cx
jne case.default.0x67089eba
mov eax, 1
jmp case.default.0x67089eba
xor eax, eax
cmp ebp, 0x1c
setne al
dec eax
and eax, 2
jmp case.default.0x67089eba
xor eax, eax
cmp ebp, 0x1c
jne 0x67089f12
cmp esi, 1
jbe case.default.0x67089eba
mov cl, byte [esi + edi - 2]
and cl, 0xfe
or cl, 2
mov byte [esi + edi - 2], cl
jmp case.default.0x67089eba
xor eax, eax
cmp ebp, 0x1c
jne 0x67089f12
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 0x67089d73
mov eax, dword [esp + 0x24]
or byte [eax + edi - 1], 3
pop esi
pop ebp
pop ebx
add esp, 0x10
ret