Function at 0x100baf60
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
mov edi, ecx
mov dword [ebp - 0xc], edi
cmp dword [edi + 0x2cb8], 2
mov dword [edi + 0x2cb0], 0
jne 0x100bafa9
push 1
call fcn.100bae70
test eax, eax
je 0x100baf9f
push dword [edi + 0x80]
mov ecx, edi
push dword [edi + 0x7c]
call fcn.100ba450
pop edi
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x2cb8], 0
mov eax, dword [edi + 0x3c]
mov ecx, 8
sub ecx, dword [edi + 0x38]
shr eax, cl
shr eax, 0x10
cmp dword [edi + 0x2ca0], 0x25
movzx eax, al
mov dword [ebp - 8], eax
mov eax, dword [edi + 0x2cac]
push ebx
jae 0x100bafe2
test eax, eax
mov ebx, 0x100e8590
mov ecx, 0x100e8580
mov eax, 0x100e85c0
jmp 0x100baff3
test eax, eax
mov ebx, 0x100e85b0
mov ecx, 0x100e85a0
mov eax, 0x100e85fc
cmove ebx, ecx
mov dword [ebp - 4], eax
mov eax, dword [eax]
mov edx, 0xff
xor eax, dword [ebp - 8]
push esi
mov cl, byte [ebx]
xor esi, esi
sar edx, cl
not edx
test eax, edx
je 0x100bb02e
mov edi, dword [ebp - 4]
mov cl, byte [esi + ebx + 1]
inc esi
mov edx, 0xff
sar edx, cl
not edx
mov eax, dword [edi + esi*4]
xor eax, dword [ebp - 8]
test eax, edx
jne 0x100bb013
mov edi, dword [ebp - 0xc]
movzx eax, byte [esi + ebx]
add eax, dword [edi + 0x38]
mov dword [edi + 0x38], eax
cmp eax, 8
jb 0x100bb072
nop dword [eax]
mov eax, dword [edi + 0x40]
cmp eax, dword [edi + 0x44]
jb 0x100bb054
lea ecx, [edi + 0x40]
call fcn.100a4114
mov dl, al
jmp 0x100bb05a
mov dl, byte [eax]
inc eax
mov dword [edi + 0x40], eax
mov ecx, dword [edi + 0x3c]
add dword [edi + 0x38], 0xfffffff8
shl ecx, 8
movzx eax, dl
or ecx, eax
cmp dword [edi + 0x38], 8
mov dword [edi + 0x3c], ecx
jae 0x100bb040
cmp esi, 9
jb 0x100bb132
jne 0x100bb09a
push dword [edi + 0x80]
inc dword [edi + 0x2cb8]
mov ecx, edi
push dword [edi + 0x7c]
call fcn.100ba450
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x2cb8], 0
mov ecx, edi
cmp esi, 0xe
jne 0x100bb0df
push 0x100e843c
call fcn.100ba5f0
push 0xf
mov ecx, edi
lea esi, [eax + 5]
call fcn.100bae70
add eax, 0x7fff
mov dword [edi + 0x80], esi
push esi
push eax
mov ecx, edi
mov dword [edi + 0x7c], eax
call fcn.100ba450
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x78]
sub eax, esi
inc eax
and eax, 3
push 0x100e8404
mov ebx, dword [edi + eax*4 + 0x68]
call fcn.100ba5f0
add eax, 2
cmp eax, 0x101
jne 0x100bb115
cmp esi, 0xa
jne 0x100bb115
xor dword [edi + 0x2cac], 1
xor eax, eax
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
lea ecx, [eax + 1]
cmp ebx, 0x100
cmovb ecx, eax
mov eax, dword [edi + 0x2cc8]
dec eax
cmp ebx, eax
lea esi, [ecx + 1]
cmovb esi, ecx
jmp 0x100bb191
mov ecx, dword [edi + 0x2ca0]
add ecx, esi
mov dword [edi + 0x2cb8], 0
mov eax, ecx
shr eax, 4
sub ecx, eax
mov dword [edi + 0x2ca0], ecx
mov ecx, edi
push 0x100e84e4
call fcn.100ba5f0
movzx ecx, al
mov ebx, dword [edi + ecx*4 + 0x494]
test al, al
je 0x100bb18e
dec dword [edi + ebx*4 + 0x1494]
mov eax, dword [edi + ecx*4 + 0x490]
inc dword [edi + eax*4 + 0x1494]
mov dword [edi + ecx*4 + 0x494], eax
mov dword [edi + ecx*4 + 0x490], ebx
add esi, 2
mov eax, dword [edi + 0x78]
mov ecx, edi
push esi
push ebx
mov dword [edi + eax*4 + 0x68], ebx
mov eax, dword [edi + 0x78]
inc eax
mov dword [edi + 0x7c], ebx
and eax, 3
mov dword [edi + 0x80], esi
mov dword [edi + 0x78], eax
call fcn.100ba450
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret