Function at 0x476260
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xb4
mov eax, dword [0x4ea93c]
xor eax, esp
mov dword [esp + 0xb0], eax
test byte [ebp + 0x10], 0xf
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0xc], eax
jne 0x476501
test al, 0xf
jne 0x476501
cmp dword [0x56a0e0], 3
jl 0x476501
mov eax, dword [ecx + 0xc]
imul eax, dword [ebp + 0xc]
add eax, dword [ebp + 8]
mov edx, dword [ecx + 0x1c]
mov ebx, dword [ecx + 4]
mov edx, dword [edx + eax*4]
mov edi, dword [ecx]
mov esi, dword [ebx + edx*4]
mov dword [esp + 0x1c], edx
xor eax, eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov ecx, ebx
nop
mov edx, dword [ebx]
add edx, esi
mov edx, dword [edi + edx*4]
mov byte [esp + eax + 0x20], dl
shr edx, 8
mov byte [esp + eax + 0x40], dl
mov edx, dword [ecx]
add edx, esi
mov edx, dword [edi + edx*4]
mov byte [esp + eax + 0x50], dl
shr edx, 8
mov byte [esp + eax + 0x60], dl
mov edx, dword [esp + 0x10]
mov edx, dword [edx]
add dword [esp + 0x10], 0x400
add edx, esi
mov edx, dword [edi + edx*4]
mov byte [esp + eax + 0x90], dl
shr edx, 8
mov byte [esp + eax + 0x80], dl
mov edx, dword [esp + 0x14]
mov edx, dword [edx]
add dword [esp + 0x14], 0x4000
add edx, esi
mov edx, dword [edi + edx*4]
mov byte [esp + eax + 0x30], dl
shr edx, 8
mov byte [esp + eax + 0xa0], dl
inc eax
add ebx, 4
add ecx, 0x40
cmp eax, 0x10
jb 0x4762d0
mov ebx, dword [esp + 0xc]
mov esi, dword [ebp + 0x18]
mov eax, 0xff
movsx edx, ax
movd xmm0, edx
mov edx, dword [ebp + 0x10]
movdqa xmm1, xmm0
punpcklwd xmm1, xmm0
mov eax, 0xf
pshufd xmm3, xmm1, 0
movd xmm0, eax
punpcklbw xmm0, xmm0
movdqa xmm1, xmm0
punpcklbw xmm1, xmm0
xor ecx, ecx
pshufd xmm7, xmm1, 0
movdqa xmm6, xmm7
lea eax, [ebx + 0x10]
sub edx, ebx
mov ebx, dword [ebp + 0x10]
movdqa xmmword [esp + 0x70], xmm3
psllw xmm6, 4
lea edi, [esi - 0x20]
jmp 0x4763a6
movdqa xmm3, xmmword [esp + 0x70]
movdqa xmm1, xmmword [ecx + ebx]
movdqa xmm2, xmmword [edx + eax]
movdqa xmm0, xmm1
pand xmm1, xmm3
movdqa xmm4, xmm2
pand xmm2, xmm3
packuswb xmm1, xmm2
movdqa xmm2, xmm1
psrlw xmm0, 8
pand xmm1, xmm6
psrlw xmm1, 4
pand xmm2, xmm7
psrlw xmm4, 8
packuswb xmm0, xmm4
movdqa xmm4, xmm1
movdqa xmm1, xmmword [esp + 0x50]
movdqa xmm3, xmm0
pand xmm0, xmm6
psrlw xmm0, 4
movdqa xmm5, xmm0
movdqa xmm0, xmmword [esp + 0x20]
pshufb xmm0, xmm2
pshufb xmm1, xmm4
pxor xmm0, xmm1
movdqa xmm1, xmmword [esp + 0x90]
pand xmm3, xmm7
pshufb xmm1, xmm3
pxor xmm0, xmm1
movdqa xmm1, xmmword [esp + 0x30]
pshufb xmm1, xmm5
pxor xmm0, xmm1
movdqa xmm1, xmmword [esp + 0x40]
pshufb xmm1, xmm2
movdqa xmm2, xmmword [esp + 0x60]
pshufb xmm2, xmm4
pxor xmm1, xmm2
movdqa xmm2, xmmword [esp + 0x80]
pshufb xmm2, xmm3
pxor xmm1, xmm2
movdqa xmm2, xmmword [esp + 0xa0]
pshufb xmm2, xmm5
pxor xmm1, xmm2
movdqa xmm2, xmmword [eax - 0x10]
movdqa xmm3, xmm0
punpcklbw xmm3, xmm1
pxor xmm2, xmm3
movdqa xmmword [eax - 0x10], xmm2
movdqa xmm2, xmmword [eax]
punpckhbw xmm0, xmm1
pxor xmm2, xmm0
movdqa xmmword [eax], xmm2
add ecx, 0x20
add eax, 0x20
cmp ecx, edi
jbe 0x4763a0
cmp ecx, esi
jae 0x4764e8
mov eax, dword [esp + 0xc]
sub esi, ecx
dec esi
shr esi, 1
add eax, ecx
inc esi
mov dword [esp + 0xc], esi
lea ecx, [ecx]
movzx esi, word [edx + eax]
mov edi, dword [esp + 0x18]
mov ecx, dword [edi + 4]
mov esi, dword [ecx + esi*4]
mov ebx, dword [esp + 0x1c]
add esi, dword [ecx + ebx*4]
mov ecx, dword [edi]
mov cx, word [ecx + esi*4]
xor word [eax], cx
add eax, 2
sub dword [esp + 0xc], 1
jne 0x4764c0
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.004bfc52
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [esp + 0xbc]
pop edi
pop esi
pop ebx
xor ecx, esp
xor al, al
call fcn.004bfc52
mov esp, ebp
pop ebp
ret 0x14