Function at 0x477330
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xb4
mov eax, dword [0x4eb0b4]
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 0x4775f1
test al, 0xf
jne 0x4775f1
cmp dword [0x56a844], 3
jl 0x4775f1
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 0x4773a0
mov eax, 0xff
movsx ecx, ax
movd xmm0, ecx
mov ecx, dword [ebp + 0x18]
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 edx, edx
pshufd xmm7, xmm1, 0
movdqa xmm6, xmm7
movdqa xmmword [esp + 0x70], xmm3
psllw xmm6, 4
cmp ecx, 0x20
jb 0x47758f
mov esi, dword [esp + 0xc]
mov edi, dword [ebp + 0x10]
mov ebx, 0x10
sub edi, esi
lea eax, [esi + 0x10]
sub ebx, esi
jmp 0x477486
movdqa xmm3, xmmword [esp + 0x70]
movdqa xmm2, xmmword [edi + eax]
mov esi, dword [ebp + 0x10]
movdqa xmm1, xmmword [edx + esi]
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 eax, 0x20
lea esi, [eax + ebx]
add edx, 0x20
cmp esi, ecx
jbe 0x477480
cmp edx, ecx
jae 0x4775d8
mov edi, dword [esp + 0xc]
mov esi, dword [ebp + 0x10]
sub ecx, edx
dec ecx
shr ecx, 1
sub esi, edi
inc ecx
lea eax, [edi + edx]
mov dword [esp + 0xc], ecx
lea esp, [esp]
movzx ecx, word [esi + eax]
mov edi, dword [esp + 0x18]
mov edx, dword [edi + 4]
mov ecx, dword [edx + ecx*4]
mov ebx, dword [esp + 0x1c]
add ecx, dword [edx + ebx*4]
mov edx, dword [edi]
mov cx, word [edx + ecx*4]
xor word [eax], cx
add eax, 2
sub dword [esp + 0xc], 1
jne 0x4775b0
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.004c1302
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.004c1302
mov esp, ebp
pop ebp
ret 0x14