Function at 0x10077cb0
Capabilities:
Get socket status
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x228
mov dword [ebp - 0x230], edx
mov dword [ebp - 0x22c], ecx
mov edi, dword [ebp + 8]
mov eax, dword [0x101db014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push dword [0x101de1f0]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov dword [ebp - 0x234], eax
test eax, eax
je 0x10077e23
cmp edi, 0xffffffff
je 0x10077e44
test edi, edi
je 0x1007801a
xor eax, eax
lea ecx, [ebp - 0x114]
mov dword [ecx], eax
mov dword [ebp - 0x218], eax
xor esi, esi
dec esi
mov ebx, 0x10624dd3
cmp dword [0x101de200], 0
je 0x10077fa4
mov eax, edi
mul ebx
mov ebx, edx
shr ebx, 6
mov dword [ebp - 0x220], ebx
cmp edi, 0x1770
jae 0x10077f93
cmp dword [0x101de200], 0
je 0x10077fce
imul eax, ebx, 0xfffffc18
add eax, edi
push eax
call sym.nss3.dll_PR_IntervalToMicroseconds
add esp, 4
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp - 0x114]
cmp eax, 0x3f
ja 0x10077d85
lea ecx, [eax + 1]
mov dword [ebp - 0x114], ecx
mov ecx, dword [ebp - 0x22c]
mov dword [ebp + eax*4 - 0x110], ecx
mov eax, dword [ebp - 0x218]
cmp eax, 0x3f
ja 0x10077da6
lea ecx, [eax + 1]
mov dword [ebp - 0x218], ecx
mov ecx, dword [ebp - 0x22c]
mov dword [ebp + eax*4 - 0x214], ecx
cmp dword [ebp - 0x230], 1
jne 0x10077fae
lea eax, [ebp - 0x220]
push eax
xor eax, eax
push eax
push eax
lea ecx, [ebp - 0x114]
push ecx
push eax
call sub.wsock32.dll_select
mov esi, eax
cmp esi, 0xffffffff
je 0x10077f65
cmp dword [ebp - 0x230], 3
jne 0x10077de7
test esi, esi
jg 0x1007805c
mov eax, dword [ebp - 0x234]
mov eax, dword [eax + 0xe0]
mov ecx, eax
and ecx, 0x1002
cmp ecx, 2
je 0x10077f78
test esi, esi
je 0x10077fd8
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1014dc80
mov eax, esi
add esp, 0x228
pop esi
pop edi
pop ebx
pop ebp
ret
sub esp, 0x10
movaps xmm0, xmmword [0x1019c190]
movups xmmword [esp], xmm0
call fcn.10072140
add esp, 0x10
mov dword [ebp - 0x234], eax
jmp 0x10077cef
lea eax, [ebp - 0x220]
mov dword [eax], 5
xor ebx, ebx
mov dword [eax + 4], ebx
lea edi, [ebp - 0x114]
mov dword [edi], ebx
lea eax, [ebp - 0x218]
mov dword [eax], ebx
xor esi, esi
dec esi
xor eax, eax
cmp eax, 0x3f
ja 0x10077e85
lea ecx, [eax + 1]
mov dword [ebp - 0x114], ecx
mov ecx, dword [ebp - 0x22c]
mov dword [ebp + eax*4 - 0x110], ecx
mov eax, dword [ebp - 0x218]
cmp eax, 0x3f
ja 0x10077ea6
lea ecx, [eax + 1]
mov dword [ebp - 0x218], ecx
mov ecx, dword [ebp - 0x22c]
mov dword [ebp + eax*4 - 0x214], ecx
cmp dword [ebp - 0x230], 3
je 0x10077ed7
cmp dword [ebp - 0x230], 2
je 0x10077ecd
cmp dword [ebp - 0x230], 1
jne 0x10077eef
lea eax, [ebp - 0x220]
push eax
push ebx
push ebx
push edi
jmp 0x10077ee7
lea eax, [ebp - 0x220]
push eax
push ebx
jmp 0x10077ee5
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x218]
push eax
push edi
push ebx
push ebx
call sub.wsock32.dll_select
mov esi, eax
cmp esi, 0xffffffff
je 0x10077f65
cmp dword [ebp - 0x230], 3
jne 0x10077f37
test esi, esi
jle 0x10077f37
push 0
call dword [sym.imp.kernel32.dll_Sleep]
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x22c]
call sub.wsock32.dll___WSAFDIsSet
test eax, eax
jne 0x1007809c
push edi
push dword [ebp - 0x22c]
call sub.wsock32.dll___WSAFDIsSet
test eax, eax
jne 0x10078094
mov eax, dword [ebp - 0x234]
mov eax, dword [eax + 0xe0]
mov ecx, eax
and ecx, 0x1002
cmp ecx, 2
je 0x10077f78
test esi, esi
jne 0x10077e0c
xor esi, esi
mov eax, dword [ebp - 0x114]
jmp 0x10077e6a
call sub.wsock32.dll_WSAGetLastError
push eax
call fcn.10189f70
add esp, 4
jmp 0x10078029
and eax, 0xfffffffd
mov ecx, dword [ebp - 0x234]
mov dword [ecx + 0xe0], eax
push 0
push 0xffffe897
jmp 0x10078021
mov dword [ebp - 0x220], 5
xor eax, eax
jmp 0x10077d5e
call fcn.100745f0
jmp 0x10077d25
cmp dword [ebp - 0x230], 2
jne 0x10078031
xor eax, eax
lea ecx, [ebp - 0x220]
push ecx
push eax
lea ecx, [ebp - 0x114]
push ecx
push eax
jmp 0x10077dc5
call fcn.100745f0
jmp 0x10077d4d
mov eax, edi
cmp edi, 0x1770
jb 0x1007800b
mov esi, dword [ebp - 0x220]
cmp dword [0x101de200], 0
je 0x100780fb
imul esi, esi, 0x3e8
push dword [ebp - 0x21c]
call sym.nss3.dll_PR_MicrosecondsToInterval
add esp, 4
add eax, esi
xor esi, esi
sub edi, eax
mov ebx, 0x10624dd3
ja 0x10077d18
push 0
push 0xffffe89a
call sym.nss3.dll_PR_SetError
add esp, 8
xor esi, esi
dec esi
jmp 0x10077e0c
cmp dword [ebp - 0x230], 3
jne 0x10077dcd
lea eax, [ebp - 0x218]
xor ecx, ecx
lea edx, [ebp - 0x220]
push edx
push eax
lea eax, [ebp - 0x114]
push eax
push ecx
push ecx
jmp 0x10077dc6
push 0
call dword [sym.imp.kernel32.dll_Sleep]
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x22c]
call sub.wsock32.dll___WSAFDIsSet
test eax, eax
jne 0x1007809c
lea eax, [ebp - 0x114]
push eax
push dword [ebp - 0x22c]
call sub.wsock32.dll___WSAFDIsSet
test eax, eax
je 0x10077de7
xor esi, esi
inc esi
jmp 0x10077e0c
lea eax, [ebp - 0x228]
mov dword [eax], 4
lea ecx, [ebp - 0x224]
push eax
push ecx
push 0x1007
push 0xffff
push dword [ebp - 0x22c]
call sub.wsock32.dll_getsockopt
cmp eax, 0xffffffff
je 0x100780df
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x100780ef
push eax
call fcn.1007c500
jmp 0x10077f70
call sub.wsock32.dll_WSAGetLastError
push eax
call fcn.10189fa0
jmp 0x10077f70
push 0
push 0xffffe896
jmp 0x10078021
call fcn.100745f0
jmp 0x10077ff5