Function at 0x496e10
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [ecx + 4]
inc ebx
imul ebx, dword [ecx]
push ebp
mov ebp, dword [esp + 0x18]
mov dword [esp + 0xc], ebx
cmp ebp, 7
jne 0x496e3a
push ebp
mov ebx, ecx
call fcn.00496cf0
add esp, 4
pop ebp
pop ebx
add esp, 0xc
ret
push esi
push edi
lea esi, [ebp*4]
push esi
add ecx, 0x2c
push eax
push ecx
mov dword [esp + 0x1c], ecx
call fcn.0040dc50
mov edx, dword [esp + 0x1c]
mov eax, ebx
sub eax, ebp
add esp, 0xc
mov edi, ebp
lea ecx, [esi + edx - 4]
mov dword [esp + 0x18], eax
cmp ebp, eax
jae 0x496fc8
mov esi, edx
mov eax, dword [ecx]
add ecx, 4
ror eax, 8
mov edx, eax
shr edx, 0x10
and edx, 0xff
movzx ebp, byte [edx*4 + 0x57c030]
mov edx, eax
shr edx, 0x18
movzx edx, byte [edx*4 + 0x57c030]
shl edx, 8
or ebp, edx
mov edx, eax
shr edx, 8
and edx, 0xff
movzx edx, byte [edx*4 + 0x57c030]
shl ebp, 8
or ebp, edx
and eax, 0xff
movzx eax, byte [eax*4 + 0x57c030]
shl ebp, 8
or ebp, eax
xor edx, edx
mov eax, edi
div dword [esp + 0x20]
add esi, 4
add ecx, 4
add esi, 4
inc edi
add ecx, 4
inc edi
add esi, 4
inc edi
add ecx, 4
inc edi
add esi, 4
xor ebp, dword [eax*4 + 0x57e42c]
xor ebp, dword [esi - 0x10]
mov dword [ecx - 0xc], ebp
mov edx, dword [esi - 0xc]
mov eax, ebp
mov ebp, dword [esp + 0x20]
xor edx, eax
mov dword [ecx - 8], edx
mov eax, edx
mov edx, dword [esi - 8]
xor edx, eax
mov dword [ecx - 4], edx
mov eax, edx
mov edx, dword [esi - 4]
xor edx, eax
mov dword [ecx], edx
cmp ebp, 4
je case.default.0x496f2c
lea eax, [ebp - 5]
cmp eax, 3
ja case.default.0x496f2c
jmp dword [eax*4 + 0x4970fc]
mov eax, edx
shr edx, 0x10
and edx, 0xff
movzx edx, byte [edx*4 + 0x57c030]
mov ebx, eax
shr ebx, 0x18
movzx ebx, byte [ebx*4 + 0x57c030]
shl ebx, 8
or edx, ebx
mov ebx, eax
shr ebx, 8
and ebx, 0xff
movzx ebx, byte [ebx*4 + 0x57c030]
shl edx, 8
or edx, ebx
mov ebx, dword [esp + 0x14]
and eax, 0xff
movzx eax, byte [eax*4 + 0x57c030]
shl edx, 8
or edx, eax
xor edx, dword [esi]
add ecx, 4
inc edi
mov dword [ecx], edx
add esi, 4
mov eax, dword [ecx]
mov edx, dword [esi]
add ecx, 4
xor edx, eax
inc edi
mov dword [ecx], edx
add esi, 4
mov eax, dword [ecx]
mov edx, dword [esi]
add ecx, 4
xor edx, eax
inc edi
mov dword [ecx], edx
add esi, 4
mov eax, dword [ecx]
mov edx, dword [esi]
add ecx, 4
xor edx, eax
inc edi
mov dword [ecx], edx
add esi, 4
cmp edi, dword [esp + 0x18]
jb 0x496e71
mov eax, dword [ecx]
add ecx, 4
ror eax, 8
mov edx, eax
shr edx, 0x10
and edx, 0xff
movzx esi, byte [edx*4 + 0x57c030]
mov edx, eax
shr edx, 0x18
movzx edx, byte [edx*4 + 0x57c030]
shl edx, 8
or esi, edx
mov edx, eax
shr edx, 8
and edx, 0xff
movzx edx, byte [edx*4 + 0x57c030]
shl esi, 8
or esi, edx
and eax, 0xff
movzx eax, byte [eax*4 + 0x57c030]
shl esi, 8
or esi, eax
xor edx, edx
mov eax, edi
div ebp
mov edx, edi
sub edx, ebp
inc edi
xor esi, dword [eax*4 + 0x57e42c]
mov eax, dword [esp + 0x10]
xor esi, dword [eax + edx*4]
mov dword [ecx], esi
cmp ebp, 8
jae 0x49706f
cmp edi, ebx
jae 0x4970f0
mov edx, edi
sub edx, ebp
sub ebx, edi
lea eax, [eax + edx*4]
mov esi, ebx
mov edx, dword [ecx]
mov edi, dword [eax]
add ecx, 4
xor edi, edx
add eax, 4
sub esi, 1
mov dword [ecx], edi
jne 0x497052
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
cmp edi, ebx
jae 0x4970f0
mov edx, edi
sub edx, ebp
lea ebx, [eax + edx*4]
mov edi, edi
xor edx, edx
mov eax, edi
div ebp
mov esi, dword [ecx]
add ecx, 4
cmp edx, 4
jne 0x4970e0
mov eax, esi
shr eax, 0x10
and eax, 0xff
movzx edx, byte [eax*4 + 0x57c030]
mov eax, esi
shr eax, 0x18
movzx eax, byte [eax*4 + 0x57c030]
shl eax, 8
or edx, eax
mov eax, esi
shr eax, 8
and eax, 0xff
movzx eax, byte [eax*4 + 0x57c030]
shl edx, 8
and esi, 0xff
or edx, eax
movzx eax, byte [esi*4 + 0x57c030]
shl edx, 8
or edx, eax
mov esi, edx
mov edx, dword [ebx]
xor edx, esi
inc edi
add ebx, 4
mov dword [ecx], edx
cmp edi, dword [esp + 0x14]
jb 0x497080
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret