Function at 0x4a0590
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x88
push ebx
push ebp
push esi
push edi
lea edi, [eax + 7]
shr edi, 3
and eax, 7
mov edx, eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], edx
mov ebx, ecx
jne 0x4a05bd
mov dword [esp + 0x1c], 8
mov edx, dword [esp + 0x1c]
xor ecx, ecx
xor eax, eax
xor ebp, ebp
lea esi, [edi - 1]
test esi, esi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], ebp
jbe 0x4a076c
lea ebx, [ebx]
mov esi, dword [ebx]
mov edx, dword [ebx + 4]
xor esi, eax
xor edx, ecx
test ebp, ebp
mov dword [ebx], esi
mov dword [ebx + 4], edx
jne 0x4a073d
cmp edi, 2
mov esi, ebx
jbe 0x4a0723
lea edi, [esp + 0x28]
call fcn.004a0310
mov eax, dword [0x603634]
test eax, eax
jne 0x4a07fd
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x30], eax
mov edx, 1
jmp 0x4a0630
mov edi, dword [esp + edx*4 + 0x2c]
lea ecx, [edi + esi]
mov dword [esp + edx*4 + 0x30], ecx
and edi, 0x1f
mov ecx, 0x20
sub ecx, edi
mov ebp, eax
shl ebp, cl
mov ecx, eax
mov dword [esp + 0x10], ecx
mov ecx, edi
mov edi, eax
shr edi, cl
or ebp, edi
xor dword [esp + 0x34], ebp
mov edi, dword [esp + edx*4 + 0x30]
lea ecx, [edi + esi]
mov dword [esp + edx*4 + 0x34], ecx
and edi, 0x1f
mov ecx, 0x20
sub ecx, edi
mov ebp, eax
shl ebp, cl
mov ecx, eax
mov dword [esp + 0x10], ecx
mov ecx, edi
mov edi, eax
shr edi, cl
or ebp, edi
xor dword [esp + 0x34], ebp
mov edi, dword [esp + edx*4 + 0x34]
lea ecx, [edi + esi]
mov dword [esp + edx*4 + 0x38], ecx
and edi, 0x1f
mov ecx, 0x20
sub ecx, edi
mov ebp, eax
shl ebp, cl
mov ecx, eax
mov dword [esp + 0x10], ecx
mov ecx, edi
mov edi, eax
shr edi, cl
or ebp, edi
xor dword [esp + 0x34], ebp
mov edi, dword [esp + edx*4 + 0x38]
lea ecx, [edi + esi]
mov dword [esp + edx*4 + 0x3c], ecx
and edi, 0x1f
mov ecx, 0x20
sub ecx, edi
mov ebp, eax
shl ebp, cl
mov ecx, eax
mov dword [esp + 0x10], ecx
mov ecx, edi
mov edi, eax
shr edi, cl
or ebp, edi
xor dword [esp + 0x34], ebp
mov edi, dword [esp + edx*4 + 0x3c]
lea ecx, [edi + esi]
mov dword [esp + edx*4 + 0x40], ecx
and edi, 0x1f
mov ecx, 0x20
sub ecx, edi
mov ebp, eax
shl ebp, cl
mov ecx, eax
mov dword [esp + 0x10], ecx
mov ecx, edi
mov edi, eax
shr edi, cl
mov ecx, dword [esp + 0x34]
or ebp, edi
xor ecx, ebp
add edx, 5
cmp edx, 0x1a
mov dword [esp + 0x34], ecx
jb 0x4a0630
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
jmp 0x4a0748
xor edi, edi
call fcn.004a0310
mov eax, dword [0x603634]
test eax, eax
jne 0x4a07fd
mov edi, dword [esp + 0x20]
jmp 0x4a0748
lea ecx, [esp + 0x30]
mov eax, ebx
call fcn.004a03b0
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
add ebx, 8
inc ebp
lea edx, [edi - 1]
cmp ebp, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x24], ebp
jb 0x4a05e0
mov edx, dword [esp + 0x1c]
xor esi, esi
test edx, edx
jbe 0x4a078e
mov ebp, ebx
lea eax, [esp + 0x14]
sub ebp, eax
lea ebx, [ebx]
lea eax, [esp + esi + 0x14]
mov cl, byte [eax + ebp]
xor byte [eax], cl
inc esi
cmp esi, edx
jb 0x4a0780
cmp edi, 2
jbe 0x4a07a2
lea ecx, [esp + 0x30]
lea eax, [esp + 0x14]
call fcn.004a03b0
jmp 0x4a07c3
cmp edi, 1
jne 0x4a07b4
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
xor edi, edi
lea esi, [esp + 0x14]
call fcn.004a0310
mov edi, dword [esp + 0x20]
cmp edi, 1
jbe 0x4a07f0
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jbe 0x4a07d7
lea esi, [ebx - 8]
mov edi, ebx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
mov dword [ebx - 8], ecx
mov dword [ebx - 4], edx
pop ebx
add esp, 0x88
ret
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x88
ret