Function at 0x100cbb50
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [esp + 0x60]
lea esi, [esp + 0x30]
lea edi, [esp + 0x34]
mov ebx, dword [eax]
call fcn.100c5ae0
test eax, eax
je 0x100cbb84
mov ebp, eax
mov eax, dword [eax + 0x18]
lea esi, [esp + 0x30]
lea edi, [esp + 0x34]
cmp eax, 3
je 0x100cbd80
lea edx, [ebx + 4]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov eax, esi
mov dword [esp + 0x30], edx
xchg dword [edx], eax
test eax, eax
je 0x100cbbda
mov dword [eax + 4], esi
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cbbcc
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea edx, [esp + 0x38]
xor ebp, ebp
lock xadd dword [edx], ebp
test ebp, ebp
je 0x100cbc21
mov eax, dword [ebx]
mov ecx, dword [esp + 0x30]
xor edx, edx
lea ebp, [eax - 1]
mov dword [ebx], ebp
lock xadd dword [edi], edx
test edx, edx
mov eax, edx
je 0x100cbd50
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cbc13
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
test ebp, ebp
js 0x100cbc72
xor eax, eax
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
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 eax, ebp
mov edx, dword [esp + 0x1c]
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cbe22
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cbbda
mov esi, dword [0x10103ce0]
mov dword [esp + 0x24], 0x100bdea0
mov dword [esp + 0x28], ebx
test esi, esi
je 0x100cbf52
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov eax, dword [esi]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov edi, eax
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [0x10103ce0]
sub esp, 4
lea eax, [esp + 0x24]
mov dword [esp], esi
mov dword [esp + 0x2c], edi
mov dword [esp + 4], eax
call fcn.100c5450
mov eax, dword [ebx + 8]
mov edx, 0xffffffff
call fcn.100cae60
mov ebx, dword [0x10103ce0]
mov esi, eax
test ebx, ebx
je 0x100cbd31
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 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], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
test ebx, ebx
je 0x100cbd31
test esi, esi
je 0x100cbd1d
mov eax, dword [ebx]
test eax, eax
je 0x100cbd1d
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
test esi, esi
je 0x100cbc17
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
mov eax, 0xffffffff
jmp 0x100cbc19
mov eax, esi
lock cmpxchg dword [ecx], edx
cmp esi, eax
je 0x100cbc13
lea ecx, [esp + 0x3c]
mov esi, edx
lock xadd dword [ecx], esi
test esi, esi
je 0x100cbe94
xor eax, eax
lock xadd dword [edi], eax
jmp 0x100cbbf5
lea edx, [ebp + 0x20]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov eax, esi
mov dword [esp + 0x30], edx
xchg dword [edx], eax
test eax, eax
je 0x100cbdd6
mov dword [eax + 4], esi
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cbdc8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea edx, [esp + 0x38]
xor edi, edi
lock xadd dword [edx], edi
test edi, edi
je 0x100cbe43
cmp dword [ebp + 0x8c], 1
jne 0x100cbfc4
mov ecx, dword [esp + 0x30]
lea edi, [esp + 0x34]
xor edx, edx
lock xadd dword [edi], edx
test edx, edx
mov eax, edx
je 0x100cbee1
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cbb84
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
jmp 0x100cbb84
mov dword [esp], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov ecx, dword [esp + 0x1c]
jmp 0x100cbc61
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 eax, edi
mov edx, dword [esp + 0x1c]
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cbf10
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cbdd6
mov dword [esp + 0x1c], 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 + 0x1c]
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x100cbf31
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cbd70
mov eax, esi
lock cmpxchg dword [ecx], edx
cmp esi, eax
je 0x100cbb84
lea ecx, [esp + 0x3c]
mov ebp, edx
lock xadd dword [ecx], ebp
test ebp, ebp
je 0x100cbf59
xor eax, eax
lock xadd dword [edi], eax
jmp 0x100cbdfb
mov dword [esp], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov ecx, dword [esp + 0x1c]
jmp 0x100cbe83
mov dword [esp], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov edx, dword [esp + 0x1c]
jmp 0x100cbed0
xor edi, edi
jmp 0x100cbcb6
mov dword [esp + 0x1c], 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, ebp
mov ecx, dword [esp + 0x1c]
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x100cbfa6
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cbefd
mov dword [esp], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov edx, dword [esp + 0x1c]
jmp 0x100cbf95
mov eax, dword [ebp + 0x24]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push eax
mov dword [ebp + 0x18], 4
mov dword [ebp + 0x8c], 1
mov dword [esp], esi
call fcn.100bdaa0
mov dword [esp], 2
call fcn.100ca220
lea esi, [esi]
lea edi, [edi]
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [esp + 0x60]
mov dword [esp + 0x28], eax
call fcn.100c5ae0
test eax, eax
je 0x100cc160
mov ebx, eax
mov eax, dword [eax + 0x8c]
test eax, eax
je 0x100cc080
mov eax, 1
lea edx, [esp + 0x28]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub esp, 0x10
test eax, eax
mov edx, eax
je 0x100cc092
cmp eax, 1
je 0x100cc0a0
cmp edx, 0x102
mov eax, 0x8a
je 0x100cc06e
mov eax, 0x16
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebx + 0x24]
mov eax, 2
test edx, edx
mov dword [esp + 0x2c], edx
jne 0x100cc02d
jmp 0x100cc028
add esp, 0x4c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
sub esp, 4
lea edx, [ebx + 0x20]
lea esi, [esp + 0x30]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], 0
mov eax, esi
xchg dword [edx], eax
test eax, eax
je 0x100cc10f
mov dword [eax + 4], esi
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cc0fc
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea ebp, [esp + 0x38]
xor edi, edi
lock xadd dword [ebp], edi
test edi, edi
je 0x100cc1c0
mov eax, dword [ebx + 0x18]
cmp eax, 3
jbe 0x100cc2af
mov ecx, dword [esp + 0x30]
lea edi, [esp + 0x34]
xor edx, edx
lock xadd dword [edi], edx
test edx, edx
mov eax, edx
je 0x100cc230
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cc069
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
jmp 0x100cc069
lea eax, [esp + 0x28]
mov dword [esp + 0x2c], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp], 1
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub esp, 0x10
test eax, eax
mov edx, eax
je 0x100cc092
cmp eax, 1
jne 0x100cc05c
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
sub esp, 4
jmp 0x100cc069
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, edi
lock cmpxchg dword [ebp], edx
test eax, eax
je 0x100cc210
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cc10f
mov dword [esp], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov edx, dword [esp + 0x1c]
jmp 0x100cc1f5
mov eax, esi
lock cmpxchg dword [ecx], edx
cmp esi, eax
je 0x100cc069
lea esi, [esp + 0x3c]
mov ebx, edx
lock xadd dword [esi], ebx
test ebx, ebx
je 0x100cc257
xor eax, eax
lock xadd dword [edi], eax
jmp 0x100cc133
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 ebp, eax
sub esp, 0x10
mov eax, ebx
lock cmpxchg dword [esi], ebp
test eax, eax
je 0x100cc299
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cc24c
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
jmp 0x100cc28b
mov dword [ebx + 0x18], 4
mov dword [ebx + 0x8c], 1
mov dword [esp], esi
call fcn.100bdaa0
mov dword [esp], 2
call fcn.100ca220
lea esi, [esi]
lea edi, [edi]
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [esp + 0x60]
mov dword [esp + 0x28], eax
call fcn.100c5ae0
test eax, eax
je 0x100cc440
mov ebx, eax
mov eax, dword [eax + 0x8c]
test eax, eax
je 0x100cc360
mov eax, 1
mov esi, dword [esp + 0x64]
lea edx, [esp + 0x28]
mov dword [esp + 8], 0
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub esp, 0x10
test eax, eax
mov edx, eax
je 0x100cc372
cmp eax, 1
je 0x100cc380
cmp edx, 0x102
mov eax, 0x8a
je 0x100cc34e
mov eax, 0x16
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebx + 0x24]
mov eax, 2
test edx, edx
mov dword [esp + 0x2c], edx
jne 0x100cc30d
jmp 0x100cc308
add esp, 0x4c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
sub esp, 4
lea edx, [ebx + 0x20]
lea esi, [esp + 0x30]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], 0
mov eax, esi
xchg dword [edx], eax
test eax, eax
je 0x100cc3ef
mov dword [eax + 4], esi
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cc3dc
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea ebp, [esp + 0x38]
xor edi, edi
lock xadd dword [ebp], edi
test edi, edi
je 0x100cc4a0
mov eax, dword [ebx + 0x18]
cmp eax, 3
jbe 0x100cc58f
mov ecx, dword [esp + 0x30]
lea edi, [esp + 0x34]
xor edx, edx
lock xadd dword [edi], edx
test edx, edx
mov eax, edx
je 0x100cc510
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100cc349
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
jmp 0x100cc349
mov eax, dword [esp + 0x64]
mov dword [esp + 0x2c], 0
mov dword [esp + 8], 0
mov dword [esp], 1
mov dword [esp + 0xc], eax
lea eax, [esp + 0x28]
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub esp, 0x10
test eax, eax
mov edx, eax
je 0x100cc372
cmp eax, 1
jne 0x100cc33c
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
sub esp, 4
jmp 0x100cc349
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, edi
lock cmpxchg dword [ebp], edx
test eax, eax
je 0x100cc4f0
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cc3ef
mov dword [esp], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov edx, dword [esp + 0x1c]
jmp 0x100cc4d5
mov eax, esi
lock cmpxchg dword [ecx], edx
cmp esi, eax
je 0x100cc349
lea esi, [esp + 0x3c]
mov ebx, edx
lock xadd dword [esi], ebx
test ebx, ebx
je 0x100cc537
xor eax, eax
lock xadd dword [edi], eax
jmp 0x100cc413
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 ebp, eax
sub esp, 0x10
mov eax, ebx
lock cmpxchg dword [esi], ebp
test eax, eax
je 0x100cc579
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x100cc52c
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
jmp 0x100cc56b
mov dword [ebx + 0x18], 4
mov dword [ebx + 0x8c], 1
mov dword [esp], esi
call fcn.100bdaa0
mov dword [esp], 2
call fcn.100ca220
lea esi, [esi]
lea edi, [edi]