Function at 0x422110
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x8a0
mov eax, dword [esp + 0x8a4]
mov edx, dword [esp + 0x8b0]
push ebx
push ebp
push esi
xor esi, esi
cmp eax, 4
push edi
mov dword [edx], 0xffffffff
mov dword [esp + 0x1c], esi
mov dword [esp + 0x30], eax
jbe 0x42215f
lea ecx, [esp + 0x30]
mov eax, ecx
mov ecx, dword [ecx]
sub ecx, 3
shr ecx, 1
mov dword [eax + 4], ecx
mov edi, dword [eax + 4]
add eax, 4
inc esi
cmp edi, 4
mov ecx, eax
ja 0x422143
mov dword [esp + 0x1c], esi
mov ebp, dword [esp + esi*4 + 0x30]
mov esi, dword [esp + 0x8b8]
mov dword [esp + 0x24], ebp
lea edi, [esp + 0xb0]
lea eax, [esp + 0x4b0]
xor ebx, ebx
mov edi, edi
test ebp, ebp
mov ecx, ebx
jbe 0x4221a3
mov dword [esp + 0x18], ebp
lea ebx, [ebx]
movzx ebp, cl
shr ecx, 8
xor ecx, dword [esi + ebp*4]
dec dword [esp + 0x18]
jne 0x422190
mov ebp, dword [esp + 0x24]
mov dword [esp + ebx*4 + 0xb0], ecx
inc ebx
cmp ebx, 0xff
jbe 0x422180
test ebp, ebp
jbe 0x4221c7
movzx ecx, byte [edx]
mov ebx, dword [edx]
shr ebx, 8
xor ebx, dword [esi + ecx*4]
dec ebp
mov dword [edx], ebx
jne 0x4221b7
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jbe 0x422479
mov ecx, dword [edx]
movzx edx, cl
shr ecx, 8
mov ebp, eax
mov eax, edi
mov edx, dword [eax + edx*4]
movzx ebx, dl
movzx edi, cl
mov dword [esp + 0x14], ebx
mov ebx, dword [eax + edi*4]
mov edi, dword [esp + 0x14]
xor ebx, dword [esi + edi*4]
shr edx, 8
mov edi, edx
mov dword [esp + 0x14], edx
shr ecx, 8
xor ebx, edi
movzx edx, cl
mov edx, dword [eax + edx*4]
movzx edi, bl
xor edx, dword [esi + edi*4]
shr ebx, 8
xor edx, ebx
shr ecx, 8
movzx edi, dl
movzx ecx, cl
mov ecx, dword [eax + ecx*4]
mov dword [esp + 0x14], ebx
mov ebx, dword [esi + edi*4]
shr edx, 8
xor ecx, ebx
xor ecx, edx
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + edx*4 + 0x30]
mov edx, dword [esp + edx*4 + 0x2c]
lea edi, [edi + edi + 3]
cmp edi, edx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x18], edi
mov dword [esp + 0x28], edx
jae 0x42225a
movzx edx, cl
mov edi, dword [esi + edx*4]
shr ecx, 8
xor ecx, edi
mov edx, dword [esp + 0x8c0]
mov dword [edx], ecx
lea ecx, [eax + 0xc]
mov dword [esp + 0x20], ecx
mov ecx, eax
sub ecx, ebp
lea edi, [ebp + 4]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x14], 0x40
lea ecx, [ecx]
mov edx, dword [esp + 0x20]
mov ecx, dword [edx - 0xc]
movzx edx, cl
mov edx, dword [eax + edx*4]
shr ecx, 8
movzx ebx, cl
mov ebx, dword [eax + ebx*4]
movzx ebp, dl
xor ebx, dword [esi + ebp*4]
shr edx, 8
mov ebp, edx
shr ecx, 8
mov dword [esp + 0x10], edx
xor ebx, ebp
movzx edx, cl
mov edx, dword [eax + edx*4]
movzx ebp, bl
xor edx, dword [esi + ebp*4]
shr ebx, 8
mov ebp, ebx
xor edx, ebp
shr ecx, 8
mov dword [esp + 0x10], ebx
movzx ebx, dl
mov ebp, dword [esi + ebx*4]
mov ebx, dword [esp + 0x18]
movzx ecx, cl
mov ecx, dword [eax + ecx*4]
shr edx, 8
xor ecx, ebp
xor ecx, edx
mov edx, dword [esp + 0x28]
cmp ebx, edx
jae 0x4222ee
movzx edx, cl
mov ebx, dword [esi + edx*4]
shr ecx, 8
xor ecx, ebx
mov dword [edi - 4], ecx
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx + edi]
movzx edx, cl
mov edx, dword [eax + edx*4]
shr ecx, 8
movzx ebx, cl
mov ebx, dword [eax + ebx*4]
movzx ebp, dl
xor ebx, dword [esi + ebp*4]
shr edx, 8
mov ebp, edx
shr ecx, 8
mov dword [esp + 0x10], edx
xor ebx, ebp
movzx edx, cl
mov edx, dword [eax + edx*4]
movzx ebp, bl
xor edx, dword [esi + ebp*4]
shr ebx, 8
mov ebp, ebx
xor edx, ebp
shr ecx, 8
mov dword [esp + 0x10], ebx
movzx ebx, dl
mov ebp, dword [esi + ebx*4]
mov ebx, dword [esp + 0x18]
movzx ecx, cl
mov ecx, dword [eax + ecx*4]
shr edx, 8
xor ecx, ebp
xor ecx, edx
mov edx, dword [esp + 0x28]
cmp ebx, edx
jae 0x42235f
movzx edx, cl
mov ebx, dword [esi + edx*4]
shr ecx, 8
xor ecx, ebx
mov dword [edi], ecx
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx - 4]
movzx edx, cl
mov edx, dword [eax + edx*4]
shr ecx, 8
movzx ebx, cl
mov ebx, dword [eax + ebx*4]
movzx ebp, dl
xor ebx, dword [esi + ebp*4]
shr edx, 8
mov ebp, edx
shr ecx, 8
mov dword [esp + 0x10], edx
xor ebx, ebp
movzx edx, cl
mov edx, dword [eax + edx*4]
movzx ebp, bl
xor edx, dword [esi + ebp*4]
shr ebx, 8
mov ebp, ebx
xor edx, ebp
shr ecx, 8
mov dword [esp + 0x10], ebx
movzx ebx, dl
mov ebp, dword [esi + ebx*4]
mov ebx, dword [esp + 0x18]
movzx ecx, cl
mov ecx, dword [eax + ecx*4]
shr edx, 8
xor ecx, ebp
xor ecx, edx
mov edx, dword [esp + 0x28]
cmp ebx, edx
jae 0x4223cf
movzx edx, cl
mov ebx, dword [esi + edx*4]
shr ecx, 8
xor ecx, ebx
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx]
movzx edx, cl
mov edx, dword [eax + edx*4]
shr ecx, 8
movzx ebx, cl
mov ebx, dword [eax + ebx*4]
movzx ebp, dl
xor ebx, dword [esi + ebp*4]
shr edx, 8
mov ebp, edx
shr ecx, 8
mov dword [esp + 0x10], edx
xor ebx, ebp
movzx edx, cl
mov edx, dword [eax + edx*4]
movzx ebp, bl
xor edx, dword [esi + ebp*4]
shr ebx, 8
mov ebp, ebx
xor edx, ebp
shr ecx, 8
mov dword [esp + 0x10], ebx
movzx ebx, dl
mov ebp, dword [esi + ebx*4]
mov ebx, dword [esp + 0x18]
movzx ecx, cl
mov ecx, dword [eax + ecx*4]
shr edx, 8
xor ecx, ebp
xor ecx, edx
mov edx, dword [esp + 0x28]
cmp ebx, edx
jae 0x42243f
movzx edx, cl
mov ebx, dword [esi + edx*4]
shr ecx, 8
xor ecx, ebx
mov edx, dword [esp + 0x20]
mov dword [edi + 8], ecx
mov ecx, dword [esp + 0x14]
add edx, 0x10
add edi, 0x10
dec ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], ecx
jne 0x422280
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x8c0]
dec ecx
mov dword [esp + 0x1c], ecx
jne 0x4221d3
mov eax, dword [edx]
not eax
mov dword [edx], eax
mov eax, dword [esp + 0x8bc]
lea edx, [edi + 0xc]
lea ecx, [eax + 4]
sub edi, eax
mov ebx, 0x40
mov eax, dword [edx - 0xc]
movzx ebp, al
shr eax, 8
xor eax, dword [esi + ebp*4]
add ecx, 0x10
mov dword [ecx - 0x14], eax
mov eax, dword [edi + ecx - 0x10]
movzx ebp, al
shr eax, 8
xor eax, dword [esi + ebp*4]
add edx, 0x10
mov dword [ecx - 0x10], eax
mov eax, dword [edx - 0x14]
movzx ebp, al
shr eax, 8
xor eax, dword [esi + ebp*4]
mov dword [ecx - 0xc], eax
mov eax, dword [edx - 0x10]
movzx ebp, al
shr eax, 8
xor eax, dword [esi + ebp*4]
dec ebx
mov dword [ecx - 8], eax
jne 0x422493
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8a0
ret