Function at 0x1010b570
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 0x1010b5a0
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 0x1010b647
jmp 0x1010b75d
cmp ebx, dword [esp + 0x4c]
mov dword [esp + 4], ebx
jl 0x1010b71e
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 0x1010b664
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 0x1010b831
and ecx, ecx
jne 0x1010b610
jmp 0x1010b831
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 0x1010b70d
mov esi, 0x10
jmp 0x1010b690
movdqu xmm3, xmmword [esi + edx]
movdqu xmm2, xmmword [esi + edi]
pcmpeqb xmm2, xmm3
pmovmskb ecx, xmm2
cmp ecx, 0xffff
je 0x1010b6b1
not ecx
bsf ecx, ecx
jmp 0x1010b6fa
add esi, 0x10
cmp esi, 0x100
jl 0x1010b690
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 0x1010b6fa
mov ebp, dword [esp + 4]
mov eax, 0x102
sub edi, ebp
mov esi, dword [esp + 0x38]
sub edx, edi
jmp 0x1010b831
add ecx, esi
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, edi
jmp 0x1010b63b
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, edi
jmp 0x1010b647
mov edi, dword [esp + 0x2c]
jmp 0x1010b730
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 0x1010b77a
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 0x1010b831
and ecx, ecx
jne 0x1010b730
jmp 0x1010b831
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 0x1010b81e
mov esi, 0x10
jmp 0x1010b7a0
movdqu xmm3, xmmword [esi + edx]
movdqu xmm2, xmmword [esi + edi]
pcmpeqb xmm2, xmm3
pmovmskb ecx, xmm2
cmp ecx, 0xffff
je 0x1010b7c1
not ecx
bsf ecx, ecx
jmp 0x1010b809
add esi, 0x10
cmp esi, 0x100
jl 0x1010b7a0
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 0x1010b809
mov ebp, dword [esp + 4]
mov eax, 0x102
sub edi, ebp
mov esi, dword [esp + 0x38]
sub edx, dword [esp + 0x1c]
jmp 0x1010b831
add ecx, esi
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, dword [esp + 0x1c]
jmp 0x1010b751
mov esi, dword [esp + 4]
sub edi, esi
mov esi, dword [esp + 0x38]
sub edx, dword [esp + 0x1c]
jmp 0x1010b75d
mov ebx, edx
sub ebx, ebp
cmp eax, 3
jl 0x1010ba67
je 0x1010b842
jmp 0x1010b84e
cmp ebx, 0x1000
jg 0x1010ba67
movd mm1, eax
mov ecx, eax
movd mm2, edx
add edx, ecx
psubd mm2, mm7
sub edx, 1
cmp ecx, ebx
jg 0x1010b870
jmp 0x1010b9a2
movd eax, mm2
add eax, 2
cmp eax, edx
jge 0x1010b9a2
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 0x1010b970
lea edi, [edi - 0x203]
jmp 0x1010b8bb
cmp ebp, dword [esi + edi*4]
jle 0x1010b9a2
inc eax
inc edi
cmp eax, dword [esp + 4]
jl 0x1010b8b0
movd edi, mm2
mov ecx, edi
mov eax, edi
sub edx, 2
sub edi, ebx
and eax, dword [esp]
jmp 0x1010b8e0
mov dword [esi + eax*4], edi
inc ecx
inc eax
inc edi
and eax, dword [esp]
cmp ecx, edx
jle 0x1010b8e0
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 0x1010b910
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 0x1010b910
psubd mm5, mm7
psubd mm5, mm7
jmp 0x1010b9ab
movd mm3, edi
and edi, dword [esp]
cmp ebp, dword [esi + edi*4]
movd edi, mm3
jle 0x1010b9a2
inc eax
inc edi
cmp eax, dword [esp + 4]
jl 0x1010b960
movd edi, mm2
mov ecx, edi
mov eax, edi
sub edx, 2
sub edi, ebx
and eax, dword [esp]
jmp 0x1010b990
mov dword [esi + eax*4], edi
inc ecx
inc eax
inc edi
and eax, dword [esp]
cmp ecx, edx
jle 0x1010b990
jmp 0x1010b8ed
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 0x1010b9c0
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 0x1010b9c0
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 0x1010ba8e
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 0x1010baa6
movd ecx, mm6
cmp ecx, dword [esp + 0x48]
jl 0x1010b5a0
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