Function at 0x4094e0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x58
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x40d750
mov esi, ecx
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
call fcn.00403020
test eax, eax
je 0x40999a
cmp dword [eax], 1
mov cl, 1
jbe 0x4095a0
mov byte [ebp - 0x26], cl
push esi
call fcn.00410c10
add esp, 4
test eax, eax
je 0x4099b9
mov dword [ebp - 0x54], eax
push esi
call fcn.00410c30
add esp, 4
mov edi, eax
push eax
call dword [edx + 0xc]
add esp, 4
test edi, edi
je 0x409615
xor eax, 0xecc7bcf4
xor edx, 0x7ef2a91e
or edx, eax
jne 0x409615
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], ecx
mov eax, dword [0x498024]
test eax, eax
jne 0x40965c
push 0x498024
call fcn.004088c0
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jae 0x409667
jmp 0x409671
mov eax, dword [0x4981dc]
cmp eax, 2
je 0x409941
cmp eax, 1
je 0x40993a
test eax, eax
jne 0x409523
lea eax, [ebp - 0x50]
push 0xe
push str.RUST_BACKTRACE0library_std_srcenv.rsfailed_to_get_environment_variable___:_Q
push eax
call fcn.00403ec0
add esp, 0xc
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x409948
mov edx, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x4c]
cmp edx, 4
je 0x40994c
cmp edx, 1
jne 0x409962
mov bl, 4
mov edi, 1
cmp eax, 0x46163a
je 0x409969
cmp byte [eax], 0x30
jne 0x409962
jmp 0x409969
push esi
call fcn.00410c30
add esp, 4
mov esi, eax
push eax
call dword [edx + 0xc]
add esp, 4
test esi, esi
mov edi, str.Box_Any__unnamed_
mov ecx, 8
je 0x409649
xor eax, 0x6e4c897a
xor edx, 0x2831415d
or edx, eax
jne 0x409649
mov edi, dword [esi]
mov ecx, dword [esi + 8]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], ecx
mov eax, dword [0x498024]
test eax, eax
je 0x40957f
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x409671
cmp dword [eax], 1
jne 0x409671
add eax, 4
jmp 0x40967a
call fcn.004031c0
test eax, eax
je 0x4096a1
mov ecx, eax
call fcn.00408750
mov dword [ebp - 0x38], eax
lea ecx, [eax + 0x10]
mov edx, dword [eax + 0x10]
test edx, edx
cmove ecx, edx
je 0x4096b3
mov esi, dword [ecx + 4]
sub esi, 1
jb 0x4099f5
mov ecx, dword [ecx]
jmp 0x4096b5
xor ecx, ecx
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x24], 0
jmp 0x4096b8
xor ecx, ecx
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x64]
test ecx, ecx
mov edx, 0x461dd8
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x5c]
cmovne edx, ecx
mov ecx, 9
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x54]
cmovne ecx, esi
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x26]
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x44], eax
mov al, byte [0x498259]
test al, al
je 0x40978c
mov byte [0x498259], 1
mov dword [ebp - 0x34], 0
mov eax, dword [0x49801c]
test eax, eax
jne 0x409720
mov dword [ebp - 0x10], 5
push 0x49801c
call fcn.004088c0
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x409735
cmp dword [eax], 1
jne 0x409735
add eax, 4
jmp 0x409749
mov dword [ebp - 0x10], 5
call fcn.004030f0
test eax, eax
je 0x4099cf
mov ecx, dword [eax]
mov dword [eax], 0
test ecx, ecx
mov dword [ebp - 0x2c], ecx
je 0x409793
lea eax, [ecx + 8]
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x24], ecx
mov byte [ebp - 0x1d], 1
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x3c], eax
push eax
call fcn.0040b860
add esp, 4
mov eax, dword [0x4981f4]
test eax, eax
je 0x4097c3
mov byte [ebp - 0x1d], 1
call fcn.00409e50
jmp 0x4097c5
mov dword [ebp - 0x2c], 0
mov byte [ebp - 0x1e], 0
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x34]
push 0x461de4
call fcn.00409b40
add esp, 4
mov eax, dword [ebp - 0x24]
xor ebx, ebx
test eax, eax
jne 0x4098f8
jmp 0x409905
mov al, 1
mov edx, dword [ebp - 0x24]
mov byte [ebp - 0x25], al
xor al, 1
mov cl, byte [edx + 0xc]
mov ecx, dword [ebp - 0x3c]
add edx, 0x10
mov dword [ebp - 0x10], 3
mov dword [ebp - 0x34], ecx
mov byte [ebp - 0x30], al
lea ecx, [ebp - 0x50]
push 0x461e10
call fcn.00409b40
add esp, 4
cmp byte [ebp - 0x25], 0
je 0x40981d
mov eax, dword [0x4981f4]
test eax, eax
je 0x40981d
mov byte [ebp - 0x1d], 1
mov dword [ebp - 0x10], 1
call fcn.00409e50
test al, al
jne 0x40981d
mov eax, dword [ebp - 0x24]
mov byte [eax + 0xc], 1
mov eax, dword [0x498200]
test eax, eax
jne 0x409836
mov byte [ebp - 0x1d], 1
mov dword [ebp - 0x10], 1
call fcn.0040c440
cmp eax, 0x40c420
jne 0x409854
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax]
mov byte [eax + 0x18], 0
push eax
call sub.KERNEL32.dll_LeaveCriticalSection
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x24], eax
jmp 0x409876
mov eax, dword [0x498208]
mov dword [ebp - 0x10], 1
test eax, eax
jne 0x40986d
mov byte [ebp - 0x1d], 1
call fcn.0040c4e0
mov byte [ebp - 0x1d], 1
push dword [ebp - 0x3c]
call eax
mov byte [0x498259], 1
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x34], eax
mov eax, dword [0x49801c]
test eax, eax
jne 0x4098a0
mov dword [ebp - 0x10], 2
push 0x49801c
call fcn.004088c0
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x4098b5
cmp dword [eax], 1
jne 0x4098b5
add eax, 4
jmp 0x4098c9
mov dword [ebp - 0x10], 2
call fcn.004030f0
test eax, eax
je 0x409a0e
mov ecx, dword [eax]
mov edx, dword [ebp - 0x24]
test ecx, ecx
mov dword [eax], edx
mov dword [ebp - 0x34], ecx
je 0x4098ef
lock dec dword [ecx]
jne 0x4098ef
lea ecx, [ebp - 0x34]
mov byte [ebp - 0x1d], 0
mov dword [ebp - 0x10], 1
call fcn.00402c20
mov eax, dword [ebp - 0x38]
mov bl, 1
test eax, eax
je 0x409905
lock dec dword [eax]
jne 0x409905
lea ecx, [ebp - 0x38]
call fcn.00402be0
cmp dword [ebp - 0x2c], 0
not bl
setne al
test bl, al
je 0x409929
mov eax, dword [ebp - 0x2c]
lock dec dword [eax]
jne 0x409929
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x10], 0xffffffff
call fcn.00402c20
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x58
pop esi
pop edi
pop ebx
pop ebp
ret
mov cl, 4
jmp 0x409523
xor ecx, ecx
jmp 0x409523
mov bl, 5
jmp 0x409979
mov bl, 1
mov edi, 3
cmp eax, 0x461c2a
je 0x409969
cmp dword [eax], 0x6c6c7566
je 0x409969
mov edi, 2
xor ebx, ebx
test ecx, ecx
je 0x409979
push 1
push ecx
push eax
call fcn.00459be0
add esp, 0xc
cmp bl, 5
mov edx, 1
movzx eax, bl
mov ecx, 4
cmovne edx, edi
cmovne ecx, eax
xchg dword [0x4981dc], edx
jmp 0x409523
lea eax, [ebp - 0x34]
push 0x4614d4
push 0x46134c
push eax
push 0x46
push 0x46146f
call fcn.00410b80
add esp, 0x14
ud2
push 0x461dc0
push 0x2b
push 0x461300
call fcn.00410cb0
add esp, 0xc
ud2
mov dword [ebp - 0x10], 4
lea eax, [ebp - 0x34]
push 0x4614d4
push 0x46134c
push eax
push 0x46
push 0x46146f
call fcn.00410b80
add esp, 0x14
jmp 0x409a57
mov dword [ebp - 0x10], 4
push 0x4616dc
push 0
push esi
call fcn.00413b50
add esp, 0xc
jmp 0x409a57
cmp dword [ebp - 0x24], 0
je 0x409a2f
mov eax, dword [ebp - 0x24]
lock dec dword [eax]
jne 0x409a2f
lea ecx, [ebp - 0x34]
mov byte [ebp - 0x1d], 0
mov dword [ebp - 0x10], 1
call fcn.00402c20
mov byte [ebp - 0x1d], 0
mov dword [ebp - 0x10], 1
lea eax, [ebp - 0x34]
push 0x4614d4
push 0x46134c
push eax
push 0x46
push 0x46146f
call fcn.00410b80
add esp, 0x14
ud2