Function at 0x45f580
Capabilities:
Encrypt data using speck

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
xor ebx, ebx
cmp dword [ecx + 0x28], 0
je 0x45f69e
mov esi, ecx
mov eax, edx
mov ecx, dword [ecx]
mov edx, dword [esi + 4]
push dword [ebp + 8]
mov dword [ebp - 0x20], eax
push eax
push dword [esi + 0xc]
push dword [esi + 8]
call fcn.00462b80
add esp, 0x10
mov edx, dword [esi + 0x20]
mov ecx, dword [esi + 0x14]
pcmpeqd xmm1, xmm1
mov edi, edx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], edx
and edi, eax
shr eax, 0x19
movd xmm0, eax
mov eax, dword [esi + 0x18]
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x1c]
movdqa xmm3, xmm0
movdqu xmm2, xmmword [eax + edi]
mov dword [ebp - 0x18], eax
pcmpeqb xmm3, xmm2
pmovmskb esi, xmm3
test si, si
jne 0x45f62e
nop
pcmpeqb xmm2, xmm1
pmovmskb ecx, xmm2
test ecx, ecx
jne 0x45f69c
lea edi, [ebx + edi + 0x10]
movdqa xmm3, xmm0
add ebx, 0x10
and edi, edx
movdqu xmm2, xmmword [eax + edi]
pcmpeqb xmm3, xmm2
pmovmskb esi, xmm3
test esi, esi
je 0x45f600
tzcnt ecx, esi
add ecx, edi
and ecx, edx
mov edx, eax
shl ecx, 2
sub edx, ecx
mov ecx, dword [edx - 4]
cmp dword [ebp - 0x10], ecx
jbe 0x45f7e9
mov eax, dword [ebp - 0x14]
lea edx, [esi - 1]
imul ecx, ecx, 0x38
and edx, esi
mov esi, dword [eax + ecx + 0x2c]
mov eax, dword [eax + ecx + 0x28]
xor esi, dword [ebp + 8]
xor eax, dword [ebp - 0x20]
or eax, esi
mov esi, edx
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
jne 0x45f5f9
mov edi, dword [ebp - 0x14]
cmp byte [edi + ecx + 0x22], 0
je 0x45f69c
cmp dword [ebp + 0xc], 0
je 0x45f7e2
add edi, ecx
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x45f69c
mov ecx, dword [edi + 0x18]
lea eax, [eax + eax*2]
mov dword [ebp - 0x14], edi
lea eax, [ecx + eax*4]
mov dword [ebp - 0x18], eax
jmp 0x45f6b2
xor ebx, ebx
mov eax, ebx
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [ebp - 0x1c]
xor ebx, ebx
cmp ecx, dword [ebp - 0x18]
je 0x45f69e
mov edx, dword [ecx + 8]
mov eax, dword [ecx + 4]
add ecx, 0xc
mov dword [ebp - 0x1c], ecx
shl edx, 4
add edx, eax
mov dword [ebp - 0x20], edx
jmp 0x45f6db
mov eax, dword [ebp - 0x10]
test bl, bl
jne 0x45f7e2
cmp eax, dword [ebp - 0x20]
je 0x45f6a8
mov edx, dword [eax + 4]
mov esi, dword [eax + 8]
cmp byte [edi + 0x20], 0
lea ebx, [eax + 0x10]
je 0x45f7c0
mov dword [ebp - 0x10], ebx
lea ecx, [ebp - 0x2c]
push esi
call fcn.004b1110
add esp, 4
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x24]
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x38]
push dword [ebp + 0x10]
call fcn.004b1110
add esp, 4
xor ebx, ebx
cmp edi, dword [ebp - 0x30]
jne 0x45f768
test edi, edi
je 0x45f763
mov eax, dword [ebp - 0x34]
xor ebx, ebx
nop dword [eax]
movzx ecx, byte [esi + ebx]
movzx edx, byte [eax + ebx]
mov ch, cl
mov dh, dl
add ch, 0xbf
cmp ch, 0x1a
setb ch
add dh, 0xbf
shl ch, 5
cmp dh, 0x1a
setb dh
or ch, cl
shl dh, 5
or dh, dl
cmp ch, dh
jne 0x45f763
inc ebx
cmp edi, ebx
jne 0x45f730
mov ebx, edi
cmp ebx, edi
setae bl
mov eax, dword [ebp - 0x38]
cmp eax, 0x80000000
je 0x45f786
test eax, eax
je 0x45f786
push dword [ebp - 0x34]
push 0
push dword [0x5920d8]
call sub.KERNEL32.dll_HeapFree
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x14]
cmp eax, 0x80000000
je 0x45f6d0
test eax, eax
je 0x45f6d0
push dword [ebp - 0x28]
push 0
push dword [0x5920d8]
call sub.KERNEL32.dll_HeapFree
jmp 0x45f6d0
cmp esi, dword [ebp + 0x10]
mov eax, ebx
jne 0x45f6db
push esi
push dword [ebp + 0xc]
push edx
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
mov eax, ebx
jne 0x45f6db
mov bl, 1
jmp 0x45f69e
mov edx, dword [ebp - 0x10]
push 0x581154
call fcn.004699c0
nop word cs:[eax + eax]