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

Disassembly:
mov eax, 0x4140ac
call fcn.00413240
sub esp, 0x54
mov eax, dword [0x4241a4]
push ebx
xor eax, ebp
push esi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x30], ebp
push 1
push dword [ebp - 0x30]
push str.struct_HINSTANCE_____stdcall_CHookLoadLibrary::XLLoadLibraryExW_const_wchar_t__void__unsigned_long_
call fcn.00407881
mov esi, eax
add esp, 0xc
cmp esi, ebx
mov eax, 0x419338
jne 0x40a69e
mov esi, eax
push ebx
push ebx
push ebx
push ebx
push eax
push 0x4192f0
push esi
lea ecx, [ebp - 0x60]
call fcn.00409792
mov dword [ebp - 4], ebx
cmp esi, ebx
jne 0x40a6ba
push ebp
pop ebp
push edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x38], ebx
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov byte [ebp - 4], 1
push dword [0x424064]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
jne 0x40a821
cmp dword [ebp + 0x10], ebx
je 0x40a6ee
cmp dword [ebp + 0x10], 8
jne 0x40a82e
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ebx
mov eax, ebp
add eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x30]
cmp eax, dword [0x4241ec]
jl 0x40a71f
cmp eax, dword [0x4241e8]
jg 0x40a71f
mov dword [ebp - 0x34], 1
nop
cmp dword [ebp - 0x34], 1
jne 0x40a74d
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call fcn.00409eed
test al, al
pop ecx
je 0x40a74d
push str.mswsock.dll
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
jmp 0x40a82e
cmp dword [ebp + 0x10], 8
jne 0x40a82e
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x30]
cmp eax, dword [0x4241f4]
jl 0x40a77b
cmp eax, dword [0x4241f0]
jg 0x40a77b
mov dword [ebp - 0x34], 1
nop
cmp dword [ebp - 0x34], 1
jne 0x40a82e
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::iterator___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::begin_void_]
mov esi, eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::iterator___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::end_void_]
mov edi, eax
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::iterator___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::begin_void_]
push dword [sym.imp.MSVCR71.dll_tolower]
push dword [esi]
push dword [edi]
push dword [eax]
lea eax, [ebp - 0x44]
push eax
call fcn.004051eb
add esp, 0x14
call fcn.00408c41
mov esi, dword [eax + 4]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00408c41
mov ecx, eax
call fcn.00405c0d
cmp dword [eax], esi
jne 0x40a82e
mov esi, 0x4192a8
push esi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x40a81a
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push str.lyc:It_is_an_invalid_hook.Module_name_is__s.
push ebx
push esi
call fcn.00408cd1
pop ecx
pop ecx
push eax
call fcn.0040973c
add esp, 0xc
xor esi, esi
jmp 0x40a8e0
push ebx
push dword [0x424064]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call dword [0x424204]
test al, al
pop ecx
mov esi, 0x4192a8
je 0x40a890
cmp dword [0x424200], ebx
jne 0x40a86b
push dword [ebp + 0x10]
lea ecx, [ebp - 0x2c]
push dword [ebp - 0x40]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call dword [0x424214]
mov dword [ebp - 0x38], eax
jmp 0x40a8b5
push 0xffffffffffffffff
push dword [0x424064]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [ebp + 0x10]
lea ecx, [ebp - 0x2c]
push dword [ebp - 0x40]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call fcn.0040a3ef
jmp 0x40a866
push esi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x40a8b5
push dword [ebp - 0x3c]
push str.lyc:Has_been_filtered:_s
push ebx
push esi
call fcn.00408cd1
pop ecx
pop ecx
push eax
call fcn.0040973c
add esp, 0xc
push esi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x40a8dd
push dword [ebp - 0x3c]
push dword [ebp - 0x38]
push str.XLLoadLibraryExW_handle:0x_X_dll_name:_s._n
push ebx
push esi
call fcn.00408cd1
pop ecx
pop ecx
push eax
call fcn.0040973c
add esp, 0x10
mov esi, dword [ebp - 0x38]
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00409a0c
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413159
leave
ret 0xc