Function at 0x10021af0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d8
mov eax, dword [0x1003a360]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x1cc], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0x1bc], eax
mov eax, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 0x1d8], eax
mov eax, dword [ebp + 0x28]
push esi
mov dword [ebp - 0x1d4], ebx
mov dword [ebp - 0x1c0], esi
mov dword [ebp - 0x1d0], eax
call fcn.10021600
add esp, 4
test eax, eax
jne 0x10021ed4
push ebx
call fcn.10021630
add esp, 4
test eax, eax
jne 0x10021ed4
imul eax, esi, 0x68
mov ecx, 0
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x1a8], eax
mov edx, dword [eax + 0x1003bdd8]
mov eax, dword [ebp + 0x20]
dec eax
mov dword [ebp - 0x1b0], edx
test al, 7
mov dword [ebp + 0x20], eax
setne cl
shr eax, 3
lea ebx, [ecx + eax]
mov dword [ebp - 0x1ac], ebx
cmp esi, ebx
ja 0x10021f36
lea eax, [esi + 2]
add eax, edx
cmp ebx, eax
jb 0x10021f36
push edi
push ebx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov edi, eax
push ebx
mov dword [ebp - 0x1c4], edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
push dword [ebp - 0x1ac]
mov ebx, eax
mov dword [ebp - 0x1c8], ebx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
push dword [ebp - 0x1ac]
mov dword [ebp - 0x1b4], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 0x10
mov dword [ebp - 0x1b8], eax
test edi, edi
je 0x10021eed
test ebx, ebx
je 0x10021ee4
mov ecx, dword [ebp - 0x1b4]
test ecx, ecx
je 0x10021ee4
test eax, eax
je 0x10021ee4
test esi, esi
je 0x10021c3e
mov eax, dword [ebp - 0x1d4]
push dword [ebp - 0x1d8]
push esi
lea eax, [eax + eax*4]
mov eax, dword [eax*8 + 0x1003cae4]
push ecx
call eax
add esp, 0xc
cmp eax, esi
je 0x10021c3e
mov esi, 9
jmp 0x10021eac
lea eax, [ebp - 0x1a4]
push eax
mov eax, dword [ebp - 0x1a8]
mov eax, dword [eax + 0x1003be24]
call eax
mov esi, eax
add esp, 4
test esi, esi
jne 0x10021eac
push 8
push edi
call fcn.10022410
push 8
lea eax, [ebp - 0x1a4]
push edi
push eax
mov eax, dword [ebp - 0x1a8]
mov eax, dword [eax + 0x1003be28]
call eax
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x10021eac
push dword [ebp + 0xc]
lea eax, [ebp - 0x1a4]
push dword [ebp - 0x1bc]
push eax
mov eax, dword [ebp - 0x1a8]
mov eax, dword [eax + 0x1003be28]
call eax
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10021eac
push dword [ebp + 0x10]
lea eax, [ebp - 0x1a4]
push dword [ebp - 0x1b4]
push eax
mov eax, dword [ebp - 0x1a8]
mov eax, dword [eax + 0x1003be28]
call eax
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10021eac
push dword [ebp - 0x1b8]
lea eax, [ebp - 0x1a4]
push eax
mov eax, dword [ebp - 0x1a8]
mov eax, dword [eax + 0x1003be2c]
call eax
mov esi, eax
add esp, 8
test esi, esi
jne 0x10021eac
mov esi, dword [ebp - 0x1ac]
sub esi, dword [ebp - 0x1b0]
mov eax, esi
sub eax, dword [ebp + 0x10]
sub eax, 2
push eax
push 0
push edi
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [ebp + 0x10]
mov eax, edi
sub eax, dword [ebp - 0x1b0]
mov edx, dword [ebp - 0x1ac]
sub eax, ecx
push ecx
push dword [ebp - 0x1b4]
mov byte [eax + edx - 2], 1
dec edx
add eax, edx
push eax
call sub.VCRUNTIME140.dll_memcpy
dec esi
push esi
push ebx
push dword [ebp - 0x1b0]
mov dword [ebp - 0x1a8], esi
push dword [ebp - 0x1b8]
push dword [ebp - 0x1c0]
call fcn.10024340
mov esi, eax
add esp, 0x2c
test esi, esi
jne 0x10021eac
mov esi, dword [ebp - 0x1a8]
xor edx, edx
test esi, esi
je 0x10021e31
cmp esi, 0x20
jb 0x10021e06
lea eax, [esi - 1]
lea ecx, [esi - 1]
add eax, ebx
add ecx, edi
cmp edi, eax
ja 0x10021da4
cmp ecx, ebx
jae 0x10021e06
mov ecx, esi
mov eax, edi
mov esi, ebx
and ecx, 0xffffffe0
sub esi, edi
mov dword [ebp - 0x1c0], esi
lea esi, [ebx + 0x10]
mov ebx, dword [ebp - 0x1c0]
mov dword [ebp - 0x1bc], esi
mov esi, dword [ebp - 0x1a8]
mov edi, dword [ebp - 0x1bc]
movups xmm0, xmmword [eax]
lea eax, [eax + 0x20]
movups xmm1, xmmword [ebx + eax - 0x20]
pxor xmm1, xmm0
movups xmmword [eax - 0x20], xmm1
movups xmm1, xmmword [edi + edx]
add edx, 0x20
movups xmm0, xmmword [eax - 0x10]
pxor xmm1, xmm0
movups xmmword [eax - 0x10], xmm1
cmp edx, ecx
jb 0x10021dd0
mov edi, dword [ebp - 0x1c4]
mov ebx, dword [ebp - 0x1c8]
cmp edx, esi
jae 0x10021e31
mov dword [ebp - 0x1c4], ebx
lea ecx, [edx + edi]
sub ebx, edi
sub esi, edx
mov al, byte [ecx + ebx]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
sub esi, 1
jne 0x10021e17
mov ebx, dword [ebp - 0x1c8]
mov esi, dword [ebp - 0x1a8]
mov ecx, dword [ebp - 0x1d0]
mov eax, dword [ebp - 0x1ac]
cmp dword [ecx], eax
jae 0x10021e4a
mov dword [ecx], eax
mov esi, 6
jmp 0x10021eac
push esi
mov esi, dword [ebp - 0x1cc]
push edi
push esi
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 0x1b0]
mov eax, dword [ebp - 0x1ac]
sub eax, ecx
push ecx
push dword [ebp - 0x1b8]
dec eax
add esi, eax
push esi
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [ebp - 0x1ac]
add esp, 0x18
mov eax, dword [ebp - 0x1b0]
lea ecx, [edx*8]
sub ecx, dword [ebp + 0x20]
mov byte [esi + eax], 0xbc
mov eax, 0xff
sar eax, cl
mov ecx, dword [ebp - 0x1cc]
and byte [ecx], al
xor esi, esi
mov eax, dword [ebp - 0x1d0]
mov dword [eax], edx
push dword [ebp - 0x1b8]
call fcn.1002a4c0
push dword [ebp - 0x1b4]
call fcn.1002a4c0
push ebx
call fcn.1002a4c0
push edi
call fcn.1002a4c0
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10028fc0
mov esp, ebp
pop ebp
ret
push edi
call fcn.1002a4c0
add esp, 4
test ebx, ebx
je 0x10021efa
push ebx
call fcn.1002a4c0
add esp, 4
mov eax, dword [ebp - 0x1b4]
test eax, eax
je 0x10021f0d
push eax
call fcn.1002a4c0
add esp, 4
mov eax, dword [ebp - 0x1b8]
test eax, eax
je 0x10021f20
push eax
call fcn.1002a4c0
add esp, 4
pop edi
pop esi
mov eax, 0xd
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10028fc0
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0x16
pop esi
xor ecx, ebp
pop ebx
call fcn.10028fc0
mov esp, ebp
pop ebp
ret