Function at 0x470c20
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x30]
push ebx
push esi
mov esi, dword [esp + 0x30]
push edi
push eax
lea ecx, [esp + 0x20]
push ecx
mov ecx, esi
call fcn.00494500
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
sub edi, eax
mov eax, dword [esp + 0x20]
mov ebx, edi
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x28]
sar edi, 3
and ebx, 7
cmp eax, edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x34], edi
mov dword [esp + 0xc], eax
jge 0x470ebb
imul eax, ecx
mov ecx, eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], ecx
push ebp
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
lea ecx, [ecx + edx*4]
add ecx, esi
test edi, edi
jle 0x470e52
mov esi, dword [ecx]
mov edx, esi
not edx
mov ebp, edx
xor edx, eax
and edx, 0xfefefe
and ebp, eax
lea edx, [edx + ebp*2]
shr edx, 8
and edx, 0x10101
add edx, 0x7f7f7f
xor edx, 0x7f7f7f
mov ebp, edx
or edx, eax
or ebp, esi
sub ebp, edx
mov dword [ecx], ebp
mov esi, dword [ecx + 4]
mov edx, esi
not edx
mov ebp, edx
xor edx, eax
and edx, 0xfefefe
and ebp, eax
lea edx, [edx + ebp*2]
shr edx, 8
and edx, 0x10101
add edx, 0x7f7f7f
xor edx, 0x7f7f7f
mov ebp, edx
or edx, eax
or ebp, esi
sub ebp, edx
mov dword [ecx + 4], ebp
mov esi, dword [ecx + 8]
mov edx, esi
not edx
mov ebp, edx
xor edx, eax
and edx, 0xfefefe
and ebp, eax
lea edx, [edx + ebp*2]
shr edx, 8
and edx, 0x10101
add edx, 0x7f7f7f
xor edx, 0x7f7f7f
mov ebp, edx
or edx, eax
or ebp, esi
sub ebp, edx
mov dword [ecx + 8], ebp
mov esi, dword [ecx + 0xc]
mov edx, esi
not edx
mov ebp, edx
xor edx, eax
and edx, 0xfefefe
and ebp, eax
lea edx, [edx + ebp*2]
shr edx, 8
and edx, 0x10101
add edx, 0x7f7f7f
xor edx, 0x7f7f7f
mov ebp, edx
or edx, eax
or ebp, esi
sub ebp, edx
mov dword [ecx + 0xc], ebp
mov esi, dword [ecx + 0x10]
mov edx, esi
not edx
mov ebp, edx
xor edx, eax
and edx, 0xfefefe
and ebp, eax
lea edx, [edx + ebp*2]
shr edx, 8
and edx, 0x10101
add edx, 0x7f7f7f
xor edx, 0x7f7f7f
mov ebp, edx
or edx, eax
or ebp, esi
sub ebp, edx
mov dword [ecx + 0x10], ebp
mov esi, dword [ecx + 0x14]
mov edx, esi
not edx
mov ebp, edx
xor edx, eax
and edx, 0xfefefe
and ebp, eax
lea edx, [edx + ebp*2]
shr edx, 8
and edx, 0x10101
add edx, 0x7f7f7f
xor edx, 0x7f7f7f
mov ebp, edx
or edx, eax
or ebp, esi
sub ebp, edx
mov dword [ecx + 0x14], ebp
mov esi, dword [ecx + 0x18]
mov edx, esi
not edx
mov ebp, edx
xor edx, eax
and edx, 0xfefefe
and ebp, eax
lea edx, [edx + ebp*2]
shr edx, 8
and edx, 0x10101
add edx, 0x7f7f7f
xor edx, 0x7f7f7f
mov ebp, edx
or edx, eax
or ebp, esi
sub ebp, edx
mov dword [ecx + 0x18], ebp
mov esi, dword [ecx + 0x1c]
mov edx, esi
not edx
mov ebp, edx
xor edx, eax
and edx, 0xfefefe
and ebp, eax
lea edx, [edx + ebp*2]
shr edx, 8
and edx, 0x10101
add edx, 0x7f7f7f
xor edx, 0x7f7f7f
mov ebp, edx
or ebp, esi
or edx, eax
sub ebp, edx
mov dword [ecx + 0x1c], ebp
add ecx, 0x20
dec edi
jne 0x470c96
mov edi, dword [esp + 0x38]
xor esi, esi
test ebx, ebx
jle 0x470e97
mov edi, dword [ecx + esi*4]
mov edx, edi
not edx
mov ebp, edx
xor edx, eax
and edx, 0xfefefe
and ebp, eax
lea edx, [edx + ebp*2]
shr edx, 8
and edx, 0x10101
add edx, 0x7f7f7f
xor edx, 0x7f7f7f
mov ebp, edx
or ebp, edi
or edx, eax
sub ebp, edx
mov dword [ecx + esi*4], ebp
inc esi
cmp esi, ebx
jl 0x470e58
mov edi, dword [esp + 0x38]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x2c]
inc edx
add ecx, ebp
cmp edx, esi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
jl 0x470c81
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x20
ret