Function at 0x502630
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0x90]
mov ecx, dword [ebx + 0x88]
push ebp
inc eax
push esi
mov dword [ebx + 0x90], eax
push edi
mov edi, eax
mov eax, dword [ebx + 0x8c]
lea edx, [ebx + 0x48]
add eax, edi
lea ebp, [edx + 0x20]
cmp edx, ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ebx
lea esi, [ebx + 8]
mov eax, edx
mov dword [esp + 0x18], ebp
jae 0x50277f
mov edi, dword [eax]
mov ebx, ecx
shl ebx, 0xd
xor ebx, ecx
add ebx, dword [ebp]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], edi
and edi, 0x3c
mov edi, dword [edi + edx]
add edi, ecx
add edi, ebx
mov dword [eax], edi
mov ecx, dword [esp + 0x10]
shr edi, 4
and edi, 0x3c
mov edi, dword [edi + edx]
add edi, ecx
mov dword [esi], edi
mov ecx, dword [eax + 4]
mov dword [esp + 0x10], ecx
mov ecx, ebx
add eax, 4
shr ecx, 6
xor ecx, ebx
mov ebx, dword [ebp + 4]
add ecx, ebx
mov ebx, dword [esp + 0x10]
and ebx, 0x3c
mov ebx, dword [ebx + edx]
add ebx, edi
mov edi, dword [esp + 0x10]
add ebx, ecx
mov dword [eax], ebx
add ebp, 4
shr ebx, 4
and ebx, 0x3c
mov ebx, dword [ebx + edx]
add ebx, edi
mov dword [esi + 4], ebx
mov edi, dword [eax + 4]
mov dword [esp + 0x14], ebx
lea ebx, [ecx*4]
xor ebx, ecx
mov ecx, dword [ebp + 4]
add ebx, ecx
mov ecx, dword [esp + 0x14]
add esi, 4
mov dword [esp + 0x10], edi
add eax, 4
and edi, 0x3c
mov edi, dword [edi + edx]
add edi, ecx
mov ecx, dword [esp + 0x10]
add ebp, 4
add edi, ebx
mov dword [eax], edi
shr edi, 4
and edi, 0x3c
mov edi, dword [edi + edx]
add edi, ecx
add esi, 4
mov dword [esi], edi
mov ecx, dword [eax + 4]
add eax, 4
mov dword [esp + 0x10], ecx
mov ecx, ebx
shr ecx, 0x10
xor ecx, ebx
mov ebx, dword [ebp + 4]
add ebp, 4
add ecx, ebx
mov ebx, dword [esp + 0x10]
and ebx, 0x3c
mov ebx, dword [ebx + edx]
add ebx, edi
add ebx, ecx
add esi, 4
add ebp, 4
mov dword [eax], ebx
add eax, 4
shr ebx, 4
and ebx, 0x3c
mov edi, dword [ebx + edx]
add edi, dword [esp + 0x10]
mov dword [esi], edi
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x18]
add esi, 4
cmp eax, edi
jb 0x502675
mov ebx, dword [esp + 0x1c]
cmp edx, dword [esp + 0x18]
mov edi, edx
jae 0x5028b1
jmp 0x502790
mov ebx, dword [eax]
mov ebp, ecx
shl ebp, 0xd
xor ebp, ecx
add ebp, dword [edi]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], ebx
and ebx, 0x3c
mov ebx, dword [ebx + edx]
add ebx, ecx
add ebx, ebp
mov dword [eax], ebx
mov ecx, dword [esp + 0x10]
shr ebx, 4
and ebx, 0x3c
mov ebx, dword [ebx + edx]
add ebx, ecx
mov dword [esi], ebx
mov ecx, dword [eax + 4]
mov dword [esp + 0x10], ecx
mov ecx, ebp
add eax, 4
shr ecx, 6
xor ecx, ebp
mov ebp, dword [edi + 4]
add ecx, ebp
mov ebp, dword [esp + 0x10]
and ebp, 0x3c
mov ebp, dword [edx + ebp]
add ebp, ebx
mov ebx, dword [esp + 0x10]
add ebp, ecx
mov dword [eax], ebp
add edi, 4
shr ebp, 4
and ebp, 0x3c
mov ebp, dword [edx + ebp]
add ebp, ebx
mov dword [esi + 4], ebp
mov ebx, dword [eax + 4]
mov dword [esp + 0x14], ebp
lea ebp, [ecx*4]
xor ebp, ecx
mov ecx, dword [edi + 4]
add ebp, ecx
mov ecx, dword [esp + 0x14]
add esi, 4
mov dword [esp + 0x10], ebx
add eax, 4
and ebx, 0x3c
mov ebx, dword [ebx + edx]
add ebx, ecx
mov ecx, dword [esp + 0x10]
add edi, 4
add ebx, ebp
mov dword [eax], ebx
shr ebx, 4
and ebx, 0x3c
mov ebx, dword [ebx + edx]
add ebx, ecx
add esi, 4
mov dword [esi], ebx
mov ecx, dword [eax + 4]
add eax, 4
mov dword [esp + 0x10], ecx
mov ecx, ebp
shr ecx, 0x10
xor ecx, ebp
mov ebp, dword [edi + 4]
add edi, 4
add ecx, ebp
mov ebp, dword [esp + 0x10]
and ebp, 0x3c
mov ebp, dword [edx + ebp]
add ebp, ebx
add ebp, ecx
add esi, 4
add edi, 4
mov dword [eax], ebp
add eax, 4
shr ebp, 4
and ebp, 0x3c
mov ebx, dword [edx + ebp]
add ebx, dword [esp + 0x10]
mov dword [esi], ebx
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x18]
add esi, 4
cmp edi, ebx
jb 0x502790
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
pop edi
pop esi
pop ebp
mov dword [eax + 0x8c], edx
mov dword [eax + 0x88], ecx
pop ebx
add esp, 0x10
ret
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
mov dword [ebx + 0x8c], eax
mov dword [ebx + 0x88], ecx
pop ebx
add esp, 0x10
ret