Function at 0x10021580
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100fbd7b
mov eax, dword fs:[0]
push eax
mov eax, 0x204c
call fcn.100476c0
mov eax, dword [0x1015f1d4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [0x10165368]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x2044], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x10164570]
cmp eax, dword [ecx + 8]
jg 0x1002191f
push 0
push 0x10124593
mov ecx, section..data
call fcn.100122df
push edi
lea eax, [ebp - 0x2028]
mov dword [ebp - 0x2020], 0
xorps xmm0, xmm0
push esi
push eax
movq qword [ebp - 0x2028], xmm0
call fcn.10021970
sub esp, 0xc
mov dword [ebp - 0x2014], 0
mov edx, esp
mov dword [ebp - 4], 1
xorps xmm0, xmm0
movq qword [ebp - 0x201c], xmm0
mov dword [edx], 0
mov esi, dword [ebp - 0x2044]
mov ecx, esi
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0xf
mov byte [ebp - 4], 1
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10021658
sub ecx, edi
push ecx
push esi
mov ecx, edx
call fcn.100122df
lea eax, [ebp - 0x201c]
push eax
call fcn.10021a10
mov eax, dword [ebp - 0x2028]
mov ecx, dword [ebp - 0x201c]
mov dword [ebp - 0x2050], eax
mov eax, dword [ebp - 0x2018]
sub eax, ecx
mov byte [ebp - 4], 3
push eax
mov dword [ebp - 0x2038], 4
mov dword [ebp - 0x2034], 8
mov dword [ebp - 0x2030], 0xe
mov dword [ebp - 0x202c], 0x10
mov dword [ebp - 0x2058], ecx
mov dword [ebp - 0x204c], eax
call fcn.10047179
mov esi, eax
push 0x10
mov dword [ebp - 0x2044], esi
call fcn.10047179
mov ecx, dword [ebp - 0x2050]
mov edi, eax
xor eax, eax
add esp, 0x24
mov dword [ebp - 0x2048], eax
movups xmm0, xmmword [ecx]
movups xmmword [edi], xmm0
cmp dword [ebp - 0x204c], eax
jbe 0x1002175e
nop
push ecx
add esi, eax
lea ecx, [ebp - 0x2038]
add eax, dword [ebp - 0x2058]
push esi
push eax
mov dword [ebp - 0x2054], eax
call fcn.10020b00
xor ecx, ecx
nop
mov al, byte [ecx + edi]
lea esi, [esi + 1]
xor byte [esi - 1], al
inc ecx
cmp ecx, 0x10
jb 0x10021720
mov eax, dword [ebp - 0x2054]
mov esi, dword [ebp - 0x2044]
mov ecx, dword [ebp - 0x2050]
movups xmm0, xmmword [eax]
mov eax, dword [ebp - 0x2048]
add eax, 0x10
movups xmmword [edi], xmm0
mov dword [ebp - 0x2048], eax
cmp eax, dword [ebp - 0x204c]
jb 0x10021700
push edi
call fcn.10047182
mov ecx, dword [ebp - 0x2018]
add esp, 4
sub ecx, dword [ebp - 0x201c]
mov edi, dword [ebp - 0x2044]
mov esi, ecx
mov dl, byte [ecx + edi - 1]
movzx eax, dl
sub esi, eax
cmp esi, 0x2000
jbe 0x10021790
xor esi, esi
jmp 0x100217cb
mov eax, esi
cmp esi, ecx
jae 0x100217a0
cmp byte [eax + edi], dl
jne 0x1002178c
inc eax
cmp eax, ecx
jb 0x10021796
push 0x2000
lea eax, [ebp - 0x2010]
push 0
push eax
call fcn.100cede0
add esp, 0xc
test esi, esi
je 0x100217cb
push esi
lea eax, [ebp - 0x2010]
push edi
push eax
call fcn.100ce860
add esp, 0xc
mov dword [ebp - 0x2040], 0
push esi
lea eax, [ebp - 0x2010]
mov dword [ebp - 0x2030], 0
push eax
lea ecx, [ebp - 0x2040]
mov dword [ebp - 0x202c], 0xf
mov byte [ebp - 4], 3
call fcn.100122df
mov edx, dword [0x10139014]
cmp edx, 0x10
jb 0x1002183a
mov ecx, dword [section..data]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10021830
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002195c
push edx
push ecx
call fcn.1004716b
add esp, 8
movups xmm0, xmmword [ebp - 0x2040]
movups xmmword [section..data], xmm0
movq xmm0, qword [ebp - 0x2030]
movq qword [0x10139010], xmm0
push edi
call fcn.10047182
mov ecx, dword [ebp - 0x201c]
add esp, 4
cmp dword [0x10139014], 0x10
mov esi, section..data
cmovae esi, dword [section..data]
test ecx, ecx
je 0x100218cc
mov edx, dword [ebp - 0x2014]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x100218a4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002195c
push edx
push ecx
call fcn.1004716b
add esp, 8
mov dword [ebp - 0x201c], 0
mov dword [ebp - 0x2018], 0
mov dword [ebp - 0x2014], 0
mov ecx, dword [ebp - 0x2028]
test ecx, ecx
je 0x10021902
mov edx, dword [ebp - 0x2020]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x100218f8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002195c
push edx
push ecx
call fcn.1004716b
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100476aa
mov esp, ebp
pop ebp
ret
push 0x10164570
call fcn.100475d4
add esp, 4
cmp dword [0x10164570], 0xffffffff
jne 0x100215e0
push 0x10105640
mov dword [ebp - 4], 0xffffffff
call fcn.1004748c
push 0x10164570
call fcn.1004758a
add esp, 8
jmp 0x100215e0
call fcn.100d847f
int3