Function at 0x4bd380
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, 0x8000
cmp esi, eax
mov ebx, ecx
push edi
mov edi, dword [ebp + 8]
cmovl eax, esi
push eax
push edi
push dword [ebx + 8]
mov dword [ebp - 4], ebx
mov dword [ebx + 4], 0
mov dword [ebx], 0
call fcn.006b3670
mov eax, 1
add esp, 0xc
xor dl, dl
cmp esi, eax
jle 0x4bd3c9
xor dl, byte [eax + edi]
inc eax
cmp eax, esi
jl 0x4bd3c1
mov ecx, dword [ebx + 4]
mov esi, dword [ebp + 0x10]
add ecx, 8
mov eax, ecx
and ecx, 7
sar eax, 3
add dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [esi + 0x10], 0
cmp dl, byte [edi]
jne 0x4bd739
mov eax, dword [ebp + 0xc]
push eax
push edi
call fcn.004bdc70
mov dword [ebp + 8], eax
test eax, eax
je 0x4bd47d
inc dword [esi + 4]
mov ecx, dword [esi + 8]
cmp dword [esi + 4], ecx
jle 0x4bd43f
mov eax, ecx
lea edi, [ecx + 0x20]
cdq
and edx, 3
add eax, edx
sar eax, 2
add edi, eax
cmp dword [esi + 4], edi
cmovg edi, dword [esi + 4]
lea eax, [edi + edi*4]
shl eax, 3
push eax
push dword [esi]
call fcn.006b91bc
add esp, 8
mov dword [esi], eax
test eax, eax
je 0x4bd7f8
mov dword [esi + 8], edi
mov ecx, dword [esi + 0x10]
mov edx, dword [ebp + 8]
lea eax, [ecx + 1]
mov dword [esi + 0x10], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi]
mov dword [eax + ecx*8], 0x36
mov dword [eax + ecx*8 + 0x18], 3
mov dword [eax + ecx*8 + 8], 3
lea ecx, [eax + ecx*8]
lea eax, [ecx + 0xc]
mov dword [eax], edx
mov dword [ecx + 0x14], eax
lea eax, [ecx + 0x1c]
mov dword [ecx + 0x24], eax
xor eax, eax
mov dword [ebp + 0xc], eax
mov edi, dword [ebx]
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 4]
movzx eax, byte [ecx + edi]
movzx ebx, byte [ecx + edi + 1]
shl eax, 8
or ebx, eax
movzx eax, byte [ecx + edi + 2]
shl ebx, 8
mov ecx, 8
or ebx, eax
sub ecx, edx
shr ebx, cl
lea ecx, [edx + 1]
mov eax, ecx
and ecx, 7
sar eax, 3
add eax, edi
mov edi, dword [ebp - 4]
mov dword [edi], eax
mov dword [edi + 4], ecx
test ebx, 0x8000
je 0x4bd588
mov ecx, edi
call fcn.004bd970
mov ebx, dword [ebp + 0xc]
lea ecx, [eax + 1]
xor eax, eax
mov dword [ebp - 4], ecx
mov dword [ebp + 8], eax
cmp dword [edi], ebx
jge 0x4bd73c
cmp eax, ecx
jge 0x4bd58b
inc dword [esi + 0x24]
mov ecx, dword [esi + 0x28]
cmp dword [esi + 0x24], ecx
jle 0x4bd52e
mov eax, ecx
add ecx, 0x20
cdq
and edx, 3
add eax, edx
sar eax, 2
add ecx, eax
cmp dword [esi + 0x24], ecx
cmovg ecx, dword [esi + 0x24]
push ecx
push dword [esi + 0x20]
mov dword [ebp + 0x10], ecx
call fcn.006b91bc
add esp, 8
mov dword [esi + 0x20], eax
test eax, eax
je 0x4bd7f8
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x28], eax
mov ecx, dword [edi]
add ecx, dword [edi + 8]
movzx eax, byte [ecx]
movzx edx, byte [ecx + 1]
shl eax, 8
or edx, eax
movzx eax, byte [ecx + 2]
shl edx, 8
mov ecx, 8
sub ecx, dword [edi + 4]
or edx, eax
mov eax, dword [esi + 0x20]
shr edx, cl
mov ecx, dword [ebp + 8]
shr edx, 8
mov byte [ecx + eax], dl
mov ecx, dword [edi + 4]
add ecx, 8
mov eax, ecx
and ecx, 7
sar eax, 3
add dword [edi], eax
mov eax, dword [ebp + 8]
inc eax
mov dword [edi + 4], ecx
mov dword [ebp + 8], eax
cmp dword [edi], ebx
jge 0x4bd73c
mov ecx, dword [ebp - 4]
jmp 0x4bd4e4
mov ebx, dword [ebp + 0xc]
cmp dword [edi], ebx
jge 0x4bd73c
inc dword [esi + 4]
mov ebx, dword [esi + 4]
mov ecx, dword [esi + 8]
cmp ebx, ecx
jle 0x4bd5d9
mov eax, ecx
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, 0x20
add eax, ecx
cmp ebx, eax
cmovg eax, ebx
mov dword [ebp + 8], eax
lea eax, [eax + eax*4]
shl eax, 3
push eax
push dword [esi]
call fcn.006b91bc
add esp, 8
mov dword [esi], eax
test eax, eax
je 0x4bd7f8
mov eax, dword [ebp + 8]
mov dword [esi + 8], eax
mov eax, dword [esi + 0x10]
lea ecx, [eax + eax*4]
mov eax, dword [esi]
lea ebx, [eax + ecx*8]
mov ecx, dword [edi]
add ecx, dword [edi + 8]
movzx eax, byte [ecx]
movzx edx, byte [ecx + 1]
shl eax, 8
or edx, eax
movzx eax, byte [ecx + 2]
shl edx, 8
mov ecx, 8
sub ecx, dword [edi + 4]
or edx, eax
shr edx, cl
and edx, 0xffff
test edx, 0x8000
jne 0x4bd623
shr edx, 0xc
mov dword [ebx], edx
mov ecx, dword [edi + 4]
add ecx, 4
jmp 0x4bd631
shr edx, 0xa
sub edx, 0x18
mov dword [ebx], edx
mov ecx, dword [edi + 4]
add ecx, 6
mov eax, ecx
and ecx, 7
sar eax, 3
add dword [edi], eax
mov dword [edi + 4], ecx
mov eax, dword [ebx]
test byte [eax + 0x781a00], 4
je 0x4bd689
mov ecx, dword [edi]
add ecx, dword [edi + 8]
movzx eax, byte [ecx]
movzx edx, byte [ecx + 1]
shl eax, 8
or edx, eax
movzx eax, byte [ecx + 2]
shl edx, 8
mov ecx, 8
sub ecx, dword [edi + 4]
or edx, eax
shr edx, cl
shr edx, 0xf
and dl, 1
mov byte [ebx + 4], dl
mov ecx, dword [edi + 4]
inc ecx
mov eax, ecx
sar eax, 3
add dword [edi], eax
and ecx, 7
mov dword [edi + 4], ecx
jmp 0x4bd68d
mov byte [ebx + 4], 0
mov eax, dword [ebx]
lea ecx, [ebx + 8]
mov dword [ebx + 0x18], 3
mov dword [ecx], 3
mov dword [ebx + 0x24], 0
movzx eax, byte [eax + 0x781a00]
and eax, 3
mov dword [ebx + 0x14], 0
mov dword [ebp + 8], eax
jle 0x4bd729
movzx eax, byte [ebx + 4]
push eax
push ecx
mov ecx, edi
call fcn.004bd810
cmp dword [ebp + 8], 2
jne 0x4bd6e1
movzx eax, byte [ebx + 4]
mov ecx, edi
push eax
lea eax, [ebx + 0x18]
push eax
call fcn.004bd810
jmp 0x4bd729
cmp dword [ebx + 8], 1
jne 0x4bd729
mov eax, dword [ebx]
test byte [eax + 0x781a00], 0x18
je 0x4bd729
mov eax, dword [ebx + 0xc]
cmp eax, 0x100
jl 0x4bd703
sub eax, 0x100
jmp 0x4bd726
cmp eax, 0x88
jl 0x4bd711
sub eax, 0x108
jmp 0x4bd723
cmp eax, 0x10
jl 0x4bd71b
sub eax, 8
jmp 0x4bd723
cmp eax, 8
jl 0x4bd723
sub eax, 0x10
add eax, dword [esi + 0x10]
mov dword [ebx + 0xc], eax
inc dword [esi + 0x10]
mov ebx, dword [ebp + 0xc]
cmp dword [edi], ebx
jl 0x4bd593
jmp 0x4bd73c
mov ebx, dword [ebp + 0xc]
inc dword [esi + 4]
mov ecx, dword [esi + 8]
cmp dword [esi + 4], ecx
jle 0x4bd77c
mov eax, ecx
lea edi, [ecx + 0x20]
cdq
and edx, 3
add eax, edx
sar eax, 2
add edi, eax
cmp dword [esi + 4], edi
cmovg edi, dword [esi + 4]
lea eax, [edi + edi*4]
shl eax, 3
push eax
push dword [esi]
call fcn.006b91bc
add esp, 8
mov dword [esi], eax
test eax, eax
je 0x4bd7fd
mov dword [esi + 8], edi
mov ecx, dword [esi + 0x10]
xor edi, edi
lea eax, [ecx + 1]
mov dword [esi + 0x10], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi]
mov dword [eax + ecx*8], 0x16
mov dword [eax + ecx*8 + 0x18], 3
mov dword [eax + ecx*8 + 8], 3
lea ecx, [eax + ecx*8]
lea eax, [ecx + 0xc]
mov dword [ecx + 0x14], eax
lea eax, [ecx + 0x1c]
mov dword [ecx + 0x24], eax
cmp dword [esi + 0x10], edi
jle 0x4bd7e5
xor edx, edx
lea esp, [esp]
mov ecx, dword [esi]
add ecx, edx
cmp dword [ecx + 0x14], 0
jne 0x4bd7d0
lea eax, [ecx + 0xc]
mov dword [ecx + 0x14], eax
cmp dword [ecx + 0x24], 0
jne 0x4bd7dc
lea eax, [ecx + 0x1c]
mov dword [ecx + 0x24], eax
inc edi
add edx, 0x28
cmp edi, dword [esi + 0x10]
jl 0x4bd7c0
test ebx, ebx
je 0x4bd7ef
push esi
call fcn.004bdb30
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
call fcn.004ad940
call fcn.004ad940
int3