Function at 0x47c250
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebp
mov ebp, dword [esp + 0x28]
cmp ebp, 0x1000000
push esi
jb 0x47c4b4
mov eax, ebx
lea esi, [esp + 0x30]
mov ecx, edi
call fcn.0047a970
cmp eax, 3
je 0x47c4b4
mov eax, dword [esp + 0x30]
cmp dword [ebx], eax
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
setge dl
cmp dword [ebx + 8], esi
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x3c]
setle byte [esp + 0x2c]
test dl, dl
mov byte [esp + 0xf], dl
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], ecx
je 0x47c2b7
add eax, 1
mov dword [esp + 0x18], eax
cmp byte [esp + 0x2c], 0
je 0x47c2c5
sub esi, 1
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x34]
cmp eax, ecx
mov dword [esp + 0x10], eax
jge 0x47c3b1
jmp 0x47c2db
mov dl, byte [esp + 0xf]
test dl, dl
je 0x47c338
mov edx, dword [edi + 4]
imul edx, eax
add edx, dword [ebx]
mov eax, dword [edi + 0x10]
lea eax, [eax + edx*4]
mov dword [esp + 0x14], eax
mov eax, dword [eax]
mov ecx, ebp
shr ecx, 0x18
mov edx, 0x100
sub edx, ecx
mov ecx, eax
and eax, 0xff00ff
shr ecx, 8
imul eax, edx
mov esi, ecx
and esi, 0xffff00ff
imul esi, edx
and ecx, 0xff00ff
imul ecx, edx
mov edx, dword [esp + 0x14]
shr eax, 8
xor eax, esi
and eax, 0xff00ff
xor eax, ecx
add eax, ebp
mov dword [edx], eax
mov eax, dword [esp + 0x10]
cmp byte [esp + 0x2c], 0
je 0x47c39a
mov ecx, dword [edi + 4]
mov edx, dword [edi + 0x10]
imul ecx, eax
add ecx, dword [ebx + 8]
lea eax, [edx + ecx*4 - 4]
mov dword [esp + 0x14], eax
mov eax, dword [eax]
mov ecx, ebp
shr ecx, 0x18
mov edx, 0x100
sub edx, ecx
mov ecx, eax
and eax, 0xff00ff
shr ecx, 8
imul eax, edx
mov esi, ecx
and esi, 0xffff00ff
imul esi, edx
and ecx, 0xff00ff
imul ecx, edx
mov edx, dword [esp + 0x14]
shr eax, 8
xor eax, esi
and eax, 0xff00ff
xor eax, ecx
add eax, ebp
mov dword [edx], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x3c]
add eax, 1
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x47c2d7
mov esi, dword [esp + 0x20]
cmp dword [ebx + 0xc], ecx
mov eax, dword [ebx + 4]
setle byte [esp + 0x2c]
cmp eax, dword [esp + 0x34]
jl 0x47c437
mov eax, dword [esp + 0x18]
cmp eax, esi
mov dword [esp + 0x30], eax
jge 0x47c437
mov ecx, ebp
shr ecx, 0x18
mov edx, 0x100
sub edx, ecx
mov ecx, dword [edi + 4]
imul ecx, dword [ebx + 4]
add ecx, eax
mov eax, dword [edi + 0x10]
lea eax, [eax + ecx*4]
mov dword [esp + 0x14], eax
mov eax, dword [eax]
mov ecx, eax
and eax, 0xff00ff
shr ecx, 8
imul eax, edx
mov esi, ecx
and esi, 0xffff00ff
imul esi, edx
and ecx, 0xff00ff
imul ecx, edx
shr eax, 8
xor eax, esi
mov esi, dword [esp + 0x20]
and eax, 0xff00ff
xor eax, ecx
mov ecx, dword [esp + 0x14]
add eax, ebp
mov dword [ecx], eax
mov eax, dword [esp + 0x30]
add eax, 1
cmp eax, esi
mov dword [esp + 0x30], eax
jl 0x47c3da
cmp byte [esp + 0x2c], 0
je 0x47c4b4
mov eax, dword [esp + 0x18]
cmp eax, esi
mov dword [esp + 0x2c], eax
jge 0x47c4b4
mov ecx, ebp
shr ecx, 0x18
mov edx, 0x100
sub edx, ecx
mov ecx, dword [ebx + 0xc]
sub ecx, 1
imul ecx, dword [edi + 4]
add ecx, eax
mov eax, dword [edi + 0x10]
lea eax, [eax + ecx*4]
mov dword [esp + 0x30], eax
mov eax, dword [eax]
mov ecx, eax
and eax, 0xff00ff
shr ecx, 8
imul eax, edx
mov esi, ecx
and esi, 0xffff00ff
imul esi, edx
and ecx, 0xff00ff
imul ecx, edx
shr eax, 8
xor eax, esi
and eax, 0xff00ff
xor eax, ecx
mov ecx, dword [esp + 0x30]
add eax, ebp
mov dword [ecx], eax
mov eax, dword [esp + 0x2c]
add eax, 1
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
jl 0x47c456
pop esi
xor eax, eax
pop ebp
add esp, 0x20
ret 0x14