Function at 0x4a0fe0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
mov ecx, dword [esp + 0x34]
mov al, byte [edx + 0x101]
push ebx
mov bl, byte [edx + 0x100]
push ebp
mov ebp, dword [esp + 0x38]
push esi
mov esi, dword [esp + 0x34]
push edi
mov edi, dword [esp + 0x48]
and ecx, 3
and esi, 3
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], esi
cmp ebp, edi
jae 0x4a102d
push 0xffffe003
call fcn.004207c0
add esp, 4
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x24
ret
cmp edi, 8
jae 0x4a1052
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
push edi
push eax
mov eax, dword [esp + 0x40]
push ebp
push ecx
call fcn.004a0f20
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ebp, dword [esp + 0x3c]
mov dword [ebp], edi
mov edi, dword [esp + 0x44]
mov ebp, dword [esp + 0x38]
sub ebp, esi
sub edi, ecx
mov dword [esp + 0x1c], ebp
cmp ecx, esi
ja 0x4a107e
sub esi, ecx
add esi, esi
add esi, esi
add esi, esi
mov ecx, 0x20
sub ecx, esi
jmp 0x4a108d
sub ecx, esi
add ecx, ecx
add ecx, ecx
add ecx, ecx
mov esi, 0x20
sub esi, ecx
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], esi
test ecx, ecx
je 0x4a13a1
mov esi, 4
sub esi, ecx
mov dword [esp + 0x20], esi
je 0x4a111f
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
sub ecx, esi
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], ecx
inc bl
movzx ecx, bl
lea esi, [ecx + edx]
movzx ecx, byte [esi]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [esi], al
mov esi, dword [esp + 0x10]
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
movzx eax, al
mov byte [esi], cl
movzx ecx, byte [eax + edx]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
xor cl, byte [eax + esi]
mov al, byte [esp + 0x40]
mov byte [esi], cl
inc esi
sub dword [esp + 0x14], 1
mov dword [esp + 0x1c], esi
jne 0x4a10c8
mov esi, dword [esp + 0x20]
sub dword [esp + 0x48], esi
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
add ebp, 4
add edi, 4
mov dword [esp + 0x1c], ebp
cmp esi, ecx
jae 0x4a137e
sub ecx, esi
mov dword [esp + 0x40], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x30], ecx
je 0x4a1196
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x20]
add ecx, esi
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x38]
nop
mov esi, dword [esp + 0x44]
movzx esi, byte [esi + ecx]
mov ecx, dword [esp + 0x40]
add dword [esp + 0x40], 8
shl esi, cl
mov ecx, dword [esp + 0x38]
inc ecx
mov dword [esp + 0x38], ecx
or dword [esp + 0x14], esi
cmp ecx, dword [esp + 0x30]
jb 0x4a1170
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x48]
test esi, esi
je 0x4a140b
shr esi, 3
mov dword [esp + 0x30], esi
add esi, 4
cmp ecx, esi
jb 0x4a130b
sub ecx, esi
shr ecx, 2
inc ecx
mov dword [esp + 0x44], ecx
mov esi, dword [edi]
inc bl
add edi, 4
movzx ecx, bl
mov dword [esp + 0x2c], edi
lea edi, [ecx + edx]
movzx ecx, byte [edi]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
lea ebp, [eax + edx]
mov al, byte [ebp]
mov byte [edi], al
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
mov byte [ebp], cl
movzx eax, al
movzx edi, byte [eax + edx]
inc bl
movzx ecx, bl
movzx eax, byte [ecx + edx]
mov byte [esp + 0x38], al
mov al, byte [esp + 0x40]
add al, byte [esp + 0x38]
lea ebp, [ecx + edx]
movzx ecx, al
mov byte [esp + 0x40], al
lea eax, [ecx + edx]
movzx ecx, byte [esp + 0x38]
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [ebp], al
add al, byte [esp + 0x38]
mov ebp, dword [esp + 0x10]
movzx eax, al
mov byte [ebp], cl
movzx ecx, byte [eax + edx]
shl ecx, 8
inc bl
movzx eax, bl
lea ebp, [eax + edx]
mov al, byte [esp + 0x40]
or edi, ecx
movzx ecx, byte [ebp]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [ebp], al
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
movzx eax, al
mov byte [ebp], cl
movzx ecx, byte [eax + edx]
inc bl
movzx eax, bl
lea ebp, [eax + edx]
mov al, byte [esp + 0x40]
shl ecx, 0x10
or edi, ecx
movzx ecx, byte [ebp]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [ebp], al
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
movzx eax, al
mov byte [ebp], cl
movzx eax, byte [eax + edx]
shl eax, 0x18
mov ecx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
or eax, edi
mov edi, esi
shl edi, cl
mov ecx, dword [esp + 0x24]
shr esi, cl
mov ecx, dword [esp + 0x48]
or edi, dword [esp + 0x14]
add ebp, 4
xor eax, edi
mov edi, dword [esp + 0x2c]
mov dword [ebp - 4], eax
mov al, byte [esp + 0x40]
sub ecx, 4
sub dword [esp + 0x44], 1
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x14], esi
mov dword [esp + 0x48], ecx
jne 0x4a11c2
test ecx, ecx
je 0x4a1368
sub edi, dword [esp + 0x30]
test ecx, ecx
jbe 0x4a1368
mov esi, edi
sub esi, ebp
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], ecx
inc bl
movzx ecx, bl
lea esi, [ecx + edx]
movzx ecx, byte [esi]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
lea edi, [eax + edx]
mov al, byte [edi]
mov byte [esi], al
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
movzx eax, al
mov byte [edi], cl
movzx ecx, byte [eax + edx]
mov eax, dword [esp + 0x44]
xor cl, byte [eax + ebp]
mov al, byte [esp + 0x40]
mov byte [ebp], cl
inc ebp
sub dword [esp + 0x48], 1
jne 0x4a1323
pop edi
pop esi
pop ebp
mov byte [edx + 0x101], al
mov byte [edx + 0x100], bl
xor eax, eax
pop ebx
add esp, 0x24
ret
jbe 0x4a1394
mov esi, dword [edi]
mov ecx, dword [esp + 0x24]
add edi, 4
shr esi, cl
mov dword [esp + 0x14], esi
jmp 0x4a1196
mov dword [esp + 0x14], 0
jmp 0x4a1196
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x4a13fe
xor esi, esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x38], esi
mov esi, 4
sub esi, ecx
mov dword [esp + 0x30], esi
je 0x4a13f6
mov ecx, dword [esp + 0x38]
jmp 0x4a13d0
mov esi, dword [esp + 0x44]
movzx esi, byte [ecx + esi]
mov ecx, dword [esp + 0x40]
add dword [esp + 0x40], 8
shl esi, cl
mov ecx, dword [esp + 0x38]
inc ecx
mov dword [esp + 0x38], ecx
or dword [esp + 0x14], esi
cmp ecx, dword [esp + 0x30]
jb 0x4a13d0
add edi, 4
jmp 0x4a1196
mov dword [esp + 0x14], 0
jmp 0x4a119a
cmp ecx, 4
jb 0x4a1551
shr ecx, 2
mov dword [esp + 0x44], ecx
jmp 0x4a1420
mov ecx, dword [edi]
mov dword [esp + 0x14], ecx
inc bl
movzx ecx, bl
lea esi, [ecx + edx]
movzx ecx, byte [esi]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
lea ebp, [eax + edx]
mov al, byte [ebp]
mov byte [esi], al
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
mov byte [ebp], cl
movzx eax, al
movzx esi, byte [eax + edx]
inc bl
movzx ecx, bl
movzx eax, byte [ecx + edx]
mov byte [esp + 0x38], al
mov al, byte [esp + 0x40]
add al, byte [esp + 0x38]
lea ebp, [ecx + edx]
movzx ecx, al
mov byte [esp + 0x40], al
lea eax, [ecx + edx]
movzx ecx, byte [esp + 0x38]
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [ebp], al
add al, byte [esp + 0x38]
mov ebp, dword [esp + 0x10]
mov byte [ebp], cl
movzx eax, al
movzx ecx, byte [eax + edx]
shl ecx, 8
inc bl
or esi, ecx
movzx eax, bl
movzx ecx, byte [eax + edx]
lea ebp, [eax + edx]
mov al, byte [esp + 0x40]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [ebp], al
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
movzx eax, al
mov byte [ebp], cl
movzx ecx, byte [eax + edx]
inc bl
movzx eax, bl
lea ebp, [eax + edx]
mov al, byte [esp + 0x40]
shl ecx, 0x10
or esi, ecx
movzx ecx, byte [ebp]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [esp + 0x38], cl
mov byte [ebp], al
add al, byte [esp + 0x38]
mov ebp, dword [esp + 0x10]
movzx ecx, cl
movzx eax, al
mov byte [ebp], cl
movzx ecx, byte [eax + edx]
add edi, 4
shl ecx, 0x18
mov ebp, dword [esp + 0x1c]
mov al, byte [esp + 0x40]
or ecx, esi
xor ecx, dword [esp + 0x14]
add ebp, 4
mov dword [ebp - 4], ecx
mov ecx, dword [esp + 0x48]
sub ecx, 4
sub dword [esp + 0x44], 1
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x48], ecx
jne 0x4a1420
test ecx, ecx
jne 0x4a1315
jmp 0x4a1368