Function at 0x6fff4d10
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [esp + 0x60]
cmp ebx, dword [0x70ea49dc]
je 0x6fff4fe0
call fcn.6fff5340
test eax, eax
mov esi, eax
je 0x6fff4f30
test ebx, ebx
je 0x6fff5040
mov edi, dword [esp + 0x64]
test edi, edi
je 0x6fff501f
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x6fff501f
lea edx, [ebx + 8]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
lea eax, [esp + 0x20]
mov dword [esp + 0x20], edx
xchg dword [edx], eax
test eax, eax
je 0x6fff4db6
lea edi, [esp + 0x20]
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
mov dword [eax + 4], edi
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fff4da3
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea ebp, [esp + 0x28]
xor edi, edi
lock xadd dword [ebp], edi
test edi, edi
je 0x6fff4f91
lea edx, [esi + 0x1c]
lea ebp, [esp + 0x30]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], edx
mov eax, ebp
xchg dword [edx], eax
test eax, eax
je 0x6fff4e14
mov dword [eax + 4], ebp
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fff4e02
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 0x6fff4f40
mov edx, dword [esi + 0x30]
test edx, edx
je 0x6fff4e40
cmp dword [edx + 4], ebx
je 0x6fff5050
mov eax, edx
jmp 0x6fff4e39
cmp dword [eax + 4], ebx
je 0x6fff5050
mov eax, dword [eax + 8]
test eax, eax
jne 0x6fff4e30
mov dword [esp + 4], 0x18
mov dword [esp], 1
mov edi, 0xc
mov dword [esp + 0x1c], edx
call sub.msvcrt.dll_calloc
test eax, eax
mov edx, dword [esp + 0x1c]
je 0x6fff4ea0
mov ecx, dword [ebx + 0xc]
mov dword [eax], esi
mov dword [eax + 4], ebx
mov dword [eax + 0x14], 0
test ecx, ecx
mov dword [eax + 0xc], ecx
je 0x6fff4e7e
mov dword [ecx + 0x14], eax
test edx, edx
mov dword [ebx + 0xc], eax
mov dword [eax + 0x10], 0
mov dword [eax + 8], edx
je 0x6fff4e92
mov dword [edx + 0x10], eax
mov dword [esi + 0x30], eax
xor edi, edi
mov esi, esi
lea edi, [edi]
mov ecx, dword [esp + 0x30]
lea esi, [esp + 0x34]
xor edx, edx
lock xadd dword [esi], edx
test edx, edx
mov eax, edx
je 0x6fff5091
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fff4ed6
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
mov ecx, dword [esp + 0x20]
lea esi, [esp + 0x24]
xor edx, edx
lock xadd dword [esi], edx
test edx, edx
mov eax, edx
je 0x6fff5060
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fff4f0c
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
test edi, edi
je 0x6fff501f
add esp, 0x4c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x64]
test edx, edx
jne 0x6fff5040
lea esi, [esi]
mov eax, 2
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, edi
mov edx, dword [esp + 0x1c]
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fff50b6
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x6fff4e14
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 0x6fff50d7
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x6fff4db6
test ebx, ebx
je 0x6fff4f1e
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 esi, eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
test esi, esi
je 0x6fff50f8
mov esi, dword [esi + 0xc]
test esi, esi
jne 0x6fff4d3e
mov eax, dword [esp + 0x64]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x6fff5040
mov al, 0xb
jmp 0x6fff4f35
add esp, 0x4c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
xor edi, edi
jmp 0x6fff4ea0
lea eax, [esp + 0x20]
lock cmpxchg dword [ecx], edx
lea ecx, [esp + 0x20]
cmp ecx, eax
je 0x6fff4f0c
lea ecx, [esp + 0x2c]
mov ebp, edx
lock xadd dword [ecx], ebp
test ebp, ebp
je 0x6fff5117
xor eax, eax
lock xadd dword [esi], eax
jmp 0x6fff4eee
mov eax, ebp
lock cmpxchg dword [ecx], edx
cmp ebp, eax
je 0x6fff4ed6
lea eax, [esp + 0x3c]
lock xadd dword [eax], edx
test edx, edx
je 0x6fff5110
xor eax, eax
lock xadd dword [esi], eax
jmp 0x6fff4eb8
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 0x6fff4f80
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 0x6fff4fca
mov eax, dword [esp + 0x64]
test eax, eax
je 0x6fff4f30
mov eax, dword [esp + 0x64]
mov esi, dword [eax]
jmp 0x6fff5017
call fcn.6ffee320
jmp 0x6fff50ab
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 0x6fff5164
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x6fff5086
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 0x6fff5153