Function at 0x4080c8
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa
Encrypt data using speck

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x160
mov edi, dword [esp + 0x174]
mov eax, dword [0x7c3824]
xor eax, esp
mov dword [esp + 0x15c], eax
call fcn.005fe94b
mov ebx, eax
call fcn.005fe94b
mov esi, eax
mov ecx, 0x4ec4ec4f
imul ecx
mov eax, edx
shr eax, 0x1f
sar edx, 3
add edx, eax
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
add eax, edx
sub esi, eax
xorpd xmm0, xmm0
movsd xmm4, qword [0x6122a8]
movsd xmm5, qword [0x6122b0]
movsd xmm6, qword [0x6120f8]
movsd xmm7, qword [0x6122b8]
xorpd xmm3, xmm3
movapd xmm1, xmm3
mulsd xmm1, qword [0x612290]
mulsd xmm1, xmm3
movapd xmm2, xmm3
mulsd xmm2, xmm3
subsd xmm1, xmm2
movapd xmm2, xmm3
mulsd xmm2, qword [0x612298]
mulsd xmm2, xmm3
addsd xmm2, qword [0x6122a0]
divsd xmm1, xmm2
addsd xmm1, xmm0
movapd xmm2, xmm3
mulsd xmm2, xmm4
addsd xmm2, xmm1
movapd xmm0, xmm5
cmpltsd xmm0, xmm1
andpd xmm2, xmm0
andnpd xmm0, xmm1
orpd xmm0, xmm2
addsd xmm3, xmm6
ucomisd xmm7, xmm3
ja 0x408138
mov ecx, 0x4ec4ec4f
mov eax, ebx
imul ecx
mov eax, edx
shr eax, 0x1f
sar edx, 3
add edx, eax
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
add eax, edx
sub ebx, eax
lea eax, [esi + ebx]
xorpd xmm1, xmm1
ucomisd xmm1, xmm0
jbe 0x408223
sub bh, byte [ecx]
inc eax
jnp 0x40823a
je 0x408240
je 0x408208
insd dword es:[edi], dx
jne 0x408207
sub ebx, dword [esi + 0x77]
inc ebp
sub eax, 0x48363f49
xor eax, 0x67772443
jb 0x408236
push 0x11f30f78
sbb ah, dh
push ss
cli
sbb dh, ch
psubw mm2, qword [ebx]
or eax, 0xdf110ed
int1
adc ebp, esp
or al, 0xf3
push cs
cli
adc al, 0xfa
or eax, 0x18f50ff3
stc
cmc
sbb cl, bh
pmuludq mm2, qword [eax]
cmc
adc edi, edx
adc dh, dh
pxor mm2, qword [edx]
not byte [eax]
adc eax, esi
sbb edx, esi
or al, 0xf2
jmp 0x408681
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], ebx
lea ecx, [0x4081e8]
movdqa xmm1, xmmword [0x612110]
movq mm1, qword [0x612110]
and dword [ecx], esp
xor eax, eax
movdqa xmm2, xmmword [0x612120]
movq mm2, qword [0x612120]
movdqu xmmword [esp + eax + 0x26], xmm1
add eax, 0x10
paddb xmm1, xmm2
cmp eax, 0x100
jne 0x408247
mov dword [esp + 0x10], ecx
movsd xmm1, qword [0x612130]
movapd xmm2, xmm0
subsd xmm2, xmm1
cvttsd2si eax, xmm2
lea ecx, [0x4081c9]
mov dword [esp + 0xc], ecx
xor eax, 0x80000000
cvttsd2si ecx, xmm0
ucomisd xmm0, xmm1
cmovae ecx, eax
mov eax, ecx
shr eax, 0x18
mov dword [esp + 8], eax
mov dword [esp], ecx
shr ecx, 0x10
mov dword [esp + 4], ecx
mov esi, 0xff
xor ecx, ecx
xor ebx, ebx
xor edx, edx
inc edx
cmp esi, 2
jb 0x4082bb
xor edx, edx
inc edx
add edx, edx
inc edx
cmp edx, esi
jb 0x4082b4
mov edi, 0xc
cmp ecx, 3
ja case.default.0x4082c5
jmp dword [ecx*4 + 0x612360]
movzx eax, bl
add eax, esp
add eax, 0x26
mov ebx, dword [esp]
jmp 0x408314
movzx eax, bl
mov bl, byte [esp + eax + 0x26]
mov eax, dword [esp + 0xc]
add eax, ecx
add eax, 0xfffffffc
jmp 0x408314
movzx eax, bl
add eax, esp
add eax, 0x26
mov ebx, dword [esp]
mov bl, bh
jmp 0x408314
movzx eax, bl
add eax, esp
add eax, 0x26
mov ebx, dword [esp + 4]
jmp 0x408314
movzx eax, bl
add eax, esp
add eax, 0x26
mov ebx, dword [esp + 8]
add bl, byte [eax]
inc ecx
movzx eax, bl
add bl, 0x23
cmp ecx, 0x22
movzx ebx, bl
cmovbe ebx, eax
mov eax, 0
cmova ecx, eax
movzx ebp, bl
mov eax, edx
and eax, ebp
dec edi
je 0x40833e
cmp eax, esi
ja 0x4082c0
jmp 0x408344
xor edx, edx
div esi
mov eax, edx
cmp esi, eax
je 0x408360
mov dl, byte [esp + esi + 0x26]
xor dl, byte [esp + eax + 0x26]
mov byte [esp + esi + 0x26], dl
xor dl, byte [esp + eax + 0x26]
mov byte [esp + eax + 0x26], dl
xor byte [esp + esi + 0x26], dl
dec esi
jne 0x4082a9
movzx ebx, byte [esp + 0x27]
mov dword [esp + 0xc], ebx
mov al, byte [esp + 0x2b]
movzx esi, byte [esp + 0x2d]
movzx edi, byte [esp + ebp + 0x26]
mov ecx, dword [esp + 0x10]
mov ah, byte [ecx]
mov cl, byte [ecx + 1]
mov byte [esp + 8], cl
movzx ecx, byte [esp + edi + 0x26]
mov dword [esp], ecx
mov dl, byte [esp + ebx + 0x26]
add dl, byte [esp + 0x29]
movzx ebp, dl
mov cl, byte [esp + ebp + 0x26]
mov byte [esp + edi + 0x26], cl
mov dword [esp + 4], esi
mov cl, byte [esp + esi + 0x26]
mov byte [esp + ebp + 0x26], cl
mov ecx, ebx
inc cl
movzx ecx, cl
mov dh, byte [esp + ecx + 0x26]
mov byte [esp + esi + 0x26], dh
mov ebx, dword [esp]
mov byte [esp + ecx + 0x26], bl
mov cl, byte [esp + 8]
add cl, 0x15
shl ah, 4
add ah, 0x60
or ah, cl
add al, byte [esp + ebx + 0x26]
mov esi, ebx
movzx ecx, byte [esp + ebp + 0x26]
add ecx, ebx
mov esi, dword [esp + 4]
movzx esi, byte [esp + esi + 0x26]
movzx edi, byte [esp + edi + 0x26]
add edi, esi
mov byte [esp + 8], al
movzx esi, al
movzx ebp, byte [esp + esi + 0x26]
add ebp, edi
mov esi, 0xff
and ecx, esi
mov dh, byte [esp + ecx + 0x26]
xor dh, ah
and ebp, esi
movzx ecx, byte [esp + ebp + 0x26]
xor dh, byte [esp + ecx + 0x26]
mov ecx, dword [esp + 0xc]
add cl, 2
movzx ecx, cl
mov dword [esp + 4], ecx
xor edi, edi
mov ecx, dword [esp + 0x10]
add dl, bl
mov byte [esp + 0xc], dl
movzx ebp, ah
mov ah, byte [ecx + edi*2 + 2]
mov al, byte [ecx + edi*2 + 3]
mov byte [esp + 0x14], al
movzx ecx, byte [esp + ebp + 0x26]
mov dword [esp], ecx
movzx esi, dl
mov ch, byte [esp + esi + 0x26]
mov byte [esp + ebp + 0x26], ch
movzx edx, dh
mov ch, byte [esp + edx + 0x26]
mov byte [esp + esi + 0x26], ch
mov ebx, dword [esp + 4]
add ebx, edi
mov ecx, 0xff
and ebx, ecx
mov ch, byte [esp + ebx + 0x26]
mov byte [esp + edx + 0x26], ch
mov ecx, dword [esp]
mov byte [esp + ebx + 0x26], cl
mov al, byte [esp + 8]
add al, byte [esp + ecx + 0x26]
movzx edx, byte [esp + edx + 0x26]
movzx ebx, byte [esp + ebp + 0x26]
add ebx, edx
mov byte [esp + 8], al
movzx edx, al
movzx ebp, byte [esp + edx + 0x26]
mov dl, byte [esp + 0xc]
add ebp, ebx
mov al, byte [esp + 0x14]
add al, 0x15
shl ah, 4
add ah, 0x60
or ah, al
movzx ecx, byte [esp + esi + 0x26]
mov esi, dword [esp]
mov ebx, esi
add ecx, esi
mov esi, 0xff
and ecx, esi
mov dh, byte [esp + ecx + 0x26]
xor dh, ah
and ebp, esi
movzx ecx, byte [esp + ebp + 0x26]
xor dh, byte [esp + ecx + 0x26]
movsx ecx, dh
mov word [esp + edi*2 + 0x126], cx
inc edi
cmp edi, 0xc
jne 0x40842a
mov ecx, dword [esp + 4]
add ecx, edi
mov edi, ecx
xor ebp, ebp
mov ecx, ebx
add dl, cl
mov byte [esp + 0xc], dl
movzx ecx, ah
mov ebx, dword [esp + 0x10]
mov esi, ebp
mov ah, byte [ebx + ebp + 0x1a]
mov dl, byte [ebx + ebp + 0x1b]
movzx ebx, byte [esp + ecx + 0x26]
mov dword [esp], ebx
movzx ebx, byte [esp + 0xc]
mov dword [esp + 0x14], ebx
mov al, byte [esp + ebx + 0x26]
mov byte [esp + ecx + 0x26], al
movzx ebp, dh
mov al, byte [esp + ebp + 0x26]
mov byte [esp + ebx + 0x26], al
mov ebx, edi
mov dword [esp + 4], edi
movzx edi, bl
mov al, byte [esp + edi + 0x26]
mov byte [esp + ebp + 0x26], al
mov ebx, dword [esp]
mov byte [esp + edi + 0x26], bl
mov al, byte [esp + 8]
add al, byte [esp + ebx + 0x26]
movzx edi, byte [esp + ebp + 0x26]
movzx ecx, byte [esp + ecx + 0x26]
add ecx, edi
mov byte [esp + 8], al
movzx edi, al
movzx edi, byte [esp + edi + 0x26]
add edi, ecx
add dl, 0x15
shl ah, 4
add ah, 0x60
or ah, dl
mov dl, byte [esp + 0xc]
mov ecx, dword [esp + 0x14]
movzx ecx, byte [esp + ecx + 0x26]
add ecx, ebx
mov ebp, 0xff
and ecx, ebp
mov dh, byte [esp + ecx + 0x26]
xor dh, ah
and edi, ebp
movzx ecx, byte [esp + edi + 0x26]
xor dh, byte [esp + ecx + 0x26]
movsx ecx, dh
mov word [esp + esi + 0x13e], cx
mov ecx, ebx
add esi, 2
mov ebx, dword [esp + 4]
inc bl
mov edi, ebx
mov ebp, esi
cmp esi, 0x1a
jne 0x4084f6
movzx ebx, ah
mov dword [esp + 4], ebx
add dl, cl
movzx eax, byte [esp + ebx + 0x26]
mov dword [esp], eax
mov esi, dword [esp + 0x10]
mov cl, byte [esi + 0x34]
mov eax, edx
mov dl, byte [esi + 0x35]
movzx eax, al
mov ch, byte [esp + eax + 0x26]
mov byte [esp + ebx + 0x26], ch
movzx esi, dh
mov ch, byte [esp + esi + 0x26]
mov byte [esp + eax + 0x26], ch
mov ebx, edi
movzx ebp, bl
mov ch, byte [esp + ebp + 0x26]
mov byte [esp + esi + 0x26], ch
mov ebx, dword [esp]
mov byte [esp + ebp + 0x26], bl
add dl, 0x15
shl cl, 4
add cl, 0x60
or cl, dl
mov ch, byte [esp + 8]
add ch, byte [esp + ebx + 0x26]
movzx eax, byte [esp + eax + 0x26]
add eax, ebx
mov edx, 0xff
and eax, edx
xor cl, byte [esp + eax + 0x26]
movzx eax, byte [esp + esi + 0x26]
mov esi, dword [esp + 4]
movzx esi, byte [esp + esi + 0x26]
add esi, eax
movzx eax, ch
movzx eax, byte [esp + eax + 0x26]
add eax, esi
and eax, edx
movzx eax, byte [esp + eax + 0x26]
xor cl, byte [esp + eax + 0x26]
movsx eax, cl
mov word [esp + 0x158], ax
mov word [esp + 0x15a], 0
mov eax, dword [esp + 0x1c]
movzx esi, word [esp + eax*2 + 0x126]
mov edi, dword [esp + 0x174]
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
mov ecx, eax
imul ecx, eax
imul ecx, eax
mov edx, 0x4ec4ec4f
mov eax, ecx
imul edx
mov eax, edx
shr eax, 0x1f
sar edx, 3
add edx, eax
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
add eax, edx
sub ecx, eax
movzx eax, word [esp + ebx*2 + 0x126]
mov word [edi], ax
mov word [edi + 6], 0
movzx eax, word [esp + ecx*2 + 0x126]
mov word [edi + 4], ax
mov word [edi + 2], si
mov ecx, dword [esp + 0x15c]
xor ecx, esp
call fcn.005db451
add esp, 0x160
pop esi
pop edi
pop ebx
pop ebp
ret 4