Function at 0x1010a5d0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
sub esp, 8
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x3c]
dec ecx
pxor mm6, mm6
movd mm5, edx
mov dword [esp], ecx
inc dword [esp + 0x5c]
pcmpeqd mm7, mm7
jmp 0x1010a600
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
movdqu xmm1, xmmword [edx + edi]
movzx eax, byte [edx + edi]
movzx ebx, byte [edx + edi + 1]
movzx ebp, byte [edx + edi + 2]
movzx eax, word [esi + eax*2]
movzx ebx, word [esi + ebx*2 + 0x200]
movzx ebp, word [esi + ebp*2 + 0x400]
xor eax, ebx
mov ebx, dword [esp]
xor eax, ebp
mov esi, dword [esp + 0x38]
and eax, dword [esp + 0x40]
and ebx, edx
mov ebp, dword [ecx + eax*4]
mov dword [esi + ebx*4], ebp
mov dword [ecx + eax*4], edx
mov ebx, ebp
mov eax, 2
movd mm2, dword [esp + 0x5c]
cmp edi, dword [esp + 0x2c]
jne 0x1010a6a7
jmp 0x1010a7bd
cmp ebx, dword [esp + 0x4c]
mov dword [esp + 4], ebx
jl 0x1010a77e
movdqu xmm2, xmmword [ebx + edi]
and ebx, dword [esp]
pcmpeqb xmm2, xmm1
pmovmskb ecx, xmm2
mov ebx, dword [esi + ebx*4]
not ecx
bsf ecx, ecx
cmp ecx, 0x10
je 0x1010a6c4
cmp ecx, eax
cmovg eax, ecx
mov ecx, dword [esp + 4]
cmovg ebp, ecx
mov ecx, dword [esp + 0x3c]
paddd mm2, mm7
add ecx, ebx
cmp edx, ecx
movd ecx, mm2
jge 0x1010a891
and ecx, ecx
jne 0x1010a670
jmp 0x1010a891
mov esi, dword [esp + 4]
add edx, edi
add edi, esi
movzx esi, word [eax + edx - 1]
movzx ecx, word [eax + edi - 1]
cmp esi, ecx
jne 0x1010a76d
mov esi, 0x10
jmp 0x1010a6f0
movdqu xmm3, xmmword [esi + edx]
movdqu xmm2, xmmword [esi + edi]
pcmpeqb xmm2, xmm3
pmovmskb ecx, xmm2
cmp ecx, 0xffff
je 0x1010a711
not ecx
bsf ecx, ecx
jmp 0x1010a75a
add esi, 0x10
cmp esi, 0x100
jl 0x1010a6f0
movd xmm3, dword [edx + 0xfe]
movd xmm2, dword [edi + 0xfe]
pcmpeqb xmm2, xmm3
pmovmskb ecx, xmm2
and ecx, 0xf
not ecx
bsf ecx, ecx
sub ecx, 2
cmp ecx, 2
jl 0x1010a75a
mov ebp, dword [esp + 4]
mov eax, 0x102
sub edi, ebp
mov esi, dword [esp + 0x38]
sub edx, edi
jmp 0x1010a891
add ecx, esi
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, edi
jmp 0x1010a69b
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, edi
jmp 0x1010a6a7
mov edi, dword [esp + 0x2c]
jmp 0x1010a790
mov dword [esp + 4], ebx
movdqu xmm2, xmmword [ebx + edi]
and ebx, dword [esp]
pcmpeqb xmm2, xmm1
pmovmskb ecx, xmm2
mov ebx, dword [esi + ebx*4]
not ecx
bsf ecx, ecx
cmp ecx, 0x10
je 0x1010a7da
cmp ecx, eax
cmovg eax, ecx
mov ecx, dword [esp + 4]
cmovg ebp, ecx
mov ecx, dword [esp + 0x3c]
paddd mm2, mm7
add ecx, ebx
cmp edx, ecx
movd ecx, mm2
jge 0x1010a891
and ecx, ecx
jne 0x1010a790
jmp 0x1010a891
mov esi, dword [esp + 4]
add edx, dword [esp + 0x1c]
add edi, esi
movzx esi, word [eax + edx - 1]
movzx ecx, word [eax + edi - 1]
cmp esi, ecx
jne 0x1010a87e
mov esi, 0x10
jmp 0x1010a800
movdqu xmm3, xmmword [esi + edx]
movdqu xmm2, xmmword [esi + edi]
pcmpeqb xmm2, xmm3
pmovmskb ecx, xmm2
cmp ecx, 0xffff
je 0x1010a821
not ecx
bsf ecx, ecx
jmp 0x1010a869
add esi, 0x10
cmp esi, 0x100
jl 0x1010a800
movd xmm3, dword [edx + 0xfe]
movd xmm2, dword [edi + 0xfe]
pcmpeqb xmm2, xmm3
pmovmskb ecx, xmm2
and ecx, 0xf
not ecx
bsf ecx, ecx
sub ecx, 2
cmp ecx, 2
jl 0x1010a869
mov ebp, dword [esp + 4]
mov eax, 0x102
sub edi, ebp
mov esi, dword [esp + 0x38]
sub edx, dword [esp + 0x1c]
jmp 0x1010a891
add ecx, esi
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, dword [esp + 0x1c]
jmp 0x1010a7b1
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, dword [esp + 0x1c]
jmp 0x1010a7bd
mov ebx, edx
sub ebx, ebp
cmp eax, 3
jl 0x1010aac7
je 0x1010a8a2
jmp 0x1010a8ae
cmp ebx, 0x1000
jg 0x1010aac7
movd mm1, eax
mov ecx, eax
movd mm2, edx
add edx, ecx
psubd mm2, mm7
sub edx, 1
cmp ecx, ebx
jg 0x1010a8d0
jmp 0x1010aa02
movd eax, mm2
add eax, 2
cmp eax, edx
jge 0x1010aa02
lea eax, [ebx + ebp]
mov dword [esp + 4], eax
lea eax, [ebp + 1]
mov edi, dword [esp]
and edi, ebp
add edi, 0x204
cmp edi, dword [esp]
jg 0x1010a9d0
lea edi, [edi - 0x203]
jmp 0x1010a91b
cmp ebp, dword [esi + edi*4]
jle 0x1010aa02
inc eax
inc edi
cmp eax, dword [esp + 4]
jl 0x1010a910
movd edi, mm2
mov ecx, edi
mov eax, edi
sub edx, 2
sub edi, ebx
and eax, dword [esp]
jmp 0x1010a940
mov dword [esi + eax*4], edi
inc ecx
inc eax
inc edi
and eax, dword [esp]
cmp ecx, edx
jle 0x1010a940
movd mm0, ebx
sub ecx, ebx
movd mm5, edx
movd mm2, ecx
movd mm3, ebp
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x34]
jmp 0x1010a970
movzx eax, byte [ecx + edi]
movzx ebx, byte [ecx + edi + 1]
movzx ecx, byte [ecx + edi + 2]
movzx eax, word [edx + eax*2]
movzx ebx, word [edx + ebx*2 + 0x200]
movzx ecx, word [edx + ecx*2 + 0x400]
xor eax, ebx
xor eax, ecx
movd ecx, mm2
and eax, dword [esp + 0x40]
mov dword [ebp + eax*4], ecx
inc ecx
movd eax, mm5
psubd mm2, mm7
cmp ecx, eax
jle 0x1010a970
psubd mm5, mm7
psubd mm5, mm7
jmp 0x1010aa0b
movd mm3, edi
and edi, dword [esp]
cmp ebp, dword [esi + edi*4]
movd edi, mm3
jle 0x1010aa02
inc eax
inc edi
cmp eax, dword [esp + 4]
jl 0x1010a9c0
movd edi, mm2
mov ecx, edi
mov eax, edi
sub edx, 2
sub edi, ebx
and eax, dword [esp]
jmp 0x1010a9f0
mov dword [esi + eax*4], edi
inc ecx
inc eax
inc edi
and eax, dword [esp]
cmp ecx, edx
jle 0x1010a9f0
jmp 0x1010a94d
movd mm0, ebx
movd mm3, ebp
movd mm5, edx
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x34]
movd ecx, mm2
jmp 0x1010aa20
movzx eax, byte [ecx + edi]
movzx ebx, byte [ecx + edi + 1]
movzx ecx, byte [ecx + edi + 2]
movzx eax, word [edx + eax*2]
movzx ebx, word [edx + ebx*2 + 0x200]
movzx ecx, word [edx + ecx*2 + 0x400]
xor eax, ebx
movd ebx, mm2
xor eax, ecx
and ebx, dword [esp]
and eax, dword [esp + 0x40]
mov ecx, dword [ebp + eax*4]
mov dword [esi + ebx*4], ecx
movd ecx, mm2
mov dword [ebp + eax*4], ecx
movd eax, mm5
inc ecx
cmp ecx, eax
psubd mm2, mm7
jle 0x1010aa20
movd edx, mm6
movd eax, mm0
movd ecx, mm1
mov esi, dword [esp + 0x54]
mov ebp, dword [esp + 0x50]
sub ecx, 3
mov word [esi + edx*2], ax
dec eax
mov byte [edx + ebp], cl
psubd mm6, mm7
mov esi, dword [esp + 0x28]
mov ebx, eax
mov ebp, dword [esp + 0x24]
shr eax, 7
add eax, 0x100
mov edi, dword [esp + 0x20]
cmp ebx, 0x100
cmovge ebx, eax
movzx eax, byte [ebx + edi + 0x100]
movzx ecx, byte [ecx + edi]
add ecx, 0x101
inc word [esi + eax*4]
inc word [ebp + ecx*4]
movd edx, mm5
jmp 0x1010aaee
mov ecx, dword [esp + 0x1c]
movd edi, mm6
movzx ecx, byte [edx + ecx]
mov esi, dword [esp + 0x54]
mov ebp, dword [esp + 0x50]
mov word [esi + edi*2], 0
mov byte [edi + ebp], cl
mov esi, dword [esp + 0x24]
psubd mm6, mm7
inc word [esi + ecx*4]
mov edi, dword [esp + 0x1c]
inc edx
cmp edx, dword [esp + 0x44]
jge 0x1010ab06
movd ecx, mm6
cmp ecx, dword [esp + 0x48]
jl 0x1010a600
mov esi, dword [esp + 0x58]
mov dword [esi], edx
movd eax, mm6
add esp, 8
emms
pop ebp
pop edi
pop esi
pop ebx
ret