Function at 0x10006370
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10014550
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x10016334]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push ecx
push edi
lea ecx, [ebp - 0x44]
call fcn.10007a10
mov dword [ebp - 4], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x1c], 6
lea ebx, [edi + 0x24]
mov byte [ebp - 4], 1
mov ecx, ebx
call dword [sym.imp.MSDART.DLL_public:_void___thiscall_CReaderWriterLock3AR::WriteLock_void_]
mov eax, dword [edi]
push dword [ebp + 0xc]
mov esi, dword [eax + 0x8c]
mov ecx, esi
call dword [0x10017168]
mov ecx, edi
call esi
mov dword [ebp - 0x2c], eax
test eax, eax
jns 0x1000640e
lea ecx, [ebp - 0x44]
call fcn.10011800
test byte [0x1001669c], 2
je 0x100067bb
mov eax, dword [0x10018004]
jmp 0x100067bb
cmp eax, 1
jne 0x100064fd
cmp dword [edi + 0x20], 0
mov dword [ebp - 0x2c], 0
jne 0x100067c8
push 0x1c
push 0x1000000
push dword [0x10016668]
call dword [sym.imp.MSDART.DLL_MpHeapAlloc]
mov ebx, eax
add esp, 0xc
mov dword [ebp - 0x24], ebx
test ebx, ebx
je 0x10006476
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov byte [ebx + 0x18], 0
jmp 0x10006478
xor ebx, ebx
test ebx, ebx
jne 0x1000649c
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x2c], 0x8007000e
call fcn.10011800
test eax, eax
je 0x1000649c
cmp dword [ebp - 0x2c], ebx
je 0x1000649c
lea ebx, [edi + 0x24]
jmp 0x100063f7
mov eax, dword [edi]
mov esi, dword [eax + 0xb4]
mov ecx, esi
call dword [0x10017168]
mov ecx, edi
call esi
mov esi, eax
mov ecx, ebx
push esi
call fcn.1000f6a0
test eax, eax
jne 0x100064c7
push esi
lea ecx, [ebx + 0xc]
call fcn.1000f6a0
mov dword [ebp - 0x2c], eax
test eax, eax
jns 0x100064f5
lea ecx, [ebp - 0x44]
call fcn.10011800
test byte [0x1001669c], 2
je 0x1000677b
mov eax, dword [0x10018004]
mov ecx, edi
push ebx
call fcn.10006270
jmp 0x100067b8
mov dword [edi + 0x20], ebx
jmp 0x100067b8
push 0x1c
push 0x1000000
push dword [0x10016668]
call dword [sym.imp.MSDART.DLL_MpHeapAlloc]
mov ebx, eax
add esp, 0xc
mov dword [ebp - 0x24], ebx
test ebx, ebx
je 0x1000654b
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov byte [ebx + 0x18], 0
jmp 0x1000654d
xor ebx, ebx
test ebx, ebx
jne 0x10006571
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x2c], 0x8007000e
call fcn.10011800
test eax, eax
je 0x10006571
cmp dword [ebp - 0x2c], ebx
je 0x10006571
lea ebx, [edi + 0x24]
jmp 0x100063f7
mov eax, dword [edi]
mov esi, dword [eax + 0xb4]
mov ecx, esi
call dword [0x10017168]
mov ecx, edi
call esi
mov esi, eax
mov ecx, ebx
push esi
call fcn.1000f6a0
test eax, eax
jne 0x1000659c
push esi
lea ecx, [ebx + 0xc]
call fcn.1000f6a0
mov dword [ebp - 0x2c], eax
test eax, eax
js 0x100064ce
mov eax, dword [edi]
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0xc]
mov esi, dword [eax + 0x90]
mov ecx, esi
call dword [0x10017168]
mov ecx, edi
call esi
mov dword [ebp - 0x2c], eax
test eax, eax
js 0x100064ce
lea ecx, [ecx]
cmp eax, 1
je 0x10006791
mov eax, dword [edi]
lea ecx, [ebp - 0x48]
push ecx
push dword [ebp - 0x18]
mov dword [ebp - 0x14], 0
mov esi, dword [eax + 0x94]
mov ecx, esi
call dword [0x10017168]
mov ecx, edi
call esi
mov dword [ebp - 0x2c], eax
test eax, eax
js 0x1000674e
push dword [ebp - 0x48]
lea ecx, [ebp - 0x20]
call fcn.10013370
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x10006644
mov al, byte [ebp - 0x1c]
lea edx, [ebp - 0x14]
and al, 4
movzx eax, al
neg eax
push edx
sbb eax, eax
add ecx, 0xc
and eax, dword [ebp - 0x20]
push eax
call fcn.10010020
mov dword [ebp - 0x2c], eax
test eax, eax
js 0x1000674e
mov ecx, dword [edi + 0x20]
jmp 0x10006647
mov eax, dword [ebp - 0x2c]
test ecx, ecx
je 0x1000665b
cmp eax, 1
jne 0x10006785
mov dword [ebp - 0x2c], 0
mov esi, dword [edi]
lea eax, [ebp - 0x14]
push eax
push 0
push dword [ebp - 0x18]
mov esi, dword [esi + 0x98]
mov ecx, esi
mov dword [ebp - 0x24], 0
call dword [0x10017168]
mov ecx, edi
call esi
mov dword [ebp - 0x2c], eax
test eax, eax
js 0x1000674e
mov eax, dword [edi]
push dword [ebp - 0x14]
mov esi, dword [eax + 0xac]
mov ecx, esi
call dword [0x10017168]
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x10006719
mov eax, dword [ecx]
mov edx, edi
sub edx, dword [edi + 0x10]
neg edx
mov esi, dword [eax + 0x4c]
sbb edx, edx
and edx, dword [edi + 0x10]
mov ecx, esi
push edx
call dword [0x10017168]
mov ecx, dword [ebp - 0x14]
call esi
mov eax, dword [edi]
push dword [ebp - 0x14]
push dword [ebp - 0x18]
mov esi, dword [eax + 0x9c]
mov ecx, esi
call dword [0x10017168]
mov ecx, edi
call esi
mov dword [ebp - 0x2c], eax
test eax, eax
js 0x1000674e
push dword [ebp - 0x14]
lea eax, [ebp - 0x20]
mov ecx, ebx
push eax
push dword [ebx + 8]
call fcn.100101c0
mov dword [ebp - 0x2c], eax
test eax, eax
js 0x1000674e
cmp dword [ebp - 0x24], 0
je 0x10006719
mov ecx, dword [edi + 0x20]
lea eax, [ebp - 0x20]
push eax
call fcn.10010250
mov dword [ebp - 0x2c], eax
test eax, eax
js 0x1000674e
push dword [ebp - 0x20]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [edi]
push dword [ebp + 0xc]
mov dword [ebp - 0x20], 0
push dword [ebp - 0x18]
mov esi, dword [eax + 0xa0]
mov ecx, esi
call dword [0x10017168]
mov ecx, edi
call esi
mov dword [ebp - 0x2c], eax
test eax, eax
jns 0x100065d0
lea ecx, [ebp - 0x44]
call fcn.10011800
test byte [0x1001669c], 2
je 0x10006764
mov eax, dword [0x10018004]
mov eax, dword [edi]
push dword [ebp - 0x18]
mov esi, dword [eax + 0xa4]
mov ecx, esi
call dword [0x10017168]
mov ecx, edi
call esi
push ebx
mov ecx, edi
call fcn.10006270
jmp 0x100067b8
mov dword [ebp - 0x24], 1
jmp 0x100066a1
push 0
mov ecx, edi
mov dword [ebp - 0x2c], 0
call fcn.10006270
mov eax, dword [edi]
mov dword [edi + 0x20], ebx
mov esi, dword [eax + 0xb8]
mov ecx, esi
call dword [0x10017168]
mov ecx, edi
call esi
lea ebx, [edi + 0x24]
cmp dword [ebp - 0x2c], 0
jge 0x100067c8
mov dword [edi + 0x30], 1
mov ecx, ebx
call dword [sym.imp.MSDART.DLL_public:_void___thiscall_CReaderWriterLock3AR::WriteUnlock_void_]
test byte [ebp - 0x1c], 2
mov edi, dword [ebp - 0x2c]
je 0x100067e2
push dword [ebp - 0x20]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x44]
add dword [eax + 4], 0xffffffff
jne 0x10006848
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x1000681e
push ecx
push 0
call dword [sym.imp.OLEAUT32.dll_CreateErrorInfo]
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 8]
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x10017168]
call esi
mov eax, dword [ebp - 0x44]
cmp byte [eax + 0x12], 0
jne 0x10006837
mov ecx, dword [0x10016698]
push 0
push dword [ecx + 0xc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x10006848
mov dword [eax + 8], 0
mov eax, dword [ebp - 0x44]
mov dword [eax + 0xc], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10013ec0
mov esp, ebp
pop ebp
ret 8