Function at 0x10033960
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006d72d
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x10086040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x10], eax
sub eax, 1
je 0x10033b37
mov edx, dword [esi + 0xc]
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
add edx, ecx
mov dword [esi + 0xc], edx
mov eax, dword [ebx]
test eax, eax
jne 0x100339b1
test ecx, ecx
je 0x100339c8
cmp edx, dword [esi + 8]
jae 0x100339c8
xor ecx, ecx
mov edi, 0x10000
test eax, eax
cmovne edi, ecx
je 0x10033b46
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
test eax, eax
je 0x100339e1
lock inc dword [eax + 4]
mov eax, dword [esi + 0x1c]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x2c], eax
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x28], eax
mov eax, dword [ebx]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 4], 0
lea edi, [esi + 0x18]
mov ebx, dword [esi + 0x14]
push dword [0x1008948c]
mov esi, dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x10033a2f
nop word [eax + eax]
cmp dword [eax], esi
je 0x10033b1a
mov eax, dword [eax + 8]
test eax, eax
jne 0x10033a20
lea eax, [ebp - 0x2c]
push eax
push 0x38
mov dword [ebp - 0x18], eax
call fcn.100064a0
add esp, 8
mov esi, eax
mov byte [ebp - 4], 2
mov ecx, ebx
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0x10035340
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x1c], 0
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
push esi
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], edx
mov eax, dword [ebp - 0x1c]
push edi
mov dword [esi + 0x30], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
call fcn.1000aa40
lea ecx, [ebp - 0x18]
call fcn.100352e0
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x10033b7e
or edi, 0xffffffff
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x10033b7e
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x10033b7e
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [eax + 4], 0
je 0x10033a2f
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 1
push eax
push eax
call fcn.10035d10
add esp, 8
jmp 0x10033ad6
mov eax, dword [ebp + 8]
xor ecx, ecx
mov edi, 0x10000
cmp dword [eax], ecx
cmovne edi, ecx
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
cmp ecx, edx
mov eax, dword [esi + 4]
cmovae ecx, edx
add eax, ecx
sub edx, ecx
mov dword [ebp - 0x14], eax
cmp edx, edi
mov eax, dword [esi]
cmovae edx, edi
mov dword [ebp - 0x10], edx
lea ecx, [eax + 0x44]
push ecx
push esi
push 0
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [eax + 4]
push ecx
mov ecx, dword [eax]
add ecx, 0x14
call fcn.10034830
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc