Function at 0x413548
Capabilities:
Encode data using xor
Encrypt data using xxtea

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
xor edx, edx
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], 0x9e3779b9
cmp dword [ebp + 0x10], 1
jle 0x413672
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov ebx, dword [eax + edx*4 - 4]
mov eax, 0x34
cdq
idiv dword [ebp + 0x10]
add eax, 6
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
lea edx, [ecx + eax*4 - 4]
mov dword [ebp - 0x18], edx
jmp 0x41365c
mov ecx, dword [ebp - 0xc]
add dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
shr eax, 2
and eax, 3
mov dword [ebp - 8], eax
xor eax, eax
mov edx, dword [ebp + 0xc]
lea ecx, [edx + 4]
mov dword [ebp - 0x14], ecx
jmp 0x413607
mov edx, dword [ebp - 0x14]
mov edi, ebx
shl edi, 4
mov ecx, dword [edx]
mov edx, ebx
mov esi, ecx
shr edx, 5
shl esi, 2
and edx, 0x7ffffff
xor edx, esi
mov esi, ecx
shr esi, 3
xor ecx, dword [ebp - 4]
and esi, 0x1fffffff
xor esi, edi
mov edi, dword [ebp + 0x14]
add edx, esi
mov esi, eax
and esi, 3
inc eax
xor esi, dword [ebp - 8]
xor ebx, dword [edi + esi*4]
add ebx, ecx
mov ecx, dword [ebp - 0x14]
xor edx, ebx
add dword [ecx - 4], edx
mov edx, dword [ebp - 0x14]
mov ebx, dword [edx - 4]
add dword [ebp - 0x14], 4
mov edx, dword [ebp + 0x10]
dec edx
cmp eax, edx
jl 0x4135b6
mov ecx, dword [ebp + 0xc]
mov edx, ebx
shr edx, 5
mov edi, ebx
mov ecx, dword [ecx]
and edx, 0x7ffffff
mov esi, ecx
and eax, 3
shl esi, 2
xor eax, dword [ebp - 8]
xor edx, esi
mov esi, ecx
shr esi, 3
xor ecx, dword [ebp - 4]
shl edi, 4
and esi, 0x1fffffff
xor esi, edi
add edx, esi
mov esi, dword [ebp + 0x14]
xor ebx, dword [esi + eax*4]
mov eax, dword [ebp - 0x18]
add ebx, ecx
mov ecx, dword [ebp - 0x18]
xor edx, ebx
add edx, dword [eax]
mov dword [ecx], edx
mov edx, dword [ebp - 0x18]
mov ebx, dword [edx]
mov eax, dword [ebp - 0x10]
add dword [ebp - 0x10], 0xffffffff
test eax, eax
jg 0x413597
xor eax, eax
jmp 0x41376e
cmp dword [ebp + 0x10], 0xffffffff
jge 0x413769
neg dword [ebp + 0x10]
mov eax, 0x34
cdq
idiv dword [ebp + 0x10]
add eax, 6
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
imul dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
lea edx, [edx + eax*4 - 4]
mov dword [ebp - 0x20], edx
cmp dword [ebp - 4], 0
je 0x413765
mov eax, dword [ebp - 4]
shr eax, 2
and eax, 3
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
dec eax
test eax, eax
lea edx, [edx + eax*4 - 4]
mov dword [ebp - 0x1c], edx
jle 0x413717
mov edx, dword [ebp - 0x1c]
mov esi, ecx
shl esi, 2
mov ebx, dword [edx]
mov edx, ebx
mov edi, ebx
shr edx, 5
xor edx, esi
mov esi, ecx
shr esi, 3
xor ecx, dword [ebp - 4]
shl edi, 4
xor esi, edi
mov edi, dword [ebp + 0x14]
add edx, esi
mov esi, eax
and esi, 3
dec eax
xor esi, dword [ebp - 8]
xor ebx, dword [edi + esi*4]
add ebx, ecx
mov ecx, dword [ebp - 0x1c]
xor edx, ebx
mov ecx, dword [ecx + 4]
sub ecx, edx
mov edx, dword [ebp - 0x1c]
mov dword [edx + 4], ecx
add dword [ebp - 0x1c], 0xfffffffc
test eax, eax
jg 0x4136cc
mov edx, dword [ebp - 0x20]
mov esi, ecx
shl esi, 2
and eax, 3
mov ebx, dword [edx]
xor eax, dword [ebp - 8]
mov edx, ebx
mov edi, ebx
shr edx, 5
xor edx, esi
mov esi, ecx
shl edi, 4
xor ecx, dword [ebp - 4]
shr esi, 3
xor esi, edi
add edx, esi
mov esi, dword [ebp + 0x14]
xor ebx, dword [esi + eax*4]
mov eax, dword [ebp + 0xc]
add ebx, ecx
xor edx, ebx
mov ecx, dword [eax]
sub ecx, edx
mov edx, dword [ebp + 0xc]
mov dword [edx], ecx
mov eax, dword [ebp - 0xc]
sub dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4136ae
xor eax, eax
jmp 0x41376e
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret