Function at 0x100cc5c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [esp + 0x70]
mov ebp, dword [esp + 0x74]
mov dword [esp + 0x28], 0
mov ebx, dword [eax]
call fcn.100c5ae0
test eax, eax
je 0x100cc7d0
mov edi, eax
mov eax, dword [eax + 0x18]
lea ecx, [esp + 0x44]
lea esi, [esp + 0x40]
mov dword [esp + 0x18], ecx
cmp eax, 3
je 0x100cc8f3
test ebp, ebp
mov edi, 0xffffffff
je 0x100cc695
mov edi, 0x3e8
mov eax, edi
imul dword [ebp]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 4]
mov dword [esp + 0x14], edx
mov dword [esp + 8], 0xf4240
mov dword [esp + 0xc], 0
cdq
add eax, 0x7a120
adc edx, 0
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.100ab830
mov ecx, edx
mov edx, eax
add edx, dword [esp + 0x10]
adc ecx, dword [esp + 0x14]
mov dword [esp], esi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
call dword [sym.imp.msvcrt.dll__ftime64]
mov eax, edi
mul dword [esp + 0x40]
imul ecx, dword [esp + 0x44], 0x3e8
mov edi, eax
movzx eax, word [esp + 0x48]
mov ebp, edx
add ebp, ecx
xor edx, edx
add eax, edi
mov edi, dword [esp + 0x10]
adc edx, ebp
mov ebp, dword [esp + 0x14]
cmp ebp, edx
jge 0x100cc750
xor edi, edi
lea edx, [ebx + 4]
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov eax, esi
mov dword [esp + 0x40], edx
xchg dword [edx], eax
test eax, eax
je 0x100cc6ef
mov dword [eax + 4], esi
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cc6dd
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea edx, [esp + 0x48]
xor ebp, ebp
lock xadd dword [edx], ebp
test ebp, ebp
je 0x100cc770
mov eax, dword [ebx]
mov ecx, dword [esp + 0x40]
xor edx, edx
lea ebp, [eax - 1]
mov eax, dword [esp + 0x18]
mov dword [ebx], ebp
lock xadd dword [eax], edx
test edx, edx
mov eax, edx
je 0x100cc7e1
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cc72c
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
test ebp, ebp
js 0x100cc810
mov ebx, dword [esp + 0x28]
test ebx, ebx
jne 0x100ccaa0
add esp, 0x5c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
jle 0x100cc7c1
mov edi, dword [esp + 0x10]
sub edi, eax
mov eax, 0xfffffffe
cmp edi, 0xffffffff
cmove edi, eax
jmp 0x100cc695
mov dword [esp + 0x10], 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 eax, ebp
mov edx, dword [esp + 0x10]
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cc9a0
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cc6ef
cmp edi, eax
ja 0x100cc752
xor edi, edi
jmp 0x100cc695
lea eax, [esp + 0x44]
lea esi, [esp + 0x40]
mov dword [esp + 0x18], eax
jmp 0x100cc600
mov eax, esi
lock cmpxchg dword [ecx], edx
cmp esi, eax
je 0x100cc72c
lea ecx, [esp + 0x4c]
mov esi, edx
lock xadd dword [ecx], esi
test esi, esi
je 0x100cca20
xor eax, eax
mov esi, dword [esp + 0x18]
lock xadd dword [esi], eax
jmp 0x100cc70e
lea eax, [esp + 0x28]
mov esi, dword [0x10103ce0]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], 0x100bdcd0
mov dword [esp + 0x30], eax
lea eax, [esp + 0x2c]
test esi, esi
mov dword [esp + 0x38], eax
je 0x100ccb01
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
mov eax, dword [esi]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebp, eax
mov edx, dword [esp + 0x18]
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [0x10103ce0]
sub esp, 4
lea eax, [esp + 0x34]
mov dword [esp], esi
mov dword [esp + 0x3c], ebp
mov dword [esp + 4], eax
call fcn.100c5450
mov eax, dword [ebx + 8]
mov edx, edi
call fcn.100cae60
mov esi, dword [0x10103ce0]
mov ebx, eax
mov dword [esp + 0x28], eax
test esi, esi
je 0x100cc738
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [esi]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
test esi, esi
je 0x100cc734
test ebx, ebx
je 0x100cc8da
mov eax, dword [esi]
test eax, eax
je 0x100cc8da
mov edx, dword [esi + 4]
mov dword [esp], edx
call eax
mov eax, dword [esi + 8]
mov dword [esp + 4], eax
mov eax, dword [0x10103ce0]
mov dword [esp], eax
call fcn.100c5450
jmp 0x100cc734
lea edx, [edi + 0x20]
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov eax, esi
mov dword [esp + 0x40], edx
xchg dword [edx], eax
test eax, eax
je 0x100cc949
mov dword [eax + 4], esi
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cc93b
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea ecx, [esp + 0x48]
xor eax, eax
lock xadd dword [ecx], eax
test eax, eax
je 0x100cc9c1
cmp dword [edi + 0x8c], 1
jne 0x100ccb73
lea eax, [esp + 0x44]
mov edx, dword [esp + 0x40]
xor edi, edi
mov dword [esp + 0x18], eax
lock xadd dword [eax], edi
test edi, edi
mov eax, edi
je 0x100cca71
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cc600
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
jmp 0x100cc600
mov dword [esp], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov ecx, dword [esp + 0x10]
jmp 0x100cc7b0
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
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 edx, eax
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x100ccac0
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cc949
mov dword [esp + 0x10], ecx
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 edx, eax
mov eax, esi
mov ecx, dword [esp + 0x10]
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x100ccae0
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cc801
mov eax, esi
lock cmpxchg dword [edx], edi
cmp esi, eax
je 0x100cc600
lea edx, [esp + 0x4c]
lock xadd dword [edx], edi
test edi, edi
je 0x100ccb08
xor eax, eax
mov ecx, dword [esp + 0x18]
lock xadd dword [ecx], eax
jmp 0x100cc972
call dword [sym.imp.msvcrt.dll__errno]
mov edx, dword [esp + 0x28]
mov ebx, 0xffffffff
mov dword [eax], edx
jmp 0x100cc740
mov eax, dword [esp + 0x18]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
jmp 0x100cca0b
mov dword [esp], edx
mov dword [esp + 0x10], edx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov edx, dword [esp + 0x10]
jmp 0x100cca60
xor ebp, ebp
jmp 0x100cc86a
mov dword [esp + 0x10], 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 eax, edi
mov edx, dword [esp + 0x10]
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100ccb55
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cca8b
mov dword [esp], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov ecx, dword [esp + 0x10]
jmp 0x100ccb44
mov eax, dword [edi + 0x24]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push eax
mov dword [edi + 0x18], 4
mov dword [edi + 0x8c], 1
mov dword [esp], esi
call fcn.100bdaa0
mov dword [esp], 2
call fcn.100ca220
lea esi, [esi]
lea edi, [edi]