Function at 0x506183
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x12173220]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, dword [eax + 0x28]
mov edi, dword [eax + 0x2c]
mov dword [ebp - 0x2c], eax
mov eax, edi
imul eax, esi
push 1
mov dword [ebp - 0x30], esi
cdq
push edx
push eax
call 0xffa7b7c7
mov ebx, eax
add esp, 0xc
mov dword [ebp - 0x34], ebx
test ebx, ebx
je 0x50635a
dec edi
mov dword [ebp - 0x3c], edi
cmp edi, 1
jle 0x506353
lea eax, [esi - 1]
mov ecx, esi
shl ecx, 3
lea edx, [edi - 1]
mov dword [ebp - 0x1c], eax
lea eax, [ebx + esi]
mov dword [ebp - 0x28], eax
mov edi, eax
lea eax, [ecx + 8]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
xor ebx, ebx
inc ebx
cmp dword [ebp - 0x1c], ebx
jle 0x5062c2
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
mov edx, dword [esi + 0x5558]
xorps xmm0, xmm0
add edx, eax
mov ecx, edx
sub ecx, dword [ebp - 0x18]
movdqu xmmword [ebp - 0x14], xmm0
mov eax, dword [edx]
shr eax, 5
and eax, 3
mov dword [ebp - 0x38], eax
mov eax, dword [ecx - 8]
shr eax, 5
and eax, 3
inc dword [ebp + eax*4 - 0x14]
mov eax, dword [ecx]
shr eax, 5
and eax, 3
inc dword [ebp + eax*4 - 0x14]
mov eax, dword [ecx + 8]
shr eax, 5
and eax, 3
mov ecx, dword [ebp - 0x18]
inc dword [ebp + eax*4 - 0x14]
mov eax, dword [edx - 8]
shr eax, 5
and eax, 3
inc dword [ebp + eax*4 - 0x14]
mov eax, dword [edx + 8]
shr eax, 5
and eax, 3
inc dword [ebp + eax*4 - 0x14]
mov eax, dword [ecx + edx - 8]
shr eax, 5
and eax, 3
inc dword [ebp + eax*4 - 0x14]
mov eax, dword [ecx + edx]
shr eax, 5
and eax, 3
inc dword [ebp + eax*4 - 0x14]
mov eax, dword [ecx + edx + 8]
shr eax, 5
and eax, 3
inc dword [ebp + eax*4 - 0x14]
xor eax, eax
cmp dword [ebp + eax*4 - 0x14], 5
jge 0x5062a3
inc eax
cmp eax, 4
jl 0x506293
mov eax, dword [ebp - 0x38]
mov byte [edi + ebx], al
inc ebx
mov eax, dword [ebp - 0x28]
add eax, 8
mov dword [ebp - 0x28], eax
cmp ebx, dword [ebp - 0x1c]
jl 0x506205
mov esi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
add eax, ecx
add edi, esi
dec edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
jne 0x5061f3
mov edi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x34]
cmp edi, 1
jle 0x506353
lea eax, [esi - 1]
mov dword [ebp - 0x20], eax
lea ecx, [ebx + esi]
mov eax, esi
mov dword [ebp - 0x18], ecx
shl eax, 3
lea ebx, [edi - 1]
add eax, 8
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], eax
lea edi, [esi - 1]
xor edx, edx
inc edx
cmp edi, edx
jle 0x50633b
mov edi, dword [ebp - 0x18]
mov ebx, eax
mov esi, dword [ebp - 0x2c]
mov ecx, dword [esi + 0x5558]
movzx eax, byte [edi + edx]
shl eax, 5
xor eax, dword [ecx + ebx]
and eax, 0x60
xor dword [ecx + ebx], eax
inc edx
lea ebx, [ebx + 8]
cmp edx, dword [ebp - 0x20]
jl 0x50630d
mov esi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
mov edx, esi
add ecx, esi
shl edx, 3
add eax, edx
mov dword [ebp - 0x18], ecx
dec ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], ebx
jne 0x5062fe
mov ebx, dword [ebp - 0x34]
push ebx
call 0xff73012f
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call 0xec9ec
mov esp, ebp
pop ebp
ret