Function at 0x10066790
Capabilities:
Encrypt data using speck

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xa0
mov eax, dword [ecx]
mov ebx, dword [ecx + 4]
mov esi, dword [ecx + 8]
mov edi, dword [ecx + 0xc]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov edx, eax
mov ecx, edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], esi
xor eax, 0x6e657261
xor edi, 0x74656462
xor edx, 0x70736575
xor ecx, 0x646f7261
mov dword [esp + 0x30], edx
mov edx, ebx
xor ebx, 0x6c796765
xor edx, 0x736f6d65
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x14]
mov edx, esi
xor esi, 0x79746573
xor edx, 0x6e646f6d
mov dword [esp + 0x40], edx
lea edx, [esp + 0x20]
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
call fcn.10062430
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x4c]
mov edi, dword [esp + 0x50]
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x34]
shl edx, 0x18
xor esi, edi
mov dword [esp + 0x18], edi
mov edi, eax
or edx, dword [esp + 0x54]
mov dword [esp + 0x1c], edx
xor ecx, edx
mov edx, dword [esp + 0x30]
add edx, eax
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x44]
adc ebx, edx
shld edi, edx, 0xd
shld edx, eax, 0xd
mov eax, dword [esp + 0x38]
mov dword [esp + 8], ebx
xor edx, ebx
mov ebx, dword [esp + 0xc]
xor edi, ebx
add eax, esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
adc eax, ecx
mov dword [esp + 0x70], eax
mov eax, esi
shrd esi, ecx, 0x10
shld eax, ecx, 0x10
xor esi, dword [esp + 0x70]
xor eax, dword [esp + 4]
add dword [esp + 8], eax
mov ecx, eax
adc ebx, esi
shld ecx, esi, 0x15
shrd eax, esi, 0xb
mov esi, edi
xor eax, ebx
xor ecx, dword [esp + 8]
add dword [esp + 4], edi
adc dword [esp + 0x70], edx
shld esi, edx, 0x11
shrd edi, edx, 0xf
mov edx, ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x18], 0x10
xor esi, dword [esp + 4]
xor edx, dword [esp + 0x1c]
xor dword [esp + 8], ebx
mov ebx, dword [esp + 0x70]
xor edi, ebx
xor ebx, 0xff
add dword [esp + 8], esi
adc edx, edi
mov dword [esp + 0xc], edx
mov edx, esi
shrd esi, edi, 0x13
shld edx, edi, 0xd
xor esi, dword [esp + 0xc]
mov edi, ecx
xor edx, dword [esp + 8]
add ebx, ecx
adc dword [esp + 4], eax
shld edi, eax, 0x10
shrd ecx, eax, 0x10
xor edi, ebx
xor ecx, dword [esp + 4]
add dword [esp + 0xc], edi
mov eax, edi
adc dword [esp + 8], ecx
shld eax, ecx, 0x15
shrd edi, ecx, 0xb
mov ecx, edx
xor edi, dword [esp + 8]
xor eax, dword [esp + 0xc]
add ebx, edx
adc dword [esp + 4], esi
shld ecx, esi, 0x11
shrd edx, esi, 0xf
xor ecx, ebx
xor edx, dword [esp + 4]
add dword [esp + 0xc], ecx
mov esi, ecx
adc dword [esp + 8], edx
shld esi, edx, 0xd
shrd ecx, edx, 0x13
mov edx, eax
xor ecx, dword [esp + 8]
xor esi, dword [esp + 0xc]
add dword [esp + 4], eax
adc ebx, edi
shld edx, edi, 0x10
shrd eax, edi, 0x10
xor edx, dword [esp + 4]
xor eax, ebx
add dword [esp + 8], edx
mov edi, edx
adc dword [esp + 0xc], eax
shld edi, eax, 0x15
shrd edx, eax, 0xb
mov eax, esi
xor edx, dword [esp + 0xc]
xor edi, dword [esp + 8]
add dword [esp + 4], esi
adc ebx, ecx
shld eax, ecx, 0x11
shrd esi, ecx, 0xf
xor eax, dword [esp + 4]
xor esi, ebx
add dword [esp + 8], eax
mov ecx, eax
adc dword [esp + 0xc], esi
shld ecx, esi, 0xd
shrd eax, esi, 0x13
mov esi, edi
xor ecx, dword [esp + 8]
xor eax, dword [esp + 0xc]
add ebx, edi
adc dword [esp + 4], edx
shld esi, edx, 0x10
shrd edi, edx, 0x10
mov edx, dword [esp + 4]
xor esi, ebx
xor edi, edx
shld esi, edi, 0x15
add ebx, ecx
adc edx, eax
shrd eax, ecx, 0xf
mov ecx, dword [esp + 0x10]
xor eax, esi
xor eax, edx
xor eax, ebx
mov edx, dword [ecx + 0x10]
mov esi, dword [ecx + 0x14]
mov ecx, edx
mov dword [esp + 4], esi
and ecx, eax
shr eax, 0x19
movd xmm0, eax
movdqu xmm1, xmmword [esi + ecx]
lea edi, [ecx + 0x10]
mov dword [esp + 8], ecx
punpcklbw xmm0, xmm0
and edi, edx
pshuflw xmm0, xmm0, 0xe0
mov dword [esp + 0xc], edi
pshufd xmm0, xmm0, 0
movdqa xmmword [esp + 0x80], xmm0
pcmpeqb xmm0, xmm1
movdqa xmmword [esp + 0x70], xmm1
pcmpeqd xmm1, xmm1
pmovmskb edi, xmm0
test di, di
je 0x10066b30
mov ecx, dword [esp + 8]
mov eax, edi
mov dword [esp + 8], ecx
mov esi, edx
lea edi, [eax - 1]
and edi, eax
bsf ax, ax
movzx eax, ax
add eax, ecx
mov ecx, dword [esp + 0x14]
and eax, edx
neg eax
lea ebx, [eax + eax*2]
mov eax, dword [esp + 4]
lea edx, [eax + ebx*8 - 0x18]
mov dword [esp + 0x1c], edx
call fcn.100354f0
mov edx, esi
mov esi, dword [esp + 4]
pcmpeqd xmm1, xmm1
test al, al
je 0x10066a65
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0xc]
cmp eax, dword [esi + ebx*8 - 0xc]
jne 0x10066a65
mov dword [esp + 0x64], edi
mov edi, dword [esp + 0x14]
mov dword [esp + 0x68], edx
mov edx, esi
mov edx, dword [esi + ebx*8 - 0x10]
xor esi, esi
mov dword [esp + 0x6c], ebx
mov edi, dword [edi + 8]
nop
cmp eax, esi
je 0x10066bbc
movzx ecx, byte [edi + esi]
mov bh, byte [edx + esi]
inc esi
mov bl, cl
add bl, 0xbf
cmp bl, 0x1a
setb ch
shl ch, 5
or ch, cl
mov cl, bh
add cl, 0xbf
cmp cl, 0x1a
setb cl
shl cl, 5
or cl, bh
cmp ch, cl
je 0x10066ae0
mov edx, dword [esp + 0x68]
mov edi, dword [esp + 0x64]
jmp 0x10066a65
movdqa xmm0, xmmword [esp + 0x70]
mov ecx, dword [esp + 0xc]
pcmpeqb xmm0, xmm1
pmovmskb eax, xmm0
test ax, ax
jne 0x10066b86
mov eax, dword [esp + 0x18]
movdqa xmm0, xmmword [esp + 0x80]
lea esi, [ecx + eax + 0x10]
add eax, 0x10
and esi, edx
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], esi
mov esi, dword [esp + 4]
movdqu xmm2, xmmword [esi + ecx]
pcmpeqb xmm0, xmm2
movdqa xmmword [esp + 0x70], xmm2
pmovmskb edi, xmm0
test di, di
je 0x10066b30
jmp 0x10066a72
mov esi, dword [esp + 0x10]
mov byte [esp + 0x20], 3
add esi, 0x40
lea ecx, [esp + 0x20]
mov edx, esi
push dword [esp + 0x14]
call fcn.10062940
add esp, 4
cmp dword [esp + 0x28], 0
je 0x10066bb4
lea ecx, [esp + 0x20]
call fcn.100621b0
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x6c]
mov esi, dword [esp + 0x10]
pcmpeqd xmm1, xmm1
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x14]
mov edx, eax
sub edx, ecx
sar edx, 3
imul edi, edx, 0xaaaaaaab
lea edx, [edi - 0x10]
movdqu xmm2, xmmword [eax + edi]
mov dword [esp + 4], edi
mov di, 0x10
and edx, dword [esi + 0x10]
mov si, 0x10
pcmpeqb xmm2, xmm1
movdqu xmm0, xmmword [eax + edx]
pmovmskb ebx, xmm2
pcmpeqb xmm0, xmm1
pmovmskb ecx, xmm0
test cx, cx
je 0x10066c17
bsr si, cx
xor esi, 0xf
test bx, bx
je 0x10066c20
bsf di, bx
movzx edi, di
mov cl, 0x80
add edi, esi
mov esi, dword [esp + 0x10]
cmp di, 0xf
ja 0x10066c36
inc dword [esi + 0x18]
mov cl, 0xff
mov edi, dword [esp + 4]
mov byte [eax + edi], cl
mov byte [edx + eax + 0x10], cl
dec dword [esi + 0x1c]
mov eax, dword [esp + 0x1c]
movsd xmm0, qword [eax]
movq xmm1, qword [eax + 8]
movsd qword [esp + 0x20], xmm0
movq xmm0, qword [eax + 0x10]
mov al, byte [esp + 0x20]
movq qword [esp + 0x28], xmm1
cmp al, 3
movq qword [esp + 0x30], xmm0
je 0x10066b8f
cmp al, 2
jb 0x10066ca0
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0xc]
lea ecx, [esi + 8]
push dword [esi + 4]
push dword [esi]
push ecx
call dword [eax + 4]
add esp, 0xc
call sub.KERNEL32.dll_GetProcessHeap
push esi
mov esi, dword [esp + 0x14]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x30]
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push ecx
call dword [eax + 4]
add esp, 0xc
jmp 0x10066b8f