Function at 0x100cd3a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
mov eax, 0x16
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x20], 0
test ebx, ebx
je 0x100cd4d9
mov edi, dword [ebx]
test edi, edi
je 0x100cd4d9
cmp edi, 0xffffffff
je 0x100cd4f1
lea ebx, [edi + 0x10]
mov dword [esp], ebx
call fcn.100cbb50
test eax, eax
jne 0x100cd4e1
add dword [edi], 1
mov dword [esp], ebx
call fcn.100c2ae0
test eax, eax
jne 0x100cd4e1
mov eax, dword [esp + 0x64]
mov ebx, dword [0x10103ce0]
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], 0x100c7370
mov dword [esp + 0x24], eax
lea eax, [esp + 0x20]
test ebx, ebx
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x34], eax
je 0x100cd67d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [0x10103ce0]
sub esp, 4
lea eax, [esp + 0x30]
mov dword [esp], ebx
mov dword [esp + 0x38], esi
mov dword [esp + 4], eax
call fcn.100c5450
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call fcn.100c7210
test eax, eax
mov dword [esp + 0x20], eax
je 0x100cd5c0
mov ebx, dword [0x10103ce0]
test ebx, ebx
je 0x100cd4d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
test ebx, ebx
je 0x100cd4d5
mov eax, dword [ebx]
test eax, eax
je 0x100cd4c1
mov edx, dword [ebx + 4]
mov dword [esp], edx
call eax
mov eax, dword [ebx + 8]
mov dword [esp + 4], eax
mov eax, dword [0x10103ce0]
mov dword [esp], eax
call fcn.100c5450
mov eax, dword [esp + 0x20]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
lea ebp, [esp + 0x30]
mov dword [esp + 0x30], 0x10103cb4
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov edx, 0x10103cb4
mov eax, ebp
xchg dword [edx], eax
test eax, eax
je 0x100cd550
mov dword [eax + 4], ebp
lea edx, [eax + 0xc]
xor eax, eax
lock cmpxchg dword [edx], edi
test eax, eax
je 0x100cd53e
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea edi, [esp + 0x38]
xor esi, esi
lock xadd dword [edi], esi
test esi, esi
je 0x100cd5f0
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x100cd684
cmp eax, 1
sbb edi, edi
and edi, 6
cmp eax, 1
sbb esi, esi
and esi, 0x16
mov eax, dword [esp + 0x30]
xor edx, edx
mov ecx, eax
lea eax, [esp + 0x34]
mov dword [esp + 0x14], eax
lock xadd dword [eax], edx
test edx, edx
mov eax, edx
je 0x100cd635
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cd5a7
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
test edi, edi
mov dword [esp + 0x20], esi
je 0x100cd70f
mov eax, esi
jmp 0x100cd4d9
add edi, 0xc
mov dword [esp + 4], 0
mov dword [esp], edi
call fcn.100cc5c0
test eax, eax
je 0x100cd481
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp + 0x20], eax
jmp 0x100cd481
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, eax
sub esp, 0x10
mov eax, esi
lock cmpxchg dword [edi], edx
test eax, eax
je 0x100cd65f
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cd550
mov eax, ebp
lock cmpxchg dword [ecx], edx
cmp ebp, eax
je 0x100cd5a7
lea ebp, [esp + 0x3c]
lock xadd dword [ebp], edx
test edx, edx
je 0x100cd6a0
xor eax, eax
mov ecx, dword [esp + 0x14]
lock xadd dword [ecx], eax
jmp 0x100cd589
mov dword [esp], edx
mov dword [esp + 0x14], edx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov edx, dword [esp + 0x14]
jmp 0x100cd624
xor esi, esi
jmp 0x100cd455
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.100c22e0
mov edi, eax
mov esi, eax
and edi, 0xffffffef
jmp 0x100cd56b
mov dword [esp + 0x1c], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
mov ecx, eax
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
mov eax, edx
lock cmpxchg dword [ebp], ecx
test eax, eax
je 0x100cd6f6
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cd650
mov eax, dword [esp + 0x18]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push eax
push eax
jmp 0x100cd6e1
mov edi, dword [ebx]
jmp 0x100cd3d3