Function at 0x6fffa3d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [0x70ea49dc]
test ebx, ebx
je 0x6fffa4e0
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 0x6fffa4e0
mov ebx, dword [ebx + 0xc]
test ebx, ebx
je 0x6fffa420
mov eax, dword [ebx + 0x18]
cmp eax, 3
je 0x6fffa430
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebx + 0x20]
lea esi, [esp + 0x40]
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], eax
mov edx, esi
xchg dword [eax], edx
test edx, edx
je 0x6fffa48f
mov dword [edx + 4], esi
lea ecx, [edx + 0xc]
xor eax, eax
mov edx, 0xffffffff
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x6fffa47c
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea ebp, [esp + 0x48]
xor edi, edi
lock xadd dword [ebp], edi
test edi, edi
je 0x6fffa580
cmp dword [ebx + 0x8c], 1
jne 0x6fffa6d6
mov ecx, dword [esp + 0x40]
lea ebx, [esp + 0x44]
xor edx, edx
lock xadd dword [ebx], edx
test edx, edx
mov eax, edx
je 0x6fffa620
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fffa420
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
jmp 0x6fffa420
call fcn.6ffefa90
test eax, eax
mov esi, eax
mov dword [esp + 0x2c], edx
mov ebx, eax
je 0x6fffa420
or byte [eax + 0x94], 1
mov dword [eax + 0x84], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [esi + 0x98], eax
call edi
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov ebp, eax
call edi
mov ecx, dword [esp + 0x28]
mov edx, eax
lea eax, [esi + 8]
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], ebp
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
sub esp, 0x1c
test eax, eax
jne 0x6fffa5d0
mov eax, dword [esp + 0x2c]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.6ffef8d0
jmp 0x6fffa420
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 0x6fffa645
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x6fffa48f
call edi
lea edx, [esp + 0x40]
mov dword [esp], eax
mov dword [esp + 8], edx
lea edx, [esp + 0x3c]
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_GetProcessAffinityMask]
sub esp, 0xc
test eax, eax
jne 0x6fffa66d
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [esi + 0x88], eax
mov eax, dword [0x70ea49dc]
sub esp, 4
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.6fff4d10
jmp 0x6fffa565
mov eax, esi
lock cmpxchg dword [ecx], edx
cmp esi, eax
je 0x6fffa420
lea eax, [esp + 0x4c]
lock xadd dword [eax], edx
test edx, edx
je 0x6fffa666
xor eax, eax
lock xadd dword [ebx], eax
jmp 0x6fffa4b4
mov dword [esp], edx
mov dword [esp + 0x28], edx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
mov edx, dword [esp + 0x28]
jmp 0x6fffa5b9
call fcn.6ffee320
jmp 0x6fffa63a
mov eax, dword [esp + 0x3c]
mov ebp, dword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call ebp
sub esp, 8
test eax, eax
mov edi, eax
je 0x6fffa5f2
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call ebp
sub esp, 8
test eax, eax
je 0x6fffa5f2
mov eax, dword [ebx + 8]
mov dword [ebx + 0x9c], edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
push edx
mov dword [ebx + 0x88], eax
mov eax, dword [0x70ea49dc]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.6fff4d10
jmp 0x6fffa418
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push eax
mov dword [ebx + 0x18], 4
mov dword [ebx + 0x8c], 1
mov dword [esp], esi
call fcn.6ffee390
mov dword [esp], 2
call fcn.6fff9be0
nop
lea esi, [esi]
push ebp
push edi
mov edx, 0x70ea49b4
push esi
push ebx
sub esp, 0x4c
mov eax, dword [esp + 0x64]
lea esi, [esp + 0x30]
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x30], 0x70ea49b4
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x18], eax
mov eax, esi
xchg dword [edx], eax
test eax, eax
je 0x6fffa788
mov dword [eax + 4], esi
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fffa775
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 0x6fffa973
test ebx, ebx
mov ebp, 3
je 0x6fffa79e
mov eax, dword [esp + 0x18]
cmp eax, dword [ebx + 0x10]
je 0x6fffa9c0
mov edx, dword [esp + 0x30]
lea edi, [esp + 0x34]
xor ecx, ecx
lock xadd dword [edi], ecx
test ecx, ecx
mov eax, ecx
je 0x6fffaa63
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fffa7d4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
test ebp, ebp
mov edx, ebp
je 0x6fffa7e4
add esp, 0x4c
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.6fff5340
test eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edx
je 0x6fffaa90
lea eax, [ebx + 0x20]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov edx, esi
mov dword [esp + 0x30], eax
xchg dword [eax], edx
test edx, edx
je 0x6fffa853
mov dword [edx + 4], esi
mov ecx, 0xffffffff
add edx, 0xc
mov eax, ebp
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x6fffa841
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
lea ecx, [esp + 0x38]
xor eax, eax
lock xadd dword [ecx], eax
test eax, eax
je 0x6fffa9d0
mov eax, dword [ebx + 0x90]
test eax, eax
jne 0x6fffa910
mov edx, dword [ebx + 0x8c]
test edx, edx
jne 0x6fffa910
mov eax, dword [ebx + 0x18]
cmp eax, 3
ja 0x6fffa910
mov edi, dword [esp + 0x1c]
cmp dword [esp + 0x18], edi
jne 0x6fffa88f
cmp dword [esp + 0x20], ebx
je 0x6fffab1c
mov edi, dword [ebx + 8]
mov dword [esp + 0x18], edx
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
cmp eax, 0x102
mov edx, dword [esp + 0x18]
jne 0x6fffa7da
mov dword [ebx + 0x18], 4
mov dword [ebx + 0x8c], 1
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], 0x6fff9cd0
call dword [0x70ea49b8]
mov dword [esp], esi
call fcn.6ffee390
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
sub esp, 4
mov edx, dword [esp + 0x18]
jmp 0x6fffa7da
mov eax, dword [ebx + 0x18]
cmp eax, 2
jbe 0x6fffaa40
mov eax, dword [ebx + 0x18]
cmp eax, 3
jbe 0x6fffa929
mov ebp, 3
mov ecx, dword [esp + 0x30]
xor edx, edx
lock xadd dword [edi], edx
test edx, edx
mov eax, edx
je 0x6fffaad0
lea edx, [eax + 8]
mov ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
mov edx, ebp
je 0x6fffa7da
mov dword [esp + 0x18], ebp
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
mov edx, dword [esp + 0x18]
add esp, 0x4c
pop ebx
pop esi
mov eax, edx
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 0x6fffaaa0
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x6fffa788
cmp dword [ebx + 8], 1
sbb ebp, ebp
and ebp, 3
jmp 0x6fffa79e
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], 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 + 0x24], eax
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x6fffaaf1
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0x90]
sub esp, 4
test eax, eax
jne 0x6fffa910
jmp 0x6fffa861
mov eax, dword [ebx + 0x24]
mov dword [ebx + 0x18], 3
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
test eax, eax
jne 0x6fffa929
jmp 0x6fffa924
mov eax, esi
lock cmpxchg dword [edx], ecx
cmp esi, eax
je 0x6fffa7d4
lea eax, [esp + 0x3c]
lock xadd dword [eax], ecx
test ecx, ecx
je 0x6fffaac1
xor eax, eax
lock xadd dword [edi], eax
jmp 0x6fffa7b6
add esp, 0x4c
mov edx, 0xc
pop ebx
mov eax, edx
pop esi
pop edi
pop ebp
ret
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 0x6fffa9ac
call fcn.6ffee320
jmp 0x6fffaa7d
mov eax, esi
lock cmpxchg dword [ecx], edx
cmp esi, eax
je 0x6fffab15
lea eax, [esp + 0x3c]
lock xadd dword [eax], edx
test edx, edx
je 0x6fffab0e
xor eax, eax
lock xadd dword [edi], eax
jmp 0x6fffa93d
mov eax, dword [esp + 0x24]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
jmp 0x6fffaa1a
call fcn.6ffee320
jmp 0x6fffaae6
mov edx, ebp
jmp 0x6fffa7da
mov dword [ebx + 0x18], 4
mov dword [ebx + 0x8c], 1
mov dword [esp], esi
call fcn.6ffee390
mov dword [esp], 2
call fcn.6fff9be0
jmp fcn.6fffab50