Function at 0x10021680
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100554d8
mov eax, dword fs:[0]
push eax
sub esp, 0x104
mov eax, dword [0x10069018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
movzx ecx, word [ebp + 0xc]
movzx eax, word [ebp + 8]
movzx edx, word [ebp + 0x14]
mov dword [ebp - 0x60], ecx
movzx ecx, word [ebp + 0x10]
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x44], 0
mov dword [ebp - 4], 1
test ax, ax
je 0x10021a97
test cx, cx
je 0x10021a97
cmp dword [esi + 0x2c], 0
ja 0x10021a97
cmp dword [ebp + 0x2c], 0x10
lea eax, [ebp + 0x18]
lea ecx, [ebp - 0x28]
cmovae eax, dword [ebp + 0x18]
push eax
call fcn.100049e0
mov byte [ebp - 4], 2
mov edi, dword [esi + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test edi, edi
je 0x10021733
push 4
push edi
call ebx
test eax, eax
jne 0x10021733
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call dword [0x10061534]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x10021749
inc eax
push eax
push dword [ebp - 0x28]
call fcn.100047b0
cmp dword [ebp + 0x44], 0x10
lea eax, [ebp + 0x30]
lea ecx, [ebp - 0x28]
cmovae eax, dword [ebp + 0x30]
push eax
call fcn.100049e0
mov byte [ebp - 4], 3
mov edi, dword [esi + 8]
test edi, edi
je 0x1002177d
push 4
push edi
call ebx
test eax, eax
jne 0x1002177d
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call dword [0x10061534]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x10021793
inc eax
push eax
push dword [ebp - 0x28]
call fcn.100047b0
mov edi, dword [esi + 0xc]
test edi, edi
je 0x100217ac
push 4
push edi
call ebx
test eax, eax
jne 0x100217ac
push eax
mov ecx, edi
call dword [0x10061538]
mov edi, dword [esi + 0x10]
test edi, edi
je 0x100217c5
push 4
push edi
call ebx
test eax, eax
jne 0x100217c5
push eax
mov ecx, edi
call dword [0x10061538]
mov edi, dword [ebp - 0x98]
cmp di, 0xffff
je 0x10021a7d
cmp word [ebp - 0x5c], 0xffff
je 0x10021a7d
mov bh, 0x47
mov byte [ebp - 0x48], 0
mov al, 0x34
mov byte [ebp - 0x50], bh
mov ah, 0x28
mov byte [ebp - 0x48], 0
xor al, bh
xor ah, bh
mov cl, 0x3e
mov byte [ebp - 0x4f], al
mov dl, 0x2a
mov byte [ebp - 0x4b], ah
mov ch, 0x2b
lea eax, [ebp - 0x4f]
mov dh, 0x1b
xor cl, bh
xor dl, bh
mov byte [ebp - 0x4e], cl
xor ch, bh
mov byte [ebp - 0x4d], dl
xor dh, bh
mov byte [ebp - 0x4a], ch
mov bl, 0x25
mov byte [ebp - 0x49], dh
xor bl, bh
lea ecx, [ebp - 0x40]
push eax
mov edx, 0x1006f2b8
mov byte [ebp - 0x4c], bl
call fcn.10010cf0
add esp, 4
mov eax, dword [ebp - 0x60]
mov byte [ebp - 4], 4
test ax, ax
jne 0x10021887
movaps xmm0, xmmword [0x10062310]
xor ecx, ecx
movups xmmword [ebp - 0x7c], xmm0
mov dword [ebp - 0x6c], 0x3f753029
mov word [ebp - 0x68], 0x2f23
mov byte [ebp - 0x66], al
nop dword [eax + eax]
mov al, byte [ebp - 0x7c]
xor byte [ebp + ecx - 0x7b], al
inc ecx
cmp ecx, 0x15
jb 0x10021860
lea eax, [ebp - 0x7b]
mov byte [ebp - 0x66], 0
push eax
lea ecx, [ebp - 0xdc]
call fcn.100049e0
mov ebx, 1
jmp 0x100218ff
cmp dword [ebp - 0x2c], 0x10
movaps xmm0, xmmword [0x100626c0]
cwde
push eax
movsx eax, di
push eax
lea eax, [ebp - 0x40]
mov word [ebp - 0x9c], 0x6c
cmovae eax, dword [ebp - 0x40]
xor ecx, ecx
push 1
push eax
movups xmmword [ebp - 0xac], xmm0
nop dword [eax]
nop dword [eax + eax]
mov al, byte [ebp - 0xac]
xor byte [ebp + ecx - 0xab], al
inc ecx
cmp ecx, 0x10
jb 0x100218c0
sub esp, 0x18
mov byte [ebp - 0x9b], 0
lea eax, [ebp - 0xab]
mov ecx, esp
push eax
call fcn.100049e0
lea eax, [ebp - 0xc4]
push eax
call fcn.1000b410
add esp, 0x2c
mov ebx, 2
push eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x44], ebx
call fcn.10004180
mov dword [ebp - 4], 6
test bl, 2
je 0x10021928
and ebx, 0xfffffffd
lea ecx, [ebp - 0xc4]
mov dword [ebp - 0x44], ebx
call fcn.100043a0
mov byte [ebp - 4], 7
test bl, 1
je 0x10021942
and ebx, 0xfffffffe
lea ecx, [ebp - 0xdc]
mov dword [ebp - 0x44], ebx
call fcn.100043a0
mov ecx, dword [esi + 0x14]
lea edx, [ebp - 0x28]
call fcn.100115a0
mov ecx, dword [esi + 0x14]
sub esp, 0x1c
call fcn.100115d0
mov eax, dword [ebp - 0x64]
add esp, 0x1c
test ax, ax
jne 0x100219be
movaps xmm0, xmmword [0x10062200]
xor ecx, ecx
movups xmmword [ebp - 0x94], xmm0
mov dword [ebp - 0x84], 0x2b61243d
mov word [ebp - 0x80], 0x3b37
mov byte [ebp - 0x7e], al
nop word [eax + eax]
mov al, byte [ebp - 0x94]
xor byte [ebp + ecx - 0x93], al
inc ecx
cmp ecx, 0x15
jb 0x10021990
lea eax, [ebp - 0x93]
mov byte [ebp - 0x7e], 0
push eax
lea ecx, [ebp - 0x10c]
call fcn.100049e0
or ebx, 4
jmp 0x10021a17
cmp dword [ebp - 0x2c], 0x10
movaps xmm0, xmmword [0x100626f0]
cwde
push eax
mov eax, dword [ebp - 0x5c]
cwde
push eax
lea eax, [ebp - 0x40]
mov word [ebp - 0x48], 0x6d
cmovae eax, dword [ebp - 0x40]
xor ecx, ecx
push 1
push eax
movups xmmword [ebp - 0x58], xmm0
mov al, byte [ebp - 0x58]
xor byte [ebp + ecx - 0x57], al
inc ecx
cmp ecx, 0x10
jb 0x100219e6
sub esp, 0x18
mov byte [ebp - 0x47], 0
lea eax, [ebp - 0x57]
mov ecx, esp
push eax
call fcn.100049e0
lea eax, [ebp - 0xf4]
push eax
call fcn.1000b410
add esp, 0x2c
or ebx, 8
push eax
lea ecx, [ebp - 0x28]
call fcn.1000c410
test bl, 8
je 0x10021a33
lea ecx, [ebp - 0xf4]
and ebx, 0xfffffff7
call fcn.100043a0
mov dword [ebp - 4], 7
test bl, 4
je 0x10021a4a
lea ecx, [ebp - 0x10c]
call fcn.100043a0
mov ecx, dword [esi + 0x18]
lea edx, [ebp - 0x28]
call fcn.100115a0
mov ecx, dword [esi + 0x18]
sub esp, 0x1c
call fcn.100115d0
add esp, 0x1c
lea ecx, [ebp - 0x28]
call fcn.100043a0
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.100043a0
mov ebx, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
mov esi, dword [esi + 0x34]
test esi, esi
je 0x10021a97
push 4
push esi
call ebx
test eax, eax
jne 0x10021a97
push 1
mov ecx, esi
call dword [0x100614d0]
mov eax, dword [ebp + 0x2c]
cmp eax, 0x10
jb 0x10021aa9
inc eax
push eax
push dword [ebp + 0x18]
call fcn.100047b0
mov eax, dword [ebp + 0x44]
mov dword [ebp + 0x2c], 0xf
mov dword [ebp + 0x28], 0
mov byte [ebp + 0x18], 0
cmp eax, 0x10
jb 0x10021acd
inc eax
push eax
push dword [ebp + 0x30]
call fcn.100047b0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100523a0
mov esp, ebp
pop ebp
ret 0x40