Function at 0x10021360
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x40
mov eax, dword [0x1007a00c]
mov edx, dword [ebp + 8]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x34], ecx
mov eax, dword [ecx + 0x44]
mov dword [ebp - 0x14], eax
mov eax, dword [edx]
test eax, eax
je 0x1002139e
mov ecx, dword [edx + 4]
xor edx, edx
movzx esi, byte [ecx]
rol edx, 5
inc ecx
xor edx, esi
imul edx, edx, 0x9e3779b9
dec eax
jne 0x1002138a
jmp 0x100213a0
xor edx, edx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x18], edx
imul esi, edx, 0x9e3779b9
lea eax, [esi - 2]
cmp esi, 1
cmovbe esi, eax
and esi, 0xfffffffe
mov ebx, dword [ecx + 0x40]
lea edi, [ecx + 0x38]
mov dword [ebp - 0x48], edi
test ebx, ebx
je 0x100214f1
mov ecx, dword [edi + 4]
mov edi, esi
mov dword [ebp - 0x30], esi
mov esi, ebx
shr ecx, 0x18
shr edi, cl
mov dword [ebp - 0x28], ecx
neg ecx
xor eax, eax
inc eax
shl eax, cl
lea ecx, [ebx + eax*4]
lea eax, [ebx + edi*4]
lea ebx, [ecx + edi*8]
mov ecx, dword [eax]
test ecx, ecx
je 0x100214c1
and ecx, 0xfffffffe
cmp ecx, dword [ebp - 0x30]
jne 0x10021405
cmp dword [ebx], edx
je 0x100214c1
mov ecx, 0x20
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x3c], 0
sub ecx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x2c]
shl edx, cl
mov ecx, dword [ebp - 0x28]
shr edx, cl
mov ecx, dword [ebp - 0x2c]
or edx, 1
mov dword [ebp - 0x4c], edx
xor edx, edx
dec edx
shl edx, cl
not edx
mov dword [ebp - 0x2c], edx
xor edx, edx
mov ecx, edx
test dl, dl
mov dl, 1
je 0x10021481
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x28]
mov ebx, esi
sub edi, dword [ebp - 0x4c]
mov ecx, eax
mov dword [ebp - 0x28], eax
mov esi, ebx
neg cl
and edi, dword [ebp - 0x2c]
xor eax, eax
inc eax
shl eax, cl
lea ecx, [ebx + eax*4]
lea eax, [ebx + edi*4]
lea ebx, [ecx + edi*8]
mov ecx, dword [eax]
test ecx, ecx
je 0x100214a4
and ecx, 0xfffffffe
cmp ecx, dword [ebp - 0x30]
jne 0x10021439
mov ecx, dword [ebx]
cmp ecx, dword [ebp - 0x18]
jne 0x10021439
jmp 0x100214c1
mov ecx, dword [eax]
cmp ecx, 1
je 0x1002152b
or ecx, 1
xor edx, edx
mov dword [eax], ecx
mov eax, dword [ebp - 0x34]
mov cl, 1
mov dword [ebp - 0x38], ecx
mov ebx, dword [eax + 0x40]
movzx eax, byte [eax + 0x3f]
jmp 0x1002144d
mov edx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x40]
movzx ecx, byte [ebp - 0x3c]
shld esi, edx, 8
shl edx, 8
or ecx, edx
cmp byte [ebp - 0x38], 0
cmove ebx, ecx
cmove eax, esi
mov ecx, dword [ebp - 0x30]
test ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], ecx
je 0x100214fc
cmp dword [eax], 2
jb 0x100214fc
add ebx, 4
mov esi, dword [ebx]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10069260
mov eax, esi
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret 4
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], esi
mov ecx, dword [ebp - 0x48]
lea ebx, [ebp - 0x14]
lea eax, [ebp - 0x18]
lea edx, [ebp - 0x24]
push ebx
push eax
call fcn.1003bf90
add esp, 8
test al, al
je 0x10021549
mov ecx, dword [ebp - 0x34]
add ecx, 4
push dword [ebp + 8]
push 0x1006bff8
call fcn.1001ad00
jmp 0x100214d9
mov ecx, ebx
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], ebx
shrd ecx, eax, 8
shr eax, 8
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], eax
jmp 0x10021448
mov dword [sym.mozglue.dll_gMozCrashReason], str.MOZ_RELEASE_ASSERT_mStringHashToIndexMap.add_entry__hash__count__
mov ecx, 0x2f
int3