Function at 0x4a6bb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov ebx, dword [ebp + 0x18]
cmp byte [ebx + 0x14], 0
jne 0x4a6c1b
mov ecx, dword [ebx + 8]
mov esi, dword [ebx + 0x10]
cmp ecx, dword [ebx + 0xc]
jne 0x4a6c0a
lea eax, [ecx + ecx*2]
shr eax, 1
test ecx, ecx
mov edi, 0x20
cmovne edi, eax
cmp edi, ecx
jbe 0x4a6c15
cmp edi, 0x3fffffff
ja 0x4a6c15
lea eax, [edi*4]
push eax
push dword [ebx + 4]
call fcn.004c88d0
add esp, 8
test eax, eax
je 0x4a6c15
mov dword [ebx + 4], eax
mov dword [ebx + 0xc], edi
mov ecx, dword [ebx + 8]
jmp 0x4a6c0d
mov eax, dword [ebx + 4]
mov dword [eax + ecx*4], esi
inc dword [ebx + 8]
jmp 0x4a6c1b
mov word [ebx + 0x14], 0x101
push ebx
call fcn.004a0230
add esp, 4
mov esi, eax
xor eax, eax
test esi, esi
je 0x4a6f34
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
lea eax, [edi + 0x14]
push edi
push ebx
push eax
push dword [ecx + 4]
push dword [ebp + 0x10]
push esi
call fcn.004a29f0
add esp, 0x18
test eax, eax
je 0x4a6f17
push ebx
push edi
push edi
push esi
push esi
call fcn.004a2030
add esp, 0x14
test eax, eax
mov eax, 0
je 0x4a6f34
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 8]
mov dword [ebp - 0x14], esi
mov eax, dword [esi + 4]
mov edx, dword [ebx + 4]
xor ecx, ecx
cmp eax, edx
jge 0x4a6c98
mov esi, dword [ebx]
xor ecx, ecx
mov edi, eax
nop dword [eax + eax]
or ecx, dword [esi + edi*4]
inc edi
cmp edx, edi
jne 0x4a6c90
cmp edx, eax
mov dword [ebp - 0x18], eax
jge 0x4a6cb8
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
mov eax, dword [ebp - 0x18]
mov edi, edx
nop dword [eax]
or ecx, dword [esi + edi*4]
inc edi
cmp eax, edi
jne 0x4a6cb0
cmp eax, edx
cmovl edx, eax
test edx, edx
mov dword [ebp - 0x10], ebx
jle 0x4a6cdd
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
mov edi, dword [ebx]
xor ebx, ebx
nop dword [eax]
mov eax, dword [edi + ebx*4]
xor eax, dword [esi + ebx*4]
or ecx, eax
inc ebx
cmp edx, ebx
jne 0x4a6cd0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x1c], eax
mov esi, dword [eax + 4]
xor edx, edx
mov eax, dword [ebp - 0x18]
cmp eax, esi
jge 0x4a6d18
mov edx, dword [ebp - 0x1c]
mov ebx, dword [edx]
xor edx, edx
mov edi, eax
nop word cs:[eax + eax]
or edx, dword [ebx + edi*4]
inc edi
cmp esi, edi
jne 0x4a6d10
mov edi, dword [ebp - 0x10]
mov edi, dword [edi + 0xc]
xor edi, dword [ebp - 0x20]
cmp esi, eax
mov dword [ebp - 0x10], edi
jge 0x4a6d48
mov eax, dword [ebp - 0x14]
mov edi, dword [eax]
mov eax, dword [ebp - 0x18]
mov ebx, esi
nop word cs:[eax + eax]
or edx, dword [edi + ebx*4]
inc ebx
cmp eax, ebx
jne 0x4a6d40
mov edi, dword [ebp - 0x10]
or edi, ecx
cmp eax, esi
cmovl esi, eax
test esi, esi
mov dword [ebp - 0x10], edi
jle 0x4a6d7d
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x1c]
mov ecx, dword [ecx]
xor edi, edi
nop word cs:[eax + eax]
mov ebx, dword [ecx + edi*4]
xor ebx, dword [eax + edi*4]
or edx, ebx
inc edi
cmp esi, edi
jne 0x4a6d70
cmp dword [ebp - 0x10], 0
sete al
mov ecx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x1c]
xor ecx, dword [esi + 0xc]
or ecx, edx
sete cl
or cl, al
movzx eax, cl
neg eax
mov dword [ebp - 0x10], eax
mov edi, dword [ebp + 8]
cmp dword [edi + 0x10], 2
jl 0x4a6f21
mov edx, 1
mov ebx, dword [ebp + 0x18]
nop word cs:[eax + eax]
mov eax, dword [edi + 0x14]
mov ecx, eax
xor ecx, edx
not eax
dec ecx
test ecx, eax
jns 0x4a6dd8
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4a6f24
mov dword [ebp - 0x20], edx
push ebx
push dword [ebp + 0x14]
mov esi, dword [ebp - 0x14]
push esi
push esi
push esi
call fcn.004a2030
add esp, 0x14
test eax, eax
je 0x4a6f17
mov ebx, dword [edi + 0xc]
mov eax, dword [esi + 4]
mov ecx, dword [ebx + 4]
xor edi, edi
cmp eax, ecx
jge 0x4a6e18
mov edx, dword [ebx]
xor edi, edi
mov esi, eax
nop word [eax + eax]
or edi, dword [edx + esi*4]
inc esi
cmp ecx, esi
jne 0x4a6e10
cmp ecx, eax
mov dword [ebp - 0x1c], eax
jge 0x4a6e38
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
mov eax, dword [ebp - 0x1c]
mov esi, ecx
nop dword [eax]
or edi, dword [edx + esi*4]
inc esi
cmp eax, esi
jne 0x4a6e30
cmp eax, ecx
cmovl ecx, eax
test ecx, ecx
mov dword [ebp - 0x18], ebx
jle 0x4a6e5d
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
mov ebx, dword [ebx]
xor edx, edx
nop dword [eax]
mov eax, dword [ebx + edx*4]
xor eax, dword [esi + edx*4]
or edi, eax
inc edx
cmp ecx, edx
jne 0x4a6e50
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0xc]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x18], ecx
xor eax, ecx
or eax, edi
mov eax, dword [ebp - 0x10]
mov ecx, 0xffffffff
cmove eax, ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov esi, dword [ecx + 4]
xor edi, edi
mov eax, dword [ebp - 0x1c]
cmp eax, esi
jge 0x4a6ea8
mov edx, dword [ecx]
xor edi, edi
mov ebx, eax
nop word cs:[eax + eax]
or edi, dword [edx + ebx*4]
inc ebx
cmp esi, ebx
jne 0x4a6ea0
cmp esi, eax
jge 0x4a6ec8
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
mov eax, dword [ebp - 0x1c]
mov ebx, esi
nop word cs:[eax + eax]
or edi, dword [edx + ebx*4]
inc ebx
cmp eax, ebx
jne 0x4a6ec0
cmp eax, esi
cmovl esi, eax
test esi, esi
mov dword [ebp - 0x24], ecx
jle 0x4a6eed
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov ebx, dword [ecx]
xor edx, edx
nop dword [eax]
mov ecx, dword [ebx + edx*4]
xor ecx, dword [eax + edx*4]
or edi, ecx
inc edx
cmp esi, edx
jne 0x4a6ee0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x24]
xor ecx, dword [eax + 0xc]
mov eax, dword [ebp - 0x10]
and eax, 1
or eax, edi
or eax, ecx
je 0x4a6f21
mov edx, dword [ebp - 0x20]
inc edx
mov edi, dword [ebp + 8]
cmp edx, dword [edi + 0x10]
mov ebx, dword [ebp + 0x18]
jl 0x4a6dc0
jmp 0x4a6f24
xor eax, eax
cmp byte [ebx + 0x14], 0
jne 0x4a6f4d
jmp 0x4a6f3a
mov ebx, dword [ebp + 0x18]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
and ecx, 1
mov dword [eax], ecx
mov eax, 1
cmp byte [ebx + 0x14], 0
jne 0x4a6f4d
mov esi, dword [ebx + 4]
mov ecx, dword [ebx + 8]
lea edx, [ecx - 1]
mov dword [ebx + 8], edx
mov ecx, dword [esi + ecx*4 - 4]
mov dword [ebx + 0x10], ecx
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret