Function at 0x10020880
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x70
mov eax, dword [0x1004e3b0]
xor eax, esp
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x74]
push ebx
mov ebx, dword [esp + 0x8c]
push ebp
mov ebp, dword [esp + 0x84]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x88]
push esi
push eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x28], 0xffffffff
call fcn.10008790
mov esi, eax
mov eax, dword [esi]
lea ecx, [eax + eax + 2]
add esp, 4
cmp ebp, ecx
jae 0x100208f5
push 0xffffe004
call sub.nss3.dll_PORT_SetError_Util
add esp, 4
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.1003d054
add esp, 0x70
ret
mov edx, dword [esi + 4]
push edi
call edx
mov edi, eax
test edi, edi
jne 0x10020924
push 0xffffe013
call sub.nss3.dll_PORT_SetError_Util
add esp, 4
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.1003d054
add esp, 0x70
ret
mov eax, dword [esi + 0x10]
push edi
call eax
mov eax, dword [esp + 0xa0]
add esp, 4
test eax, eax
je 0x10020943
mov ecx, dword [esi + 0x14]
push eax
push ebx
push edi
call ecx
add esp, 0xc
mov ecx, dword [esi + 0x18]
push 0x40
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x44]
push eax
push edi
call ecx
mov edx, dword [esi + 0xc]
push 1
push edi
call edx
push ebp
call sub.nss3.dll_PORT_Alloc_Util
mov edi, eax
add esp, 0x1c
test edi, edi
jne 0x1002097e
push 0xffffe013
call sub.nss3.dll_PORT_SetError_Util
add esp, 4
jmp 0x10020b8c
mov ebx, ebp
sub ebx, dword [esi]
dec ebx
push ebx
mov dword [esp + 0x38], ebx
call sub.nss3.dll_PORT_Alloc_Util
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
jne 0x100209aa
push 0xffffe013
call sub.nss3.dll_PORT_SetError_Util
add esp, 4
jmp 0x10020b82
mov eax, dword [esp + 0x1c]
push ebp
push eax
push edi
call sub.MSVCR100.dll_memcpy
mov eax, dword [esi]
mov ecx, ebp
sub ecx, eax
dec ecx
push ecx
lea edx, [eax + edi + 1]
push edx
push eax
mov eax, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0xb0]
call fcn.10020510
xor eax, eax
add esp, 0x1c
mov dword [esp + 0x14], eax
cmp dword [esi], eax
jbe 0x100209fa
mov ecx, dword [esp + 0x18]
mov dl, byte [eax + ecx]
xor byte [edi + eax + 1], dl
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [esi]
jb 0x100209e2
mov eax, dword [esi]
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x98]
lea ecx, [edi + 1]
push ecx
push ebx
push edx
call fcn.10020510
xor eax, eax
add esp, 0x10
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x10020a40
mov ecx, dword [esi]
mov edx, dword [esp + 0x18]
add ecx, eax
mov al, byte [eax + edx]
xor byte [ecx + edi + 1], al
mov eax, dword [esp + 0x14]
lea ecx, [ecx + edi + 1]
inc eax
mov dword [esp + 0x14], eax
cmp eax, ebx
jb 0x10020a20
mov cl, byte [edi]
mov al, cl
neg al
or al, cl
mov ecx, dword [esi]
not al
xor dl, dl
xor bl, bl
shr al, 7
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], ecx
lea esi, [ecx + edi + 1]
mov byte [esp + 0x13], dl
test ecx, ecx
je 0x10020a92
lea edx, [esp + 0x3c]
sub edx, esi
mov dword [esp + 0x30], edx
mov dl, byte [esp + 0x13]
mov dword [esp + 0x1c], ecx
lea ecx, [ecx]
mov ecx, dword [esp + 0x30]
mov cl, byte [ecx + esi]
xor cl, byte [esi]
inc esi
or dl, cl
dec dword [esp + 0x1c]
jne 0x10020a80
mov esi, dword [esp + 0x24]
mov cl, dl
neg cl
or cl, dl
not cl
shr cl, 7
lea esi, [esi + esi + 1]
and al, cl
mov byte [esp + 0x13], al
mov dword [esp + 0x14], esi
cmp esi, ebp
jae 0x10020b19
mov cl, byte [esi + edi]
mov al, 1
sub al, cl
lea edx, [ecx - 1]
or al, dl
not al
shr al, 7
movzx eax, al
mov dword [esp + 0x24], eax
movzx edx, bl
not edx
and edx, eax
dec edx
mov eax, edx
and edx, dword [esp + 0x20]
not eax
and eax, esi
or eax, edx
mov dword [esp + 0x20], eax
mov al, byte [esp + 0x24]
dec al
and bl, al
not al
and al, 1
mov dl, cl
neg dl
or dl, cl
or bl, al
not dl
shr dl, 7
mov al, bl
not al
not dl
and dl, al
mov al, byte [esp + 0x13]
dec dl
inc esi
and al, dl
mov byte [esp + 0x13], al
mov dword [esp + 0x14], esi
cmp esi, ebp
jb 0x10020ab3
test al, bl
jne 0x10020b2c
push 0xffffe002
call sub.nss3.dll_PORT_SetError_Util
add esp, 4
jmp 0x10020b70
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x38]
inc ecx
mov eax, ebp
sub eax, ecx
mov dword [edx], eax
cmp eax, dword [esp + 0x88]
jbe 0x10020b53
push 0xffffe003
call sub.nss3.dll_PORT_SetError_Util
add esp, 4
jmp 0x10020b70
test eax, eax
je 0x10020b68
push eax
mov eax, dword [esp + 0x30]
add ecx, edi
push ecx
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
mov dword [esp + 0x28], 0
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x18]
push ecx
push edx
call sub.nss3.dll_PORT_ZFree_Util
add esp, 8
push ebp
push edi
call sub.nss3.dll_PORT_ZFree_Util
add esp, 8
mov ecx, dword [esp + 0x7c]
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1003d054
add esp, 0x70
ret