Function at 0x4a2c60
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
cmp dword [ebp + 0xc], 0
push esi
jne 0x4a2c8f
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.004a2390
test eax, eax
jne 0x4a2c85
cmp dword [esi + 0x24], eax
jne 0x4a2c85
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
push ebx
push edi
mov edi, dword [ecx + 0x24]
test edi, edi
je 0x4a2ce3
jmp 0x4a2ca0
mov esi, dword [edi + 0x14]
xor edx, edx
test esi, esi
jle 0x4a2cd9
lea ecx, [edi + 0x24]
lea esp, [esp]
mov eax, dword [ecx]
mov ebx, dword [ebp + 0xc]
cmp dword [ebx + eax*4], 0
jge 0x4a2e55
mov ebx, dword [ebp + 8]
cmp eax, dword [ebx + 8]
jne 0x4a2cd1
cmp dword [ebp + 0x10], 0
jne 0x4a2e55
inc edx
add ecx, 8
cmp edx, esi
jl 0x4a2cb0
mov edi, dword [edi + 4]
test edi, edi
jne 0x4a2ca0
mov ecx, dword [ebp + 8]
mov esi, dword [ecx + 4]
mov eax, esi
test esi, esi
jne 0x4a2cf3
xor edi, edi
mov dword [ebp - 8], edi
jmp 0x4a2d0a
cmp byte [esi], 0
je 0x4a2cfe
inc eax
cmp byte [eax], 0
jne 0x4a2cf8
sub eax, esi
and eax, 0x3fffffff
mov edi, eax
mov dword [ebp - 8], eax
mov ebx, dword [ecx + 0x44]
add ebx, 0x34
cmp dword [ebx + 0xc], 0
mov dword [ebp - 0xc], ebx
je 0x4a2d4a
xor eax, eax
mov edx, edi
mov ecx, esi
test edi, edi
jle 0x4a2d44
movzx edi, byte [ecx]
movzx edi, byte [edi + 0x58e240]
lea ebx, [eax*8]
xor edi, ebx
dec edx
xor eax, edi
inc ecx
test edx, edx
jg 0x4a2d23
mov edi, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
xor edx, edx
div dword [ebx]
jmp 0x4a2d4c
xor edx, edx
push edi
push esi
mov eax, ebx
call fcn.0046f680
add esp, 8
test eax, eax
je 0x4a2d66
mov eax, dword [eax + 8]
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a2d73
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
mov edi, dword [eax + 0x14]
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x18], edi
test edi, edi
jle 0x4a2e40
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0xc]
lea esi, [eax + 0x28]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], esi
mov esi, dword [ebp - 4]
mov ebx, dword [esi]
xor esi, esi
mov dword [ebp - 0x10], ebx
test ecx, ecx
jle 0x4a2e2d
mov edi, dword [edx + 0x10]
lea esp, [esp]
test ebx, ebx
je 0x4a2e03
mov ecx, dword [edi]
mov al, byte [ecx]
mov edx, ebx
test al, al
je 0x4a2de0
mov edi, edi
movzx ebx, byte [edx]
movzx eax, al
mov al, byte [eax + 0x58e240]
cmp al, byte [ebx + 0x58e240]
jne 0x4a2ddd
mov al, byte [ecx + 1]
inc ecx
inc edx
test al, al
jne 0x4a2dc0
mov ebx, dword [ebp - 0x10]
movzx ecx, byte [ecx]
movzx edx, byte [edx]
movzx eax, byte [ecx + 0x58e240]
movzx ecx, byte [edx + 0x58e240]
mov edx, dword [ebp + 8]
sub eax, ecx
mov ecx, dword [ebp - 0x14]
neg eax
sbb eax, eax
inc eax
jmp 0x4a2e07
movzx eax, byte [edi + 0x15]
test eax, eax
je 0x4a2e1f
mov eax, dword [ebp + 0xc]
cmp dword [eax + esi*4], 0
jge 0x4a2e55
cmp esi, dword [edx + 8]
jne 0x4a2e1f
cmp dword [ebp + 0x10], 0
jne 0x4a2e55
inc esi
add edi, 0x18
cmp esi, ecx
jl 0x4a2db0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
add dword [ebp - 4], 8
inc esi
mov dword [ebp - 0xc], esi
cmp esi, edi
jl 0x4a2d97
mov eax, dword [eax + 0xc]
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a2d70
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
pop edi
pop ebx
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret