Function at 0x4a7540
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x38
call fcn.00525ec0
mov eax, dword [0x5af1b4]
xor eax, esp
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x3c]
push ebx
mov ebx, dword [esp + 0x44]
push ebp
mov ebp, dword [esi + 0x28]
push edi
mov dword [esp + 0x1c], eax
mov al, byte [esi]
mov edi, ecx
mov ecx, dword [esi + 0x2c]
mov byte [esp + 0x13], al
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ecx
test al, 0x40
jne 0x4a7595
push ecx
lea ecx, [esi + 0x10]
push ecx
push esi
call ebp
mov al, byte [esp + 0x1f]
add esp, 0xc
add dword [esi + 0x20], 1
adc dword [esi + 0x24], 0
movzx eax, al
and eax, 7
mov edx, 0xf
sub edx, eax
mov byte [esi], al
mov eax, edx
xor ecx, ecx
mov dword [esp + 0x20], edx
cmp eax, 0xf
jae 0x4a75c8
movzx ebp, byte [esi + eax]
or ecx, ebp
mov byte [esi + eax], 0
inc eax
shl ecx, 8
cmp eax, 0xf
jb 0x4a75b1
mov ebp, dword [esp + 0x14]
movzx eax, byte [esi + 0xf]
or ecx, eax
mov byte [esi + 0xf], 1
cmp ecx, ebx
je 0x4a75eb
or eax, 0xffffffff
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00511c1b
add esp, 0x38
ret
lea ecx, [ebx + 0xf]
or ecx, 8
shr ecx, 3
add dword [esi + 0x20], ecx
adc dword [esi + 0x24], 0
cmp dword [esi + 0x24], 0x20000000
jb 0x4a7623
ja 0x4a760c
cmp dword [esi + 0x20], 0
jbe 0x4a7623
mov eax, 0xfffffffe
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00511c1b
add esp, 0x38
ret
cmp ebx, 0x10
jb 0x4a76cd
mov eax, ebx
shr eax, 4
lea ebp, [esi + 0x10]
mov dword [esp + 0x24], eax
mov edx, dword [edi]
xor dword [ebp], edx
mov eax, dword [edi + 4]
xor dword [ebp + 4], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [edi + 8]
xor dword [esi + 0x18], ecx
mov edx, dword [edi + 0xc]
xor dword [esi + 0x1c], edx
push eax
push ebp
push ebp
call dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
push ecx
lea edx, [esp + 0x38]
push edx
push esi
call dword [esp + 0x2c]
add esp, 0x18
mov eax, 8
mov cl, byte [eax + esi + 7]
dec eax
add cl, 1
mov byte [eax + esi + 8], cl
jne 0x4a7683
test eax, eax
jne 0x4a7671
mov ecx, dword [edi]
mov edx, dword [edi + 4]
mov eax, dword [esp + 0x1c]
xor ecx, dword [esp + 0x28]
xor edx, dword [esp + 0x2c]
mov dword [eax], ecx
mov ecx, dword [esp + 0x30]
mov dword [eax + 4], edx
xor ecx, dword [edi + 8]
mov edx, dword [esp + 0x34]
xor edx, dword [edi + 0xc]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
add eax, 0x10
add edi, 0x10
sub ebx, 0x10
sub dword [esp + 0x24], 1
mov dword [esp + 0x1c], eax
jne 0x4a7638
mov edx, dword [esp + 0x20]
mov ebp, dword [esp + 0x14]
test ebx, ebx
je 0x4a772c
xor eax, eax
test ebx, ebx
jbe 0x4a76e3
mov cl, byte [eax + edi]
xor byte [esi + eax + 0x10], cl
inc eax
cmp eax, ebx
jb 0x4a76d7
mov edx, dword [esp + 0x18]
lea eax, [esi + 0x10]
push edx
push eax
push eax
call ebp
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x38]
push ecx
push esi
call ebp
add esp, 0x18
xor ecx, ecx
test ebx, ebx
jbe 0x4a7728
mov ebp, dword [esp + 0x1c]
lea edx, [esp + 0x28]
mov eax, edx
sub edi, edx
sub ebp, eax
lea eax, [esp + ecx + 0x28]
mov dl, byte [edi + eax]
xor dl, byte [eax]
inc ecx
mov byte [eax + ebp], dl
cmp ecx, ebx
jb 0x4a7713
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
cmp edx, 0x10
jae 0x4a7747
mov ecx, 0x10
sub ecx, edx
push ecx
lea eax, [esi + edx]
push 0
push eax
call fcn.00516180
add esp, 0xc
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x2c]
push eax
push esi
call ebp
mov ecx, dword [esp + 0x34]
xor dword [esi + 0x10], ecx
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x38]
xor dword [esi + 0x1c], ecx
xor dword [esi + 0x14], edx
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x48]
xor dword [esi + 0x18], eax
mov dl, byte [esp + 0x1f]
add esp, 0xc
pop edi
pop ebp
pop ebx
xor ecx, esp
mov byte [esi], dl
xor eax, eax
call fcn.00511c1b
add esp, 0x38
ret