Function at 0x10013980
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi + 0xf74]
push edi
mov edi, dword [esi + 0xaf0]
push 1
mov dword [ebp - 0xc], edi
call fcn.100122d0
mov ecx, dword [esi + 0xf74]
push 2
mov dword [ebp - 0x10], eax
call fcn.10012390
dec eax
je 0x10013af8
dec eax
je 0x10013ad8
dec eax
je 0x10013abc
mov ecx, dword [esi + 0xf74]
push 1
call fcn.100122d0
test eax, eax
je 0x10013a3e
mov eax, dword [esi + 0xf74]
push eax
mov eax, dword [esi + 0xc0]
mov ecx, edi
mov dword [ebp - 4], 2
call fcn.10013430
mov eax, dword [esi + 0xbc]
mov ecx, dword [esi + 0xaf0]
xor ebx, ebx
test eax, eax
mov dword [ebp - 8], ebx
jle 0x10013a9d
lea ecx, [ecx]
mov eax, dword [esi + 0xb8]
xor edi, edi
test eax, eax
jle 0x10013cea
lea edx, [ebx + edi]
test edx, edx
je 0x10013ccc
test ebx, ebx
jne 0x10013c95
mov eax, dword [ecx - 0x70]
and eax, 1
jmp 0x10013ccf
mov ecx, dword [esi + 0xf74]
push 1
call fcn.100122d0
test eax, eax
je 0x10013a5f
mov ecx, esi
mov dword [ebp - 4], 4
call fcn.100135b0
jmp 0x100139f4
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10013a9d
mov eax, dword [esi + 0xc0]
xor ecx, ecx
test eax, eax
jle 0x10013a9d
lea esp, [esp]
mov eax, dword [edi]
mov edx, eax
not edx
xor edx, eax
and edx, 1
xor edx, eax
mov dword [edi], edx
mov eax, dword [esi + 0xc0]
inc ecx
add edi, 0x70
cmp ecx, eax
jl 0x10013a80
mov eax, dword [ebp + 8]
test eax, eax
jne 0x10013d01
mov eax, dword [ebp - 4]
pop edi
mov dword [esi + 0x490], eax
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, esi
mov dword [ebp - 4], 3
call fcn.100135b0
cmp eax, 0xffffff9c
jne 0x10013a66
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esi + 0xf74]
mov eax, dword [esi + 0xc0]
push ecx
mov ecx, edi
mov dword [ebp - 4], 1
call fcn.10013430
jmp 0x10013a66
mov ecx, dword [esi + 0xf74]
push 1
call fcn.100122d0
xor ebx, ebx
test eax, eax
mov dword [ebp - 8], ebx
je 0x10013bd5
mov eax, dword [esi + 0xb8]
test eax, eax
mov dword [ebp - 4], 6
jle 0x10013a66
jmp 0x10013b30
mov ecx, dword [esi + 0xf74]
push 1
call fcn.100122d0
test eax, eax
je 0x10013b9f
mov eax, dword [esi + 0xbc]
xor ebx, ebx
test eax, eax
jle 0x10013b89
lea ecx, [ecx]
mov edx, dword [esi + 0xb8]
mov eax, dword [ebp - 8]
imul edx, ebx
mov ecx, dword [esi + 0xf74]
add edx, eax
imul edx, edx, 0x70
push 1
add edi, edx
call fcn.100122d0
mov edx, dword [edi]
xor eax, edx
and eax, 1
xor edx, eax
mov dword [edi], edx
mov eax, dword [esi + 0xbc]
mov edi, dword [ebp - 0xc]
inc ebx
cmp ebx, eax
jl 0x10013b50
mov ebx, dword [ebp - 8]
mov eax, dword [esi + 0xb8]
inc ebx
cmp ebx, eax
mov dword [ebp - 8], ebx
jl 0x10013b30
jmp 0x10013a66
mov ecx, dword [esi + 0xbc]
xor eax, eax
test ecx, ecx
jle 0x10013b8c
jmp 0x10013bb0
mov ecx, dword [esi + 0xb8]
imul ecx, eax
add ecx, ebx
imul ecx, ecx, 0x70
mov edx, dword [ecx + edi]
add ecx, edi
and edx, 0xfffffffe
mov dword [ecx], edx
mov ecx, dword [esi + 0xbc]
inc eax
cmp eax, ecx
jl 0x10013bb0
jmp 0x10013b8c
mov eax, dword [esi + 0xbc]
test eax, eax
mov dword [ebp - 4], 5
jle 0x10013a66
lea ebx, [ebx]
mov ecx, dword [esi + 0xf74]
push 1
call fcn.100122d0
test eax, eax
je 0x10013c5d
mov eax, dword [esi + 0xb8]
xor ebx, ebx
test eax, eax
jle 0x10013c47
lea ecx, [ecx]
mov edx, dword [esi + 0xb8]
imul edx, dword [ebp - 8]
mov ecx, dword [esi + 0xf74]
add edx, ebx
imul edx, edx, 0x70
push 1
add edi, edx
call fcn.100122d0
mov edx, dword [edi]
xor eax, edx
and eax, 1
xor edx, eax
mov dword [edi], edx
mov eax, dword [esi + 0xb8]
mov edi, dword [ebp - 0xc]
inc ebx
cmp ebx, eax
jl 0x10013c10
mov ebx, dword [ebp - 8]
mov eax, dword [esi + 0xbc]
inc ebx
cmp ebx, eax
mov dword [ebp - 8], ebx
jl 0x10013bf0
jmp 0x10013a66
mov ecx, dword [esi + 0xb8]
xor eax, eax
test ecx, ecx
jle 0x10013c4a
lea esp, [esp]
mov ecx, dword [esi + 0xb8]
imul ecx, ebx
add ecx, eax
imul ecx, ecx, 0x70
mov edx, dword [ecx + edi]
add ecx, edi
and edx, 0xfffffffe
mov dword [ecx], edx
mov ecx, dword [esi + 0xb8]
inc eax
cmp eax, ecx
jl 0x10013c70
jmp 0x10013c4a
test edi, edi
jne 0x10013cad
mov eax, dword [esi + 0xb8]
imul eax, eax, 0x70
mov edx, ecx
sub edx, eax
mov eax, dword [edx]
and eax, 1
jmp 0x10013ccf
mov edx, dword [esi + 0xb8]
mov eax, dword [ecx - 0x70]
imul edx, edx, 0x70
mov ebx, ecx
sub ebx, edx
mov edx, dword [ebx]
mov ebx, dword [ebp - 8]
and eax, 1
and edx, 1
cmp eax, edx
je 0x10013ccf
mov eax, dword [ebp - 0x10]
mov edx, dword [ecx]
and eax, 1
xor eax, edx
mov dword [ecx], eax
mov eax, dword [esi + 0xb8]
add ecx, 0x70
inc edi
cmp edi, eax
jl 0x10013a20
mov eax, dword [esi + 0xbc]
inc ebx
cmp ebx, eax
mov dword [ebp - 8], ebx
jl 0x10013a10
jmp 0x10013a9d
cmp eax, 3
jne 0x10013d1a
mov ecx, dword [ebp - 4]
pop edi
mov dword [esi + 0x498], ecx
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [ebp - 4]
pop edi
mov dword [esi + 0x494], edx
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4