Function at 0x479670
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, dword [eax + 8]
mov ebx, edx
mov edi, dword [eax + 4]
mov edx, 2
mov dword [ebp - 0xc], ecx
mov ecx, dword [eax]
push 0
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], esi
call fcn.0048ffe0
add esp, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov edx, ebx
mov ebx, dword [ebp - 8]
mov ecx, ebx
push edi
push dword [ebp - 4]
push dword [eax + 0x10]
call fcn.00478050
add esp, 0xc
mov edx, ebx
mov ecx, ebx
push edi
mov edi, dword [ebp - 4]
push edi
call fcn.00478650
push 3
push edi
mov edx, ebx
mov ecx, ebx
call fcn.00478780
mov eax, dword [ebp + 8]
mov edx, ebx
push 3
push edi
mov edi, dword [ebp - 0xc]
mov ecx, edi
push dword [eax + 0x14]
call fcn.00478050
mov edx, dword [ebp - 4]
add esp, 0x1c
mov ecx, ebx
call fcn.004791f0
mov ebx, dword [ebp - 4]
xor edx, edx
mov eax, ebx
test ebx, ebx
je 0x47971c
mov esi, ebx
mov cx, word [edi + edx*2]
call fcn.00478030
inc edx
sub esi, eax
cmp edx, ebx
jb 0x479703
mov dword [ebp + 8], esi
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, esi
xor ecx, eax
call fcn.00478030
xor edx, edx
lea ecx, [eax - 1]
mov dword [ebp - 0x10], ecx
test esi, esi
je 0x4797bb
cmp esi, 0x20
jb 0x4797bf
movaps xmm3, xmmword [0x4f7890]
mov eax, esi
and eax, 0xffffffe0
mov dword [ebp + 8], eax
movsx eax, cx
movd xmm0, eax
lea eax, [edi + 0x20]
punpcklwd xmm0, xmm0
pshufd xmm2, xmm0, 0
movups xmm1, xmmword [eax - 0x20]
lea eax, [eax + 0x40]
add edx, 0x20
movaps xmm0, xmm3
xorps xmm0, xmm1
andps xmm0, xmm2
xorps xmm0, xmm1
movups xmmword [eax - 0x60], xmm0
movaps xmm0, xmm3
movups xmm1, xmmword [eax - 0x50]
xorps xmm0, xmm1
andps xmm0, xmm2
xorps xmm0, xmm1
movups xmmword [eax - 0x50], xmm0
movaps xmm0, xmm3
movups xmm1, xmmword [eax - 0x40]
xorps xmm0, xmm1
andps xmm0, xmm2
xorps xmm0, xmm1
movups xmmword [eax - 0x40], xmm0
movaps xmm0, xmm3
movups xmm1, xmmword [eax - 0x30]
xorps xmm0, xmm1
andps xmm0, xmm2
xorps xmm0, xmm1
movups xmmword [eax - 0x30], xmm0
cmp edx, dword [ebp + 8]
jb 0x479760
cmp edx, esi
jae 0x4797df
movzx eax, cx
mov dword [ebp + 8], eax
movzx eax, word [edi + edx*2]
mov ecx, eax
xor ecx, 1
and ecx, dword [ebp + 8]
xor ecx, eax
mov word [edi + edx*2], cx
inc edx
cmp edx, esi
jb 0x4797c5
mov ecx, dword [ebp - 0x10]
mov eax, ebx
sub eax, esi
cmp esi, ebx
jae 0x479879
cmp eax, 0x20
jb 0x479866
and eax, 0x1f
mov edx, ebx
sub edx, eax
movsx eax, cx
mov dword [ebp + 8], edx
movd xmm0, eax
lea eax, [edi + 0x20]
punpcklwd xmm0, xmm0
lea eax, [eax + esi*2]
pshufd xmm2, xmm0, 0
andnps xmm2, xmmword [0x4f7a60]
nop word [eax + eax]
movups xmm0, xmmword [eax - 0x20]
lea eax, [eax + 0x40]
add esi, 0x20
movaps xmm1, xmm2
mov edx, esi
andps xmm1, xmm0
movups xmmword [eax - 0x60], xmm1
movaps xmm1, xmm2
movups xmm0, xmmword [eax - 0x50]
andps xmm0, xmm2
movups xmmword [eax - 0x50], xmm0
movups xmm0, xmmword [eax - 0x40]
andps xmm1, xmm0
movups xmmword [eax - 0x40], xmm1
movaps xmm1, xmm2
movups xmm0, xmmword [eax - 0x30]
andps xmm1, xmm0
movups xmmword [eax - 0x30], xmm1
cmp esi, dword [ebp + 8]
jb 0x479820
cmp edx, ebx
jae 0x479879
not ecx
movzx eax, cx
nop dword [eax + eax]
and word [edi + esi*2], ax
inc esi
cmp esi, ebx
jb 0x479870
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret