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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [0x70ea49dc]
test ebx, ebx
je 0x6ffef490
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 0x6ffef490
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
lea esi, [esp + 0x20]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.6ffeec30
lea eax, [ebx + 0x20]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov edx, esi
mov dword [esp + 0x20], eax
xchg dword [eax], edx
test edx, edx
je 0x6ffef3b2
mov dword [edx + 4], esi
lea ecx, [edx + 0xc]
xor eax, eax
mov edx, 0xffffffff
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x6ffef39f
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 0x6ffef4a0
mov dword [ebx + 0x18], 6
mov ecx, dword [esp + 0x20]
lea edi, [esp + 0x24]
xor edx, edx
lock xadd dword [edi], edx
test edx, edx
mov eax, edx
je 0x6ffef504
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6ffef3ef
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
mov eax, dword [ebx + 0x7c]
mov esi, 0xffffffff
test eax, eax
jne 0x6ffef41d
jmp 0x6ffef451
add edx, 4
mov ecx, esi
xchg dword [edx], ecx
mov eax, dword [eax + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [ebx + 0x7c]
sub esp, 4
test eax, eax
je 0x6ffef451
mov eax, dword [eax]
mov ecx, dword [eax + 0x18]
mov edi, dword [eax + 0xc]
mov dword [eax + 0xc], ebx
mov edx, dword [ecx + 0xc]
test edx, edx
je 0x6ffef435
mov ebp, dword [ecx + 8]
mov dword [edx + 8], ebp
mov ebp, dword [ecx + 8]
test ebp, ebp
je 0x6ffef43f
mov dword [ebp + 0xc], edx
cmp ecx, dword [edi + 0x7c]
mov edx, ecx
jne 0x6ffef400
mov edx, dword [ecx + 0xc]
mov dword [edi + 0x7c], edx
mov edx, dword [eax + 0x18]
jmp 0x6ffef400
cmp dword [ebx + 0x84], 1
jne 0x6ffef490
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.6ffee940
mov eax, dword [0x70ea49dc]
test eax, eax
je 0x6ffef490
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
nop
lea esi, [esi]
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
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 0x6ffef4e6
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x6ffef3b2
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 0x6ffef4d5
mov eax, esi
lock cmpxchg dword [ecx], edx
cmp esi, eax
je 0x6ffef3ef
lea eax, [esp + 0x2c]
lock xadd dword [eax], edx
test edx, edx
je 0x6ffef529
xor eax, eax
lock xadd dword [edi], eax
jmp 0x6ffef3d1
call fcn.6ffee320
jmp 0x6ffef51e