Function at 0x1010d4b0
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 0x1010d4e0
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 0x1010d587
jmp 0x1010d69d
cmp ebx, dword [esp + 0x4c]
mov dword [esp + 4], ebx
jl 0x1010d65e
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 0x1010d5a4
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 0x1010d771
and ecx, ecx
jne 0x1010d550
jmp 0x1010d771
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 0x1010d64d
mov esi, 0x10
jmp 0x1010d5d0
movdqu xmm3, xmmword [esi + edx]
movdqu xmm2, xmmword [esi + edi]
pcmpeqb xmm2, xmm3
pmovmskb ecx, xmm2
cmp ecx, 0xffff
je 0x1010d5f1
not ecx
bsf ecx, ecx
jmp 0x1010d63a
add esi, 0x10
cmp esi, 0x100
jl 0x1010d5d0
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 0x1010d63a
mov ebp, dword [esp + 4]
mov eax, 0x102
sub edi, ebp
mov esi, dword [esp + 0x38]
sub edx, edi
jmp 0x1010d771
add ecx, esi
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, edi
jmp 0x1010d57b
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, edi
jmp 0x1010d587
mov edi, dword [esp + 0x2c]
jmp 0x1010d670
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 0x1010d6ba
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 0x1010d771
and ecx, ecx
jne 0x1010d670
jmp 0x1010d771
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 0x1010d75e
mov esi, 0x10
jmp 0x1010d6e0
movdqu xmm3, xmmword [esi + edx]
movdqu xmm2, xmmword [esi + edi]
pcmpeqb xmm2, xmm3
pmovmskb ecx, xmm2
cmp ecx, 0xffff
je 0x1010d701
not ecx
bsf ecx, ecx
jmp 0x1010d749
add esi, 0x10
cmp esi, 0x100
jl 0x1010d6e0
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 0x1010d749
mov ebp, dword [esp + 4]
mov eax, 0x102
sub edi, ebp
mov esi, dword [esp + 0x38]
sub edx, dword [esp + 0x1c]
jmp 0x1010d771
add ecx, esi
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, dword [esp + 0x1c]
jmp 0x1010d691
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, dword [esp + 0x1c]
jmp 0x1010d69d
mov ebx, edx
sub ebx, ebp
cmp eax, 3
jl 0x1010d9a7
je 0x1010d782
jmp 0x1010d78e
cmp ebx, 0x1000
jg 0x1010d9a7
movd mm1, eax
mov ecx, eax
movd mm2, edx
add edx, ecx
psubd mm2, mm7
sub edx, 1
cmp ecx, ebx
jg 0x1010d7b0
jmp 0x1010d8e2
movd eax, mm2
add eax, 2
cmp eax, edx
jge 0x1010d8e2
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 0x1010d8b0
lea edi, [edi - 0x203]
jmp 0x1010d7fb
cmp ebp, dword [esi + edi*4]
jle 0x1010d8e2
inc eax
inc edi
cmp eax, dword [esp + 4]
jl 0x1010d7f0
movd edi, mm2
mov ecx, edi
mov eax, edi
sub edx, 2
sub edi, ebx
and eax, dword [esp]
jmp 0x1010d820
mov dword [esi + eax*4], edi
inc ecx
inc eax
inc edi
and eax, dword [esp]
cmp ecx, edx
jle 0x1010d820
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 0x1010d850
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 0x1010d850
psubd mm5, mm7
psubd mm5, mm7
jmp 0x1010d8eb
movd mm3, edi
and edi, dword [esp]
cmp ebp, dword [esi + edi*4]
movd edi, mm3
jle 0x1010d8e2
inc eax
inc edi
cmp eax, dword [esp + 4]
jl 0x1010d8a0
movd edi, mm2
mov ecx, edi
mov eax, edi
sub edx, 2
sub edi, ebx
and eax, dword [esp]
jmp 0x1010d8d0
mov dword [esi + eax*4], edi
inc ecx
inc eax
inc edi
and eax, dword [esp]
cmp ecx, edx
jle 0x1010d8d0
jmp 0x1010d82d
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 0x1010d900
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 0x1010d900
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 0x1010d9ce
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 0x1010d9e6
movd ecx, mm6
cmp ecx, dword [esp + 0x48]
jl 0x1010d4e0
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