Function at 0x100213b0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
push ebp
push dword [esp + 0x24]
call fcn.10008de0
mov edx, dword [esp + 0x30]
add esp, 4
mov dword [esp + 0xc], eax
add edx, 2
mov ecx, dword [eax]
mov eax, dword [esp + 0x20]
mov ebx, eax
sub ebx, ecx
add ecx, edx
dec ebx
cmp eax, ecx
jb 0x100215f3
mov ebp, dword [esp + 0x1c]
cmp byte [eax + ebp - 1], 0xbc
jne 0x100215f3
test byte [ebp], 0x80
jne 0x100215f3
push esi
push ebx
call sub.nssutil3.dll_PORT_Alloc_Util
mov esi, eax
add esp, 4
test esi, esi
jne 0x10021421
push 0xffffe013
call sub.nssutil3.dll_PORT_SetError_Util
add esp, 4
or eax, 0xffffffff
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, dword [esp + 0x10]
push edi
lea edi, [ebx + ebp]
push dword [eax]
push edi
push ebx
push esi
push dword [esp + 0x40]
call fcn.10020280
xor ecx, ecx
add esp, 0x14
mov dword [esp + 0x10], ecx
test ebx, ebx
je 0x10021457
mov al, byte [ecx + ebp]
xor byte [ecx + esi], al
mov ecx, dword [esp + 0x10]
inc ecx
mov dword [esp + 0x10], ecx
cmp ecx, ebx
jb 0x10021444
mov edx, dword [esp + 0x34]
mov eax, ebx
and byte [esi], 0x7f
xor ecx, ecx
sub eax, edx
mov dword [esp + 0x10], ecx
dec eax
je 0x1002147f
jmp 0x10021470
cmp byte [ecx + esi], 0
jne 0x1002148f
inc ecx
mov dword [esp + 0x10], ecx
cmp ecx, eax
jb 0x10021470
mov eax, esi
sub eax, edx
add eax, ebx
mov dword [esp + 0x18], eax
cmp byte [eax - 1], 1
je 0x100214ad
push esi
call sub.nssutil3.dll_PORT_Free_Util
push 0xffffe00a
call sub.nssutil3.dll_PORT_SetError_Util
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov ebx, dword [esp + 0x14]
push dword [ebx]
call sub.nssutil3.dll_PORT_Alloc_Util
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x100214df
push esi
call sub.nssutil3.dll_PORT_Free_Util
push 0xffffe013
call sub.nssutil3.dll_PORT_SetError_Util
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, dword [ebx + 4]
call eax
mov dword [esp + 0x28], eax
test eax, eax
jne 0x10021510
push esi
call sub.nssutil3.dll_PORT_Free_Util
push ebp
call sub.nssutil3.dll_PORT_Free_Util
push 0xffffe013
call sub.nssutil3.dll_PORT_SetError_Util
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push eax
mov eax, dword [ebx + 0x10]
call eax
mov eax, dword [ebx + 0x14]
push 8
push 0x1004fb60
push dword [esp + 0x34]
call eax
push dword [ebx]
mov eax, dword [ebx + 0x14]
push dword [esp + 0x34]
push dword [esp + 0x40]
call eax
mov edx, dword [esp + 0x50]
mov eax, dword [ebx + 0x14]
push edx
push dword [esp + 0x38]
push dword [esp + 0x4c]
call eax
push dword [ebx]
lea eax, [esp + 0x3c]
push eax
mov eax, dword [ebx + 0x18]
push ebp
push dword [esp + 0x5c]
call eax
mov eax, dword [ebx + 0xc]
push 1
push dword [esp + 0x64]
call eax
add esp, 0x40
push esi
call sub.nssutil3.dll_PORT_Free_Util
mov edx, dword [ebx]
add esp, 4
mov ecx, ebp
sub edx, 4
jb 0x10021589
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x1002158e
add ecx, 4
add edi, 4
sub edx, 4
jae 0x10021578
cmp edx, 0xfffffffc
je 0x100215de
mov al, byte [ecx]
cmp al, byte [edi]
jne 0x100215bb
cmp edx, 0xfffffffd
je 0x100215de
mov al, byte [ecx + 1]
cmp al, byte [edi + 1]
jne 0x100215bb
cmp edx, 0xfffffffe
je 0x100215de
mov al, byte [ecx + 2]
cmp al, byte [edi + 2]
jne 0x100215bb
cmp edx, 0xffffffff
je 0x100215de
mov al, byte [ecx + 3]
cmp al, byte [edi + 3]
je 0x100215de
push 0xffffe00a
call sub.nssutil3.dll_PORT_SetError_Util
add esp, 4
or esi, 0xffffffff
push ebp
call sub.nssutil3.dll_PORT_Free_Util
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push ebp
xor esi, esi
call sub.nssutil3.dll_PORT_Free_Util
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push 0xffffe00a
call sub.nssutil3.dll_PORT_SetError_Util
add esp, 4
or eax, 0xffffffff
pop ebp
pop ebx
add esp, 0xc
ret