Function at 0x10022db4
Capabilities:
Encode data using xor

Disassembly:
mov edi, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x104]
xor eax, eax
or ecx, ecx
je 0x10022ddf
mov dword [edi], eax
jns 0x10022dd1
add edi, 0
and dword [esp - 0x4b], edi
lea edi, [edi + 4]
dec ecx
jne 0x10022dc7
mov edi, dword [ebp - 0x100]
call fcn.10023045
lea edi, [edi + ebx*4 - 0x705fb118]
and edi, dword [ebp - 0x80]
or edi, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x104]
clc
push edx
mov edx, 0
rcl edx, 1
rcr edx, 1
rcl dword [edi]
mov edx, 0
rcl edx, 1
lea edi, [edi + 4]
dec ecx
jne 0x10022e06
rcr edx, 1
pop edx
jb 0x10022e5a
shl edi, 5
or dword [esp - 0x46], ebx
shl edi, 0x1b
xor edi, dword [ebp - 0x80]
mov esi, dword [ebp + 0x18]
xchg ecx, ebp
mov ebp, ecx
add ecx, 0xfffffefc
mov ecx, dword [ecx]
dec ecx
mov eax, dword [edi + ecx*4]
cmp eax, dword [esi + ecx*4]
jb 0x10022eb2
ja 0x10022e5a
dec ecx
jns 0x10022e41
mov edi, dword [ebp - 0x80]
mov esi, dword [ebp + 0x18]
add ebp, 0xfffffefc
mov ecx, dword [ebp]
sub ebp, 0xfffffefc
xchg ecx, ebp
or ebp, ebx
mov ebp, ecx
add ecx, 0xfffffefc
mov ecx, dword [ecx]
clc
push edx
mov edx, 0
rcl edx, 1
rcr edx, 1
mov eax, dword [esi]
sbb dword [edi], eax
mov edx, 0
rcl edx, 1
lea esi, [esi + 4]
cmp dword [esp - 0x54], ecx
xor ecx, 0
lea edi, [edi + 4]
dec ecx
jne 0x10022e86
rcr edx, 1
mov edx, dword [esp]
add esp, 4
add ebp, 0xffffff00
mov eax, dword [ebp]
sub ebp, 0xffffff00
xchg eax, ebp
mov ebp, eax
add eax, 0xffffff00
mov eax, dword [eax]
bt dword [eax], ebx
jae 0x10023007
mov edi, dword [ebp - 0x80]
or esi, 0xffffffff
not esi
sub esi, edx
dec esi
not esi
mov ecx, dword [ebp - 0x104]
clc
lea esp, [esp - 4]
xchg dword [esp], edx
mov edx, dword [esp]
lea esp, [esp + 4]
lea esp, [esp - 4]
mov edx, 0
rcl edx, 1
rcr edx, 1
mov eax, dword [esi]
adc dword [edi], eax
mov edx, 0
rcl edx, 1
lea esi, [esi + 4]
jmp 0x10022f1d
push ecx
not ecx
mov ecx, esp
xor dword [ecx - 0x58], ebx
pop ecx
lea edi, [edi + 4]
dec ecx
jne 0x10022f03
rcr edx, 1
pop edx
jb 0x10022f61
mov edi, dword [ebp - 0x80]
sub esi, esi
or esi, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x104]
dec ecx
mov eax, dword [edi + ecx*4]
cmp eax, dword [esi + ecx*4]
jb 0x10023007
ja 0x10022f61
dec ecx
jns 0x10022f48
mov edi, dword [ebp - 0x80]
inc esi
push dword [ebp + 0x18]
sub esi, esi
je 0x10022f77
push ebx
nop
mov dword [esi - 0x7eba4351], ecx
idiv bh
invalid
xor esi, 0xffffffff
sub esp, 0x37
and esi, dword [esp + 0x37]
add esp, 0x3b
mov ecx, dword [ebp - 0x104]
jne 0x10022f92
xor edx, 0
push 0x25ae2f2
xor dword [esp], 0x25ae2f2
add edi, dword [esp]
lea esp, [esp + 4]
clc
lea esp, [esp - 0x48]
mov dword [esp + 0x44], edx
lea esp, [esp + 0x44]
mov edx, 0
rcl edx, 1
rcr edx, 1
mov eax, dword [esi]
sbb dword [edi], eax
mov edx, 0
rcl edx, 1
push esi
inc esi
mov esi, esp
and dword [esi - 0x1b], ebx
pop esi
lea esi, [esi + 4]
lea edi, [edi + 4]
dec ecx
jne 0x10022fb9
rcr edx, 1
xor edx, edx
je 0x10022fe6
imul ebp, esi, 0xc1251c8f
loop 0x10022ff6
shl edx, 0xd
push edx
lea edx, [ecx - 0xda47e5f]
mov edx, esp
mov dword [edx - 0x2f], eax
pop edx
jae 0x10022ffe
xor edx, 0
shl edx, 0x13
add edx, dword [esp]
add esp, 4
dec ebx
jns 0x10022dea
or edi, 0xffffffff
not edi
add edi, edx
mov esi, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x104]
rep movsd dword es:[edi], dword [esi]
push dword [esp]
mov dword [esp + 4], 0xf60004c2
mov dword [esp - 0x3b], edx
jmp 0x10023037
ret 4
jmp 0x10023027