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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x3c
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x10], ecx
mov eax, dword [ecx]
jmp 0x466f4e
cmp byte [ebp - 0x3c], 0
je 0x4672e0
mov ecx, dword [ebp - 0x10]
mov eax, edi
mov edx, 2
lock cmpxchg dword [ecx], edx
je 0x4671ea
mov edi, eax
test eax, eax
je 0x466f3a
cmp edi, 1
je 0x466f30
cmp edi, 3
je 0x467215
mov eax, edi
and eax, 3
cmp eax, 2
je 0x466f8e
jmp 0x467310
mov eax, edi
and eax, 3
cmp eax, 2
jne 0x4671e0
mov eax, dword [0x4ba030]
test eax, eax
je 0x4670c7
dec eax
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 2
jb 0x466fc0
cmp dword [eax + 4], 0
mov ebx, eax
je 0x466fc0
add ebx, 8
jmp 0x467060
mov eax, dword [0x4ba030]
test eax, eax
je 0x4670d6
dec eax
push eax
call sub.kernel32.dll_TlsGetValue
test eax, eax
je 0x466ff0
mov esi, eax
cmp eax, 1
jne 0x467032
jmp 0x467283
movzx eax, byte [0x4e4158]
mov ecx, 0xc
mov edx, 4
call fcn.00413060
test eax, eax
je 0x467272
mov dword [eax], 0x4ba030
mov dword [eax + 4], 0
mov esi, eax
mov eax, dword [0x4ba030]
test eax, eax
je 0x4670e5
dec eax
push esi
push eax
call sub.kernel32.dll_TlsSetValue
mov ecx, dword [esi + 8]
cmp dword [esi + 4], 0
lea ebx, [esi + 8]
mov dword [esi + 4], 1
mov dword [esi + 8], 0
je 0x467060
test ecx, ecx
je 0x467060
lock dec dword [ecx]
jne 0x467060
call fcn.004674f0
nop word [eax + eax]
mov esi, dword [ebx]
test esi, esi
jne 0x46707a
xor ecx, ecx
call fcn.00466a70
cmp dword [ebx], 0
mov esi, eax
jne 0x46723d
mov dword [ebx], esi
lock inc dword [esi]
jle 0x46721d
mov ecx, dword [ebp - 0x10]
mov eax, edi
mov dword [ebp - 0x34], esi
mov byte [ebp - 0x2c], 0
lea edx, [ebp - 0x32]
add eax, 0xfffffffe
mov dword [ebp - 0x30], eax
mov eax, edi
lock cmpxchg dword [ecx], edx
je 0x4671c0
mov edi, eax
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x466f80
lock dec dword [eax]
jne 0x466f80
mov ecx, dword [ebp - 0x34]
call fcn.004674f0
jmp 0x466f80
mov ecx, 0x4ba030
call fcn.00467530
jmp 0x466f9c
mov ecx, 0x4ba030
call fcn.00467530
jmp 0x466fce
mov ecx, 0x4ba030
call fcn.00467530
jmp 0x46702b
call fcn.00467660
mov edi, eax
test eax, eax
je 0x467221
lock dec byte [edi + 0x18]
je 0x467146
mov esi, dword [0x4e4118]
mov ebx, edi
add ebx, 0x18
test esi, esi
je 0x467154
nop word cs:[eax + eax]
nop
push 0xffffffffffffffff
push 1
push 0x4c7840
push ebx
call esi
xor ecx, ecx
mov al, 1
lock cmpxchg byte [ebx], cl
jne 0x467130
lock dec dword [edi]
jne 0x4671c0
mov ecx, edi
call fcn.004674f0
jmp 0x4671c0
mov ecx, dword [0x4ba008]
cmp ecx, 0xffffffff
jne 0x46719e
mov dword [ebp - 0x38], 0xffffffff
mov eax, dword [0x4ba014]
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x38]
push ecx
call eax
test eax, eax
jne 0x46729c
mov ecx, dword [ebp - 0x38]
mov eax, 0xffffffff
lock cmpxchg dword [0x4ba008], ecx
je 0x46719e
mov esi, eax
push ecx
call sub.kernel32.dll_CloseHandle
mov ecx, esi
mov eax, dword [0x4ba01c]
push 0
push 0
push ebx
push ecx
call eax
xor eax, eax
xchg byte [ebx], al
lock dec dword [edi]
je 0x46714b
nop word cs:[eax + eax]
nop
movzx eax, byte [ebp - 0x2c]
test al, al
je 0x467100
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4671e0
lock dec dword [eax]
jne 0x4671e0
mov ecx, dword [ebp - 0x34]
call fcn.004674f0
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
jmp 0x466f4e
mov eax, dword [ebp + 0xc]
cmp edi, 1
mov dword [ebp - 0x28], 3
sete byte [ebp - 0x24]
mov eax, dword [eax + 0x10]
lea ecx, [ebp - 0x28]
push ecx
push dword [ebp + 8]
call eax
add esp, 8
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x10]
call fcn.00467380
add esp, 0x3c
pop esi
pop edi
pop ebx
pop ebp
ret
ud2
mov edx, 0x5e
mov ecx, str.use_of_std::thread::current___is_not_possible_after_the_threads_local_data_has_been_destroyed
push 0x4c871c
call fcn.004493b0
add esp, 4
jmp 0x46736d
mov dword [ebp - 0x28], str.reentrant_init
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], 0x4cc61c
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x28]
mov edx, 0x4c7830
call fcn.004468e0
jmp 0x46736d
mov ecx, 4
mov edx, 0xc
call fcn.00413450
ud2
mov ecx, str.use_of_std::thread::current___is_not_possible_after_the_threads_local_data_has_been_destroyed
mov edx, 0x5e
push 0x4c871c
call fcn.004493b0
add esp, 4
ud2
lea ebx, [ebp - 0x40]
lea esi, [ebp - 0x48]
mov dword [ebp - 0x28], 0x4ca394
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x44], fcn.00451880
mov dword [ebp - 0x1c], 1
lea ecx, [ebp - 0x28]
mov edx, 0x4ca3cc
call fcn.004468e0
jmp 0x46736d
mov dword [ebp - 0x28], 0x4ca644
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], 0x4cc61c
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp + 0x10]
lea ecx, [ebp - 0x28]
call fcn.004468e0
ud2
mov ecx, str.assertion_failed:_state_and_queue.addr____STATE_MASK__RUNNING
mov edx, 0x40
push dword [ebp + 0x10]
call fcn.004478a0
add esp, 4
ud2
ud2