Function at 0x1000a290
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
mov ecx, dword [esp + 0x34]
mov al, byte [edx + 0x101]
push ebx
mov bl, byte [edx + 0x100]
push ebp
mov ebp, dword [esp + 0x38]
push esi
mov esi, dword [esp + 0x34]
push edi
mov edi, dword [esp + 0x48]
and ecx, 3
and esi, 3
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], esi
cmp ebp, edi
jae 0x1000a2dd
push 0xffffe003
call sub.nss3.dll_PORT_SetError_Util
add esp, 4
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x24
ret
cmp edi, 8
jae 0x1000a302
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
push edi
push eax
mov eax, dword [esp + 0x40]
push ebp
push ecx
call fcn.1000a1e0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ebp, dword [esp + 0x3c]
mov dword [ebp], edi
mov edi, dword [esp + 0x44]
mov ebp, dword [esp + 0x38]
sub ebp, esi
sub edi, ecx
mov dword [esp + 0x18], ebp
cmp ecx, esi
ja 0x1000a32e
sub esi, ecx
add esi, esi
add esi, esi
add esi, esi
mov ecx, 0x20
sub ecx, esi
jmp 0x1000a33d
sub ecx, esi
add ecx, ecx
add ecx, ecx
add ecx, ecx
mov esi, 0x20
sub esi, ecx
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x28]
mov dword [esp + 0x24], ecx
xor ecx, ecx
cmp esi, ecx
je 0x1000a468
mov ecx, 4
sub ecx, esi
mov dword [esp + 0x1c], ecx
je 0x1000a3d5
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
sub ecx, esi
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], ecx
lea ebx, [ebx]
inc bl
movzx esi, bl
movzx ecx, byte [esi + edx]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [esi + edx], al
mov esi, dword [esp + 0x10]
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
movzx eax, al
mov byte [esi], cl
movzx ecx, byte [eax + edx]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x30]
xor cl, byte [eax + esi]
mov al, byte [esp + 0x40]
mov byte [esi], cl
inc esi
dec dword [esp + 0x14]
mov dword [esp + 0x18], esi
jne 0x1000a380
mov ecx, dword [esp + 0x1c]
sub dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
add ebp, 4
add edi, 4
mov dword [esp + 0x18], ebp
cmp ecx, esi
jae 0x1000a44b
sub esi, ecx
mov dword [esp + 0x40], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x30], esi
je 0x1000a4b9
mov ecx, dword [esp + 0x1c]
add ecx, dword [esp + 0x44]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x44]
movzx esi, byte [esi + ecx]
mov ecx, dword [esp + 0x40]
add dword [esp + 0x40], 8
shl esi, cl
mov ecx, dword [esp + 0x38]
inc ecx
mov dword [esp + 0x38], ecx
or dword [esp + 0x14], esi
cmp ecx, dword [esp + 0x30]
jb 0x1000a423
jmp 0x1000a4b9
jbe 0x1000a45e
mov esi, dword [edi]
mov ecx, dword [esp + 0x24]
add edi, 4
shr esi, cl
mov dword [esp + 0x14], esi
jmp 0x1000a4b9
mov dword [esp + 0x14], 0
jmp 0x1000a4b9
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x14], ecx
cmp esi, ecx
je 0x1000a4b9
mov dword [esp + 0x40], ecx
mov dword [esp + 0x38], ecx
mov ecx, 4
sub ecx, esi
mov dword [esp + 0x30], ecx
je 0x1000a4b6
mov ecx, dword [esp + 0x38]
lea ecx, [ecx]
mov esi, dword [esp + 0x44]
movzx esi, byte [ecx + esi]
mov ecx, dword [esp + 0x40]
add dword [esp + 0x40], 8
shl esi, cl
mov ecx, dword [esp + 0x38]
inc ecx
mov dword [esp + 0x38], ecx
or dword [esp + 0x14], esi
cmp ecx, dword [esp + 0x30]
jb 0x1000a490
add edi, 4
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x1000a698
shr ecx, 3
lea esi, [ecx + 4]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x48]
cmp ecx, esi
jb 0x1000a627
sub ecx, esi
shr ecx, 2
inc ecx
mov dword [esp + 0x44], ecx
mov esi, dword [edi]
add edi, 4
mov dword [esp + 0x2c], edi
inc bl
movzx edi, bl
movzx ecx, byte [edi + edx]
add al, cl
movzx ebp, al
mov byte [esp + 0x40], al
mov al, byte [ebp + edx]
mov byte [edi + edx], al
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
mov byte [ebp + edx], cl
movzx eax, al
movzx edi, byte [eax + edx]
inc bl
movzx ebp, bl
movzx eax, byte [ebp + edx]
mov byte [esp + 0x38], al
mov al, byte [esp + 0x40]
add al, byte [esp + 0x38]
movzx ecx, byte [esp + 0x38]
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [ebp + edx], al
add al, byte [esp + 0x38]
mov ebp, dword [esp + 0x10]
movzx eax, al
mov byte [ebp], cl
movzx ecx, byte [eax + edx]
mov al, byte [esp + 0x40]
shl ecx, 8
or edi, ecx
inc bl
movzx ebp, bl
movzx ecx, byte [ebp + edx]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [ebp + edx], al
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
movzx eax, al
mov byte [ebp], cl
movzx ecx, byte [eax + edx]
mov al, byte [esp + 0x40]
shl ecx, 0x10
or edi, ecx
inc bl
movzx ebp, bl
movzx ecx, byte [ebp + edx]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [ebp + edx], al
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
movzx eax, al
mov byte [ebp], cl
movzx eax, byte [eax + edx]
mov ecx, dword [esp + 0x20]
shl eax, 0x18
or eax, edi
mov edi, esi
shl edi, cl
or edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
mov ebp, dword [esp + 0x18]
xor eax, edi
mov edi, dword [esp + 0x2c]
shr esi, cl
mov ecx, dword [esp + 0x48]
mov dword [ebp], eax
mov al, byte [esp + 0x40]
add ebp, 4
sub ecx, 4
dec dword [esp + 0x44]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], esi
mov dword [esp + 0x48], ecx
jne 0x1000a4e5
test ecx, ecx
je 0x1000a682
sub edi, dword [esp + 0x30]
test ecx, ecx
je 0x1000a682
mov esi, edi
sub esi, ebp
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], ecx
nop
inc bl
movzx esi, bl
movzx ecx, byte [esi + edx]
add al, cl
movzx edi, al
mov byte [esp + 0x40], al
mov al, byte [edi + edx]
mov byte [esi + edx], al
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
movzx eax, al
mov byte [edi + edx], cl
movzx ecx, byte [eax + edx]
mov eax, dword [esp + 0x44]
xor cl, byte [eax + ebp]
mov al, byte [esp + 0x40]
mov byte [ebp], cl
inc ebp
dec dword [esp + 0x48]
jne 0x1000a640
pop edi
pop esi
pop ebp
mov byte [edx + 0x101], al
mov byte [edx + 0x100], bl
xor eax, eax
pop ebx
add esp, 0x24
ret
mov ecx, dword [esp + 0x48]
cmp ecx, 4
jb 0x1000a7da
shr ecx, 2
mov dword [esp + 0x44], ecx
lea esp, [esp]
mov ecx, dword [edi]
mov dword [esp + 0x14], ecx
inc bl
movzx esi, bl
movzx ecx, byte [esi + edx]
add al, cl
movzx ebp, al
mov byte [esp + 0x40], al
mov al, byte [ebp + edx]
mov byte [esi + edx], al
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
mov byte [ebp + edx], cl
movzx eax, al
movzx esi, byte [eax + edx]
inc bl
movzx ebp, bl
movzx eax, byte [ebp + edx]
mov byte [esp + 0x38], al
mov al, byte [esp + 0x40]
add al, byte [esp + 0x38]
movzx ecx, byte [esp + 0x38]
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [ebp + edx], al
add al, byte [esp + 0x38]
mov ebp, dword [esp + 0x10]
mov byte [ebp], cl
movzx eax, al
movzx ecx, byte [eax + edx]
mov al, byte [esp + 0x40]
shl ecx, 8
or esi, ecx
inc bl
movzx ebp, bl
movzx ecx, byte [ebp + edx]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [ebp + edx], al
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x38], cl
add al, byte [esp + 0x38]
movzx ecx, cl
mov byte [ebp], cl
movzx eax, al
movzx ecx, byte [eax + edx]
mov al, byte [esp + 0x40]
shl ecx, 0x10
or esi, ecx
inc bl
movzx ebp, bl
movzx ecx, byte [ebp + edx]
add al, cl
mov byte [esp + 0x40], al
movzx eax, al
add eax, edx
mov byte [esp + 0x38], cl
mov dword [esp + 0x10], eax
mov al, byte [eax]
mov byte [ebp + edx], al
add al, byte [esp + 0x38]
mov ebp, dword [esp + 0x10]
movzx ecx, cl
mov byte [ebp], cl
mov ebp, dword [esp + 0x18]
movzx eax, al
movzx ecx, byte [eax + edx]
shl ecx, 0x18
or ecx, esi
xor ecx, dword [esp + 0x14]
add edi, 4
mov dword [ebp], ecx
add ebp, 4
mov ecx, dword [esp + 0x48]
mov al, byte [esp + 0x40]
sub ecx, 4
dec dword [esp + 0x44]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x48], ecx
jne 0x1000a6b0
test ecx, ecx
jne 0x1000a633
jmp 0x1000a682