Function at 0x406b00
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38c
push ebx
push esi
push edi
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x320], 0
mov dword [ebp - 0x328], 0
cmp dword [ebp + 8], 0xffffffff
jne 0x406b59
cmp dword [ebp + 0xc], 0xffffffff
jne 0x406b59
cmp dword [ebp + 0x10], 0xffffffff
jne 0x406b59
mov eax, dword [ebp + 0x14]
push eax
call fcn.00406aa0
add esp, 4
mov dword [ebp - 0x330], eax
mov eax, dword [ebp - 0x330]
jmp 0x40711d
cmp dword [ebp + 0x14], 0
jle 0x406b79
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x328], ecx
call fcn.00419aa0
mov dword [ebp - 0x324], eax
mov dword [ebp - 0x320], edx
mov dword [ebp - 0x318], 0
mov dword [ebp - 0x31c], 0xffffffff
mov dword [ebp - 0x110], 0
cmp dword [ebp + 8], 0xffffffff
je 0x406ca6
xor edx, edx
test edx, edx
jne 0x406ba1
mov dword [ebp - 0x338], 0
jmp 0x406bc2
mov eax, dword [ebp - 0x338]
add eax, 1
mov dword [ebp - 0x338], eax
mov ecx, dword [ebp - 0x338]
cmp ecx, dword [ebp - 0x110]
jae 0x406be6
mov edx, dword [ebp - 0x338]
mov eax, dword [ebp + edx*4 - 0x10c]
cmp eax, dword [ebp + 8]
jne 0x406be4
jmp 0x406be6
jmp 0x406bb3
mov ecx, dword [ebp - 0x338]
cmp ecx, dword [ebp - 0x110]
jne 0x406c1c
cmp dword [ebp - 0x110], 0x40
jae 0x406c1c
mov edx, dword [ebp - 0x338]
mov eax, dword [ebp + 8]
mov dword [ebp + edx*4 - 0x10c], eax
mov ecx, dword [ebp - 0x110]
add ecx, 1
mov dword [ebp - 0x110], ecx
xor edx, edx
test edx, edx
jne 0x406ba7
mov dword [ebp - 0x33c], 0
jmp 0x406c3d
mov eax, dword [ebp - 0x33c]
add eax, 1
mov dword [ebp - 0x33c], eax
mov ecx, dword [ebp - 0x33c]
cmp ecx, dword [ebp - 0x318]
jae 0x406c61
mov edx, dword [ebp - 0x33c]
mov eax, dword [ebp + edx*4 - 0x314]
cmp eax, dword [ebp + 8]
jne 0x406c5f
jmp 0x406c61
jmp 0x406c2e
mov ecx, dword [ebp - 0x33c]
cmp ecx, dword [ebp - 0x318]
jne 0x406c97
cmp dword [ebp - 0x318], 0x40
jae 0x406c97
mov edx, dword [ebp - 0x33c]
mov eax, dword [ebp + 8]
mov dword [ebp + edx*4 - 0x314], eax
mov ecx, dword [ebp - 0x318]
add ecx, 1
mov dword [ebp - 0x318], ecx
xor edx, edx
test edx, edx
jne 0x406c22
mov eax, dword [ebp + 8]
mov dword [ebp - 0x31c], eax
cmp dword [ebp + 0xc], 0xffffffff
je 0x406dc0
xor ecx, ecx
test ecx, ecx
jne 0x406cb0
mov dword [ebp - 0x340], 0
jmp 0x406cd1
mov edx, dword [ebp - 0x340]
add edx, 1
mov dword [ebp - 0x340], edx
mov eax, dword [ebp - 0x340]
cmp eax, dword [ebp - 0x110]
jae 0x406cf5
mov ecx, dword [ebp - 0x340]
mov edx, dword [ebp + ecx*4 - 0x10c]
cmp edx, dword [ebp + 0xc]
jne 0x406cf3
jmp 0x406cf5
jmp 0x406cc2
mov eax, dword [ebp - 0x340]
cmp eax, dword [ebp - 0x110]
jne 0x406d2b
cmp dword [ebp - 0x110], 0x40
jae 0x406d2b
mov ecx, dword [ebp - 0x340]
mov edx, dword [ebp + 0xc]
mov dword [ebp + ecx*4 - 0x10c], edx
mov eax, dword [ebp - 0x110]
add eax, 1
mov dword [ebp - 0x110], eax
xor ecx, ecx
test ecx, ecx
jne 0x406cb6
mov dword [ebp - 0x344], 0
jmp 0x406d4c
mov edx, dword [ebp - 0x344]
add edx, 1
mov dword [ebp - 0x344], edx
mov eax, dword [ebp - 0x344]
cmp eax, dword [ebp - 0x318]
jae 0x406d70
mov ecx, dword [ebp - 0x344]
mov edx, dword [ebp + ecx*4 - 0x314]
cmp edx, dword [ebp + 0xc]
jne 0x406d6e
jmp 0x406d70
jmp 0x406d3d
mov eax, dword [ebp - 0x344]
cmp eax, dword [ebp - 0x318]
jne 0x406da6
cmp dword [ebp - 0x318], 0x40
jae 0x406da6
mov ecx, dword [ebp - 0x344]
mov edx, dword [ebp + 0xc]
mov dword [ebp + ecx*4 - 0x314], edx
mov eax, dword [ebp - 0x318]
add eax, 1
mov dword [ebp - 0x318], eax
xor ecx, ecx
test ecx, ecx
jne 0x406d31
mov edx, dword [ebp + 0xc]
cmp edx, dword [ebp - 0x31c]
jbe 0x406dc0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x31c], eax
mov dword [ebp - 0x214], 0
cmp dword [ebp + 0x10], 0xffffffff
je 0x406ee4
xor ecx, ecx
test ecx, ecx
jne 0x406dd4
mov dword [ebp - 0x348], 0
jmp 0x406df5
mov edx, dword [ebp - 0x348]
add edx, 1
mov dword [ebp - 0x348], edx
mov eax, dword [ebp - 0x348]
cmp eax, dword [ebp - 0x214]
jae 0x406e19
mov ecx, dword [ebp - 0x348]
mov edx, dword [ebp + ecx*4 - 0x210]
cmp edx, dword [ebp + 0x10]
jne 0x406e17
jmp 0x406e19
jmp 0x406de6
mov eax, dword [ebp - 0x348]
cmp eax, dword [ebp - 0x214]
jne 0x406e4f
cmp dword [ebp - 0x214], 0x40
jae 0x406e4f
mov ecx, dword [ebp - 0x348]
mov edx, dword [ebp + 0x10]
mov dword [ebp + ecx*4 - 0x210], edx
mov eax, dword [ebp - 0x214]
add eax, 1
mov dword [ebp - 0x214], eax
xor ecx, ecx
test ecx, ecx
jne 0x406dda
mov dword [ebp - 0x34c], 0
jmp 0x406e70
mov edx, dword [ebp - 0x34c]
add edx, 1
mov dword [ebp - 0x34c], edx
mov eax, dword [ebp - 0x34c]
cmp eax, dword [ebp - 0x318]
jae 0x406e94
mov ecx, dword [ebp - 0x34c]
mov edx, dword [ebp + ecx*4 - 0x314]
cmp edx, dword [ebp + 0x10]
jne 0x406e92
jmp 0x406e94
jmp 0x406e61
mov eax, dword [ebp - 0x34c]
cmp eax, dword [ebp - 0x318]
jne 0x406eca
cmp dword [ebp - 0x318], 0x40
jae 0x406eca
mov ecx, dword [ebp - 0x34c]
mov edx, dword [ebp + 0x10]
mov dword [ebp + ecx*4 - 0x314], edx
mov eax, dword [ebp - 0x318]
add eax, 1
mov dword [ebp - 0x318], eax
xor ecx, ecx
test ecx, ecx
jne 0x406e55
mov edx, dword [ebp + 0x10]
cmp edx, dword [ebp - 0x31c]
jbe 0x406ee4
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x31c], eax
xor ecx, ecx
cmp dword [ebp + 0x14], 0
setl cl
dec ecx
lea edx, [ebp - 8]
and ecx, edx
mov dword [ebp - 0xc], ecx
cmp dword [ebp + 0x14], 0
jle 0x406f26
mov eax, dword [ebp - 0x328]
cdq
mov ecx, 0x3e8
idiv ecx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x328]
cdq
mov ecx, 0x3e8
idiv ecx
imul edx, edx, 0x3e8
mov dword [ebp - 4], edx
jmp 0x406f3a
cmp dword [ebp + 0x14], 0
jne 0x406f3a
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0xc]
push edx
lea eax, [ebp - 0x318]
push eax
mov ecx, dword [ebp - 0x214]
neg ecx
sbb ecx, ecx
lea edx, [ebp - 0x214]
and ecx, edx
push ecx
mov eax, dword [ebp - 0x110]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x110]
and eax, ecx
push eax
mov edx, dword [ebp - 0x31c]
add edx, 1
push edx
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x330], eax
cmp dword [ebp - 0x330], 0xffffffff
je 0x406f8c
jmp 0x407008
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x32c], eax
cmp dword [ebp - 0x32c], 0
je 0x406fb8
cmp dword [0x46c77c], 0
jne 0x406fb6
cmp dword [ebp - 0x32c], 0x2714
je 0x406fb8
jmp 0x407008
cmp dword [ebp + 0x14], 0
jle 0x406ffb
mov eax, dword [ebp - 0x320]
push eax
mov ecx, dword [ebp - 0x324]
push ecx
call fcn.00419aa0
push edx
push eax
call fcn.00419af0
add esp, 0x10
mov edx, dword [ebp + 0x14]
sub edx, eax
mov dword [ebp - 0x328], edx
cmp dword [ebp - 0x328], 0
jg 0x406ffb
mov dword [ebp - 0x330], 0
jmp 0x407008
cmp dword [ebp - 0x330], 0xffffffff
je 0x406ef6
cmp dword [ebp - 0x330], 0
jge 0x407019
or eax, 0xffffffff
jmp 0x40711d
cmp dword [ebp - 0x330], 0
jne 0x407029
xor eax, eax
jmp 0x40711d
mov dword [ebp - 0x334], 0
cmp dword [ebp + 8], 0xffffffff
je 0x40707f
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40705c
mov edx, dword [ebp - 0x334]
or edx, 1
mov dword [ebp - 0x334], edx
lea eax, [ebp - 0x318]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40707f
mov edx, dword [ebp - 0x334]
or edx, 4
mov dword [ebp - 0x334], edx
cmp dword [ebp + 0xc], 0xffffffff
je 0x4070cb
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4070a8
mov edx, dword [ebp - 0x334]
or edx, 8
mov dword [ebp - 0x334], edx
lea eax, [ebp - 0x318]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4070cb
mov edx, dword [ebp - 0x334]
or edx, 4
mov dword [ebp - 0x334], edx
cmp dword [ebp + 0x10], 0xffffffff
je 0x407117
lea eax, [ebp - 0x214]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4070f4
mov edx, dword [ebp - 0x334]
or edx, 2
mov dword [ebp - 0x334], edx
lea eax, [ebp - 0x318]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x407117
mov edx, dword [ebp - 0x334]
or edx, 4
mov dword [ebp - 0x334], edx
mov eax, dword [ebp - 0x334]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret