Function at 0x5d1900
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x2c
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor edx, edx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], connect
mov esi, dword [edi + 0x18]
mov dword [esp + 0x38], esi
test esi, esi
je 0x5d1973
push dword [0x884adc]
call ebp
lea ecx, [esi*4 + 0x7f]
and ecx, 0xffffff80
mov edx, dword [eax + 0xc]
lea ebx, [edx + ecx]
cmp ecx, dword [eax + 8]
jg 0x5d195f
cmp ebx, dword [eax + 0x10]
ja 0x5d195f
mov dword [eax + 0xc], ebx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x2c]
jmp 0x5d1977
push ecx
mov ecx, eax
call fcn.0046a3c0
mov edx, eax
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x2c]
jmp 0x5d1977
mov dword [esp + 0x28], edx
mov eax, dword [esp + 0x28]
or esi, 0x80000000
mov dword [esp + 0x34], eax
mov al, byte [edi + 0xe7]
mov dword [esp + 0x30], esi
cmp al, 1
je 0x5d1a46
cmp al, 3
je 0x5d1a46
xor ebx, ebx
cmp dword [edi + 0x18], ebx
jle 0x5d1a46
nop word [eax + eax]
mov eax, dword [edi + 0x14]
mov dword [esp + 0x18], eax
mov ecx, dword [eax + ebx*4]
mov eax, dword [ecx + 0x30]
test eax, eax
je 0x5d1a36
mov ebp, dword [ecx + 0x2c]
cmp dword [ebp + 0x14], 0
je 0x5d1a36
cmp byte [eax + 0xac], 0
je 0x5d1a36
mov eax, dword [ebp + 0x24]
mov eax, dword [eax + 0x74]
cmp dword [eax + 0x24], 0
je 0x5d19f9
mov eax, dword [ecx + 0x38]
test eax, eax
jne 0x5d19f3
mov eax, ebp
test eax, eax
je 0x5d19f1
mov eax, dword [eax + 0x20]
jmp 0x5d19f3
xor eax, eax
cmp dword [eax + 0xc], 0
je 0x5d1a36
and esi, 0x3fffffff
cmp edx, esi
jne 0x5d1a1b
push 4
lea eax, [esp + 0x2c]
push eax
push 0x7d8954
call fcn.00467c00
mov edx, dword [esp + 0x38]
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax + ebx*4]
mov dword [ecx + edx*4], eax
mov edx, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
inc edx
mov dword [esp + 0x2c], edx
inc ebx
cmp ebx, dword [edi + 0x18]
jl 0x5d19b0
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [0x884adc]
call ebp
push 0x18
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esp + 0x2c]
movss xmm0, dword [esp + 0x40]
mov dword [edi + 0xd8], eax
mov dword [eax + 0x10], ecx
mov eax, dword [edi + 0xd8]
movss dword [eax + 0x14], xmm0
push dword [0x884adc]
call ebp
push 0x18
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 4]
test eax, eax
je 0x5d1a99
push 0
mov ecx, eax
call fcn.00462be0
mov ecx, eax
jmp 0x5d1a9b
xor ecx, ecx
mov eax, dword [edi + 0xd8]
mov dword [eax + 0xc], ecx
mov eax, dword [edi + 0xd8]
cmp dword [eax + 0x10], 0
je 0x5d1e2c
push dword [0x884adc]
mov esi, dword [esp + 0x30]
call ebp
mov ecx, dword [eax + 0x2c]
lea eax, [esi + esi*4]
shl eax, 3
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [edi + 0xd8]
xor ebx, ebx
mov dword [ecx], eax
mov ebp, dword [esp + 0x2c]
test ebp, ebp
jle 0x5d1b27
xor esi, esi
mov eax, dword [edi + 0xd8]
mov ecx, dword [eax]
add ecx, esi
je 0x5d1b09
mov eax, dword [esp + 0x28]
push 0
push dword [edi + 0xd0]
push dword [edi + 0xd4]
push dword [eax + ebx*4]
call fcn.005c6060
mov eax, dword [edi + 0xd8]
inc ebx
mov ecx, dword [eax]
mov eax, dword [edi + 0xe0]
mov dword [ecx + esi + 0x10], eax
add esi, 0x28
mov ebp, dword [esp + 0x2c]
cmp ebx, ebp
jl 0x5d1ae3
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x2c]
lea eax, [ebp*8]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [edi + 0xd8]
xor ebx, ebx
mov dword [ecx + 4], eax
mov esi, dword [esp + 0x2c]
test esi, esi
jle 0x5d1c0b
nop word [eax + eax]
mov eax, dword [esp + 0x28]
mov esi, dword [eax + ebx*4]
movzx ecx, word [esi + 0x14]
mov eax, dword [esi + 0x2c]
cmp cx, 0xffff
jne 0x5d1b7c
mov eax, dword [eax + 0x14]
mov eax, dword [eax + 0x1c]
jmp 0x5d1b88
mov eax, dword [eax + 0x24]
movsx ecx, cx
mov eax, dword [eax + 0x5c]
mov eax, dword [eax + ecx*4]
mov ecx, dword [esi + 0x1c]
mov dword [esp + 0x40], eax
test ecx, ecx
je 0x5d1bba
call fcn.005cca00
test eax, eax
je 0x5d1bba
mov ecx, dword [esi + 0x1c]
test ecx, ecx
jne 0x5d1bad
xor eax, eax
mov eax, dword [eax + 0x2c]
mov ebp, dword [eax + 0x1c]
jmp 0x5d1bbc
call fcn.005cca00
mov eax, dword [eax + 0x2c]
mov ebp, dword [eax + 0x1c]
jmp 0x5d1bbc
xor ebp, ebp
mov ecx, dword [esi + 0x30]
call fcn.005984c0
mov ecx, dword [edi + 0xd8]
mov dword [esp + 0x18], eax
mov ecx, dword [ecx + 4]
lea ecx, [ecx + ebx*8]
test ecx, ecx
je 0x5d1bfe
mov edx, dword [esi + 0x2c]
mov edx, dword [edx + 0x24]
movsx eax, word [edx + 0x82]
push eax
movsx eax, word [edx + 0x80]
push 0x15
push eax
push dword [esp + 0x24]
push ebp
push dword [esp + 0x54]
call fcn.005dcf70
mov esi, dword [esp + 0x2c]
inc ebx
cmp ebx, esi
jl 0x5d1b60
push dword [0x884adc]
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call ebp
mov ecx, dword [eax + 0x2c]
lea eax, [esi + esi*4]
shl eax, 4
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [edi + 0xd8]
xor ebx, ebx
mov dword [esp + 0x10], ebx
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x2c]
test eax, eax
jle 0x5d1e30
xor ecx, ecx
xor ebp, ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ebp
nop
mov edx, dword [edi + 0xd8]
mov esi, dword [edx + 8]
add esi, ecx
je 0x5d1df7
mov eax, dword [esp + 0x28]
mov eax, dword [eax + ebx*4]
mov eax, dword [eax + 0x30]
mov dword [esp + 0x40], eax
mov eax, dword [edx + 4]
lea eax, [eax + ebx*8]
mov dword [esp + 0x24], eax
mov eax, dword [edx]
mov dword [esi], 0
add eax, ebp
mov dword [esi + 4], 0
mov dword [esi + 8], connect
mov dword [esi + 0x10], 0xa
push dword [0x884adc]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 8], 0x80
mov ecx, dword [eax + 0xc]
lea edx, [ecx + 0x80]
jl 0x5d1cc4
cmp edx, dword [eax + 0x10]
ja 0x5d1cc4
mov dword [eax + 0xc], edx
jmp 0x5d1cd2
push 0x80
mov ecx, eax
call fcn.0046a3c0
mov ecx, eax
mov eax, dword [esp + 0x40]
lea ebx, [esi + 0x14]
mov dword [esi], ecx
mov dword [esi + 8], reloc.WSOCK32.dll_inet_addr
mov dword [esi + 0xc], ecx
mov eax, dword [eax + 0x58]
mov ebp, dword [eax + 4]
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], connect
mov dword [ebx + 0x10], ebp
test ebp, ebp
je 0x5d1d4e
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea edx, [ebp*4 + 0x7f]
and edx, 0xffffff80
mov ecx, dword [eax + 0xc]
lea ebx, [ecx + edx]
mov dword [esp + 0x1c], ebx
lea ebx, [esi + 0x14]
cmp edx, dword [eax + 8]
jg 0x5d1d42
lea ebx, [ecx + edx]
cmp ebx, dword [eax + 0x10]
lea ebx, [esi + 0x14]
ja 0x5d1d42
mov edx, dword [esp + 0x1c]
mov dword [eax + 0xc], edx
jmp 0x5d1d50
push edx
mov ecx, eax
call fcn.0046a3c0
mov ecx, eax
jmp 0x5d1d50
xor ecx, ecx
mov eax, dword [esp + 0x40]
or ebp, 0x80000000
mov dword [ebx], ecx
mov dword [ebx + 0xc], ecx
mov ecx, dword [esp + 0x20]
mov dword [ebx + 8], ebp
mov ebp, dword [esi + 0x24]
mov dword [esi + 0x2c], ecx
mov ecx, dword [esp + 0x24]
mov dword [esi + 0x30], ecx
or ecx, 0xffffffff
mov word [esi + 0x48], cx
mov dword [esi + 0x28], eax
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0
mov word [esi + 0x4a], 0x101
mov ecx, dword [ebx + 8]
and ecx, 0x3fffffff
cmp ecx, ebp
jge 0x5d1dd1
add ecx, ecx
mov eax, ebp
cmp ebp, ecx
push 4
cmovl eax, ecx
push eax
push ebx
push 0x7d8954
call fcn.00467b80
mov eax, dword [esp + 0x50]
add esp, 0x10
mov dword [ebx + 4], ebp
mov eax, dword [eax + 0x58]
mov eax, dword [eax + 4]
shl eax, 2
push eax
push 0
push dword [esi + 0x20]
call fcn.0045d830
mov ecx, dword [esp + 0x24]
add esp, 0xc
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov eax, dword [edi + 0xd8]
inc ebx
add ebp, 0x28
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebp
mov eax, dword [eax + 8]
mov byte [eax + ecx + 0x4a], 0
add ecx, 0x50
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x18], ecx
cmp ebx, eax
jl 0x5d1c50
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
jmp 0x5d1e30
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x34]
xor ecx, ecx
cmp edi, dword [esp + 0x28]
push dword [0x884adc]
cmove eax, ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x3c]
lea esi, [eax*4 + 0x7f]
and esi, 0xffffff80
call ebp
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x5d1e74
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x5d1e74
cmp dword [eax + 0x14], edi
je 0x5d1e74
mov dword [eax + 0xc], edi
jmp 0x5d1e7d
push edx
push edi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x30]
mov dword [esp + 0x2c], 0
pop edi
pop esi
pop ebp
pop ebx
test eax, eax
js 0x5d1eab
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x1c]
call dword [eax + 0x10]
add esp, 0x2c
ret 4