Function at 0x47afb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x10], 0
test edi, edi
je 0x47b266
mov esi, dword [ebp + 0xc]
cmp esi, 8
jb 0x47b266
cmp esi, 0x4000
ja 0x47b266
mov eax, dword [edi + 8]
mov dword [ebp + 8], eax
mov eax, dword [edi + 4]
mov dword [ebp - 8], eax
test eax, eax
je 0x47b266
push ebx
lea ebx, [esi + esi*4]
shl ebx, 2
push ebx
call dword [0x5351d0]
add esp, 4
mov dword [edi + 4], eax
test eax, eax
jne 0x47b01e
mov esi, dword [ebp - 8]
or eax, 0xffffffff
pop ebx
mov dword [edi + 4], esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push ebx
push 0
push eax
call fcn.004bdca0
mov ecx, dword [ebp + 8]
add esp, 0xc
mov dword [edi + 8], esi
test ecx, ecx
je 0x47b250
mov esi, dword [ebp - 8]
mov eax, ecx
add esi, 4
mov dword [ebp - 4], ecx
cmp dword [esi + 8], 0
je 0x47b137
cmp ecx, 0x80
je 0x47b05a
mov ebx, dword [esi + 0xc]
jmp 0x47b0b5
cmp dword [edi + 8], 0x80
jne 0x47b077
push dword [edi + 0x18]
push dword [esi + 4]
push dword [esi]
call fcn.0047abf0
add esp, 0xc
mov ebx, eax
jmp 0x47b0b5
cmp dword [esi + 4], 0
jle 0x47b0b3
mov ebx, dword [esi]
test ebx, ebx
je 0x47b0b3
mov ecx, dword [edi + 0x18]
xor edx, edx
movzx eax, byte [edx + ebx]
inc edx
add eax, ecx
imul ecx, eax, 0x401
mov eax, ecx
shr eax, 6
xor ecx, eax
cmp edx, dword [esi + 4]
jl 0x47b088
lea ecx, [ecx + ecx*8]
mov eax, ecx
shr eax, 0xb
xor eax, ecx
imul ebx, eax, 0x8001
jmp 0x47b0b5
xor ebx, ebx
xor edx, edx
mov eax, ebx
div dword [edi + 8]
lea ecx, [edx + edx*4]
mov edx, dword [edi + 4]
shl ecx, 2
mov dword [ebp - 0xc], ecx
cmp dword [edx + ecx + 0xc], 0
jne 0x47b0f1
movups xmm0, xmmword [esi - 4]
movups xmmword [edx + ecx], xmm0
mov eax, dword [esi + 0xc]
mov dword [edx + ecx + 0x10], eax
mov eax, dword [edi + 4]
mov dword [ecx + eax], 0
mov eax, dword [edi + 4]
mov dword [ecx + eax + 0x10], ebx
jmp 0x47b131
push 0x14
call dword [0x5351d0]
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x47b12a
mov eax, dword [esi]
mov edx, dword [ebp - 0xc]
mov dword [ecx + 4], eax
mov eax, dword [esi + 4]
mov dword [ecx + 8], eax
mov dword [ecx + 0x10], ebx
mov eax, dword [edi + 4]
mov eax, dword [edx + eax]
mov dword [ecx], eax
mov dword [ecx + 0xc], 1
mov eax, dword [edi + 4]
mov dword [edx + eax], ecx
jmp 0x47b131
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
add esi, 0x14
sub eax, 1
mov dword [ebp - 4], eax
jne 0x47b043
mov eax, dword [ebp - 8]
mov edx, ecx
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ecx
mov esi, dword [eax]
test esi, esi
je 0x47b23e
nop dword [eax + eax]
mov eax, dword [esi]
mov dword [ebp - 0x14], eax
cmp ecx, 0x80
je 0x47b172
mov ecx, dword [esi + 0x10]
jmp 0x47b1cf
cmp dword [edi + 8], 0x80
jne 0x47b190
push dword [edi + 0x18]
push dword [esi + 8]
push dword [esi + 4]
call fcn.0047abf0
add esp, 0xc
mov ecx, eax
jmp 0x47b1cf
cmp dword [esi + 8], 0
jle 0x47b1cd
mov ebx, dword [esi + 4]
test ebx, ebx
je 0x47b1cd
mov eax, dword [edi + 0x18]
xor edx, edx
movzx ecx, byte [edx + ebx]
inc edx
add ecx, eax
imul eax, ecx, 0x401
mov ecx, eax
shr ecx, 6
xor eax, ecx
cmp edx, dword [esi + 8]
jl 0x47b1a2
lea ecx, [eax + eax*8]
mov eax, ecx
shr eax, 0xb
xor eax, ecx
imul ecx, eax, 0x8001
jmp 0x47b1cf
xor ecx, ecx
xor edx, edx
mov ebx, dword [edi + 4]
mov eax, ecx
div dword [edi + 8]
lea edx, [edx + edx*4]
shl edx, 2
add ebx, edx
cmp dword [ebx + 0xc], 0
jne 0x47b21b
movups xmm0, xmmword [esi]
push esi
movups xmmword [ebx], xmm0
mov eax, dword [esi + 0x10]
mov dword [ebx + 0x10], eax
mov eax, dword [edi + 4]
mov dword [edx + eax], 0
mov eax, dword [edi + 4]
mov dword [edx + eax + 0xc], 1
mov eax, dword [edi + 4]
mov dword [edx + eax + 0x10], ecx
call dword [0x5351dc]
add esp, 4
jmp 0x47b228
mov eax, dword [ebx]
mov dword [esi], eax
mov dword [esi + 0x10], ecx
mov eax, dword [edi + 4]
mov dword [edx + eax], esi
mov eax, dword [ebp - 0x14]
mov esi, eax
mov ecx, dword [ebp + 8]
test eax, eax
jne 0x47b160
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
add eax, 0x14
sub edx, 1
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], edx
jne 0x47b151
push dword [ebp - 8]
call dword [0x5351dc]
mov eax, dword [ebp - 0x10]
add esp, 4
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret