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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x303c
call fcn.10157400
mov eax, dword [0x101ef014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push dword [0x101f25a4]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1012942d
mov ecx, dword [eax + 0xe0]
mov edx, ecx
and edx, 0x1002
cmp edx, 2
je 0x1012947a
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x1012948c
mov edi, dword [ebp + 8]
xor edx, edx
mov dword [ebp - 0x1014], edx
mov dword [ebp - 0x2018], edx
mov dword [ebp - 0x301c], edx
lea eax, [edi + ecx*8]
mov dword [ebp - 0x3044], eax
mov dword [ebp - 0x3040], 0
mov ebx, 0
test ecx, ecx
mov dword [ebp - 0x3038], edi
jle 0x101290ad
xor esi, esi
mov dword [ebp - 0x303c], 0
mov dword [ebp - 0x3040], 0
xor ebx, ebx
mov dword [ebp - 0x3034], ebx
mov dword [ebp - 0x3030], esi
xor eax, eax
mov word [ebp - 0x3024], ax
mov word [ebp - 0x3028], ax
mov esi, dword [edi]
test esi, esi
je 0x10129448
movzx ebx, word [edi + 4]
test bx, bx
je 0x10129448
test bl, 1
je 0x10129266
mov eax, dword [esi]
mov ecx, dword [eax + 0x54]
and ebx, 0xfffd
call dword [section..00cfg]
movsx eax, bx
lea edx, [ebp - 0x3024]
push edx
push eax
push esi
call ecx
add esp, 0xc
mov esi, eax
movzx ebx, word [edi + 4]
test bl, 2
jne 0x10129033
xor eax, eax
movzx ecx, word [ebp - 0x3024]
test cx, si
jne 0x101292d9
test word [ebp - 0x3028], ax
jne 0x101292d9
mov word [edi + 6], 0
mov ecx, dword [edi]
test ecx, ecx
je 0x1012931f
movzx ebx, si
movzx eax, ax
mov edx, ecx
cmp dword [edx + 0x14], 0
je 0x10128f8b
mov edx, dword [edx + 8]
test edx, edx
jne 0x10128f79
jmp 0x1012930e
mov ecx, dword [edx + 4]
cmp dword [ecx], 0xaaaaaaaa
jne 0x1012931f
mov esi, dword [ebp - 0x3030]
test esi, esi
jne 0x10129303
mov ecx, dword [ecx + 0x18]
test bl, 1
je 0x1012925f
mov word [edi + 6], 1
mov edx, dword [ebp - 0x1014]
cmp edx, 0x3ff
ja 0x10128fd8
lea esi, [edx + 1]
mov dword [ebp - 0x1014], esi
mov dword [ebp + edx*4 - 0x1010], ecx
inc dword [ebp - 0x303c]
xor edx, edx
inc edx
test bl, 2
jne 0x101292a6
test al, 1
mov ebx, dword [ebp - 0x3034]
jne 0x1012926d
test al, 2
jne 0x10129067
xor esi, esi
test byte [edi + 4], 4
je 0x10129022
mov eax, dword [ebp - 0x301c]
cmp eax, 0x3ff
ja 0x10129021
lea edx, [eax + 1]
mov dword [ebp - 0x301c], edx
mov dword [ebp + eax*4 - 0x3018], ecx
inc ebx
add edi, 8
cmp edi, dword [ebp - 0x3044]
jb 0x10128ed5
jmp 0x10129099
mov eax, dword [edi]
mov dword [ebp - 0x3048], eax
mov eax, dword [eax]
mov ecx, dword [eax + 0x54]
and ebx, 0xfffe
call dword [section..00cfg]
movsx eax, bx
lea edx, [ebp - 0x3028]
push edx
push eax
push dword [ebp - 0x3048]
call ecx
add esp, 0xc
jmp 0x10128f44
movzx eax, dx
or eax, 8
mov word [edi + 6], ax
mov eax, dword [ebp - 0x2018]
cmp eax, 0x3ff
ja 0x1012908e
lea edx, [eax + 1]
mov dword [ebp - 0x2018], edx
mov dword [ebp + eax*4 - 0x2014], ecx
inc dword [ebp - 0x3040]
jmp 0x10128ffc
mov dword [ebp - 0x3030], esi
test esi, esi
mov edx, dword [ebp - 0x303c]
jne 0x101294a1
cmp edx, 0x400
mov edi, dword [ebp - 0x3040]
jg 0x10129460
cmp edi, 0x400
jg 0x10129460
cmp ebx, 0x401
jge 0x10129460
mov eax, edx
test edi, edi
lea esi, [ebp - 0x2018]
cmove esi, edi
test ebx, ebx
lea edx, [ebp - 0x301c]
mov ecx, ebx
mov ebx, edx
mov edx, ecx
cmove ebx, ecx
lea ecx, [ebp - 0x1014]
test eax, eax
cmovne eax, ecx
mov dword [ebp - 0x303c], eax
mov ecx, dword [ebp + 0x10]
jne 0x10129117
test edi, edi
jne 0x10129117
test edx, edx
je 0x101294bc
xor edi, edi
cmp ecx, 0xffffffff
jne 0x10129208
push edi
push ebx
push esi
push dword [ebp - 0x303c]
push 0
call sub.wsock32.dll_select
test eax, eax
jle 0x1012934f
cmp dword [ebp + 0xc], 0
mov esi, dword [ebp + 8]
jle 0x10129497
mov dword [ebp - 0x3030], 0
mov eax, dword [esi]
test eax, eax
je 0x10129459
cmp word [esi + 4], 0
je 0x10129459
mov ecx, eax
cmp dword [ecx + 0x14], 0
je 0x1012918b
mov ecx, dword [ecx + 8]
test ecx, ecx
jne 0x10129168
jmp 0x10129183
mov eax, dword [eax + 0xc]
cmp dword [eax + 0x14], 0
jne 0x10129180
jmp 0x1012918d
mov eax, ecx
mov eax, dword [eax + 4]
mov ebx, dword [eax + 0x18]
lea eax, [ebp - 0x1014]
push eax
push ebx
call sub.wsock32.dll___WSAFDIsSet
test eax, eax
jne 0x101291f6
xor edi, edi
lea eax, [ebp - 0x2018]
push eax
push ebx
call sub.wsock32.dll___WSAFDIsSet
test eax, eax
jne 0x10129242
lea eax, [ebp - 0x301c]
push eax
push ebx
call sub.wsock32.dll___WSAFDIsSet
movzx ecx, di
lea edx, [ecx + 4]
test eax, eax
cmovne ecx, edx
mov word [esi + 6], cx
cmp cx, 1
sbb dword [ebp - 0x3030], 0xffffffff
add esi, 8
cmp esi, dword [ebp - 0x3044]
jb 0x10129151
jmp 0x101294a1
movzx edi, word [esi + 6]
mov eax, edi
and eax, 1
shr edi, 1
and edi, 2
or edi, eax
jmp 0x101291a6
cmp dword [0x101f2f50], 0
je 0x101294bf
mov edx, 0x10624dd3
mov eax, ecx
mul edx
shr edx, 6
lea edi, [ebp - 0x3024]
mov dword [edi], edx
imul eax, edx, 0x3e8
sub ecx, eax
push ecx
call sym.nss3.dll_PR_IntervalToMicroseconds
add esp, 4
mov dword [edi + 4], eax
jmp 0x10129122
movzx eax, word [esi + 6]
mov ecx, eax
shr ecx, 1
and ecx, 1
shr eax, 2
and eax, 2
or eax, ecx
movzx edi, di
or edi, eax
jmp 0x101291bb
xor edx, edx
jmp 0x10128fe1
xor esi, esi
jmp 0x10128f39
movzx edx, dx
or edx, 4
mov word [edi + 6], dx
mov esi, dword [ebp - 0x1014]
cmp esi, 0x3ff
ja 0x10129295
lea ebx, [esi + 1]
mov dword [ebp - 0x1014], ebx
mov dword [ebp + esi*4 - 0x1010], ecx
inc dword [ebp - 0x303c]
mov ebx, dword [ebp - 0x3034]
jmp 0x10128ff8
movzx edx, dx
or edx, 2
mov word [edi + 6], dx
mov esi, dword [ebp - 0x2018]
cmp esi, 0x3ff
ja 0x101292ce
lea ebx, [esi + 1]
mov dword [ebp - 0x2018], ebx
mov dword [ebp + esi*4 - 0x2014], ecx
inc dword [ebp - 0x3040]
jmp 0x10128fea
mov esi, dword [ebp - 0x3030]
test esi, esi
mov eax, dword [ebp + 8]
jne 0x101292f7
cmp edi, eax
jbe 0x101292f7
mov word [eax + 6], 0
add eax, 8
cmp eax, edi
jb 0x101292ea
inc esi
or cx, word [ebp - 0x3028]
mov word [edi + 6], cx
mov ebx, dword [ebp - 0x3034]
jmp 0x10129022
cmp dword [ecx + 0x14], 0
je 0x101294cc
mov ecx, dword [ecx + 0xc]
test ecx, ecx
jne 0x1012930e
mov esi, dword [ebp - 0x3030]
test esi, esi
mov eax, dword [ebp + 8]
mov ebx, dword [ebp - 0x3034]
jne 0x10129343
cmp edi, eax
jbe 0x10129343
mov word [eax + 6], 0
add eax, 8
cmp eax, edi
jb 0x10129336
inc esi
mov word [edi + 6], 0x10
jmp 0x10129022
mov dword [ebp - 0x3030], eax
cmp eax, 0xffffffff
jne 0x101294a1
call sub.wsock32.dll_WSAGetLastError
cmp eax, 0x2736
jne 0x101294d3
mov dword [ebp - 0x302c], 4
cmp dword [ebp + 0xc], 0
jle 0x10129497
mov dword [ebp - 0x3030], 0
lea edi, [ebp - 0x302c]
lea ebx, [ebp - 0x3028]
mov eax, dword [ebp - 0x3038]
mov word [eax + 6], 0
mov eax, dword [eax]
test eax, eax
je 0x101293f1
mov ecx, dword [ebp - 0x3038]
cmp word [ecx + 4], 0
je 0x101293f1
mov ecx, eax
cmp dword [ecx + 0x14], 0
je 0x101293d3
mov ecx, dword [ecx + 8]
test ecx, ecx
jne 0x101293b9
jmp 0x101293cb
mov eax, dword [eax + 0xc]
cmp dword [eax + 0x14], 0
jne 0x101293c8
jmp 0x101293d5
mov eax, ecx
mov eax, dword [eax + 4]
push edi
push ebx
push 0x1008
push 0xffff
push dword [eax + 0x18]
call sub.wsock32.dll_getsockopt
cmp eax, 0xffffffff
je 0x1012940d
mov eax, dword [ebp - 0x3038]
add eax, 8
mov dword [ebp - 0x3038], eax
cmp eax, dword [ebp - 0x3044]
jb 0x10129398
jmp 0x101294a1
call sub.wsock32.dll_WSAGetLastError
cmp eax, 0x2736
jne 0x101293f1
mov eax, dword [ebp - 0x3038]
mov word [eax + 6], 0x10
inc dword [ebp - 0x3030]
jmp 0x101293f1
sub esp, 0x10
movaps xmm0, xmmword [0x101af1a0]
movups xmmword [esp], xmm0
call fcn.1006d800
add esp, 0x10
jmp 0x10128e5e
mov word [edi + 6], 0
mov esi, dword [ebp - 0x3030]
jmp 0x10129303
xor ecx, ecx
jmp 0x101291d3
push 0
push 0xffffe89d
call sym.nss3.dll_PR_SetError
add esp, 8
xor eax, eax
dec eax
mov dword [ebp - 0x3030], eax
jmp 0x101294a1
and ecx, 0xfffffffd
mov dword [eax + 0xe0], ecx
push 0
push 0xffffe897
jmp 0x10129467
push dword [ebp + 0x10]
call sym.nss3.dll_PR_Sleep
add esp, 4
mov dword [ebp - 0x3030], 0
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10156ff0
mov eax, dword [ebp - 0x3030]
add esp, 0x303c
pop esi
pop edi
pop ebx
pop ebp
ret
push ecx
jmp 0x1012948f
call fcn.100029e0
mov ecx, dword [ebp + 0x10]
jmp 0x10129215
mov edx, ecx
jmp 0x10128f8b
push eax
call fcn.101a57f0
add esp, 4
jmp 0x1012946f