Function at 0x100c9980
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 [0x101d2014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x234], eax
je 0x100c9af7
cmp edi, 0xffffffff
je 0x100c9b11
test edi, edi
je 0x100c9ce5
xor eax, eax
xor esi, esi
lea ecx, [ebp - 0x114]
lea edx, [ebp - 0x218]
mov ebx, 0x10624dd3
dec esi
mov dword [ecx], eax
mov dword [edx], eax
cmp dword [0x101d4d40], 0
je 0x100c9c73
mov eax, edi
mul ebx
mov ebx, edx
shr ebx, 6
cmp edi, 0x1770
mov dword [ebp - 0x220], ebx
jae 0x100c9c60
cmp dword [0x101d4d40], 0
je 0x100c9c9d
imul eax, ebx, 0xfffffc18
xor ebx, ebx
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 0x100c9a59
mov edx, dword [ebp - 0x22c]
lea ecx, [eax + 1]
mov dword [ebp - 0x114], ecx
mov dword [ebp + eax*4 - 0x110], edx
mov eax, dword [ebp - 0x218]
cmp eax, 0x3f
ja 0x100c9a7a
mov edx, dword [ebp - 0x22c]
lea ecx, [eax + 1]
mov dword [ebp - 0x218], ecx
mov dword [ebp + eax*4 - 0x214], edx
cmp dword [ebp - 0x230], 1
jne 0x100c9c7d
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 0x100c9c32
cmp dword [ebp - 0x230], 3
jne 0x100c9abb
test esi, esi
jg 0x100c9d25
mov eax, dword [ebp - 0x234]
mov eax, dword [eax + 0xe0]
mov ecx, eax
and ecx, 0x1002
cmp ecx, 2
je 0x100c9c45
test esi, esi
je 0x100c9ca7
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, esi
add esp, 0x228
pop esi
pop edi
pop ebx
pop ebp
ret
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x234], eax
jmp 0x100c99bf
lea eax, [ebp - 0x220]
xor ebx, ebx
xor esi, esi
lea edi, [ebp - 0x114]
mov dword [eax], 5
mov dword [eax + 4], ebx
lea eax, [ebp - 0x218]
mov dword [edi], ebx
dec esi
mov dword [eax], ebx
xor eax, eax
cmp eax, 0x3f
ja 0x100c9b52
mov edx, dword [ebp - 0x22c]
lea ecx, [eax + 1]
mov dword [ebp - 0x114], ecx
mov dword [ebp + eax*4 - 0x110], edx
mov eax, dword [ebp - 0x218]
cmp eax, 0x3f
ja 0x100c9b73
mov edx, dword [ebp - 0x22c]
lea ecx, [eax + 1]
mov dword [ebp - 0x218], ecx
mov dword [ebp + eax*4 - 0x214], edx
cmp dword [ebp - 0x230], 3
je 0x100c9ba4
cmp dword [ebp - 0x230], 2
je 0x100c9b9a
cmp dword [ebp - 0x230], 1
jne 0x100c9bbc
lea eax, [ebp - 0x220]
push eax
push ebx
push ebx
push edi
jmp 0x100c9bb4
lea eax, [ebp - 0x220]
push eax
push ebx
jmp 0x100c9bb2
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 0x100c9c32
cmp dword [ebp - 0x230], 3
jne 0x100c9c04
test esi, esi
jle 0x100c9c04
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 0x100c9d65
push edi
push dword [ebp - 0x22c]
call sub.wsock32.dll___WSAFDIsSet
test eax, eax
jne 0x100c9d5d
mov eax, dword [ebp - 0x234]
mov eax, dword [eax + 0xe0]
mov ecx, eax
and ecx, 0x1002
cmp ecx, 2
je 0x100c9c45
test esi, esi
jne 0x100c9ae0
mov eax, dword [ebp - 0x114]
xor esi, esi
jmp 0x100c9b37
call sub.wsock32.dll_WSAGetLastError
push eax
call fcn.100d6ae0
add esp, 4
jmp 0x100c9cf4
mov ecx, dword [ebp - 0x234]
and eax, 0xfffffffd
mov dword [ecx + 0xe0], eax
push 0
push 0xffffe897
jmp 0x100c9cec
mov dword [ebp - 0x220], 5
mov bl, 1
xor eax, eax
jmp 0x100c9a32
call fcn.100da0a0
jmp 0x100c99f7
cmp dword [ebp - 0x230], 2
jne 0x100c9cfc
lea eax, [ebp - 0x220]
push eax
xor eax, eax
push eax
lea ecx, [ebp - 0x114]
push ecx
push eax
jmp 0x100c9a99
call fcn.100da0a0
jmp 0x100c9a1f
test bl, bl
mov eax, edi
je 0x100c9cd6
mov esi, dword [ebp - 0x220]
cmp dword [0x101d4d40], 0
je 0x100c9dc4
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 0x100c99ea
push 0
push 0xffffe89a
call sym.nss3.dll_PR_SetError
add esp, 8
xor esi, esi
dec esi
jmp 0x100c9ae0
cmp dword [ebp - 0x230], 3
jne 0x100c9aa1
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x114]
push eax
xor eax, eax
jmp 0x100c9c97
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 0x100c9d65
lea eax, [ebp - 0x114]
push eax
push dword [ebp - 0x22c]
call sub.wsock32.dll___WSAFDIsSet
test eax, eax
je 0x100c9abb
xor esi, esi
inc esi
jmp 0x100c9ae0
lea eax, [ebp - 0x228]
lea ecx, [ebp - 0x224]
mov dword [eax], 4
push eax
push ecx
push 0x1007
push 0xffff
push dword [ebp - 0x22c]
call sub.wsock32.dll_getsockopt
cmp eax, 0xffffffff
je 0x100c9da8
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x100c9db8
push eax
call fcn.100d6a00
jmp 0x100c9c3d
call sub.wsock32.dll_WSAGetLastError
push eax
call fcn.100d4df0
jmp 0x100c9c3d
push 0
push 0xffffe896
jmp 0x100c9cec
call fcn.100da0a0
jmp 0x100c9cc0