Function at 0x100ba660
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x14]
sub esp, 0x14
cmp eax, ecx
jge 0x100ba671
mov ecx, eax
mov edx, dword [esp + 0x2c]
push ebx
push ebp
mov ebp, dword [esp + 0x28]
cmp ebp, edx
push esi
mov dword [esp + 0xc], ecx
push edi
mov dword [esp + 0x38], ebp
jl 0x100ba68d
mov dword [esp + 0x38], edx
mov eax, dword [esp + 0x40]
cmp eax, 4
je 0x100ba8e7
cmp eax, 8
jne 0x100baab4
mov dword [esp + 0x2c], 0
test ecx, ecx
jle 0x100ba7b1
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x28]
lea eax, [ebp*4]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], esi
lea ebx, [ebx]
xor edi, edi
cmp dword [esp + 0x38], edi
jle 0x100ba786
mov ecx, dword [esp + 0x14]
mov edx, esi
sub edx, eax
add edx, 4
sub ecx, esi
mov dword [esp + 0x1c], ecx
jmp 0x100ba6f4
mov ecx, dword [esp + 0x1c]
cmp dword [esp + 0x2c], 0
mov ecx, dword [ecx + esi]
mov eax, dword [esi]
mov dword [esp + 0x40], ecx
jle 0x100ba730
mov ecx, dword [edx - 4]
mov ebx, ecx
shr ebx, 1
lea ebp, [ecx + ecx]
or ebx, ebp
or ebx, ecx
or eax, ebx
test edi, edi
jle 0x100ba720
mov ecx, dword [edx - 8]
shl ecx, 0x1f
or eax, ecx
mov ecx, dword [esp + 0x38]
dec ecx
cmp edi, ecx
jge 0x100ba730
mov ecx, dword [edx]
shr ecx, 0x1f
or eax, ecx
test edi, edi
jle 0x100ba73c
mov ecx, dword [esi - 4]
shl ecx, 0x1f
or eax, ecx
and eax, dword [esp + 0x40]
je 0x100ba767
mov ecx, eax
not ecx
test ecx, ecx
je 0x100ba767
lea ebx, [ebx]
mov ebx, eax
shr ebx, 1
lea ebp, [eax + eax]
or ebx, ebp
or ebx, eax
and ebx, dword [esp + 0x40]
mov ecx, eax
mov eax, ebx
xor ecx, eax
jne 0x100ba750
mov dword [esi], eax
inc edi
add edx, 4
add esi, 4
cmp edi, dword [esp + 0x38]
jl 0x100ba6f0
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x3c]
mov edi, dword [esp + 0x2c]
inc edi
lea eax, [ebp*4]
lea ecx, [edx*4]
add dword [esp + 0x14], ecx
add esi, eax
cmp edi, dword [esp + 0x10]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x18], esi
jl 0x100ba6d0
mov ebx, dword [esp + 0x10]
dec ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x2c], ebx
test ebx, ebx
jl 0x100baab4
mov ecx, dword [esp + 0x38]
mov eax, ebx
imul eax, edx
mov esi, edx
mov edx, dword [esp + 0x34]
neg esi
mov edi, ebp
neg edi
lea eax, [edx + eax*4]
add esi, esi
add edi, edi
dec ecx
add esi, esi
add edi, edi
mov edx, ebx
imul edx, ebp
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x28]
lea eax, [eax + edx*4]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], eax
jmp 0x100ba810
mov edx, ecx
test edx, edx
jl 0x100ba8c8
lea edi, [edx + ebp]
mov ebp, dword [esp + 0x38]
sub ebp, eax
lea esi, [eax + edx*4]
lea edi, [eax + edi*4 + 4]
mov dword [esp + 0x20], ebp
jmp 0x100ba834
mov ebp, dword [esp + 0x20]
cmp ebx, dword [esp + 0x14]
mov ebp, dword [esi + ebp]
mov eax, dword [esi]
mov dword [esp + 0x40], ebp
jge 0x100ba86e
mov ecx, dword [edi - 4]
mov ebx, ecx
shr ebx, 1
lea ebp, [ecx + ecx]
or ebx, ebp
or ebx, ecx
or eax, ebx
test edx, edx
jle 0x100ba85f
mov ecx, dword [edi - 8]
shl ecx, 0x1f
or eax, ecx
mov ecx, dword [esp + 0x3c]
cmp edx, ecx
jge 0x100ba87a
mov ebx, dword [edi]
shr ebx, 0x1f
or eax, ebx
cmp edx, ecx
jge 0x100ba87a
mov ebx, dword [esi + 4]
shr ebx, 0x1f
or eax, ebx
and eax, dword [esp + 0x40]
je 0x100ba8a3
mov ebx, eax
not ebx
test ebx, ebx
je 0x100ba8a3
mov ebx, eax
shr ebx, 1
lea ebp, [eax + eax]
or ebx, ebp
or ebx, eax
and ebx, dword [esp + 0x40]
mov ecx, eax
mov eax, ebx
xor ecx, eax
jne 0x100ba888
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x2c]
mov dword [esi], eax
dec edx
sub edi, 4
sub esi, 4
test edx, edx
jge 0x100ba830
mov ebp, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
add dword [esp + 0x38], esi
dec ebx
add eax, edi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x1c], eax
test ebx, ebx
jge 0x100ba810
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
xor ebx, ebx
mov dword [esp + 0x2c], ebx
test ecx, ecx
jle 0x100ba9ba
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x28]
lea eax, [ebp*4]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x18], esi
lea esp, [esp]
xor ecx, ecx
cmp dword [esp + 0x38], ecx
mov dword [esp + 0x1c], ecx
jle 0x100ba993
mov ebp, dword [esp + 0x40]
mov edi, esi
sub edi, eax
sub ebp, esi
mov edx, esi
mov dword [esp + 0x20], ebp
jmp 0x100ba934
mov ebp, dword [esp + 0x20]
mov eax, dword [edx]
mov esi, dword [edx + ebp]
test ebx, ebx
jle 0x100ba93f
or eax, dword [edi]
test ecx, ecx
jle 0x100ba94b
mov ebp, dword [edx - 4]
shl ebp, 0x1f
or eax, ebp
and eax, esi
je 0x100ba974
mov ebp, eax
not ebp
test ebp, ebp
je 0x100ba974
mov ebx, eax
shr ebx, 1
lea ebp, [eax + eax]
or ebx, ebp
or ebx, eax
and ebx, esi
mov ecx, eax
mov eax, ebx
xor ecx, eax
jne 0x100ba957
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x2c]
inc ecx
mov dword [edx], eax
add edi, 4
add edx, 4
cmp ecx, dword [esp + 0x38]
mov dword [esp + 0x1c], ecx
jl 0x100ba930
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x3c]
inc ebx
lea eax, [ebp*4]
lea ecx, [edx*4]
add dword [esp + 0x40], ecx
add esi, eax
cmp ebx, dword [esp + 0x10]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x18], esi
jl 0x100ba910
mov ecx, dword [esp + 0x10]
dec ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x2c], ecx
test ecx, ecx
jl 0x100baab4
mov eax, dword [esp + 0x38]
mov esi, ecx
imul esi, edx
dec eax
mov dword [esp + 0x3c], eax
mov eax, edx
mov edx, dword [esp + 0x34]
lea edx, [edx + esi*4]
mov esi, dword [esp + 0x28]
neg eax
mov edi, ebp
neg edi
add eax, eax
add edi, edi
mov dword [esp + 0x40], edx
add eax, eax
add edi, edi
mov edx, ecx
imul edx, ebp
lea ebx, [esi + edx*4]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ebx
mov esi, dword [esp + 0x3c]
test esi, esi
jl 0x100baa9d
mov edi, dword [esp + 0x40]
lea eax, [esi + ebp]
lea eax, [ebx + eax*4]
sub edi, ebx
lea edx, [ebx + esi*4]
mov dword [esp + 0x38], eax
mov dword [esp + 0x20], edi
jmp 0x100baa39
mov edi, dword [esp + 0x20]
cmp ecx, dword [esp + 0x14]
mov eax, dword [edx]
mov edi, dword [edi + edx]
jge 0x100baa4b
mov ebp, dword [esp + 0x38]
or eax, dword [ebp]
cmp esi, dword [esp + 0x3c]
jge 0x100baa59
mov ebp, dword [edx + 4]
shr ebp, 0x1f
or eax, ebp
and eax, edi
je 0x100baa82
mov ebp, eax
not ebp
test ebp, ebp
je 0x100baa82
mov ebx, eax
shr ebx, 1
lea ebp, [eax + eax]
or ebx, ebp
or ebx, eax
and ebx, edi
mov ecx, eax
mov eax, ebx
xor ecx, eax
jne 0x100baa65
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x1c]
sub dword [esp + 0x38], 4
mov dword [edx], eax
dec esi
sub edx, 4
test esi, esi
jge 0x100baa35
mov ebp, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
add dword [esp + 0x40], eax
dec ecx
add ebx, edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x1c], ebx
test ecx, ecx
jge 0x100baa10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret