Function at 0x6b476320
Capabilities:
Get socket status

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x330
mov ebx, dword [esp + 0x350]
mov edx, dword [esp + 0x34c]
mov ecx, dword [esp + 0x344]
test ecx, ecx
je 0x6b47635b
mov edi, dword [esp + 0x348]
test edi, edi
je 0x6b47635b
xor eax, eax
cmp dword [ecx + eax*8], 0xffffffff
jne 0x6b476389
inc eax
cmp edi, eax
jne 0x6b476350
xor esi, esi
mov eax, edx
or eax, ebx
je 0x6b476797
test ebx, ebx
js 0x6b476676
cmp edx, 0xfffffffe
sbb ebx, 0
mov eax, 0xfffffffe
cmovl eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x6b476797
mov dword [esp + 0x128], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x22c], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0
xor ebp, ebp
mov dword [esp + 4], 0
xor edx, edx
xor eax, eax
jmp 0x6b4763e4
mov ecx, ebp
inc eax
cmp eax, edi
mov ebp, ecx
mov ecx, dword [esp + 0x344]
je 0x6b4765e8
mov word [ecx + eax*8 + 6], 0
mov esi, dword [ecx + eax*8]
cmp esi, 0xffffffff
je 0x6b4763d0
movzx ebx, word [ecx + eax*8 + 4]
test bl, 7
je 0x6b4763d0
test bl, 1
jne 0x6b47640a
mov dword [esp], edx
jmp 0x6b47649b
mov dword [esp + 0x18], ebx
xor edi, edi
test edx, edx
je 0x6b47645b
mov ecx, dword [esp + 4]
cmp ecx, 1
mov ebx, 1
cmova ebx, ecx
cmp dword [esp + 0x12c], esi
mov dword [esp], ecx
je 0x6b476471
mov dword [esp + 0x14], ebx
lea edx, [ebx - 1]
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
cmp edx, ecx
je 0x6b476466
lea edi, [ecx + 1]
cmp dword [esp + ecx*4 + 0x130], esi
mov ecx, edi
jne 0x6b476440
mov edx, dword [esp + 4]
mov dword [esp], edx
jmp 0x6b476471
mov dword [esp], 0
xor edx, edx
jmp 0x6b476471
mov edx, dword [esp + 4]
mov dword [esp], edx
mov edi, dword [esp + 0x14]
cmp edi, edx
mov ebx, dword [esp + 0x18]
jne 0x6b47649b
cmp edx, 0x3f
ja 0x6b47649b
mov dword [esp + edi*4 + 0x12c], esi
mov ecx, dword [esp + 0x128]
inc ecx
mov dword [esp + 0x128], ecx
mov dword [esp + 4], ecx
mov dword [esp], ecx
test bl, 4
jne 0x6b4764af
mov ecx, ebp
mov edi, dword [esp + 0x348]
mov ebp, dword [esp + 0x10]
jmp 0x6b476518
xor edx, edx
test ebp, ebp
je 0x6b4764ef
mov ecx, dword [esp + 8]
cmp ecx, 1
mov edi, 1
cmova edi, ecx
cmp dword [esp + 0x28], esi
je 0x6b4764f3
lea ecx, [edi - 1]
xor ebp, ebp
nop
cmp ecx, ebp
je 0x6b4765aa
lea edx, [ebp + 1]
cmp dword [esp + ebp*4 + 0x2c], esi
mov ebp, edx
jne 0x6b4764d0
mov ebp, dword [esp + 8]
mov ecx, ebp
cmp edx, ebp
je 0x6b4764f7
jmp 0x6b4764a2
xor ecx, ecx
xor ebp, ebp
cmp edx, ebp
jne 0x6b4764a2
cmp ebp, 0x3f
mov edi, dword [esp + 0x348]
mov ebp, dword [esp + 0x10]
ja 0x6b476518
mov dword [esp + edx*4 + 0x28], esi
mov ecx, dword [esp + 0x24]
inc ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 8], ecx
test bl, 2
je 0x6b4765e0
xor edx, edx
test ebp, ebp
je 0x6b476570
mov ebx, dword [esp + 0xc]
cmp ebx, 1
mov edi, 1
cmova edi, ebx
cmp dword [esp + 0x230], esi
je 0x6b476574
lea ebx, [edi - 1]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ebx, ebp
je 0x6b4765bf
lea edx, [ebp + 1]
cmp dword [esp + ebp*4 + 0x234], esi
mov ebp, edx
jne 0x6b476550
mov edi, dword [esp + 0xc]
mov ebx, edi
mov ebp, edi
cmp edx, ebp
je 0x6b476578
jmp 0x6b4765cb
xor ebx, ebx
xor ebp, ebp
cmp edx, ebp
jne 0x6b4765cb
cmp ebp, 0x3f
mov edi, dword [esp + 0x348]
ja 0x6b4765a4
mov dword [esp + edx*4 + 0x230], esi
mov edx, dword [esp + 0x22c]
inc edx
mov dword [esp + 0x22c], edx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], edx
jmp 0x6b4765e0
mov dword [esp + 0x10], ebx
jmp 0x6b4765e0
mov ebp, dword [esp + 8]
mov ecx, ebp
mov edx, edi
cmp edx, ebp
je 0x6b4764f7
jmp 0x6b4764a2
mov ebp, dword [esp + 0xc]
mov ebx, ebp
mov edx, edi
cmp edx, ebp
je 0x6b476578
mov dword [esp + 0x10], ebx
mov edi, dword [esp + 0x348]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp]
jmp 0x6b4763d2
mov eax, dword [esp + 8]
or eax, dword [esp + 4]
or eax, dword [esp + 0xc]
je 0x6b476645
mov ebx, dword [esp + 0x350]
test ebx, ebx
js 0x6b47668b
mov esi, dword [esp + 0x34c]
mov eax, esi
or eax, ebx
je 0x6b47668f
push 0
push 0x3e8
push ebx
push esi
call fcn.6b715060
add esp, 0x10
imul ecx, eax, 0x3e8
sub esi, ecx
cmp ebx, 0x1f3
mov ecx, 0x7fffffff
cmovle ecx, eax
mov dword [esp + 0x1c], ecx
imul eax, esi, 0x3e8
jmp 0x6b476699
xor esi, esi
mov ecx, dword [esp + 0x34c]
mov eax, ecx
mov edx, dword [esp + 0x350]
or eax, edx
je 0x6b476797
test edx, edx
js 0x6b476676
cmp ecx, 0xfffffffe
sbb edx, 0
mov eax, 0xfffffffe
cmovl eax, ecx
jmp 0x6b47637d
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov esi, 0xffffffff
jmp 0x6b476797
xor eax, eax
jmp 0x6b4766a1
mov dword [esp + 0x1c], 0
xor eax, eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1c]
mov esi, dword [esp + 4]
test esi, esi
lea ecx, [esp + 0x128]
cmovne esi, ecx
mov edx, dword [esp + 8]
test edx, edx
lea ecx, [esp + 0x24]
cmovne edx, ecx
mov ecx, dword [esp + 0xc]
test ecx, ecx
lea ebx, [esp + 0x22c]
cmovne ecx, ebx
push eax
push ecx
push edx
push esi
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x6b476795
xor esi, esi
xor ebp, ebp
mov ecx, dword [esp + 0x344]
jmp 0x6b476709
cmp word [ecx + edi*2 + 6], 1
sbb esi, 0xffffffff
mov edi, dword [esp + 0x348]
inc ebp
cmp ebp, edi
jae 0x6b476797
mov word [ecx + ebp*8 + 6], 0
mov eax, dword [ecx + ebp*8]
cmp eax, 0xffffffff
je 0x6b476700
lea edi, [ebp*4]
lea ecx, [esp + 0x128]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
mov ecx, dword [esp + 0x344]
test eax, eax
je 0x6b476744
test byte [ecx + ebp*8 + 4], 1
je 0x6b476744
or byte [ecx + edi*2 + 6], 1
lea eax, [esp + 0x24]
push eax
push dword [ecx + edi*2]
call sub.WS2_32.dll___WSAFDIsSet
mov ecx, dword [esp + 0x344]
test eax, eax
je 0x6b476768
test byte [ecx + ebp*8 + 4], 4
je 0x6b476768
or byte [ecx + edi*2 + 6], 4
push ebx
push dword [ecx + edi*2]
call sub.WS2_32.dll___WSAFDIsSet
mov ecx, dword [esp + 0x344]
test eax, eax
je 0x6b4766f0
test byte [ecx + ebp*8 + 4], 2
je 0x6b4766f0
or byte [ecx + edi*2 + 6], 2
jmp 0x6b4766f0
mov esi, eax
mov eax, esi
add esp, 0x330
pop esi
pop edi
pop ebx
pop ebp
ret