Function at 0x4192a0
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x40
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x10], ecx
mov eax, dword [ecx]
mov ebx, eax
test eax, eax
jne 0x418d14
jmp 0x418cfa
cmp byte [ebp - 0x3c], 0
je 0x4191eb
mov ecx, dword [ebp - 0x10]
mov eax, ebx
mov edx, 2
lock cmpxchg dword [ecx], edx
je 0x419094
mov ebx, eax
test eax, eax
je 0x418cfa
cmp ebx, 1
je 0x418cf0
cmp ebx, 3
je 0x4190bf
mov eax, ebx
and eax, 3
cmp eax, 2
je 0x418d4e
jmp 0x419219
mov eax, ebx
and eax, 3
cmp eax, 2
jne 0x419080
mov eax, dword [0x462058]
test eax, eax
je 0x418d73
dec eax
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 2
jb 0x418d90
cmp dword [eax + 4], 0
mov edi, eax
je 0x418d90
add edi, 8
jmp 0x418e40
mov ecx, 0x462058
call fcn.004193f0
push eax
call sub.kernel32.dll_TlsGetValue
cmp eax, 2
jae 0x418d63
nop dword [eax + eax]
mov eax, dword [0x462058]
test eax, eax
je 0x418db0
dec eax
push eax
call sub.kernel32.dll_TlsGetValue
test eax, eax
je 0x418dd0
mov esi, eax
cmp eax, 1
jne 0x418e0d
jmp 0x419193
mov ecx, 0x462058
call fcn.004193f0
push eax
call sub.kernel32.dll_TlsGetValue
test eax, eax
jne 0x418da4
nop word cs:[eax + eax]
nop
movzx eax, byte [0x476104]
mov ecx, 0xc
call fcn.0043d720
test eax, eax
je 0x419184
mov dword [eax], 0x462058
mov dword [eax + 4], 0
mov esi, eax
mov eax, dword [0x462058]
test eax, eax
je 0x418f0f
dec eax
push esi
push eax
call sub.kernel32.dll_TlsSetValue
mov ecx, dword [esi + 8]
cmp dword [esi + 4], 0
lea edi, [esi + 8]
mov dword [esi + 4], 1
mov dword [esi + 8], 0
je 0x418e40
test ecx, ecx
je 0x418e40
lock dec dword [ecx]
jne 0x418e40
call fcn.00441120
nop word cs:[eax + eax]
nop
mov esi, dword [edi]
test esi, esi
jne 0x418ec2
movzx eax, byte [0x476104]
mov ecx, 0x20
call fcn.0043d720
test eax, eax
je 0x4190f7
mov dword [eax], 1
mov dword [eax + 4], 1
mov dword [ebp - 0x40], ebx
mov dword [eax + 0x10], 0
mov esi, eax
movq xmm0, qword [0x4760b8]
movd eax, xmm0
pshufd xmm0, xmm0, 0x55
movd edx, xmm0
nop dword [eax]
mov ebx, eax
mov ecx, edx
add ebx, 1
adc ecx, 0
jb 0x4190c7
lock cmpxchg8b qword [0x4760b8]
jne 0x418e90
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ecx
mov byte [esi + 0x18], 0
cmp dword [edi], 0
jne 0x419106
mov ebx, dword [ebp - 0x40]
mov dword [edi], esi
lock inc dword [esi]
jle 0x419276
mov ecx, dword [ebp - 0x10]
mov eax, ebx
mov dword [ebp - 0x34], esi
mov byte [ebp - 0x2c], 0
lea edx, [ebp - 0x32]
add eax, 0xfffffffe
mov dword [ebp - 0x30], eax
mov eax, ebx
lock cmpxchg dword [ecx], edx
je 0x419060
mov ebx, eax
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x418d40
lock dec dword [eax]
jne 0x418d40
mov ecx, dword [ebp - 0x34]
call fcn.00441120
jmp 0x418d40
mov ecx, 0x462058
call fcn.004193f0
jmp 0x418e06
call fcn.00419780
mov esi, eax
test eax, eax
je 0x4190db
mov edi, dword [esi]
test edi, edi
jne 0x418faf
movzx eax, byte [0x476104]
mov ecx, 0x20
call fcn.0043d720
test eax, eax
je 0x41913b
mov dword [eax], 1
mov dword [eax + 4], 1
mov dword [eax + 0x10], 0
mov edi, eax
movq xmm0, qword [0x4760b8]
movd eax, xmm0
pshufd xmm0, xmm0, 0x55
movd edx, xmm0
nop dword [eax]
mov ebx, eax
mov ecx, edx
add ebx, 1
adc ecx, 0
jb 0x4190d1
lock cmpxchg8b qword [0x4760b8]
jne 0x418f80
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ecx
mov byte [edi + 0x18], 0
cmp dword [esi], 0
jne 0x41914f
mov dword [esi], edi
lock inc dword [edi]
jle 0x419276
lock dec byte [edi + 0x18]
je 0x418fe6
mov esi, dword [0x4760d8]
lea ebx, [edi + 0x18]
test esi, esi
je 0x418ff4
nop dword [eax + eax]
push 0xffffffffffffffff
push 1
push 0x46787c
push ebx
call esi
xor ecx, ecx
mov al, 1
lock cmpxchg byte [ebx], cl
jne 0x418fd0
lock dec dword [edi]
jne 0x419060
mov ecx, edi
call fcn.00441120
jmp 0x419060
mov ecx, dword [0x46201c]
cmp ecx, 0xffffffff
jne 0x41903e
mov dword [ebp - 0x38], 0xffffffff
mov eax, dword [0x462024]
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x38]
push ecx
call eax
test eax, eax
jne 0x4191a7
mov ecx, dword [ebp - 0x38]
mov eax, 0xffffffff
lock cmpxchg dword [0x46201c], ecx
je 0x41903e
mov esi, eax
push ecx
call sub.kernel32.dll_CloseHandle
mov ecx, esi
mov eax, dword [0x46202c]
push 0
push 0
push ebx
push ecx
call eax
xor eax, eax
xchg byte [ebx], al
lock dec dword [edi]
je 0x418feb
nop word cs:[eax + eax]
nop
movzx eax, byte [ebp - 0x2c]
test al, al
je 0x418f20
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x419080
lock dec dword [eax]
jne 0x419080
mov ecx, dword [ebp - 0x34]
call fcn.00441120
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov ebx, eax
test eax, eax
jne 0x418d14
jmp 0x418cfa
mov eax, dword [ebp + 0xc]
cmp ebx, 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 0x4192a0
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.0041b0a0
jmp 0x419276
call fcn.0041b0a0
jmp 0x419276
mov edx, 0x5e
mov ecx, 0x4661f0
push 0x466250
call fcn.00408bc0
add esp, 4
jmp 0x419276
mov ecx, 8
mov edx, 0x20
call fcn.004068b0
mov dword [ebp - 0x28], str.reentrant_init
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], str.Index_out_of_bounds
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x28]
mov edx, 0x465944
call fcn.00407170
jmp 0x419276
mov ecx, 8
mov edx, 0x20
call fcn.004068b0
jmp 0x419276
mov dword [ebp - 0x28], str.reentrant_init
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], str.Index_out_of_bounds
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x28]
mov edx, 0x465944
call fcn.00407170
jmp 0x419276
mov ecx, 4
mov edx, 0xc
call fcn.004068b0
mov ecx, 0x4661f0
mov edx, 0x5e
push 0x466250
call fcn.00408bc0
lea ebx, [ebp - 0x44]
lea esi, [ebp - 0x4c]
mov dword [ebp - 0x28], 0x4678a8
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x48], 0x40b210
mov dword [ebp - 0x1c], 1
lea ecx, [ebp - 0x28]
mov edx, 0x4678e4
call fcn.00407170
jmp 0x419276
mov dword [ebp - 0x28], str.Once_instance_has_previously_been_poisoned
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], str.Index_out_of_bounds
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp + 0x10]
lea ecx, [ebp - 0x28]
call fcn.00407170
mov ecx, str.assertion_failed:_state_and_queue.addr____STATE_MASK__RUNNINGlibrary_std_src_sys_commononcequeue.rs8F
mov edx, 0x40
push dword [ebp + 0x10]
call fcn.00407d90
mov edi, eax
mov ecx, dword [ebp - 0x10]
mov edx, 1
call 0x4192a0
jmp 0x41928c
ud2
push edi
call fcn.004558c0
call fcn.00408ed0
nop word [eax + eax]
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
xchg dword [ecx], edx
mov eax, edx
and eax, 3
cmp eax, 2
mov dword [ebp - 0x18], eax
jne 0x4193be
add edx, 0xfffffffe
jne 0x4192d6
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
test ebx, ebx
mov edx, ebx
je 0x4192c1
mov esi, dword [edx]
mov ebx, dword [edx + 4]
mov dword [edx], 0
test esi, esi
je 0x419373
mov byte [edx + 8], 1
mov al, 1
xchg byte [esi + 0x18], al
cmp al, 0xff
jne 0x419305
mov eax, dword [0x4760dc]
lea edi, [esi + 0x18]
test eax, eax
je 0x419313
push edi
call eax
lock dec dword [esi]
jne 0x4192d0
mov ecx, esi
call fcn.00441120
jmp 0x4192d0
mov ecx, dword [0x46201c]
cmp ecx, 0xffffffff
jne 0x41935b
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [0x462024]
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x10]
push ecx
call eax
test eax, eax
jne 0x41937d
mov ecx, dword [ebp - 0x10]
mov eax, 0xffffffff
lock cmpxchg dword [0x46201c], ecx
je 0x41935b
push ecx
mov dword [ebp - 0x1c], eax
call sub.kernel32.dll_CloseHandle
mov ecx, dword [ebp - 0x1c]
mov eax, dword [0x462028]
push 0
push 0
push edi
push ecx
call eax
lock dec dword [esi]
jne 0x4192d0
jmp 0x41930a
mov ecx, 0x467c60
call fcn.00408ba0
lea ebx, [ebp - 0x20]
lea edi, [ebp - 0x18]
mov dword [ebp - 0x38], 0x4678a8
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x14], 0x40b210
mov dword [ebp - 0x2c], 1
lea ecx, [ebp - 0x38]
mov edx, 0x4678e4
call fcn.00407170
ud2
mov dword [ebp - 0x38], 0
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x18]
mov edx, 0x46a55c
push 0x467c70
push eax
call fcn.00419a10
lock dec dword [esi]
mov edi, eax
jne 0x4193e9
mov ecx, esi
call fcn.00441120
push edi
call fcn.004558c0
nop