Function at 0x10001050
Capabilities:
Encode data using xor
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, edx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], eax
push ebx
test eax, eax
je 0x10001341
mov ecx, eax
shr ecx, 2
test al, 3
push 4
lea eax, [ecx + 1]
cmovne ecx, eax
push ecx
mov dword [ebp - 4], ecx
call fcn.10005360
mov ebx, eax
add esp, 8
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x10001341
push esi
push edi
mov edi, dword [ebp - 0x24]
xor esi, esi
test edi, edi
je 0x100010c0
nop word [eax + eax]
mov eax, esi
mov ecx, esi
shr eax, 2
and ecx, 3
lea edx, [ebx + eax*4]
shl ecx, 3
mov eax, dword [ebp - 0x20]
movzx eax, byte [eax + esi]
inc esi
shl eax, cl
or dword [edx], eax
cmp esi, edi
jb 0x100010a0
push 4
push 4
call fcn.10005360
mov edi, eax
add esp, 8
mov dword [ebp - 0x1c], edi
test edi, edi
jne 0x100010e7
push ebx
call fcn.10007784
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
mov ebx, 0xfffffffe
mov ecx, eax
mov dword [ebp - 0xc], 2
not ecx
mov dword [ebp - 0x10], 8
mov dword [ebp - 0x24], ecx
mov ecx, 0xfffffffc
sub ecx, eax
lea esi, [eax + 2]
mov dword [ebp - 0x20], ecx
mov ecx, 0xfffffffd
sub ecx, eax
mov dword [ebp - 0x14], ecx
mov ecx, 1
sub ecx, eax
sub ebx, eax
mov dword [ebp - 0x18], ecx
lea ecx, [ebx + esi]
mov eax, ecx
and ecx, 3
shr eax, 2
lea edx, [edi + eax*4]
shl ecx, 3
movzx eax, byte [esi - 2]
shl eax, cl
or dword [edx], eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x10]
add eax, esi
shr eax, 2
and ecx, 0x18
lea edx, [edi + eax*4]
add dword [ebp - 0x10], 0x20
movzx eax, byte [esi - 1]
shl eax, cl
or dword [edx], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x20]
shr eax, 2
lea edx, [edi + eax*4]
add dword [ebp - 0xc], 4
movzx eax, byte [esi]
lea ecx, [ecx + esi]
shl ecx, 3
and ecx, 0x18
shl eax, cl
or dword [edx], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
add eax, esi
shr eax, 2
lea edx, [edi + eax*4]
movzx eax, byte [esi + 1]
lea ecx, [ecx + esi]
add esi, 4
shl ecx, 3
and ecx, 0x18
shl eax, cl
or dword [edx], eax
lea eax, [ebx + esi]
cmp eax, 0x10
jb 0x10001127
mov esi, dword [ebp - 4]
xor edx, edx
mov ebx, dword [ebp - 8]
mov ecx, 0xb54cda56
mov dword [ebp - 0x10], edi
lea eax, [esi - 1]
mov dword [ebp - 0x14], eax
mov eax, 0x34
div esi
mov edx, dword [ebp - 8]
mov ebx, dword [ebx]
imul eax, eax, 0x61c88647
sub ecx, eax
cmp dword [ebp - 0x14], 1
mov eax, esi
mov dword [ebp - 0x18], ecx
mov esi, edx
jb 0x100012d1
mov dword [ebp - 0x10], edi
test ecx, ecx
je 0x100012d1
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], esi
lea eax, [edx + eax*4]
mov dword [ebp - 0x28], eax
jmp 0x10001203
mov esi, dword [ebp - 0xc]
mov eax, ecx
shr eax, 2
and eax, 3
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov esi, dword [esi + eax*4 - 4]
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x24], ecx
mov ecx, ebx
mov dword [ebp - 0x10], edi
mov edi, esi
mov dword [ebp - 0x2c], edx
mov edx, esi
shr ecx, 3
shl edi, 4
xor edi, ecx
shr edx, 5
lea ecx, [ebx*4]
xor edx, ecx
mov ecx, eax
add edi, edx
and ecx, 3
xor ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [ebp - 0x18]
xor edx, esi
mov esi, dword [ebp - 0xc]
xor ecx, ebx
add edx, ecx
xor edi, edx
mov edx, dword [ebp - 8]
sub dword [esi + eax*4], edi
mov ebx, dword [esi + eax*4]
mov edi, dword [ebp - 0x1c]
sub eax, 1
jne 0x10001211
mov ecx, dword [ebp - 0x28]
lea edi, [ebx*4]
mov edx, ebx
and eax, 3
xor eax, dword [ebp - 0x20]
shr edx, 3
mov esi, dword [ecx]
mov ecx, esi
shr ecx, 5
xor edi, ecx
mov ecx, esi
shl ecx, 4
xor edx, ecx
mov ecx, dword [ebp - 0x18]
add edi, edx
xor ebx, ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + eax*4]
xor eax, esi
mov esi, dword [ebp - 0x2c]
add eax, ebx
xor edi, eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 4], eax
sub dword [esi], edi
add ecx, 0x61c88647
mov eax, dword [ebp - 0xc]
mov edi, edx
mov ebx, dword [esi]
mov edx, esi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], eax
jne 0x10001200
mov eax, dword [ebp - 0x24]
mov edi, dword [esi + eax*4 - 4]
lea ecx, [eax*4 - 4]
lea eax, [ecx - 3]
cmp edi, eax
jb 0x10001325
cmp edi, ecx
ja 0x10001325
lea eax, [edi + 1]
push eax
call fcn.10007896
add esp, 4
xor edx, edx
mov ebx, eax
test edi, edi
je 0x1000131a
nop dword [eax + eax]
mov eax, edx
mov ecx, edx
shr eax, 2
and ecx, 3
shl ecx, 3
mov eax, dword [esi + eax*4]
shr eax, cl
mov byte [ebx + edx], al
inc edx
cmp edx, edi
jb 0x10001300
mov eax, dword [ebp + 0xc]
mov byte [ebx + edi], 0
mov dword [eax], edi
jmp 0x10001327
xor ebx, ebx
push esi
call fcn.10007784
push dword [ebp - 0x10]
call fcn.10007784
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret