Function at 0x6fffc1a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov esi, dword [esp + 0x80]
mov dword [esp + 0x28], 0
test esi, esi
je 0x6fffc3c0
mov ebx, dword [esi]
test ebx, ebx
je 0x6fffc3c0
cmp ebx, 0xffffffff
je 0x6fffc5c1
mov esi, dword [ebx + 0x10]
lea edi, [esp + 0x40]
call fcn.6fffa3d0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov eax, edi
lea edx, [esi + 4]
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], edx
xchg dword [edx], eax
test eax, eax
je 0x6fffc27f
mov dword [eax + 4], edi
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fffc225
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
jne 0x6fffc27f
mov dword [esp + 0x14], 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 + 0x14]
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fffc700
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [esi]
xor edx, edx
lea ebp, [eax - 1]
mov eax, dword [esp + 0x40]
mov dword [esi], ebp
mov ecx, eax
lea eax, [esp + 0x44]
lock xadd dword [eax], edx
test edx, edx
mov eax, edx
je 0x6fffc3e0
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fffc2be
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
test ebp, ebp
js 0x6fffc410
add dword [ebx], 1
lea eax, [ebx + 0x10]
mov dword [esp], eax
call fcn.6fff2910
test eax, eax
jne 0x6fffc3d0
mov eax, dword [esp + 0x84]
mov esi, dword [0x70ea49d8]
mov dword [esp + 0x44], ebx
mov dword [esp + 0x50], 0x6fff91a0
mov dword [esp + 0x54], edi
mov dword [esp + 0x40], eax
lea eax, [esp + 0x28]
test esi, esi
mov dword [esp + 0x48], eax
je 0x6fffc843
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 [0x70ea49d8]
sub esp, 4
lea eax, [esp + 0x50]
mov dword [esp], esi
mov dword [esp + 0x58], edi
mov dword [esp + 4], eax
call fcn.6fff4d10
mov eax, dword [esp + 0x84]
mov dword [esp], eax
call fcn.6fff6820
test eax, eax
mov dword [esp + 0x28], eax
je 0x6fffc6d0
mov ebx, dword [0x70ea49d8]
test ebx, ebx
je 0x6fffc3ba
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 0x6fffc3ba
mov eax, dword [ebx]
test eax, eax
je 0x6fffc3a6
mov edx, dword [ebx + 4]
mov dword [esp], edx
call eax
mov eax, dword [ebx + 8]
mov dword [esp + 4], eax
mov eax, dword [0x70ea49d8]
mov dword [esp], eax
call fcn.6fff4d10
mov eax, dword [esp + 0x28]
jmp 0x6fffc3c5
mov eax, 0x16
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
jmp 0x6fffc3c5
mov eax, edi
lock cmpxchg dword [ecx], edx
cmp edi, eax
je 0x6fffc2be
lea eax, [esp + 0x4c]
lock xadd dword [eax], edx
test edx, edx
je 0x6fffc790
xor eax, eax
lea ecx, [esp + 0x44]
lock xadd dword [ecx], eax
jmp 0x6fffc2a0
lea eax, [esp + 0x34]
mov dword [esp + 8], esi
mov dword [esp + 4], 0x6ffee400
mov dword [esp], eax
call fcn.6fff52d0
mov eax, dword [esi + 8]
mov dword [esp + 0x2c], eax
call fcn.6fff5340
test eax, eax
mov esi, eax
je 0x6fffc7c7
mov ecx, dword [eax + 0x8c]
test ecx, ecx
jne 0x6fffc721
mov edx, dword [eax + 0x24]
mov eax, 2
test edx, edx
mov dword [esp + 0x30], edx
je 0x6fffc721
lea edx, [esp + 0x2c]
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
je 0x6fffc68a
cmp eax, 1
jne 0x6fffc779
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push eax
lea edx, [esi + 0x20]
lea ebp, [esp + 0x50]
mov dword [esp + 0x50], edx
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov eax, ebp
xchg dword [edx], eax
test eax, eax
je 0x6fffc501
mov dword [eax + 4], ebp
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fffc4ef
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea ecx, [esp + 0x58]
xor eax, eax
lock xadd dword [ecx], eax
test eax, eax
je 0x6fffc84a
mov eax, dword [esi + 0x18]
cmp eax, 3
jbe 0x6fffc914
lea eax, [esp + 0x54]
mov esi, dword [esp + 0x50]
xor edx, edx
mov dword [esp + 0x14], eax
lock xadd dword [eax], edx
test edx, edx
mov eax, edx
je 0x6fffc8cb
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fffc547
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
mov ebp, 0x16
mov esi, dword [0x70ea49d8]
test esi, esi
je 0x6fffc5ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
mov eax, dword [esi]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
mov edx, dword [esp + 0x14]
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
test esi, esi
je 0x6fffc5ae
mov eax, dword [esi]
test eax, eax
je 0x6fffc592
mov edx, dword [esi + 4]
mov dword [esp], edx
call eax
mov eax, dword [esi + 8]
mov dword [esp + 4], eax
mov eax, dword [0x70ea49d8]
mov dword [esp], eax
call fcn.6fff4d10
test ebp, ebp
je 0x6fffc2c6
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov dword [eax], ebp
call ebx
mov eax, dword [eax]
jmp 0x6fffc3c5
lea ebp, [esp + 0x50]
mov dword [esp + 0x50], 0x70ea49ac
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov edx, 0x70ea49ac
mov eax, ebp
xchg dword [edx], eax
test eax, eax
je 0x6fffc620
mov dword [eax + 4], ebp
lea edx, [eax + 0xc]
xor eax, eax
lock cmpxchg dword [edx], ebx
test eax, eax
je 0x6fffc60e
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea edi, [esp + 0x58]
xor ebx, ebx
lock xadd dword [edi], ebx
test ebx, ebx
je 0x6fffc730
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x6fffc8a5
cmp eax, 1
sbb edi, edi
and edi, 6
cmp eax, 1
sbb ebx, ebx
and ebx, 0x16
mov eax, dword [esp + 0x50]
xor edx, edx
mov ecx, eax
lea eax, [esp + 0x54]
mov dword [esp + 0x14], eax
lock xadd dword [eax], edx
test edx, edx
mov eax, edx
je 0x6fffc79a
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fffc677
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
test edi, edi
mov dword [esp + 0x28], ebx
je 0x6fffc939
mov eax, ebx
jmp 0x6fffc3c5
mov esi, dword [0x70ea49d8]
test esi, esi
je 0x6fffc2c6
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 esi, eax
mov dword [esp], ebp
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
test esi, esi
jne 0x6fffc592
jmp 0x6fffc2c6
add ebx, 0xc
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.6fffbbe0
test eax, eax
je 0x6fffc366
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp + 0x28], eax
jmp 0x6fffc366
mov dword [esp], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov ecx, dword [esp + 0x14]
jmp 0x6fffc273
mov eax, 1
jmp 0x6fffc460
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, ebx
lock cmpxchg dword [edi], edx
test eax, eax
je 0x6fffc822
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x6fffc620
cmp eax, 0x102
mov ebp, 0x8a
mov eax, 0x16
cmovne ebp, eax
jmp 0x6fffc54c
call fcn.6ffee320
jmp 0x6fffc3fe
mov eax, ebp
lock cmpxchg dword [ecx], edx
cmp ebp, eax
je 0x6fffc677
lea eax, [esp + 0x5c]
lock xadd dword [eax], edx
test edx, edx
je 0x6fffc8c1
xor eax, eax
mov ecx, dword [esp + 0x14]
lock xadd dword [ecx], eax
jmp 0x6fffc659
lea eax, [esp + 0x2c]
mov dword [esp + 0x30], 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
je 0x6fffc68a
cmp eax, 1
jne 0x6fffc779
mov eax, dword [esp + 0x30]
mov ebp, 0x16
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
sub esp, 4
jmp 0x6fffc54c
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 0x6fffc768
xor edi, edi
jmp 0x6fffc337
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], 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 + 0x14], eax
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x6fffc8f4
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x6fffc501
mov dword [esp + 4], 0
mov dword [esp], esi
call fcn.6fff2210
mov edi, eax
mov ebx, eax
and edi, 0xffffffef
jmp 0x6fffc63b
call fcn.6ffee320
jmp 0x6fffc7b8
mov eax, ebp
lock cmpxchg dword [esi], edx
cmp ebp, eax
je 0x6fffc547
lea eax, [esp + 0x5c]
lock xadd dword [eax], edx
test edx, edx
je 0x6fffc90d
xor eax, eax
mov ecx, dword [esp + 0x14]
lock xadd dword [ecx], eax
jmp 0x6fffc529
mov eax, dword [esp + 0x14]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edx
push edx
jmp 0x6fffc890
call fcn.6ffee320
jmp 0x6fffc8e5
mov dword [esi + 0x18], 4
mov dword [esi + 0x8c], 1
mov dword [esp], ebp
call fcn.6ffee390
mov dword [esp], 2
call fcn.6fff9be0
mov ebx, dword [esi]
jmp 0x6fffc1d1