Function at 0x10021f50
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x34
mov dword [ebp - 0x10], 0
mov esi, dword [ebp + 0x10]
test byte [0x100471a4], 8
jne 0x10021fd8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x100220c5
mov eax, dword [ebp + 8]
mov ebx, 6
mov dword [esp], eax
call sym._get_handle_object
mov edi, eax
test eax, eax
je 0x10021fb0
cmp dword [eax], 1
jne 0x10021fa8
cmp dword [ebp + 0x1c], 1
je 0x10022180
cmp dword [ebp + 0x1c], 3
je 0x10022110
xor ebx, ebx
mov dword [esp], edi
call sym._WININET_Release
test byte [0x100471a4], 8
jne 0x100220e0
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], ebx
mov eax, dword [ebp - 0x10]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x20
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x10022220
mov eax, dword [ebp + 0x14]
shr eax, 0x10
je 0x10022160
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 0xffffffff
mov edi, 0x1004c271
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x1002201e
mov eax, dword [ebp + 0x14]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn.part.0_2
mov edi, eax
mov edx, dword [ebp + 0xc]
movzx ebx, si
test edx, edx
je 0x10022210
mov eax, dword [ebp + 0xc]
shr eax, 0x10
je 0x100221f0
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x1004c271
test edx, edx
jne 0x10022067
mov eax, dword [ebp + 0xc]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn.part.0_2
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x20]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [esp + 0x28], edx
mov edx, dword [ebp + 0x18]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__p___s___u___s___p___lu___lx___Ix__n
mov dword [esp + 8], str.InternetConnectW
mov dword [esp + 4], 0x100471a4
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_5
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x10021f77
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x57
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 0x20
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], str.returning__p_n
mov dword [esp + 8], str.InternetConnectW
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x100471a4
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_5
jmp 0x10021fbd
lea eax, [ebp - 0x10]
movzx esi, si
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 8], esi
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x20]
mov dword [esp], edi
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
call sym._HTTP_Connect
mov dword [esp], edi
mov ebx, eax
call sym._WININET_Release
jmp 0x10021fb0
movzx eax, word [ebp + 0x14]
mov dword [esp], 0x1004c264
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_4
mov edi, eax
jmp 0x1002201e
mov eax, dword [ebp + 0x24]
movzx esi, si
mov dword [esp + 0x1c], 0
mov dword [esp + 8], esi
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x20]
mov dword [esp], edi
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
call sym._FTP_Connect
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x10021fa6
mov eax, dword [0x10047300]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x10021fa6
mov ebx, dword [eax]
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], ebx
jmp 0x10021fa8
movzx eax, word [ebp + 0xc]
mov dword [esp], 0x1004c264
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_4
jmp 0x10022067
mov eax, 0x1004c26a
jmp 0x10022067
mov edi, 0x1004c26a
jmp 0x1002201e