Function at 0x1001a330
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xcc
mov eax, dword [0x1004e3b0]
xor eax, esp
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0xd8]
mov ecx, dword [esp + 0xdc]
mov edx, dword [esp + 0xe4]
push ebx
push ebp
mov ebp, dword [esp + 0xe8]
push esi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xdc]
push edi
push eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], edx
or esi, 0xffffffff
call fcn.10008790
xor ecx, ecx
add esp, 4
cmp eax, ecx
jne 0x1001a395
xor ebx, ebx
mov dword [esp + 0x18], ebx
jmp 0x1001a39d
mov edx, dword [eax]
mov dword [esp + 0x18], edx
mov ebx, edx
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x38], ecx
call fcn.1002a460
mov edi, eax
add esp, 4
test edi, edi
js 0x1001a606
lea ecx, [esp + 0x48]
push ecx
call fcn.1002a460
mov edi, eax
add esp, 4
test edi, edi
js 0x1001a606
lea edx, [esp + 0x28]
push edx
call fcn.1002a460
mov edi, eax
add esp, 4
test edi, edi
js 0x1001a606
mov eax, dword [esp + 0xe4]
cmp eax, 2
jae 0x1001a402
or esi, 0xffffffff
jmp 0x1001a606
cmp eax, 0x21
jb 0x1001a496
lea eax, [esp + 0x28]
push eax
call fcn.10029370
lea ecx, [esp + 0x2c]
push ecx
mov edx, ecx
push 1
push edx
call fcn.1002b790
mov edi, eax
add esp, 0x10
test edi, edi
js 0x1001a606
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0xe4]
mov edx, dword [esp + 0x20]
push eax
push ebp
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [esp + 0xec]
lea eax, [ebx + 1]
shr eax, 1
push edx
inc eax
push eax
push ecx
call fcn.1001a330
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x1001a606
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
push edx
push ebp
push eax
mov eax, dword [esp + 0xec]
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x58]
push edx
push ebx
push eax
call fcn.10019be0
add esp, 0x1c
mov esi, eax
jmp 0x1001a606
mov ecx, dword [esp + 0x20]
push ecx
push ebp
push 0
call sub.nss3.dll_SECITEM_CopyItem_Util
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1001a606
mov edx, dword [esp + 0x14]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 4]
push eax
mov eax, dword [esp + 0xe4]
push ecx
lea edx, [esp + 0x60]
push edx
call fcn.100193c0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1001a606
mov eax, dword [esp + 0xe0]
mov edx, dword [esp + 0x10]
lea ebp, [esp + ebx + 0x58]
push ebp
push eax
mov eax, 0x200
lea ecx, [esi + 1]
call fcn.10019850
mov esi, eax
add esp, 8
test esi, esi
jne 0x1001a602
xor edi, edi
test ebx, ebx
jle 0x1001a51e
lea ecx, [ecx]
lea eax, [esp + edi + 0x58]
mov cl, byte [eax + ebx]
xor byte [eax], cl
inc edi
cmp edi, ebx
jl 0x1001a510
mov ecx, dword [esp + 0xe4]
lea eax, [ebx*8]
sub eax, ecx
dec ecx
and ecx, 7
mov dl, 1
shl dl, cl
shr eax, 3
lea edi, [esp + eax + 0x58]
sub ebx, eax
push ebx
push edi
lea ecx, [edx - 1]
and cl, byte [edi]
or cl, dl
lea edx, [esp + 0x40]
mov byte [edi], cl
or byte [ebp - 1], 1
push edx
call fcn.1002a160
mov edi, eax
add esp, 0xc
test edi, edi
js 0x1001a602
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
inc dword [eax]
push 0x200
push 2
push ebx
call fcn.10019650
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1001a5de
mov eax, dword [0x10045b78]
cmp dword [eax*4 + 0x10045b7c], 0xfff1
jb 0x1001a5db
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.10026a00
mov edi, eax
add esp, 8
cmp edi, 0xffffffff
je 0x1001a5e2
test edi, edi
jne 0x1001a5de
mov edx, dword [esp + 0xe4]
mov ecx, dword [esp + 0x14]
lea eax, [edx*4]
cmp dword [ecx], eax
ja 0x1001a5db
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x10]
jmp 0x1001a4b6
or esi, 0xffffffff
mov ebp, ebx
jmp 0x1001a606
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.10029230
mov edi, eax
add esp, 8
test edi, edi
js 0x1001a5de
xor edi, edi
xor esi, esi
mov ebp, ebx
jmp 0x1001a606
mov ebp, dword [esp + 0x10]
lea ecx, [esp + 0x38]
push ecx
call fcn.10029320
lea edx, [esp + 0x4c]
push edx
call fcn.10029320
lea eax, [esp + 0x30]
push eax
call fcn.10029320
add esp, 0xc
test edi, edi
je 0x1001a682
cmp edi, 0xfffffffc
je 0x1001a670
cmp edi, 0xfffffffd
je 0x1001a65e
cmp edi, 0xfffffffe
je 0x1001a64c
push 0xffffe001
call sub.nss3.dll_PORT_SetError_Util
add esp, 4
or esi, 0xffffffff
jmp 0x1001a687
push 0xffffe013
call sub.nss3.dll_PORT_SetError_Util
add esp, 4
or esi, 0xffffffff
jmp 0x1001a687
push 0xffffe002
call sub.nss3.dll_PORT_SetError_Util
add esp, 4
or esi, 0xffffffff
jmp 0x1001a687
push 0xffffe005
call sub.nss3.dll_PORT_SetError_Util
add esp, 4
or esi, 0xffffffff
jmp 0x1001a687
cmp esi, 0xffffffff
jne 0x1001a6af
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.10029370
add esp, 4
cmp dword [ebp + 4], 0
je 0x1001a6a5
push 0
push ebp
call sub.nss3.dll_SECITEM_FreeItem_Util
add esp, 8
mov edx, dword [esp + 0x14]
mov dword [edx], 0
mov ecx, dword [esp + 0xd8]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1003d054
add esp, 0xcc
ret