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

Disassembly:
push 0x70
mov eax, 0x41b632
call fcn.0041280d
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
xor ebx, ebx
push ebx
push ebx
push 1
push ebx
mov dword [ebp - 0x44], eax
mov eax, str.struct_HINSTANCE_____stdcall_CHookLoadLibrary::XLLoadLibraryExWOfKernelBase_const_wchar_t__void__unsigned_long_
push eax
push 0x420908
push eax
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x40], esi
call fcn.00407ab1
mov dword [ebp - 4], ebx
push esi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x3c], ebx
call dword [sym.imp.MSVCP90.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 [0x431014]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
jne 0x40851b
cmp dword [ebp + 0x10], ebx
je 0x4083de
cmp dword [ebp + 0x10], 8
jne 0x408528
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov eax, ebp
add eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x34]
cmp eax, dword [0x431568]
jl 0x40840f
cmp eax, dword [0x431570]
jg 0x40840f
mov dword [ebp - 0x30], 1
nop
cmp dword [ebp - 0x30], 1
jne 0x40843d
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP90.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.0040816e
pop ecx
test al, al
je 0x40843d
push str.mswsock.dll
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP90.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 0x408528
cmp dword [ebp + 0x10], 8
jne 0x408528
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x34]
cmp eax, dword [0x431564]
jl 0x40846b
cmp eax, dword [0x43156c]
jg 0x40846b
mov dword [ebp - 0x38], 1
nop
cmp dword [ebp - 0x38], 1
jne 0x408528
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP90.dll_public:_class_std::_String_iterator_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__::begin_void_]
mov esi, eax
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP90.dll_public:_class_std::_String_iterator_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__::end_void_]
mov edi, eax
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP90.dll_public:_class_std::_String_iterator_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__::begin_void_]
push dword [sym.imp.MSVCR90.dll_tolower]
push dword [esi + 4]
push dword [esi]
push dword [edi + 4]
push dword [edi]
push dword [eax + 4]
push dword [eax]
lea eax, [ebp - 0x54]
push eax
call fcn.00404ed5
add esp, 0x20
call fcn.004059df
mov ecx, dword [eax + 0x18]
push eax
push ecx
lea ecx, [ebp - 0x4c]
call fcn.00403fed
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.004059df
mov ecx, eax
call fcn.0040512e
mov ecx, eax
call fcn.004027c0
test al, al
je 0x408528
xor esi, esi
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP90.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 - 0x7c]
call fcn.00407d23
mov eax, esi
call fcn.00412890
ret 0xc
push ebx
push dword [0x431014]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP90.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 [0x431580]
pop ecx
test al, al
je 0x408556
push dword [ebp + 0x10]
lea ecx, [ebp - 0x2c]
push dword [ebp - 0x44]
call dword [sym.imp.MSVCP90.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 [0x431598]
mov dword [ebp - 0x3c], eax
mov esi, 0x4208a8
push esi
call fcn.00402c05
pop ecx
test eax, eax
jne 0x408583
push dword [ebp - 0x40]
push dword [ebp - 0x3c]
push str.XLLoadLibraryExWOfKernelBase_handle:0x_X_dll_name:_s._n
push ebx
push esi
call fcn.00407313
pop ecx
pop ecx
push eax
call fcn.00406d6c
add esp, 0x10
mov esi, dword [ebp - 0x3c]
jmp 0x4084f9