Function at 0x4a2af0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
push 0x18
push 0x564342
push edi
call fcn.004a2690
mov esi, dword [esp + 0x20]
push 0x10
mov eax, dword [esi]
push eax
push edi
call fcn.004a2690
mov ecx, dword [esi + 4]
push 0x18
push ecx
push edi
call fcn.004a2690
mov edx, dword [esi + 4]
mov ecx, 1
add esp, 0x24
cmp edx, ecx
jle 0x4a2b48
mov eax, dword [esi + 8]
add eax, 4
mov ebx, dword [eax - 4]
test ebx, ebx
je 0x4a2b48
cmp dword [eax], ebx
jl 0x4a2b48
inc ecx
add eax, 4
cmp ecx, edx
jl 0x4a2b35
cmp ecx, edx
push 1
jne 0x4a2bdc
push 1
push edi
xor ebp, ebp
call fcn.004a2690
mov edx, dword [esi + 8]
push 5
mov eax, dword [edx]
dec eax
push eax
push edi
call fcn.004a2690
mov eax, dword [esi + 4]
mov ebx, 1
add esp, 0x18
cmp eax, ebx
jle 0x4a2bbf
mov ecx, dword [esi + 8]
mov eax, dword [ecx + ebx*4]
lea ecx, [ecx + ebx*4]
mov ecx, dword [ecx - 4]
cmp eax, ecx
jle 0x4a2bb7
sub eax, ecx
mov dword [esp + 0x18], eax
mov edx, dword [esi + 4]
sub edx, ebp
push edx
call fcn.004a18f0
push eax
mov eax, ebx
sub eax, ebp
push eax
push edi
call fcn.004a2690
mov eax, dword [esp + 0x28]
add esp, 0x10
dec eax
mov ebp, ebx
mov dword [esp + 0x18], eax
jne 0x4a2b90
mov eax, dword [esi + 4]
inc ebx
cmp ebx, eax
jl 0x4a2b7a
mov ecx, dword [esi + 4]
sub ecx, ebp
push ecx
call fcn.004a18f0
sub ebx, ebp
push eax
push ebx
push edi
call fcn.004a2690
add esp, 0x10
jmp 0x4a2c86
push 0
push edi
call fcn.004a2690
mov ecx, dword [esi + 4]
add esp, 0xc
xor eax, eax
test ecx, ecx
jle 0x4a2c00
mov edx, dword [esi + 8]
cmp dword [edx], 0
je 0x4a2c00
inc eax
add edx, 4
cmp eax, ecx
jl 0x4a2bf3
cmp eax, ecx
push 1
jne 0x4a2c37
push 0
push edi
call fcn.004a2690
mov eax, dword [esi + 4]
add esp, 0xc
xor ebx, ebx
test eax, eax
jle 0x4a2c86
mov edx, dword [esi + 8]
push 5
mov eax, dword [edx + ebx*4]
dec eax
push eax
push edi
call fcn.004a2690
mov eax, dword [esi + 4]
add esp, 0xc
inc ebx
cmp ebx, eax
jl 0x4a2c1a
jmp 0x4a2c86
push 1
push edi
call fcn.004a2690
mov eax, dword [esi + 4]
add esp, 0xc
xor ebx, ebx
test eax, eax
jle 0x4a2c86
mov ecx, dword [esi + 8]
push 1
cmp dword [ecx + ebx*4], 0
jne 0x4a2c63
push 0
push edi
call fcn.004a2690
add esp, 0xc
jmp 0x4a2c7e
push 1
push edi
call fcn.004a2690
mov edx, dword [esi + 8]
push 5
mov eax, dword [edx + ebx*4]
dec eax
push eax
push edi
call fcn.004a2690
add esp, 0x18
mov eax, dword [esi + 4]
inc ebx
cmp ebx, eax
jl 0x4a2c4b
mov ecx, dword [esi + 0xc]
push 4
push ecx
push edi
call fcn.004a2690
mov eax, dword [esi + 0xc]
add esp, 0xc
test eax, eax
je 0x4a2d2f
jle 0x4a2cae
cmp eax, 2
jg 0x4a2cae
mov eax, dword [esi + 0x20]
test eax, eax
jne 0x4a2cb6
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
mov edx, dword [esi + 0x10]
push 0x20
push edx
push edi
call fcn.004a2690
mov eax, dword [esi + 0x14]
push 0x20
push eax
push edi
call fcn.004a2690
mov ecx, dword [esi + 0x18]
push 4
dec ecx
push ecx
push edi
call fcn.004a2690
mov edx, dword [esi + 0x1c]
push 1
push edx
push edi
call fcn.004a2690
mov eax, dword [esi + 0xc]
add esp, 0x30
dec eax
je 0x4a2d00
dec eax
je 0x4a2cf8
or ebp, 0xffffffff
jmp 0x4a2d0b
mov ebp, dword [esi + 4]
imul ebp, dword [esi]
jmp 0x4a2d0b
push esi
call fcn.004a1cc0
add esp, 4
mov ebp, eax
xor ebx, ebx
test ebp, ebp
jle 0x4a2d2f
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x20]
push eax
mov eax, dword [ecx + ebx*4]
cdq
xor eax, edx
sub eax, edx
push eax
push edi
call fcn.004a2690
add esp, 0xc
inc ebx
cmp ebx, ebp
jl 0x4a2d11
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret