Function at 0x10041070
Capabilities:
Encrypt data using speck

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x9c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x10041df0
mov esi, ecx
lea eax, [ebp - 0x18]
call 0x10041097
pop edi
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov dword [ebp - 0x74], 0x3d
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], edx
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x5c], 0x3d
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], edx
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0x74]
mov word [ebp - 0x50], 1
call fcn.1003cde0
cmp dword [ebp - 0x40], 0
je 0x100412a6
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x58], ecx
sub eax, edx
add esi, edx
movzx ebx, byte [ebp - 0x4f]
push eax
push esi
call fcn.10052840
add esp, 8
test bl, bl
jne 0x100416e4
mov esi, dword [ebp - 0x70]
mov dword [ebp - 0x7c], edx
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0x74]
mov edi, eax
call fcn.1003cde0
cmp dword [ebp - 0x40], 0
je 0x100412d8
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x38]
add esi, edx
sub eax, edx
mov dword [ebp - 0x58], ecx
push eax
push esi
call fcn.10052840
add esp, 8
test edx, edx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x78], edi
je 0x10041304
setns al
js 0x10041702
movzx edi, al
push edi
push edx
mov ebx, edx
call fcn.100985b0
add esp, 8
test eax, eax
je 0x10041709
mov esi, eax
mov edi, eax
push ebx
push dword [ebp - 0x4c]
push esi
call fcn.10193640
add esp, 0xc
cmp ebx, 8
mov ebx, esi
mov ecx, esi
jb 0x10041312
mov edx, dword [ebp - 0x20]
xor eax, eax
cmp edx, 0x20
jb 0x10041247
movdqa xmm0, xmmword [0x101b1040]
movdqa xmm1, xmmword [0x101b1050]
movdqa xmm2, xmmword [0x101b1060]
mov eax, edx
lea ecx, [esi + 0x10]
and eax, 0xffffffe0
mov edx, eax
nop word cs:[eax + eax]
nop dword [eax + eax]
movdqu xmm4, xmmword [ecx - 0x10]
movdqu xmm3, xmmword [ecx]
movdqa xmm5, xmm4
movdqa xmm6, xmm3
paddb xmm5, xmm0
paddb xmm6, xmm0
movdqa xmm7, xmm5
pminub xmm7, xmm1
pcmpeqb xmm7, xmm5
movdqa xmm5, xmm6
pminub xmm5, xmm1
pand xmm7, xmm2
pcmpeqb xmm5, xmm6
por xmm7, xmm4
pand xmm5, xmm2
movdqu xmmword [ecx - 0x10], xmm7
por xmm5, xmm3
movdqu xmmword [ecx], xmm5
add ecx, 0x20
add edx, 0xffffffe0
jne 0x100411e0
cmp dword [ebp - 0x20], eax
je 0x1004133a
mov edx, dword [ebp - 0x20]
test dl, 0x18
je 0x1004130e
movdqa xmm0, xmmword [0x101b1070]
movdqa xmm1, xmmword [0x101b1080]
movdqa xmm2, xmmword [0x101b1090]
and edx, 0xfffffff8
lea edi, [esi + eax]
lea ecx, [esi + edx]
sub eax, edx
nop word [eax + eax]
movq xmm3, qword [edi]
movdqa xmm4, xmm3
paddb xmm4, xmm0
movdqa xmm5, xmm4
pmaxub xmm5, xmm1
pcmpeqb xmm5, xmm4
pandn xmm5, xmm2
por xmm5, xmm3
movq qword [edi], xmm5
add edi, 8
add eax, 8
jne 0x10041270
cmp dword [ebp - 0x20], edx
jne 0x10041312
jmp 0x1004133a
cmp byte [ebp - 0x4f], 0
jne 0x100416e4
cmp byte [ebp - 0x50], 0
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
jne 0x100412c4
cmp ecx, eax
je 0x100416e4
sub ecx, eax
add eax, dword [ebp - 0x70]
push ecx
push eax
call fcn.10052840
add esp, 8
jmp 0x100416e4
cmp byte [ebp - 0x4f], 0
jne 0x100416e4
mov byte [ebp - 0x4f], 1
cmp byte [ebp - 0x50], 0
mov esi, dword [ebp - 0x58]
mov eax, dword [ebp - 0x54]
jne 0x100412fa
cmp eax, esi
je 0x100416e4
sub eax, esi
add esi, dword [ebp - 0x70]
jmp 0x10041148
mov ebx, 1
jmp 0x10041438
add eax, esi
mov ecx, eax
add esi, dword [ebp - 0x20]
nop word cs:[eax + eax]
nop
movzx eax, byte [ecx]
mov edx, eax
add dl, 0xbf
cmp dl, 0x1a
setb dl
shl dl, 5
or dl, al
mov byte [ecx], dl
inc ecx
cmp ecx, esi
jne 0x10041320
mov edx, dword [ebp - 0x20]
cmp edx, 1
jbe 0x10041438
movzx eax, byte [ebx]
mov edi, 2
mov dword [ebp - 0x24], ebx
cmp al, 0x24
je 0x1004163d
movzx ecx, word [ebx]
cmp ecx, 0x2476
je 0x1004163a
movzx ecx, word [ebx]
cmp ecx, 0x2473
je 0x1004163a
mov esi, dword [ebp - 0x20]
movzx ecx, byte [esi + ebx - 1]
cmp cl, 0x40
je 0x100413fa
movzx edx, word [esi + ebx - 2]
cmp edx, 0x7340
je 0x100413fa
movzx edx, word [ebx + esi - 2]
cmp edx, 0x7640
je 0x1004163a
mov edx, dword [ebp - 0x20]
cmp cl, 0x29
jne 0x100413d4
mov ecx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x10], 0
call fcn.10039860
mov edx, dword [ebp - 0x20]
test al, al
mov edi, 2
jne 0x1004163d
mov ebx, dword [ebp - 0x24]
movzx eax, byte [ebx]
movzx eax, al
add eax, 0xffffffde
cmp eax, 0x1e
ja 0x1004140b
mov ecx, dword [ebp - 0x28]
mov edi, 1
add ecx, dword [eax*4 + 0x10041768]
jmp ecx
mov edx, esi
jmp 0x1004163d
mov ecx, dword [ebp - 0x24]
xor edi, edi
movzx eax, word [ecx]
cmp eax, 0x7830
je 0x1004163d
cmp edx, 3
jae 0x100415ba
movzx eax, word [ecx]
cmp eax, 0x6230
je 0x1004163d
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x10], 0
push edx
mov dword [ebp - 0x24], ebx
push ebx
lea eax, [ebp - 0x40]
push eax
call fcn.10184ee0
add esp, 0xc
cmp byte [ebp - 0x40], 0
mov ebx, dword [ebp + 0x10]
mov edi, 0
je 0x10041593
mov eax, dword [ebp + 8]
cmp dword [eax + 0xc], 0
je 0x100415b2
mov esi, dword [ebp + 8]
lea eax, [esi + 0x10]
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push eax
call fcn.10092420
add esp, 0xc
mov edx, eax
mov ecx, dword [esi]
shr eax, 0x19
mov edi, dword [esi + 4]
mov dword [ebp - 0x48], 0
movd xmm0, eax
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
lea eax, [ecx - 0x18]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x34], edi
movdqu xmmword [ebp - 0x98], xmm0
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x44]
and edx, edi
movdqu xmm0, xmmword [ebp - 0x98]
mov ecx, dword [ebp - 0x20]
movdqu xmm1, xmmword [eax + edx]
pcmpeqb xmm0, xmm1
movdqu xmmword [ebp - 0xa8], xmm1
pmovmskb ebx, xmm0
test ebx, ebx
jne 0x1004152a
movdqu xmm1, xmmword [ebp - 0xa8]
pcmpeqd xmm0, xmm0
pcmpeqb xmm1, xmm0
pmovmskb eax, xmm1
test eax, eax
jne 0x100415b2
mov eax, dword [ebp - 0x48]
lea edx, [edx + eax + 0x10]
add eax, 0x10
mov dword [ebp - 0x48], eax
jmp 0x100414c1
lea eax, [ebx - 1]
and ax, bx
mov ebx, eax
je 0x100414ea
tzcnt eax, ebx
add eax, edx
and eax, edi
neg eax
lea esi, [eax + eax*2]
mov eax, dword [ebp - 0x28]
cmp dword [eax + esi*8 + 8], ecx
jne 0x10041520
mov eax, dword [ebp - 0x28]
lea eax, [eax + esi*8]
push ecx
push dword [eax]
push dword [ebp - 0x24]
mov edi, edx
call fcn.10193bb4
mov edx, edi
mov edi, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x20]
add esp, 0xc
test eax, eax
jne 0x10041520
mov ecx, dword [ebp - 0x44]
mov ebx, dword [ebp + 0x10]
mov eax, dword [ecx + esi*8 - 0xc]
imul ecx, dword [ecx + esi*8 - 4], 0x38
add eax, 0xffffffc8
nop word cs:[eax + eax]
nop
test ecx, ecx
je 0x100415b2
add ecx, 0xffffffc8
cmp dword [eax + 0x54], ebx
lea edx, [eax + 0x38]
mov eax, edx
jne 0x10041580
mov edi, dword [edx]
mov edx, dword [ebp - 0x20]
test edx, edx
jne 0x1004163d
mov esi, 1
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x28], 0
jmp 0x10041674
mov eax, dword [ebp - 0x20]
jmp 0x100416d2
movzx eax, word [ecx]
movzx ecx, byte [ecx + 2]
xor eax, 0x302d
xor ecx, 0x78
or cx, ax
je 0x1004163a
mov ecx, dword [ebp - 0x24]
movzx eax, word [ecx]
movzx ecx, byte [ecx + 2]
xor eax, 0x302b
xor ecx, 0x78
or cx, ax
je 0x100416f8
mov eax, dword [ebp - 0x24]
movzx eax, word [eax]
cmp eax, 0x6230
je 0x100416f8
mov ecx, dword [ebp - 0x24]
movzx eax, word [ecx]
movzx ecx, byte [ecx + 2]
xor eax, 0x302d
xor ecx, 0x62
or cx, ax
je 0x100416f8
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
mov edi, 0
movzx eax, word [ecx]
movzx ecx, byte [ecx + 2]
xor eax, 0x302b
xor ecx, 0x62
or cx, ax
jne 0x10041435
jmp 0x1004163d
mov edx, dword [ebp - 0x20]
xor ebx, ebx
test edx, edx
mov dword [ebp - 0x34], edi
setns al
js 0x10041715
mov bl, al
push ebx
push edx
mov edi, edx
call fcn.100985b0
add esp, 8
test eax, eax
mov dword [ebp - 0x10], 0
je 0x1004172c
mov ebx, dword [ebp + 0x10]
mov esi, eax
mov dword [ebp - 0x28], edi
mov edx, edi
push edx
push dword [ebp - 0x4c]
push esi
mov edi, edx
call fcn.10193640
add esp, 0xc
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x88], esi
lea esi, [ebp - 0x40]
mov dword [ebp - 0x84], edi
mov dword [ebp - 0x80], edi
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x88]
push esi
push dword [ebp - 0x34]
push eax
push dword [ebp - 0x7c]
push dword [ebp - 0x78]
push ebx
call fcn.10040eb0
add esp, 0x18
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x100416e4
push 1
push eax
push dword [ebp - 0x24]
call fcn.100985c0
add esp, 0xc
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x9c
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [ebp - 0x20]
xor edi, edi
jmp 0x1004163d
call fcn.10176df0
ud2
push ebx
push edi
call fcn.101aefe0
add esp, 8
ud2
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x2c], eax
call fcn.10176df0
jmp 0x1004173f
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], eax
push edi
push ebx
call fcn.101aefe0
add esp, 8
ud2