Function at 0x10066190
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100bfafe
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x1010aef8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
xor ebx, ebx
mov dword [esi + 4], ebx
mov dword [esi], vtable.PDFPortResources.0
mov dword [ebp - 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
lea edi, [esi + 0x10]
push 8
mov byte [ebp - 4], 2
mov dword [edi], ebx
call dword [0x1010db70]
add esp, 4
mov dword [ebp - 0x10], eax
cmp eax, ebx
jne 0x100661f4
call fcn.1009d5f0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
push ecx
push eax
lea edx, [ebp + 0xb]
push edx
mov dword [edi], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call fcn.10031080
mov eax, dword [edi]
mov dword [eax], edi
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
lea edi, [esi + 0x28]
push 8
mov byte [ebp - 4], 3
mov dword [edi], ebx
call dword [0x1010db70]
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp eax, ebx
jne 0x1006623d
call fcn.1009d5f0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
push ecx
push eax
lea edx, [ebp + 0xb]
push edx
mov dword [edi], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call fcn.10031080
mov eax, dword [edi]
mov dword [eax], edi
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
lea edi, [esi + 0x40]
push 8
mov byte [ebp - 4], 4
mov dword [edi], ebx
call dword [0x1010db70]
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp eax, ebx
jne 0x10066286
call fcn.1009d5f0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
push ecx
push eax
lea edx, [ebp + 0xb]
push edx
mov dword [edi], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call fcn.10031080
mov eax, dword [edi]
mov dword [eax], edi
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
lea edi, [esi + 0x58]
push 8
mov byte [ebp - 4], 5
mov dword [edi], ebx
call dword [0x1010db70]
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp eax, ebx
jne 0x100662cf
call fcn.1009d5f0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
push ecx
push eax
lea edx, [ebp + 0xb]
push edx
mov dword [edi], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call fcn.10031080
mov eax, dword [edi]
mov dword [eax], edi
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
lea edi, [esi + 0x70]
push 8
mov byte [ebp - 4], 6
mov dword [edi], ebx
call dword [0x1010db70]
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp eax, ebx
jne 0x10066318
call fcn.1009d5f0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
push ecx
push eax
lea edx, [ebp + 0xb]
push edx
mov dword [edi], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call fcn.10031080
mov eax, dword [edi]
mov dword [eax], edi
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
lea edi, [esi + 0x88]
push 8
mov byte [ebp - 4], 7
mov dword [edi], ebx
call dword [0x1010db70]
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp eax, ebx
jne 0x10066364
call fcn.1009d5f0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
push ecx
push eax
lea edx, [ebp + 0xb]
push edx
mov dword [edi], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call fcn.10031080
mov eax, dword [edi]
mov dword [eax], edi
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
push ebx
push 1
mov byte [ebp - 4], 8
mov dword [esi + 0xa8], ebx
call fcn.10036dd0
mov dword [esi + 0xa4], eax
mov dword [eax], eax
mov eax, dword [esi + 0xa4]
mov dword [eax + 4], eax
mov eax, dword [esi + 0xa4]
mov dword [eax + 8], eax
mov ecx, dword [esi + 0xa4]
mov byte [ecx + 0x14], 1
mov edx, dword [esi + 0xa4]
mov byte [edx + 0x15], 1
push ebx
push 1
mov byte [ebp - 4], 9
mov dword [esi + 0xb8], ebx
call fcn.1005bec0
mov dword [esi + 0xb4], eax
mov dword [eax], eax
mov eax, dword [esi + 0xb4]
mov dword [eax + 4], eax
mov eax, dword [esi + 0xb4]
mov dword [eax + 8], eax
mov eax, dword [esi + 0xb4]
mov byte [eax + 0x20], 1
mov ecx, dword [esi + 0xb4]
add esp, 0x1c
mov byte [ecx + 0x21], 1
mov byte [ebp - 4], 0xa
call fcn.1009b450
push eax
lea ecx, [esi + 0xc0]
call fcn.10045ad0
lea ecx, [esi + 0xcc]
call fcn.1009d630
mov dword [esi + 0xd0], ebx
lea ecx, [esi + 0xd4]
call fcn.1009d630
mov dword [esi + 0xd8], ebx
mov edx, dword [ebp + 8]
push edx
lea ecx, [esi + 0xdc]
mov byte [ebp - 4], 0xd
call fcn.1009e3b0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov dword [esi + 0xe0], ecx
push 0x20
mov byte [ebp - 4], 0xe
mov dword [esi + 0xe4], ebx
mov dword [esi + 0xe8], ebx
mov dword [esi + 0xec], ebx
mov dword [esi + 0xf0], ebx
call fcn.100328c0
add esp, 4
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 0xf
cmp eax, ebx
je 0x1006649d
mov ecx, eax
call fcn.10081700
jmp 0x1006649f
xor eax, eax
mov dword [esi + 0xf4], eax
mov dword [esi + 0xf8], ebx
mov byte [ebp - 4], 0x11
call fcn.10065d60
mov dword [esi + 0xfc], eax
mov byte [ebp - 4], 0x12
call fcn.10066080
mov dword [esi + 0x100], eax
lea ecx, [esi + 0x174]
mov dword [esi + 0x104], ebx
mov dword [esi + 0x108], ebx
mov dword [esi + 0x10c], ebx
mov dword [esi + 0x110], 1
mov dword [esi + 0x114], ebx
call fcn.1009d5a0
lea edi, [esi + 0x188]
mov byte [ebp - 4], 0x14
mov word [esi + 0x184], bx
mov dword [ebp - 0x10], edi
call fcn.1009d480
test eax, eax
je 0x10066522
call fcn.1009d480
mov edx, dword [eax]
push ebx
call edx
add esp, 4
jmp 0x10066524
xor eax, eax
lea ecx, [edi + 4]
push eax
call fcn.1009e380
mov byte [ebp - 4], 0x15
mov dword [edi], vtable.CAGMPDFPortErrorStrategist.0
call fcn.1009d480
mov dword [edi + 8], eax
push 0xc
mov byte [ebp - 4], 0x16
call dword [0x1010db70]
add esp, 4
cmp eax, ebx
jne 0x10066598
call fcn.1009d5f0
xor eax, eax
lea ecx, [esi + 0x194]
push eax
push ecx
call fcn.100977d0
add esp, 8
mov dword [esi + 0x1a0], ebx
mov eax, dword [0x100fef8c]
mov byte [ebp - 4], 0x18
cmp eax, ebx
jne 0x100665a9
push 4
call fcn.100328c0
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x100665a2
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [edi], eax
mov eax, edi
jmp 0x100665a4
push esi
mov ecx, eax
call fcn.1005add0
jmp 0x10066559
xor eax, eax
mov dword [0x100fef8c], eax
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x1006669e
push 0x30
call fcn.100328c0
add esp, 4
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 0x19
cmp eax, ebx
je 0x100665db
mov ecx, eax
call fcn.1007ecd0
mov dword [ebp - 0x10], eax
jmp 0x100665de
mov dword [ebp - 0x10], ebx
mov eax, dword [0x100fef8c]
mov byte [ebp - 4], 0x18
cmp eax, ebx
jne 0x1006660e
push 4
call fcn.100328c0
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x10066607
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [edi], eax
mov eax, edi
jmp 0x10066609
xor eax, eax
mov dword [0x100fef8c], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [eax]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 4
call fcn.100328c0
mov dword [ebp - 0x10], eax
mov eax, dword [0x100fefa0]
add esp, 4
cmp eax, ebx
jne 0x10066654
push 4
call fcn.100328c0
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x1006664d
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [edi], eax
mov eax, edi
jmp 0x1006664f
xor eax, eax
mov dword [0x100fefa0], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [eax]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x100fefa0]
cmp eax, ebx
jne 0x1006668d
push 4
call fcn.100328c0
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x10066686
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [edi], eax
mov eax, edi
jmp 0x10066688
xor eax, eax
mov dword [0x100fefa0], eax
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [eax], 1
jmp 0x100666d5
mov eax, dword [0x100fefa0]
cmp eax, ebx
jne 0x100666ca
push 4
call fcn.100328c0
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x100666c3
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [edi], eax
mov eax, edi
jmp 0x100666c5
xor eax, eax
mov dword [0x100fefa0], eax
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
inc dword [eax]
mov edi, dword [ebp + 8]
push 1
push str.InDesignHackLayer
lea edx, [ebp - 0x30]
push edx
mov ecx, edi
call fcn.100a27a0
mov byte [ebp - 4], 0x1a
cmp dword [ebp - 0x30], ebx
je 0x1006681f
push str.DocPort
lea ecx, [ebp - 0x30]
call fcn.100a1da0
test al, al
je 0x10066741
push ebx
push str.DocPort
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x30]
call fcn.100a25f0
mov eax, dword [eax]
mov ecx, dword [0x1010e238]
mov edx, dword [ecx + 8]
push eax
mov byte [ebp - 4], 0x1b
call edx
add esp, 4
lea ecx, [ebp - 0x24]
mov dword [esi + 0xe4], eax
mov byte [ebp - 4], 0x1a
call fcn.1009dac0
push str.GStateStack
lea ecx, [ebp - 0x30]
call fcn.100a1da0
test al, al
je 0x1006678b
push ebx
push str.GStateStack
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x30]
call fcn.100a25f0
mov eax, dword [eax]
mov ecx, dword [0x1010e238]
mov edx, dword [ecx + 8]
push eax
mov byte [ebp - 4], 0x1c
call edx
add esp, 4
lea ecx, [ebp - 0x24]
mov dword [esi + 0xe8], eax
mov byte [ebp - 4], 0x1a
call fcn.1009dac0
push str.DrawMgr
lea ecx, [ebp - 0x30]
call fcn.100a1da0
test al, al
je 0x100667d5
push ebx
push str.DrawMgr
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x30]
call fcn.100a25f0
mov eax, dword [eax]
mov ecx, dword [0x1010e238]
mov edx, dword [ecx + 8]
push eax
mov byte [ebp - 4], 0x1d
call edx
add esp, 4
lea ecx, [ebp - 0x24]
mov dword [esi + 0xec], eax
mov byte [ebp - 4], 0x1a
call fcn.1009dac0
push str.ExportUtils
lea ecx, [ebp - 0x30]
call fcn.100a1da0
test al, al
je 0x1006681f
push ebx
push str.ExportUtils
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x30]
call fcn.100a25f0
mov eax, dword [eax]
mov ecx, dword [0x1010e238]
mov edx, dword [ecx + 8]
push eax
mov byte [ebp - 4], 0x1e
call edx
add esp, 4
lea ecx, [ebp - 0x24]
mov dword [esi + 0xf0], eax
mov byte [ebp - 4], 0x1a
call fcn.1009dac0
call fcn.100a1cc0
mov dword [0x1010e23c], eax
cmp eax, ebx
je 0x10066833
mov eax, dword [eax]
call eax
jmp 0x10066835
xor eax, eax
push eax
lea ecx, [ebp - 0x40]
call fcn.1009e380
lea ecx, [ebp - 0x40]
push ecx
mov ecx, 0x1010ae10
mov byte [ebp - 4], 0x1f
call fcn.100a2050
mov byte [ebp - 4], 0x20
call fcn.100a1cc0
mov dword [0x1010e23c], eax
cmp eax, ebx
je 0x10066868
mov edx, dword [eax]
call edx
jmp 0x1006686a
xor eax, eax
push eax
lea ecx, [ebp - 0x38]
call fcn.1009e380
lea eax, [ebp - 0x38]
push eax
mov ecx, 0x1010ae10
mov byte [ebp - 4], 0x21
call fcn.100a2050
lea ecx, [esi + 0x118]
push edi
push ecx
mov byte [ebp - 4], 0x22
call fcn.1008adb0
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x40]
push eax
lea eax, [esi + 0x104]
push edi
push eax
call fcn.1008b490
add esp, 0x18
cmp dword [esi + 0x114], ebx
je 0x100668c5
cmp dword [esi + 0x128], 0x10
jge 0x100668c5
mov dword [esi + 0x114], ebx
push str.GlyphNumberThreshold
mov ecx, edi
mov dword [ebp - 0x10], 0x7d0
call fcn.100a1da0
test al, al
je 0x1006692d
push 1
push str.GlyphNumberThreshold
lea ecx, [ebp - 0x24]
push ecx
mov ecx, edi
call fcn.100a2440
mov edx, dword [ebp - 0x24]
mov eax, dword [0x1010e228]
mov ecx, dword [eax + 8]
push edx
mov byte [ebp - 4], 0x23
call ecx
fnstcw word [ebp + 0xa]
movzx eax, word [ebp + 0xa]
or eax, 0xc00
mov dword [ebp - 0x10], eax
add esp, 4
fldcw word [ebp - 0x10]
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0x22
fistp qword [ebp - 0x1c]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], edx
fldcw word [ebp + 0xa]
call fcn.1009dac0
mov eax, dword [esi + 0x16c]
cmp eax, ebx
je 0x10066996
push eax
lea ecx, [ebp - 0x24]
call fcn.1009e380
mov edi, vtable.CAGMPDFPortErrorStrategist.0
mov byte [ebp - 4], 0x24
mov dword [ebp - 0x28], edi
call fcn.1009d480
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 0x25
call fcn.1009e3b0
mov ecx, dword [esi + 0x18c]
mov eax, dword [ebp + 8]
mov dword [ebp + 8], ecx
lea ecx, [ebp + 8]
mov dword [esi + 0x18c], eax
call fcn.1009dac0
mov edx, dword [ebp - 0x20]
lea ecx, [ebp - 0x24]
mov dword [esi + 0x190], edx
mov byte [ebp - 4], 0x22
mov dword [ebp - 0x28], edi
call fcn.1009dac0
mov edx, dword [esi + 0x188]
lea ecx, [esi + 0x188]
lea eax, [esi + 0x194]
push eax
mov eax, dword [edx + 0x14]
call eax
push 0x48
call fcn.100328c0
add esp, 4
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0x26
cmp eax, ebx
je 0x100669d5
mov ecx, dword [esi + 0x120]
push ecx
mov ecx, eax
call fcn.100297b0
mov edi, eax
jmp 0x100669d7
xor edi, edi
mov ecx, dword [esi + 0x1a0]
mov byte [ebp - 4], 0x22
mov dword [ebp + 8], ecx
cmp edi, ecx
je 0x100669fd
cmp ecx, ebx
je 0x100669fd
call fcn.100296c0
mov edx, dword [ebp + 8]
push edx
call fcn.100328f0
add esp, 4
push 0x118
mov dword [esi + 0x1a0], edi
call fcn.100328c0
add esp, 4
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0x27
cmp eax, ebx
je 0x10066ae8
sub esp, 8
mov edi, esp
lea eax, [ebp - 0x38]
mov dword [ebp - 0x18], esp
push eax
mov ecx, edi
call fcn.1009e3b0
mov ecx, dword [ebp - 0x34]
mov dword [edi + 4], ecx
sub esp, 8
mov edi, esp
lea edx, [ebp - 0x40]
mov dword [ebp - 0x20], esp
push edx
mov ecx, edi
mov byte [ebp - 4], 0x28
call fcn.1009e3b0
mov eax, dword [ebp - 0x3c]
mov dword [edi + 4], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [esi + 0x128]
push ecx
push edx
sub esp, 0xc
lea eax, [esi + 0x188]
mov byte [ebp - 4], 0x29
mov dword [ebp - 0x10], esp
mov edi, esp
cmp eax, ebx
je 0x10066a7b
add eax, 4
jmp 0x10066a7d
xor eax, eax
lea ecx, [edi + 4]
push eax
call fcn.1009e3b0
mov dword [edi], vtable.CAGMPDFPortErrorStrategist.0
mov eax, dword [esi + 0x190]
mov dword [edi + 8], eax
mov ecx, dword [esi + 0xf0]
mov edx, dword [esi + 0x164]
mov eax, dword [esi + 0xf4]
push ecx
mov ecx, dword [esi + 0x110]
push edx
movzx edx, word [esi + 0x170]
push ecx
movzx ecx, word [esi + 0x114]
push edx
movzx edx, word [esi + 0x10c]
push ecx
movzx ecx, word [esi + 0x108]
push edx
mov edx, dword [esi + 0x11c]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
mov byte [ebp - 4], 0x27
call fcn.1007d360
mov edi, eax
jmp 0x10066aea
xor edi, edi
mov ecx, dword [esi + 0xf8]
mov byte [ebp - 4], 0x22
cmp edi, ecx
je 0x10066b04
cmp ecx, ebx
je 0x10066b04
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
lea ecx, [ebp - 0x38]
mov dword [esi + 0xf8], edi
mov byte [ebp - 4], 0x20
call fcn.1009dac0
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0x1a
call fcn.1009dac0
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0x18
call fcn.1009dac0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4