Function at 0x1001b4f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc4
mov eax, dword [0x1005d3b0]
xor eax, esp
mov dword [esp + 0xc0], eax
mov eax, dword [esp + 0xd0]
push ebx
push ebp
mov ebp, dword [esp + 0xe0]
or ebx, 0xffffffff
push esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xe0]
push edi
push dword [esp + 0xd8]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xf0]
mov dword [esp + 0x14], eax
call fcn.10008de0
add esp, 4
test eax, eax
jne 0x1001b54a
xor edi, edi
jmp 0x1001b54c
mov edi, dword [eax]
lea eax, [esp + 0x30]
mov dword [esp + 0x3c], 0
push eax
mov dword [esp + 0x50], 0
mov dword [esp + 0x30], 0
call fcn.100299e0
mov esi, eax
add esp, 4
test esi, esi
js 0x1001b7b0
lea eax, [esp + 0x40]
push eax
call fcn.100299e0
mov esi, eax
add esp, 4
test esi, esi
js 0x1001b7b0
lea eax, [esp + 0x20]
push eax
call fcn.100299e0
mov esi, eax
add esp, 4
test esi, esi
js 0x1001b7b0
mov eax, dword [esp + 0xdc]
cmp eax, 2
jb 0x1001b7ad
cmp eax, 0x21
jb 0x1001b647
lea eax, [esp + 0x20]
push eax
call fcn.1002aaf0
lea eax, [esp + 0x24]
push eax
push 1
push eax
call fcn.10028ee0
mov edi, dword [esp + 0x20]
mov esi, eax
add esp, 0x10
test esi, esi
js 0x1001b7b4
push edi
push ebp
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0xe8]
push dword [esp + 0x20]
inc eax
shr eax, 1
inc eax
push eax
push dword [esp + 0xec]
call fcn.1001b4f0
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x1001b7b4
push edi
push ebp
push dword [esp + 0x20]
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x50]
push eax
push dword [esp + 0xf0]
push dword [esp + 0xf0]
call fcn.1001ada0
add esp, 0x1c
mov ebx, eax
jmp 0x1001b7b4
push dword [esp + 0x14]
push ebp
push 0
call sub.nssutil3.dll_SECITEM_CopyItem_Util
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x1001b7b0
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
mov eax, dword [esp + 0xdc]
dec eax
and eax, 7
mov dword [esp + 0x14], eax
push dword [ebp + 8]
lea eax, [esp + 0x54]
push dword [ebp + 4]
push eax
push dword [esp + 0xe4]
call fcn.10019190
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x1001b7b0
lea eax, [esp + 0x50]
add eax, edi
push eax
push 0x200
push 1
push ebp
push dword [esp + 0xe8]
call fcn.1001a040
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x1001b7b0
test edi, edi
jle 0x1001b6d5
lea edx, [esp + 0x50]
add edx, eax
inc eax
mov cl, byte [edx + edi]
xor byte [edx], cl
cmp eax, edi
jl 0x1001b6c5
mov ecx, dword [esp + 0x14]
lea esi, [edi*8]
sub esi, dword [esp + 0xdc]
mov dl, 1
shl dl, cl
lea ecx, [esp + 0x50]
shr esi, 3
add ecx, esi
lea eax, [edx - 1]
and al, byte [ecx]
or al, dl
mov byte [ecx], al
mov eax, edi
or byte [esp + edi + 0x4f], 1
sub eax, esi
push eax
push ecx
lea eax, [esp + 0x38]
push eax
call fcn.1002a0c0
mov esi, eax
add esp, 0xc
test esi, esi
js 0x1001b7b0
mov eax, dword [esp + 0x10]
push ebp
push 0x200
push 2
inc dword [eax]
push ebp
call fcn.10019e30
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x1001b7b0
mov eax, dword [0x10050b78]
cmp dword [eax*4 + 0x10050b7c], 0xfff1
jb 0x1001b7ad
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x34]
push eax
call fcn.10026500
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
je 0x1001b78c
test esi, esi
jne 0x1001b7b0
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0xdc]
shl eax, 2
cmp dword [ecx], eax
jbe 0x1001b675
or ebx, 0xffffffff
mov edi, ecx
jmp 0x1001b7b4
push dword [esp + 0x18]
lea eax, [esp + 0x34]
push eax
call fcn.10029220
mov edi, dword [esp + 0x18]
mov esi, eax
add esp, 8
test esi, esi
js 0x1001b7b4
xor esi, esi
xor ebx, ebx
jmp 0x1001b7b4
or ebx, 0xffffffff
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x30]
push eax
call fcn.10029030
lea eax, [esp + 0x44]
push eax
call fcn.10029030
lea eax, [esp + 0x28]
push eax
call fcn.10029030
add esp, 0xc
test esi, esi
je 0x1001b830
cmp esi, 0xfffffffc
je 0x1001b81e
cmp esi, 0xfffffffd
je 0x1001b80c
cmp esi, 0xfffffffe
je 0x1001b7fa
push 0xffffe001
call sub.nssutil3.dll_PORT_SetError_Util
add esp, 4
or ebx, 0xffffffff
jmp 0x1001b835
push 0xffffe013
call sub.nssutil3.dll_PORT_SetError_Util
add esp, 4
or ebx, 0xffffffff
jmp 0x1001b835
push 0xffffe002
call sub.nssutil3.dll_PORT_SetError_Util
add esp, 4
or ebx, 0xffffffff
jmp 0x1001b835
push 0xffffe005
call sub.nssutil3.dll_PORT_SetError_Util
add esp, 4
or ebx, 0xffffffff
jmp 0x1001b835
cmp ebx, 0xffffffff
jne 0x1001b858
push dword [esp + 0x18]
call fcn.1002aaf0
add esp, 4
cmp dword [ebp + 4], 0
je 0x1001b852
push 0
push ebp
call sub.nssutil3.dll_SECITEM_FreeItem_Util
add esp, 8
mov dword [edi], 0
mov ecx, dword [esp + 0xd0]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1003cf2f
add esp, 0xc4
ret