Function at 0x404070
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, 0x74
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x4222a0
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
push 0x40fb90
push 0
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
test eax, eax
je 0x4046f6
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0x5000
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadStackGuarantee]
test eax, eax
jne 0x4040d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x40483f
mov ecx, 5
call fcn.00404a00
test eax, eax
je 0x404732
mov ecx, eax
mov edx, 5
mov dword [eax], 0x6e69616d
mov byte [eax + 4], 0
mov dword [ebp - 0x10], 0
call fcn.0040fd90
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x4c], eax
mov byte [ebp - 0x21], 1
mov dword [ebp - 0x10], 1
call fcn.00411f20
test eax, eax
je 0x40474d
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x70], ecx
cmp dword [eax], 0
jne 0x404789
mov dword [eax], 0xffffffff
cmp dword [eax + 4], 0
jne 0x4047b5
mov dword [eax + 4], ecx
mov ecx, 0x40198b
mov dword [eax], 0
call fcn.00401091
mov eax, dword [0x42a198]
cmp eax, 3
je 0x40459b
mov byte [ebp - 0x78], 1
xor ebx, ebx
mov esi, dword [0x42a198]
jmp 0x404186
mov esi, dword [0x42a198]
test esi, esi
je 0x404550
cmp esi, 3
je 0x40459b
cmp esi, 1
je 0x404697
mov eax, esi
and eax, 3
cmp eax, 2
je 0x4041ba
jmp 0x4046d3
mov eax, esi
and eax, 3
cmp eax, 2
jne 0x404180
mov eax, dword [0x42a148]
mov dword [ebp - 0x20], esi
test eax, eax
jne 0x4041dc
mov ecx, 0x42a148
mov dword [ebp - 0x10], 5
call fcn.0040ff90
mov esi, dword [ebp - 0x20]
xor ebx, ebx
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jbe 0x404200
cmp dword [eax], 0
mov edi, eax
je 0x404200
add edi, 4
jmp 0x4042c0
mov eax, dword [0x42a148]
test eax, eax
jne 0x40421f
mov ecx, 0x42a148
mov dword [ebp - 0x10], 5
call fcn.0040ff90
mov esi, dword [ebp - 0x20]
xor ebx, ebx
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x404240
cmp eax, 1
jne 0x404292
jmp 0x4045b2
mov ecx, 0x10
call fcn.00404a00
test eax, eax
je 0x40462c
mov dword [eax], 0
mov dword [eax + 0xc], 0x42a148
mov ecx, eax
mov eax, dword [0x42a148]
test eax, eax
jne 0x404286
mov dword [ebp - 0x40], ecx
mov ecx, 0x42a148
mov dword [ebp - 0x10], 5
call fcn.0040ff90
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x40]
xor ebx, ebx
push ecx
push eax
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, edi
mov ecx, dword [eax + 8]
cmp dword [eax], 0
lea edi, [eax + 4]
mov dword [eax], 1
mov dword [eax + 4], 0
mov dword [eax + 8], 0
je 0x4042c0
test ecx, ecx
je 0x4042c0
lock dec dword [ecx]
jne 0x4042c0
call fcn.00410130
nop
cmp dword [edi], 0
jne 0x4045d4
mov dword [edi], 0xffffffff
mov eax, dword [edi + 4]
test eax, eax
jne 0x4042f2
xor ecx, ecx
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x10], 7
call fcn.0040fd90
mov edi, dword [ebp - 0x40]
mov esi, dword [ebp - 0x20]
xor ebx, ebx
mov dword [edi + 4], eax
lock inc dword [eax]
jle 0x4045ae
inc dword [edi]
test eax, eax
je 0x4045b2
mov ecx, esi
mov dword [ebp - 0x64], eax
mov byte [ebp - 0x5c], 0
mov eax, esi
lea edx, [ebp - 0x62]
and ecx, 0xfffffffc
mov dword [ebp - 0x60], ecx
lock cmpxchg dword [0x42a198], edx
je 0x404510
mov esi, eax
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x4041b0
lock dec dword [eax]
jne 0x4041b0
mov ecx, dword [ebp - 0x64]
call fcn.00410130
jmp 0x4041b0
mov eax, dword [0x42a148]
test eax, eax
jne 0x40436c
mov ecx, 0x42a148
mov dword [ebp - 0x10], 8
call fcn.0040ff90
xor ebx, ebx
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jbe 0x404390
cmp dword [eax], 0
mov esi, eax
je 0x404390
add esi, 4
jmp 0x404450
mov eax, dword [0x42a148]
test eax, eax
jne 0x4043ac
mov ecx, 0x42a148
mov dword [ebp - 0x10], 8
call fcn.0040ff90
xor ebx, ebx
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4043d0
mov edi, eax
cmp eax, 1
jne 0x40441b
jmp 0x4045c3
mov ecx, 0x10
call fcn.00404a00
test eax, eax
je 0x404647
mov dword [eax], 0
mov dword [eax + 0xc], 0x42a148
mov edi, eax
mov eax, dword [0x42a148]
test eax, eax
jne 0x404413
mov ecx, 0x42a148
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x10], 8
call fcn.0040ff90
mov edi, dword [ebp - 0x20]
xor ebx, ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [edi + 8]
cmp dword [edi], 0
lea esi, [edi + 4]
mov dword [edi], 1
mov dword [edi + 4], 0
mov dword [edi + 8], 0
je 0x404450
test ecx, ecx
je 0x404450
lock dec dword [ecx]
jne 0x404450
call fcn.00410130
nop dword [eax + eax]
cmp dword [esi], 0
jne 0x404600
mov dword [esi], 0xffffffff
mov edi, dword [esi + 4]
test edi, edi
jne 0x404481
xor ecx, ecx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], 0xa
call fcn.0040fd90
mov esi, dword [ebp - 0x20]
mov edi, eax
xor ebx, ebx
mov dword [esi + 4], eax
lock inc dword [edi]
jle 0x4045ae
inc dword [esi]
test edi, edi
je 0x4045c3
mov dword [ebp - 0x48], edi
lock dec byte [edi + 0x18]
je 0x404500
mov esi, dword [0x42a200]
add edi, 0x18
test esi, esi
je 0x4044c6
nop word [eax + eax]
push 0xffffffffffffffff
push 1
push 0x4274e4
push edi
call esi
mov al, 1
lock cmpxchg byte [edi], bl
jne 0x4044b0
jmp 0x404500
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x10], 9
call fcn.00410190
mov ecx, dword [0x42a210]
mov esi, dword [ebp - 0x20]
test ecx, ecx
je 0x404662
push 0
push 0
push esi
push eax
call ecx
xor eax, eax
xor ebx, ebx
xchg byte [esi], al
nop word cs:[eax + eax]
nop
mov eax, dword [ebp - 0x48]
lock dec dword [eax]
jne 0x404510
mov ecx, dword [ebp - 0x48]
call fcn.00410130
mov al, byte [ebp - 0x5c]
test al, al
je 0x404350
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x404180
lock dec dword [eax]
jne 0x404180
mov ecx, dword [ebp - 0x64]
call fcn.00410130
mov esi, dword [0x42a198]
jmp 0x404186
xor eax, eax
mov ecx, 2
lock cmpxchg dword [0x42a198], ecx
je 0x404568
mov esi, eax
jmp 0x404186
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x3c], 0x42a198
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x10], 6
call fcn.00411860
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x38], 3
mov dword [ebp - 0x10], 5
call fcn.00410280
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
xor eax, eax
add esp, 0x74
pop esi
pop edi
pop ebx
pop ebp
ret
ud2
mov dword [ebp - 0x10], 5
call fcn.00423560
jmp 0x404876
mov dword [ebp - 0x10], 8
call fcn.00423560
jmp 0x404876
mov dword [ebp - 0x10], 5
mov ecx, str.already_borrowed_rustc_fe5b13d681f25ee6474be29d748c65adcd91f69elibrarycore_srccharmethods.rsencode_utf8:_need__bytes_to_encode_U__but_the_buffer_has
mov edx, 0x10
push 0x426bf4
push 0x425ca8
lea eax, [ebp - 0x3c]
push eax
call fcn.00423600
add esp, 0xc
jmp 0x404876
mov dword [ebp - 0x10], 8
mov ecx, str.already_borrowed_rustc_fe5b13d681f25ee6474be29d748c65adcd91f69elibrarycore_srccharmethods.rsencode_utf8:_need__bytes_to_encode_U__but_the_buffer_has
mov edx, 0x10
push 0x426bf4
push 0x425ca8
lea eax, [ebp - 0x3c]
push eax
call fcn.00423600
add esp, 0xc
jmp 0x404876
mov ecx, 0x10
mov edx, 4
mov dword [ebp - 0x10], 5
call fcn.004233c0
jmp 0x404876
mov ecx, 0x10
mov edx, 4
mov dword [ebp - 0x10], 8
call fcn.004233c0
jmp 0x404876
lea ecx, [ebp - 0x3c]
mov edx, 0x427710
mov dword [ebp - 0x3c], 0x4276c0
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0x425a20
mov dword [ebp - 0x28], 0
call fcn.004234b0
jmp 0x404876
lea ecx, [ebp - 0x3c]
mov edx, 0x426344
mov dword [ebp - 0x3c], 0x426ab4
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0x425a20
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x10], 5
call fcn.004234b0
jmp 0x404876
mov dword [ebp - 0x10], 5
mov ecx, str.assertion_failed:_state_and_queue.addr____STATE_MASK__RUNNINGOnce_instance_has_previously_been_poisoned
mov edx, 0x40
push 0x426344
call fcn.00423500
add esp, 4
jmp 0x404876
lea ecx, [ebp - 0x3c]
mov edx, 0x427920
mov dword [ebp - 0x3c], 0x427918
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0x425a20
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x10], 0
call fcn.004234b0
jmp 0x404876
mov ecx, 5
mov edx, 1
mov dword [ebp - 0x10], 0
call fcn.004233c0
jmp 0x404876
mov eax, dword [ebp - 0x20]
lock dec dword [eax]
jne 0x40475d
mov ecx, dword [ebp - 0x4c]
call fcn.00410130
mov dword [ebp - 0x10], 0
mov ecx, 0x42635f
mov edx, 0x46
push 0x4263c4
push 0x425cb8
lea eax, [ebp - 0x3c]
push eax
call fcn.00423600
add esp, 0xc
jmp 0x404876
mov dword [ebp - 0x10], 2
mov ecx, str.already_borrowed_rustc_fe5b13d681f25ee6474be29d748c65adcd91f69elibrarycore_srccharmethods.rsencode_utf8:_need__bytes_to_encode_U__but_the_buffer_has
mov edx, 0x10
push 0x426c04
push 0x425ca8
lea eax, [ebp - 0x3c]
push eax
call fcn.00423600
add esp, 0xc
jmp 0x404876
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x64], 0x42631c
mov dword [ebp - 0x60], 2
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x3c], 0x426c3c
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0x425a20
mov byte [ebp - 0x68], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x10], 3
lea ecx, [ebp - 0x78]
lea edx, [ebp - 0x6c]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x44], 0x406170
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x64]
mov dword [ebp - 0x50], 1
push eax
call fcn.00410450
add esp, 4
lea ecx, [ebp - 0x78]
call fcn.00410590
mov ecx, 7
int 0x29
ud2
lea ecx, [ebp - 0x3c]
mov edx, 0x4278b0
mov dword [ebp - 0x3c], 0x427878
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0x425a20
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x10], 0
call fcn.004234b0
ud2