Function at 0x10004c80
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [0x10064870]
xor eax, esp
mov dword [esp + 0x10], eax
push ebx
push esi
push edi
push dword [0x10064010]
xor ebx, ebx
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1002055d
cmp dword [eax + 0x1078], ebx
je 0x1002055d
push dword [0x10064010]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x10011438
mov esi, dword [eax + 0x1078]
test esi, esi
je 0x100204d9
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
test esi, esi
je 0x1002054d
test byte [esi + 0x2c], 2
jne 0x1002054d
cmp dword [esi + 0x24], ebx
lea eax, [esi + 0xc]
jne 0x100204e4
lea ecx, [esi + 4]
cmp dword [0x10066330], ebx
je 0x1001143f
mov eax, 1
lock xadd dword [ecx], eax
mov eax, dword [ebp + 0x1c]
inc dword [esi + 8]
and eax, 0x31f
cmp eax, dword [ebp + 0x1c]
jne 0x100204fc
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x1001ecbb
jmp 0x1001eb6c
mov dword [edx + 0x14], ecx
jmp 0x1001ec22
mov ecx, ebx
call edi
test al, 4
jne 0x1001eb7e
jmp 0x1001ecbb
test ecx, ecx
js 0x10011431
mov edx, dword [ebp + 0x18]
test edx, edx
js 0x10011448
test eax, 0x100
jne 0x1001eccd
push eax
push edx
push ecx
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp + 0xc]
call fcn.10016da7
test eax, eax
js 0x1001ecd7
mov ebx, 1
mov ecx, esi
call fcn.1001f0a0
jmp 0x1001ec68
call fcn.10002e40
mov esp, ebp
pop ebp
ret 0x18
xor ecx, ecx
jmp 0x10004d64
xor esi, esi
jmp 0x10004cdd
inc dword [ecx]
mov eax, dword [ecx]
jmp 0x10004d1f
xor edx, edx
jmp 0x10004d6f
mov eax, dword [ebx]
mov edi, dword [eax + 0x14]
mov ecx, edi
call dword [0x10067390]
jmp 0x10004d4b
cmp esi, dword [ebx + 0x10]
jne 0x1001ec8d
mov eax, dword [ebx]
mov edi, dword [eax + 0x20]
cmp edi, fcn.10003f90
je 0x1001ec81
mov ecx, edi
call dword [0x10067390]
mov ecx, ebx
call edi
push dword [0x10064010]
mov dword [esp + 0x10], eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1001ec97
mov edi, dword [eax + 0x1078]
test edi, edi
je 0x1002050c
mov edx, dword [esp + 0xc]
test edx, edx
je 0x1001ecbb
test byte [edi + 0x2c], 2
jne 0x1001ecbb
lea eax, [edi + 0xc]
mov dword [esp + 0x14], edi
cmp dword [eax + 0x18], 0
jne 0x10020523
cmp dword [0x10066330], 0
lea ecx, [edi + 4]
je 0x1001ec9e
mov eax, 1
lock xadd dword [ecx], eax
inc dword [edi + 8]
mov dword [esp + 0x10], edx
mov ecx, dword [edx + 0x10]
lea eax, [ecx + 1]
mov dword [edx + 0x10], eax
test ecx, ecx
je 0x10004d43
mov eax, dword [edx + 0x18]
mov dword [esp + 0x18], eax
mov dword [edx + 0x18], 1
mov ecx, dword [esp + 0x10]
add ecx, 4
cmp dword [0x10066330], 0
je 0x1001eca7
mov eax, 1
lock xadd dword [ecx], eax
cmp dword [esi + 0x28], 0
jne 0x1001ecad
test dword [ebx + 0x3c], 0x400000
mov eax, dword [ebp + 0x1c]
jne 0x1001ecb7
mov ecx, dword [ebp + 0x14]
test al, 2
jne 0x10004d5c
jmp 0x1001ecc5
lea ecx, [esp + 0x10]
call fcn.10004795
mov ecx, dword [esp + 0x1c]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
jmp 0x10004da3
mov ecx, ebx
call fcn.10003f90
jmp 0x1001eba4
push 0x8004001e
jmp 0x10020540
xor edi, edi
jmp 0x10020516
inc dword [ecx]
mov eax, dword [ecx]
jmp 0x1001ec0a
inc dword [ecx]
mov eax, dword [ecx]
jmp 0x1001ec49
push 0x8004001f
jmp 0x10020540
test al, 1
je 0x1001ec5b
push 0x80070057
jmp 0x10020540
mov edx, dword [ebp + 0x18]
jmp 0x10004d6f
and eax, 0xfffffeff
jmp 0x10004d7a
push eax
jmp 0x10020540
mov dword [0], ebx
jmp 0x10004cdd
cmp dword [0x10066330], ebx
je 0x10004d07
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
jmp 0x10004d07
push 0x80070057
call dword [sym.imp.kernel32.dll_SetLastError]
jmp 0x10004d97
mov dword [0], 0
test edi, edi
jne 0x1001ebca
jmp 0x1001ecbb
cmp dword [0x10066330], 0
je 0x1001ebf1
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov edx, dword [esp + 0xc]
jmp 0x1001ebf1
call dword [sym.imp.kernel32.dll_SetLastError]
xor ebx, ebx
jmp 0x10004d97
push 0x80070057
call dword [sym.imp.kernel32.dll_SetLastError]
jmp 0x1001ec68
push 0x80040014
call dword [sym.imp.kernel32.dll_SetLastError]
jmp 0x1001ec71