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

Disassembly:
mov eax, 0x41229a
call fcn.004114d0
sub esp, 0x54
mov eax, dword [0x4211a4]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push ebx
xor eax, ebp
push ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
push 1
push ebx
mov dword [ebp - 0x3c], eax
mov eax, str.struct_HINSTANCE_____stdcall_CHookLoadLibrary::XLLoadLibraryExW_const_wchar_t__void__unsigned_long_
push eax
push 0x4167a0
push eax
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x40], esi
call fcn.00406666
mov dword [ebp - 4], ebx
push esi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], 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 [0x421064]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
jne 0x4075cd
cmp dword [ebp + 0x10], ebx
je 0x407498
cmp dword [ebp + 0x10], 8
jne 0x4075da
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x30], ebx
mov eax, ebp
add eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x38]
cmp eax, dword [0x4211ec]
jl 0x4074c9
cmp eax, dword [0x4211e8]
jg 0x4074c9
mov dword [ebp - 0x30], 1
nop
cmp dword [ebp - 0x30], 1
jne 0x4074f7
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.00406d55
test al, al
pop ecx
je 0x4074f7
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 0x4075da
cmp dword [ebp + 0x10], 8
jne 0x4075da
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x38]
cmp eax, dword [0x4211f4]
jl 0x407525
cmp eax, dword [0x4211f0]
jg 0x407525
mov dword [ebp - 0x30], 1
nop
cmp dword [ebp - 0x30], 1
jne 0x4075da
push edi
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__::begin_void_]
mov esi, eax
lea eax, [ebp - 0x38]
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.00402d63
add esp, 0x14
call fcn.00405af8
mov esi, dword [eax + 4]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00405af8
mov ecx, eax
call fcn.004036c1
cmp dword [eax], esi
pop edi
jne 0x4075da
mov esi, 0x416758
push esi
call fcn.004023cd
test eax, eax
pop ecx
jne 0x4075c6
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.00405b88
pop ecx
pop ecx
push eax
call fcn.00406610
add esp, 0xc
xor esi, esi
jmp 0x407665
push ebx
push dword [0x421064]
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 [0x421204]
test al, al
pop ecx
je 0x407635
cmp dword [0x421200], ebx
jne 0x40760f
push dword [ebp + 0x10]
lea ecx, [ebp - 0x2c]
push dword [ebp - 0x3c]
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 [0x421214]
jmp 0x407632
push 0xffffffffffffffff
push dword [0x421064]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [ebp + 0x10]
lea ecx, [ebp - 0x2c]
push dword [ebp - 0x3c]
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.0040720e
mov dword [ebp - 0x34], eax
mov esi, 0x416758
push esi
call fcn.004023cd
test eax, eax
pop ecx
jne 0x407662
push dword [ebp - 0x40]
push dword [ebp - 0x34]
push str.XLLoadLibraryExW_handle:0x_X_dll_name:_s._n
push ebx
push esi
call fcn.00405b88
pop ecx
pop ecx
push eax
call fcn.00406610
add esp, 0x10
mov esi, dword [ebp - 0x34]
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.004068e0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004113e5
leave
ret 0xc