Function at 0x1000c370
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x88
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x10013600
mov ebx, ecx
lea eax, [ebp - 0x18]
mov esi, 1
mov edi, edx
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
lock xadd dword [0x1005ff50], esi
call fcn.1000cc60
test eax, eax
jne 0x1000c3dc
lea eax, [ebp - 0x40]
mov ecx, 0x100508f7
mov edx, 0x46
push 0x100509bc
push 0x10050870
push eax
call fcn.10029da0
add esp, 0xc
ud2
mov ecx, dword [eax]
mov edx, dword [ebp + 0xc]
inc ecx
test esi, esi
mov dword [eax], ecx
js 0x1000c45a
cmp ecx, 3
jae 0x1000c45a
mov dword [ebp - 0x80], ecx
push 0x1005ff4c
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockShared]
mov dword [ebp - 0x8c], 0x1005ff4c
mov dword [ebp - 0x10], 2
mov dword [ebp - 0x84], ebx
push ebx
mov dword [ebp - 0x88], edi
call dword [edi + 0x10]
add esp, 4
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], edx
call fcn.1000cc60
mov edi, dword [ebp - 0x24]
test eax, eax
jne 0x1000c563
lea eax, [ebp - 0x40]
mov ecx, 0x100508f7
mov edx, 0x46
push 0x100509bc
push 0x10050870
push eax
call fcn.10029da0
add esp, 0xc
jmp 0x1000c86e
cmp ecx, 2
jbe 0x1000c4b7
lea ecx, [ebp - 0x78]
lea edx, [ebp - 0x40]
mov dword [ebp - 0x40], 0x10051224
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x30], 0x10050570
mov byte [ebp - 0x74], 0
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x2c], 0
call fcn.1000cd50
cmp al, 3
jne 0x1000c55f
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [ebp - 0x10], 1
push eax
mov dword [ebp - 0x20], edx
call dword [ecx]
add esp, 4
jmp 0x1000c52c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x78], 0x10050570
mov dword [ebp - 0x74], 0x10050824
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x40], 0x10051260
mov dword [ebp - 0x3c], 2
mov byte [ebp - 0x5c], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x78]
mov dword [ebp - 0x6c], edx
lea edx, [ebp - 0x40]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x48], 0x100020d0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 1
call fcn.1000cd50
cmp al, 3
jne 0x1000c55f
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [ebp - 0x10], 0
push eax
mov dword [ebp - 0x20], edx
call dword [ecx]
add esp, 4
mov esi, dword [ebp - 0x20]
mov ecx, dword [esi + 4]
cmp dword [ecx + 4], 0
je 0x1000c551
mov eax, dword [esi]
cmp dword [ecx + 8], 9
jb 0x1000c543
mov eax, dword [eax - 4]
push eax
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
push esi
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
ud2
cmp dword [eax], 1
mov cl, 1
jbe 0x1000c63b
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x90], edx
mov dword [ebp - 0x7c], ecx
mov eax, dword [edi + 0xc]
push dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
call eax
add esp, 4
xor eax, 0xecc7bcf4
xor edx, 0x7ef2a91e
or edx, eax
jne 0x1000c67a
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x5c], eax
mov eax, dword [0x1005f044]
test eax, eax
jne 0x1000c5bc
mov ecx, 0x1005f044
call fcn.100125c0
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jbe 0x1000c6a3
cmp dword [eax], 1
mov edi, eax
jne 0x1000c6a3
add edi, 4
cmp dword [edi], 0
jne 0x1000c84e
mov dword [edi], 0xffffffff
mov esi, dword [edi + 4]
test esi, esi
jne 0x1000c61b
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x10], 8
call fcn.1000c140
mov edi, dword [ebp - 0x20]
mov esi, eax
mov eax, dword [edi + 4]
test eax, eax
je 0x1000c618
lock dec dword [eax]
jne 0x1000c618
mov ecx, dword [edi + 4]
call fcn.1000c2b0
mov dword [edi + 4], esi
lock inc dword [esi]
jle 0x1000c55f
inc dword [edi]
test esi, esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x20], esi
jne 0x1000c950
xor eax, eax
jmp 0x1000c6e0
mov eax, dword [0x1005ff40]
mov edx, dword [ebp + 0xc]
cmp eax, 2
je 0x1000c847
cmp eax, 1
je 0x1000c840
test eax, eax
jne 0x1000c571
lea ecx, [ebp - 0x40]
call fcn.1000cfe0
mov edi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x40]
test eax, eax
jne 0x1000c8b5
mov bl, 5
jmp 0x1000c992
push dword [ebp - 0x20]
call dword [ebp - 0x24]
add esp, 4
xor eax, 0xbae7a625
xor edx, 0xe43a67d8
or edx, eax
jne 0x1000c870
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
mov eax, dword [eax + 8]
jmp 0x1000c5a3
mov eax, dword [0x1005f044]
test eax, eax
jne 0x1000c6b6
mov ecx, 0x1005f044
call fcn.100125c0
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x1000c87f
mov esi, eax
cmp eax, 1
jne 0x1000c912
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x20], 0
xor eax, eax
test eax, eax
mov edx, 0x100510e6
mov dword [ebp - 0x78], 0x1005110c
mov dword [ebp - 0x74], 4
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x54], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x10], 3
cmovne edx, eax
mov eax, 9
cmovne eax, ecx
mov dword [ebp - 0x4c], edx
lea ecx, [ebp - 0x58]
lea edx, [ebp - 0x78]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x60]
mov dword [ebp - 0x3c], 0x1000d900
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x90]
mov dword [ebp - 0x34], 0x1000d900
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x2c], 0x1000d920
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], 3
call fcn.1000cd50
cmp al, 3
jne 0x1000c7b4
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [ebp - 0x10], 7
push eax
mov dword [ebp - 0x24], edx
call dword [ecx]
add esp, 4
mov esi, dword [ebp - 0x24]
mov ecx, dword [esi + 4]
cmp dword [ecx + 4], 0
je 0x1000c7a6
mov eax, dword [esi]
cmp dword [ecx + 8], 9
jb 0x1000c798
mov eax, dword [eax - 4]
push eax
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
push esi
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
mov ebx, dword [ebp - 0x7c]
xor eax, eax
mov ecx, ebx
add cl, 0xfd
movzx edx, cl
inc edx
cmp cl, 2
cmovb eax, edx
test eax, eax
je 0x1000c9b6
cmp eax, 1
je 0x1000ca70
xor eax, eax
xchg byte [0x1005f040], al
test al, al
je 0x1000ca70
lea ecx, [ebp - 0x58]
lea edx, [ebp - 0x40]
mov dword [ebp - 0x40], 0x1005117c
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x30], 0x10050570
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x10], 3
call fcn.1000cd50
cmp al, 3
jne 0x1000ca70
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x10], 4
push eax
call dword [ecx]
add esp, 4
jmp 0x1000ca38
mov cl, 4
jmp 0x1000c571
xor ecx, ecx
jmp 0x1000c571
lea eax, [ebp - 0x40]
mov ecx, str.already_borrowedC:qiaxpktrnuavvtvliadqvixeuexnszhxnddwiqpwqoauwmqlvpfnfcolmgfbrphijoaowjgadkcnimlhokwtgoabkqvllwmzzzafnhnjlbdzgdtdbdprhlsqbcjx
mov edx, 0x10
push 0x10050f30
push 0x10050860
push eax
call fcn.10029da0
add esp, 0xc
ud2
mov ecx, 0x100510da
mov eax, 0xc
jmp 0x1000c5a3
mov eax, dword [0x1005ff58]
test eax, eax
jne 0x1000c896
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x1000c8a4
mov dword [0x1005ff58], eax
push 0x10
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
jne 0x1000c8e2
mov ecx, 0x10
mov edx, 4
call fcn.10029af0
ud2
mov edx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x3c]
cmp edx, 4
je 0x1000c968
cmp edx, 1
jne 0x1000c979
cmp byte [eax], 0x30
jne 0x1000c979
mov bl, 4
mov esi, 1
jmp 0x1000c980
mov dword [eax], 0
mov dword [eax + 0xc], 0x1005f044
mov esi, eax
mov eax, dword [0x1005f044]
test eax, eax
jne 0x1000c90a
mov ecx, 0x1005f044
mov dword [ebp - 0x20], esi
call fcn.100125c0
mov esi, dword [ebp - 0x20]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [esi + 8]
cmp dword [esi], 0
lea edi, [esi + 4]
mov dword [esi], 1
mov dword [esi + 4], 0
mov dword [esi + 8], 0
je 0x1000c5da
test ecx, ecx
je 0x1000c5da
lock dec dword [ecx]
jne 0x1000c5da
call fcn.1000c2b0
jmp 0x1000c5da
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x10]
test eax, eax
cmove ecx, eax
jne 0x1000cb12
xor eax, eax
jmp 0x1000cb18
cmp dword [eax], 0x6c6c7566
jne 0x1000c979
mov bl, 1
mov esi, 3
jmp 0x1000c980
mov esi, 2
xor ebx, ebx
test ecx, ecx
je 0x1000c992
push eax
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
cmp bl, 5
movzx eax, bl
mov ebx, 1
mov edx, dword [ebp + 0xc]
mov ecx, 4
cmovne ebx, esi
cmovne ecx, eax
xchg dword [0x1005ff40], ebx
jmp 0x1000c571
push 0x1005ff3c
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
lea eax, [ebp - 0x25]
lea ecx, [ebp - 0x58]
lea edx, [ebp - 0x40]
mov dword [ebp - 0x40], 0x10050ad0
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x94], 0x1005ff3c
mov byte [ebp - 0x25], bl
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x10], 6
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x78]
mov dword [ebp - 0x74], 0x1000d990
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 1
call fcn.1000cd50
mov esi, edx
mov ebx, eax
push 0x1005ff3c
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp bl, 3
jne 0x1000ca70
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ebp - 0x10], 5
push eax
mov dword [ebp - 0x24], esi
call dword [ecx]
add esp, 4
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 4]
cmp dword [ecx + 4], 0
je 0x1000ca60
mov eax, dword [ebp - 0x24]
cmp dword [ecx + 8], 9
mov eax, dword [eax]
jb 0x1000ca52
mov eax, dword [eax - 4]
push eax
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
push dword [ebp - 0x24]
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x1000ca84
lock dec dword [eax]
jne 0x1000ca84
mov ecx, dword [ebp - 0x50]
call fcn.1000c2b0
mov eax, dword [ebp - 0x44]
mov esi, dword [ebp - 0x88]
mov edi, dword [ebp - 0x84]
test eax, eax
je 0x1000caa4
lock dec dword [eax]
jne 0x1000caa4
mov ecx, dword [ebp - 0x44]
call fcn.1000d6d0
push 0x1005ff4c
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockShared]
cmp dword [ebp - 0x80], 1
mov dword [ebp - 0x10], 0xffffffff
jbe 0x1000cb07
lea ecx, [ebp - 0x4c]
lea edx, [ebp - 0x40]
mov dword [ebp - 0x40], 0x1005129c
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x30], 0x10050570
mov byte [ebp - 0x48], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x2c], 0
call fcn.1000cd50
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x78], eax
call fcn.1000cf10
ud2
mov ecx, edi
mov edx, esi
call fcn.1000cef0
ud2
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
dec ecx
mov dword [ebp - 0x10], 3
jmp 0x1000c6e0