Function at 0x54f660
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, 0xc
mov eax, dword [0x55e108]
mov esi, ecx
test eax, eax
je 0x54f68e
dec eax
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
jbe 0x54f6a3
cmp dword [eax + 4], 0
je 0x54f6a3
add eax, 8
jmp 0x54f74b
mov ecx, 0x55e108
call sym.std::sys::windows::thread_local_key::StaticKey::init::he0afa17cd17428ff
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
ja 0x54f680
mov eax, dword [0x55e108]
test eax, eax
je 0x54f86a
dec eax
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
je 0x54f751
mov edi, eax
test eax, eax
jne 0x54f71e
movzx eax, byte [0x5da16c]
mov eax, dword [0x5da100]
test eax, eax
jne 0x54f6e8
call sub.kernel32.dll_GetProcessHeap
test eax, eax
je 0x54f8b0
mov dword [0x5da100], eax
push 0x1c
push 0
push eax
call sub.kernel32.dll_HeapAlloc
test eax, eax
je 0x54f8b0
mov dword [eax], 0x55e108
mov dword [eax + 4], 0
mov edi, eax
mov eax, dword [0x55e108]
test eax, eax
je 0x54f8a1
dec eax
push edi
push eax
call sub.kernel32.dll_TlsSetValue
mov dword [edi + 4], 1
lea eax, [edi + 8]
mov dword [edi + 0xc], 0
mov dword [edi + 8], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x18], 0
mov dword [eax], 0
mov eax, dword [0x55e0e4]
cmp eax, 2
jne 0x54f822
lea edi, [0x55e0ec]
push edi
call sub.kernel32.dll_AcquireSRWLockExclusive
mov eax, dword [0x5da168]
test eax, 0x7fffffff
jne 0x54f82c
xor eax, eax
movzx ecx, byte [0x55e0f0]
test cl, cl
jne 0x54f842
mov edi, dword [esi]
mov esi, dword [0x55e0fc]
mov dword [ebp - 0x10], eax
cmp esi, dword [0x55e0f8]
mov ecx, esi
jne 0x54f7b4
lea ecx, [0x55e0f4]
mov edx, esi
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::reserve_for_push::h0bf962b05ef6e94f
mov ecx, dword [0x55e0fc]
mov eax, dword [0x55e0f4]
mov dword [eax + ecx*4], edi
inc ecx
test esi, esi
mov dword [0x55e0fc], ecx
mov ecx, dword [eax + esi*4]
je 0x54f7ea
nop word [eax + eax]
lea edi, [esi - 1]
mov edx, edi
shr edx, 1
mov ebx, dword [eax + edx*4]
cmp ebx, ecx
jbe 0x54f7f7
mov dword [eax + esi*4], ebx
cmp edi, 1
mov esi, edx
ja 0x54f7d0
jmp 0x54f7ec
xor edx, edx
cmp byte [ebp - 0x10], 0
mov dword [eax + edx*4], ecx
jne 0x54f80e
jmp 0x54f802
mov edx, esi
cmp byte [ebp - 0x10], 0
mov dword [eax + edx*4], ecx
jne 0x54f80e
mov eax, dword [0x5da168]
test eax, 0x7fffffff
jne 0x54f888
lea eax, [0x55e0ec]
push eax
call sub.kernel32.dll_ReleaseSRWLockExclusive
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
call sym.once_cell::imp::OnceCell_LT_T_GT_::initialize::h8aa448749b1b5041
jmp 0x54f75f
call dbg.is_zero_slow_path
xor al, 1
movzx ecx, byte [0x55e0f0]
test cl, cl
je 0x54f78c
mov dword [ebp - 0x18], edi
mov byte [ebp - 0x14], al
lea eax, [ebp - 0x18]
mov ecx, str.called__Result::unwrap____on_an__Err__value
mov edx, 0x2b
push 0x5bfdb0
push 0x5bfd14
push eax
call dbg.unwrap_failed
add esp, 0xc
ud2
mov ecx, 0x55e108
call sym.std::sys::windows::thread_local_key::StaticKey::init::he0afa17cd17428ff
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
jne 0x54f6c0
jmp 0x54f751
call dbg.is_zero_slow_path
test al, al
jne 0x54f80e
mov byte [0x55e0f0], 1
jmp 0x54f80e
mov ecx, 0x55e108
call sym.std::sys::windows::thread_local_key::StaticKey::init::he0afa17cd17428ff
jmp 0x54f717
mov ecx, 4
mov edx, 0x1c
call dbg.handle_alloc_error
ud2