Function at 0x47af8c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x18]
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
push ebx
push dword [ebp + 8]
inc esi
shl esi, cl
call fcn.0045a9f5
pop ecx
pop ecx
test eax, eax
je 0x47b16e
mov eax, dword [ebp + 0x18]
cmp eax, 3
jg 0x47b023
xor ecx, ecx
mov dword [ebp + 0x10], ecx
test ebx, ebx
jle 0x47b165
and dword [ebp + 0x18], 0
xor edx, edx
test esi, esi
jle 0x47b004
mov ebx, dword [ebp + 0x18]
mov eax, edx
xor eax, dword [ebp + 0x14]
lea ecx, [eax - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
and ecx, eax
neg ecx
and ecx, 1
neg ecx
and ecx, dword [edi + edx*4]
or ebx, ecx
inc edx
cmp edx, esi
jl 0x47afd8
mov ecx, dword [ebp + 0x10]
mov dword [ebp + 0x18], ebx
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x18]
mov eax, dword [eax]
mov dword [eax + ecx*4], edx
mov eax, esi
shl eax, 2
inc ecx
add edi, eax
mov dword [ebp + 0x10], ecx
cmp ecx, ebx
jl 0x47afcb
jmp 0x47b165
mov edx, dword [ebp + 0x14]
lea ecx, [eax - 2]
sar edx, cl
xor eax, eax
inc eax
shl eax, cl
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 4], eax
dec eax
and ecx, eax
mov eax, edx
mov dword [ebp - 0x18], ecx
not eax
shr eax, 0x1f
lea ecx, [edx - 1]
shr ecx, 0x1f
and ecx, eax
mov eax, edx
neg ecx
xor eax, 1
and ecx, 1
neg ecx
mov dword [ebp - 0x28], ecx
lea ecx, [eax - 1]
not eax
shr eax, 0x1f
shr ecx, 0x1f
and ecx, eax
mov eax, edx
neg ecx
xor eax, 2
and ecx, 1
xor edx, 3
neg ecx
mov dword [ebp - 0x24], ecx
lea ecx, [eax - 1]
not eax
shr eax, 0x1f
shr ecx, 0x1f
and ecx, eax
lea eax, [edx - 1]
shr eax, 0x1f
not edx
shr edx, 0x1f
neg ecx
and eax, edx
and ecx, 1
neg eax
neg ecx
and eax, 1
mov dword [ebp - 0x20], ecx
neg eax
xor edx, edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], edx
test ebx, ebx
jle 0x47b165
mov eax, esi
shl eax, 2
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 8]
and dword [ebp + 0x10], 0
xor esi, esi
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], esi
test ecx, ecx
jle 0x47b14e
lea eax, [edi + ecx*8]
mov ebx, ecx
mov dword [ebp + 0x18], eax
lea edx, [edi + ecx*4]
imul eax, ecx, 0xc
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x10], edx
add eax, edi
mov dword [ebp - 0xc], eax
mov eax, dword [eax]
mov ecx, dword [ecx]
and ecx, dword [ebp - 0x20]
and eax, dword [ebp - 0x1c]
xor esi, dword [ebp - 0x18]
or ecx, eax
mov edx, dword [edx]
and edx, dword [ebp - 0x24]
or edx, ecx
lea ecx, [esi - 1]
not esi
shr ecx, 0x1f
shr esi, 0x1f
and ecx, esi
mov esi, dword [ebp - 8]
neg ecx
and ecx, 1
neg ecx
mov eax, dword [edi + esi*4]
and eax, dword [ebp - 0x28]
or eax, edx
mov edx, dword [ebp - 0x10]
and ecx, eax
add edx, 4
or dword [ebp + 0x10], ecx
inc esi
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x18]
add eax, 4
add ecx, 4
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], eax
mov dword [ebp + 0x18], ecx
mov dword [ebp - 0x10], edx
cmp esi, ebx
jl 0x47b0e8
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
mov ecx, dword [eax]
mov esi, dword [ebp + 0x10]
add edi, dword [ebp - 0x2c]
mov dword [ecx + edx*4], esi
inc edx
mov dword [ebp - 0x14], edx
cmp edx, ebx
jl 0x47b0bf
mov ecx, dword [ebp + 8]
xor eax, eax
inc eax
mov dword [ecx + 4], ebx
pop edi
pop esi
pop ebx
leave
ret