Function at 0x4e5fc8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
push ebx
push esi
push edi
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0xc]
mov esi, 4
mov ebx, dword [ecx]
mov ecx, dword [ebp + 0x24]
mov eax, dword [ebp + 8]
mov edx, dword [edx]
mov ecx, dword [ecx]
mov edi, edx
mov dword [ebp - 8], ecx
mov ecx, ebx
shl ecx, 2
mov eax, dword [eax]
mov dword [ebp - 0xc], ecx
imul ecx, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 8]
inc ecx
imul ecx, ebx
add edi, 3
lea esi, [esi + ecx*4]
mov ecx, 0xc
mov dword [ebp - 0x14], esi
mov esi, 0xfffffffc
lea ecx, [ecx + eax*4]
mov dword [ebp - 0x18], ecx
imul edi, dword [ebp - 0x18]
add eax, 3
sub esi, edx
mov edx, dword [ebp + 0x48]
imul esi, eax
mov dword [ebp - 0x1c], edi
mov edi, dword [edx]
shl esi, 2
sub esi, 4
cmp edi, ebx
jg 0x4e64eb
mov ebx, dword [ebp + 0x38]
mov eax, edi
mov ebx, dword [ebx]
shl ebx, 3
add ebx, dword [ebp + 0x44]
neg eax
mov ebx, dword [ebx - 8]
mov dword [ebp - 0x20], ebx
cmp ebx, 1
jne 0x4e605e
mov eax, edi
mov edx, dword [ebp + 0x3c]
mov dword [ebp - 0x24], eax
mov eax, dword [edx]
mov dword [ebp - 0x28], eax
shl eax, 3
add eax, dword [ebp + 0x44]
mov ebx, dword [eax - 8]
mov eax, dword [eax - 4]
mov dword [ebp - 0x2c], ebx
sub eax, dword [ebp - 0x2c]
mov ebx, dword [ebp + 0x44]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x40]
mov eax, dword [eax]
mov edx, dword [ebx + eax*8 - 8]
mov ebx, dword [ebx + eax*8 - 4]
mov dword [ebp - 0x34], edx
sub ebx, dword [ebp - 0x34]
test edi, edi
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x3c], edi
jle 0x4e64e2
lea eax, [eax*4 + 0x5914c4]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x14]
dec edi
sub eax, esi
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x18]
sub eax, esi
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x1c]
sub eax, esi
mov dword [ebp - 0x40], 4
mov dword [ebp - 0x50], eax
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x54], edi
xor esi, dword [ebp - 0x54]
mov eax, dword [ebp + 0x38]
mov eax, dword [eax]
sar esi, 0x1f
xor edi, esi
sub edi, esi
mov esi, dword [ebp - 8]
add edi, dword [ebp - 0x20]
mov dword [ebp - 0x58], esi
test esi, esi
mov dword [eax*4 + 0x5914c0], edi
jle 0x4e64c4
mov eax, dword [ebp - 0xc]
mov esi, 0
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0x28]
mov eax, dword [eax]
mov dword [ebp - 0x60], eax
xor eax, eax
cmp dword [ebp - 0x60], 5
setle al
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x68], esi
xor eax, dword [ebp - 0x68]
mov edi, dword [ebp - 0x5c]
sar eax, 0x1f
xor esi, eax
sub esi, eax
mov eax, dword [ebp - 0x28]
add esi, dword [ebp - 0x2c]
mov dword [eax*4 + 0x5914c0], esi
mov esi, dword [ebp - 0x60]
mov dword [ebp - 0x6c], esi
test esi, esi
mov esi, dword [ebp + 0x2c]
jle 0x4e64a6
sub esi, dword [ebp - 0x14]
add edi, dword [ebp - 0x10]
lea ebx, [esi + edi]
mov esi, dword [ebp - 0x40]
add esi, ebx
mov ebx, dword [ebp + 0x30]
sub ebx, dword [ebp - 0x14]
mov dword [ebp - 0x70], esi
lea edx, [ebx + edi]
mov ebx, dword [ebp - 0x40]
add ebx, edx
mov edx, dword [ebp + 0x34]
sub edx, dword [ebp - 0x14]
mov dword [ebp - 0x74], ebx
lea ecx, [edx + edi]
mov edi, dword [ebp - 0x40]
add edi, ecx
mov ecx, 0
cmp dword [ebp - 0x64], 0
jne 0x4e642f
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x78], ecx
xor eax, dword [ebp - 0x78]
mov edx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x70]
mov ebx, dword [ebp - 0x74]
sar eax, 0x1f
xor ecx, eax
sub ecx, eax
add ecx, dword [ebp - 0x34]
mov dword [edx - 4], ecx
mov eax, dword [0x5914cc]
imul eax, dword [ebp - 0x1c]
mov ecx, dword [0x5914c8]
imul ecx, dword [ebp - 0x18]
add eax, ecx
mov ecx, dword [0x5914c4]
lea eax, [eax + ecx*4]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x7c], ecx
mov ecx, dword [ecx + eax]
mov dword [esi], ecx
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x7c], ecx
mov ecx, dword [ecx + eax]
mov dword [ebx], ecx
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x7c], ecx
mov eax, dword [ecx + eax]
mov ecx, dword [ebp - 0x10]
mov dword [edi], eax
mov eax, dword [ebp - 0x10]
add esi, ecx
add ebx, eax
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x78]
add edi, ecx
inc eax
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x74], ebx
xor ecx, eax
mov dword [ebp - 0x70], esi
sar ecx, 0x1f
xor eax, ecx
sub eax, ecx
add eax, dword [ebp - 0x34]
mov dword [edx - 4], eax
mov ecx, dword [0x5914cc]
imul ecx, dword [ebp - 0x1c]
mov eax, dword [0x5914c8]
imul eax, dword [ebp - 0x18]
add eax, ecx
mov ecx, dword [0x5914c4]
lea eax, [eax + ecx*4]
mov ecx, dword [ebp - 0x48]
mov ebx, dword [ecx + eax]
mov ecx, dword [ebp - 0x4c]
mov dword [esi], ebx
mov esi, dword [ebp - 0x74]
mov ebx, dword [ecx + eax]
mov ecx, dword [ebp - 0x50]
mov dword [esi], ebx
mov esi, dword [ebp - 0x10]
mov ebx, dword [ecx + eax]
add esi, dword [ebp - 0x70]
mov eax, dword [ebp - 0x10]
mov dword [edi], ebx
mov ecx, dword [ebp - 0x10]
add eax, dword [ebp - 0x74]
mov ebx, dword [ebp - 0x78]
mov dword [ebp - 0x70], esi
add edi, ecx
add ebx, 2
mov esi, dword [ebp - 0x38]
mov dword [ebp - 0x74], eax
xor esi, ebx
sar esi, 0x1f
xor ebx, esi
sub ebx, esi
add ebx, dword [ebp - 0x34]
mov dword [edx - 4], ebx
mov eax, dword [0x5914cc]
imul eax, dword [ebp - 0x1c]
mov ecx, dword [0x5914c8]
mov esi, dword [0x5914c4]
mov ebx, dword [ebp - 0x48]
imul ecx, dword [ebp - 0x18]
add eax, ecx
mov ecx, dword [ebp - 0x4c]
lea esi, [eax + esi*4]
mov eax, dword [ebp - 0x70]
mov ebx, dword [ebx + esi]
mov dword [eax], ebx
mov eax, dword [ebp - 0x74]
mov ebx, dword [ecx + esi]
mov ecx, dword [ebp - 0x50]
mov dword [eax], ebx
mov eax, dword [ebp - 0x10]
mov ebx, dword [ecx + esi]
add eax, dword [ebp - 0x70]
mov esi, dword [ebp - 0x10]
mov dword [edi], ebx
mov ecx, dword [ebp - 0x10]
add esi, dword [ebp - 0x74]
mov ebx, dword [ebp - 0x78]
mov dword [ebp - 0x70], eax
add edi, ecx
add ebx, 3
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x74], esi
xor eax, ebx
sar eax, 0x1f
xor ebx, eax
sub ebx, eax
add ebx, dword [ebp - 0x34]
mov dword [edx - 4], ebx
mov esi, dword [0x5914cc]
imul esi, dword [ebp - 0x1c]
mov ecx, dword [0x5914c8]
mov eax, dword [0x5914c4]
mov ebx, dword [ebp - 0x48]
imul ecx, dword [ebp - 0x18]
add esi, ecx
mov ecx, dword [ebp - 0x4c]
lea esi, [esi + eax*4]
mov eax, dword [ebp - 0x70]
mov ebx, dword [ebx + esi]
mov dword [eax], ebx
mov eax, dword [ebp - 0x74]
mov ebx, dword [ecx + esi]
mov ecx, dword [ebp - 0x50]
mov dword [eax], ebx
mov eax, dword [ebp - 0x10]
mov ebx, dword [ecx + esi]
add eax, dword [ebp - 0x70]
mov esi, dword [ebp - 0x10]
mov dword [edi], ebx
mov ecx, dword [ebp - 0x10]
add esi, dword [ebp - 0x74]
mov ebx, dword [ebp - 0x78]
mov dword [ebp - 0x70], eax
add edi, ecx
add ebx, 4
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x74], esi
xor eax, ebx
sar eax, 0x1f
xor ebx, eax
sub ebx, eax
add ebx, dword [ebp - 0x34]
mov dword [edx - 4], ebx
mov esi, dword [0x5914cc]
imul esi, dword [ebp - 0x1c]
mov ecx, dword [0x5914c8]
mov eax, dword [0x5914c4]
mov ebx, dword [ebp - 0x48]
imul ecx, dword [ebp - 0x18]
add esi, ecx
mov ecx, dword [ebp - 0x4c]
lea esi, [esi + eax*4]
mov eax, dword [ebp - 0x70]
mov ebx, dword [ebx + esi]
mov dword [eax], ebx
mov eax, dword [ebp - 0x74]
mov ebx, dword [ecx + esi]
mov ecx, dword [ebp - 0x50]
mov dword [eax], ebx
mov eax, dword [ebp - 0x10]
mov ebx, dword [ecx + esi]
add eax, dword [ebp - 0x70]
mov esi, dword [ebp - 0x10]
mov dword [edi], ebx
mov ecx, dword [ebp - 0x10]
add esi, dword [ebp - 0x74]
mov ebx, dword [ebp - 0x78]
mov dword [ebp - 0x70], eax
add edi, ecx
add ebx, 5
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x74], esi
xor eax, ebx
sar eax, 0x1f
xor ebx, eax
sub ebx, eax
add ebx, dword [ebp - 0x34]
mov dword [edx - 4], ebx
mov esi, dword [0x5914cc]
imul esi, dword [ebp - 0x1c]
mov ecx, dword [0x5914c8]
mov eax, dword [0x5914c4]
mov edx, dword [ebp - 0x48]
imul ecx, dword [ebp - 0x18]
add esi, ecx
mov ecx, dword [ebp - 0x70]
lea esi, [esi + eax*4]
mov eax, dword [ebp - 0x4c]
mov ebx, dword [edx + esi]
mov eax, dword [eax + esi]
mov dword [ecx], ebx
mov ebx, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x10]
mov dword [ebx], eax
mov ebx, dword [ebp - 0x10]
mov esi, dword [ecx + esi]
mov eax, dword [ebp - 0x10]
add ebx, dword [ebp - 0x70]
mov dword [edi], esi
add eax, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x78]
add edi, edx
mov esi, dword [ebp - 0x6c]
add ecx, 6
sub esi, 6
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], esi
cmp esi, 5
jg 0x4e6188
test esi, esi
jle 0x4e64a6
mov eax, dword [ebp - 0x38]
mov edx, ecx
xor eax, ecx
mov esi, dword [ebp - 0x44]
sar eax, 0x1f
xor edx, eax
sub edx, eax
add edx, dword [ebp - 0x34]
mov dword [esi - 4], edx
mov ebx, dword [0x5914cc]
imul ebx, dword [ebp - 0x1c]
mov eax, dword [0x5914c8]
mov esi, dword [0x5914c4]
mov edx, dword [ebp - 0x48]
imul eax, dword [ebp - 0x18]
add ebx, eax
mov eax, dword [ebp - 0x70]
lea ebx, [ebx + esi*4]
mov esi, dword [ebp - 0x4c]
mov edx, dword [edx + ebx]
mov esi, dword [esi + ebx]
mov dword [eax], edx
mov eax, dword [ebp - 0x74]
mov edx, dword [ebp - 0x50]
mov dword [eax], esi
mov esi, dword [ebp - 0x10]
mov ebx, dword [edx + ebx]
mov eax, dword [ebp - 0x10]
add esi, dword [ebp - 0x70]
mov edx, dword [ebp - 0x10]
mov dword [edi], ebx
add eax, dword [ebp - 0x74]
add edi, edx
mov ebx, dword [ebp - 0x6c]
inc ecx
dec ebx
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], ebx
test ebx, ebx
jg 0x4e642f
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x68]
add eax, dword [ebp - 0x5c]
mov edi, dword [ebp - 0x58]
inc ebx
dec edi
mov dword [ebp - 0x5c], eax
mov esi, ebx
mov dword [ebp - 0x58], edi
test edi, edi
jg 0x4e6118
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x40]
dec eax
mov ecx, dword [ebp - 0x3c]
add edx, 4
dec ecx
mov edi, eax
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x3c], ecx
test ecx, ecx
jg 0x4e60cc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x44
xor edx, edx
lea eax, str.GV2_COPY_XYZ:_TOO_MANY_LAYERS:
mov dword [ebp - 0x48], 0x1e
mov dword [ebp - 0x44], eax
lea ecx, [ebp - 0x48]
lea esi, [ebp - 0x3c]
mov dword [ebp - 0x3c], edx
sub esp, 4
lea edx, [0x5776a4]
push ecx
push edx
push 0x384ff00
push 1
push esi
call fcn.00533df0
add esp, 0x18
mov dword [ebp - 0x48], edi
sub esp, 4
lea edi, [ebp - 0x48]
lea esi, [0x5776d4]
lea eax, [ebp - 0x3c]
push edi
lea edi, [ebp - 0x48]
push esi
push eax
call fcn.00534450
add esp, 0x10
mov dword [ebp - 0x48], ebx
sub esp, 4
lea esi, [0x57769c]
lea eax, [ebp - 0x3c]
lea ebx, [0x577698]
push edi
push esi
push eax
call fcn.00534450
add esp, 0x10
sub esp, 4
push 0
push 0
push 0x384ff00
push 0
push ebx
call fcn.00538400
add esp, 0x18