Function at 0x10111590
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
push ebx
mov ebx, dword [esp + 0x24]
mov eax, ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x2c]
sub eax, edi
and eax, 0xfffffffc
cmp eax, 0x80
jle 0x10111623
mov esi, dword [esp + 0x34]
test esi, esi
jle 0x10111677
push dword [esp + 0x38]
lea eax, [esp + 0x24]
push ebx
push edi
push eax
call fcn.10111250
mov edx, dword [esp + 0x30]
mov eax, esi
mov ebp, dword [esp + 0x34]
add esp, 0x10
sar eax, 2
mov ecx, ebx
sar esi, 1
sub ecx, ebp
add esi, eax
and ecx, 0xfffffffc
push dword [esp + 0x38]
mov eax, edx
sub eax, edi
and eax, 0xfffffffc
push esi
cmp eax, ecx
jge 0x10111603
push edx
push edi
call fcn.10111590
mov edi, ebp
mov dword [esp + 0x3c], edi
jmp 0x10111612
push ebx
push ebp
call fcn.10111590
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x40], ebx
mov eax, ebx
add esp, 0x10
sub eax, edi
and eax, 0xfffffffc
cmp eax, 0x80
jg 0x101115b1
mov esi, dword [esp + 0x38]
cmp edi, ebx
je 0x10111801
lea eax, [edi + 4]
mov dword [esp + 0x10], eax
cmp eax, ebx
je 0x10111801
nop
push dword [edi]
mov ebp, dword [eax]
mov ecx, esi
push ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ebp
call fcn.10114ba0
test al, al
je 0x1011179e
mov eax, dword [esp + 0x10]
sub eax, edi
push eax
lea eax, [edi + 4]
push edi
push eax
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov dword [edi], ebp
jmp 0x101117ee
sub ebx, edi
mov eax, ebx
mov dword [esp + 0x30], ebx
sar eax, 2
mov ecx, eax
mov dword [esp + 0x10], eax
sar ecx, 1
test ecx, ecx
jle 0x10111752
dec eax
mov ebx, eax
mov dword [esp + 0x1c], eax
sar ebx, 1
mov dword [esp + 0x14], ebx
nop
mov eax, dword [edi + ecx*4 - 4]
dec ecx
mov esi, dword [esp + 0x38]
mov ebp, ecx
mov dword [esp + 0x2c], ecx
mov edx, ecx
mov dword [esp + 0x18], eax
cmp ecx, ebx
jge 0x101116f1
nop dword [eax]
lea ebx, [edx + edx]
mov ecx, esi
push dword [edi + ebx*4 + 4]
push dword [edi + ebx*4 + 8]
call fcn.10114ba0
movzx eax, al
lea edx, [ebx + 1]
mov ebx, dword [esp + 0x14]
xor eax, 1
add edx, eax
mov eax, dword [edi + edx*4]
mov dword [edi + ebp*4], eax
mov ebp, edx
cmp edx, ebx
jl 0x101116c0
mov ecx, dword [esp + 0x2c]
cmp ebp, ebx
jne 0x10111708
mov eax, dword [esp + 0x10]
test al, 1
jne 0x10111708
mov eax, dword [edi + eax*4 - 4]
mov dword [edi + ebp*4], eax
mov ebp, dword [esp + 0x1c]
lea ebx, [ebp - 1]
sar ebx, 1
cmp ecx, ebp
jge 0x10111737
push dword [esp + 0x18]
mov eax, dword [edi + ebx*4]
mov ecx, esi
push eax
call fcn.10114ba0
mov ecx, dword [esp + 0x2c]
test al, al
je 0x10111737
mov eax, dword [edi + ebx*4]
mov dword [edi + ebp*4], eax
mov ebp, ebx
dec ebx
sar ebx, 1
cmp ecx, ebp
jl 0x10111711
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
mov dword [edi + ebp*4], eax
test ecx, ecx
jg 0x101116a0
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
cmp eax, 2
jl 0x10111801
nop dword [eax + eax]
mov eax, dword [edi + ebx - 4]
mov dword [esp + 0x30], eax
mov eax, dword [edi]
mov dword [edi + ebx - 4], eax
lea eax, [esp + 0x30]
push dword [esp + 0x38]
push eax
lea eax, [ebx - 4]
sar eax, 2
push eax
push 0
push edi
call fcn.101114d0
add ebx, 0xfffffffc
add esp, 0x14
mov eax, ebx
and eax, 0xfffffffc
cmp eax, 8
jge 0x10111760
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov ebx, dword [esp + 0x10]
mov ecx, esi
add ebx, 0xfffffffc
mov ebp, dword [ebx]
push ebp
push dword [esp + 0x18]
call fcn.10114ba0
test al, al
je 0x101117e0
mov edi, dword [esp + 0x14]
nop dword [eax + eax]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x18], ebx
sub ebx, 4
mov dword [ecx], ebp
mov ecx, esi
mov ebp, dword [ebx]
push ebp
push edi
call fcn.10114ba0
test al, al
jne 0x101117c0
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x30]
mov dword [ecx], eax
mov eax, dword [esp + 0x10]
add eax, 4
mov dword [esp + 0x10], eax
cmp eax, ebx
jne 0x10111640
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret