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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x50]
shl eax, 3
cmp byte [esi + 0x140], 1
jne 0x10d726
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x144], 0
jne 0x10d791
call fcn.000ee7f0
mov edi, dword [0x1aa224]
push edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x10d76e
push 0xc08
call fcn.0015c8ae
add esp, 4
mov esi, eax
push 0xc08
push 0
push esi
call fcn.00153d90
add esp, 0xc
push esi
push edi
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [ebp + 0xc]
mov dword [esi], 0x8000006
push dword [ebp + 8]
push 0x1968c8
call fcn.000ee5f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
cmp edi, dword [esi + 0x44]
jb 0x10d7c9
ja 0x10d7a3
cmp ecx, dword [esi + 0x40]
jbe 0x10d7c9
call fcn.000ee7f0
mov ecx, 0x8000009
call fcn.000ee550
push 0x1968f8
call fcn.000ee5f0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
cdq
push edx
push eax
push edi
push ecx
call fcn.00171a10
mov dword [ebp - 0x1c], ebx
pop ebx
mov dword [ebp - 8], eax
mov ebx, ecx
lea eax, [esi + 0x148]
mov dword [ebp - 0x1c], ebx
mov edi, edx
mov dword [ebp - 4], eax
push eax
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 8]
cmp eax, dword [esi + 0x168]
jne 0x10d80c
cmp edi, dword [esi + 0x16c]
je 0x10d96a
mov ebx, dword [ebp - 0xc]
mov edi, eax
mov eax, dword [esi + 0x144]
test eax, eax
je 0x10d83a
nop dword [eax + eax]
mov edx, dword [eax + 0x1c]
mov ecx, dword [eax + 0x18]
cmp edx, ebx
ja 0x10d8a5
jb 0x10d830
cmp ecx, edi
ja 0x10d8a5
mov eax, dword [eax]
sub edi, ecx
sbb ebx, edx
test eax, eax
jne 0x10d820
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.000ee7f0
mov eax, dword [0x1aa224]
push eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x10d886
push 0xc08
call fcn.0015c8ae
add esp, 4
mov esi, eax
push 0xc08
push 0
push esi
call fcn.00153d90
add esp, 0xc
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push ebx
push edi
push 0x19691c
mov dword [esi], 0x8000007
call fcn.000ee5f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x14]
add ecx, edi
mov eax, ecx
mov dword [ebp - 0x14], ecx
adc edx, ebx
or eax, edx
mov dword [ebp - 0x10], edx
je 0x10d83a
cmp edx, dword [esi + 0x44]
jb 0x10d900
ja 0x10d8cb
cmp ecx, dword [esi + 0x40]
jbe 0x10d900
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.000ee7f0
mov ecx, 0x8000007
call fcn.000ee550
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push 0x196950
call fcn.000ee5f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [esi + 0x50]
mov eax, dword [ebp - 8]
push edx
mov edx, dword [esi + 0x160]
mov dword [esi + 0x168], eax
mov eax, dword [ebp - 0xc]
push ecx
mov ecx, esi
mov dword [esi + 0x16c], eax
call fcn.00135490
mov edi, eax
add esp, 0xc
cmp edi, dword [esi + 0x50]
je 0x10d967
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
js 0x10d94a
call fcn.000ee7f0
mov ecx, 0x8000004
call fcn.000ee550
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push 0x19698c
call fcn.000ee650
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x1c]
mov esi, dword [esi + 0x160]
mov eax, ebx
cdq
and edx, 7
add eax, edx
sar eax, 3
and ebx, 0x80000007
jns 0x10d988
dec ebx
or ebx, 0xfffffff8
inc ebx
push dword [ebp - 4]
mov ecx, ebx
mov edx, 1
shl edx, cl
test byte [eax + esi], dl
setne bl
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
movsx eax, bl
pop ebx
mov esp, ebp
pop ebp
ret