Function at 0x4104d0
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 0x410529
cmp dword [ebp + 0xc], 0xffffffff
jne 0x410529
cmp dword [ebp + 0x10], 0xffffffff
jne 0x410529
mov eax, dword [ebp + 0x14]
push eax
call fcn.00410470
add esp, 4
mov dword [ebp - 0x330], eax
mov eax, dword [ebp - 0x330]
jmp 0x410aed
cmp dword [ebp + 0x14], 0
jle 0x410549
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x328], ecx
call fcn.00423490
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 0x410676
xor edx, edx
test edx, edx
jne 0x410571
mov dword [ebp - 0x338], 0
jmp 0x410592
mov eax, dword [ebp - 0x338]
add eax, 1
mov dword [ebp - 0x338], eax
mov ecx, dword [ebp - 0x338]
cmp ecx, dword [ebp - 0x110]
jae 0x4105b6
mov edx, dword [ebp - 0x338]
mov eax, dword [ebp + edx*4 - 0x10c]
cmp eax, dword [ebp + 8]
jne 0x4105b4
jmp 0x4105b6
jmp 0x410583
mov ecx, dword [ebp - 0x338]
cmp ecx, dword [ebp - 0x110]
jne 0x4105ec
cmp dword [ebp - 0x110], 0x40
jae 0x4105ec
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 0x410577
mov dword [ebp - 0x33c], 0
jmp 0x41060d
mov eax, dword [ebp - 0x33c]
add eax, 1
mov dword [ebp - 0x33c], eax
mov ecx, dword [ebp - 0x33c]
cmp ecx, dword [ebp - 0x318]
jae 0x410631
mov edx, dword [ebp - 0x33c]
mov eax, dword [ebp + edx*4 - 0x314]
cmp eax, dword [ebp + 8]
jne 0x41062f
jmp 0x410631
jmp 0x4105fe
mov ecx, dword [ebp - 0x33c]
cmp ecx, dword [ebp - 0x318]
jne 0x410667
cmp dword [ebp - 0x318], 0x40
jae 0x410667
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 0x4105f2
mov eax, dword [ebp + 8]
mov dword [ebp - 0x31c], eax
cmp dword [ebp + 0xc], 0xffffffff
je 0x410790
xor ecx, ecx
test ecx, ecx
jne 0x410680
mov dword [ebp - 0x340], 0
jmp 0x4106a1
mov edx, dword [ebp - 0x340]
add edx, 1
mov dword [ebp - 0x340], edx
mov eax, dword [ebp - 0x340]
cmp eax, dword [ebp - 0x110]
jae 0x4106c5
mov ecx, dword [ebp - 0x340]
mov edx, dword [ebp + ecx*4 - 0x10c]
cmp edx, dword [ebp + 0xc]
jne 0x4106c3
jmp 0x4106c5
jmp 0x410692
mov eax, dword [ebp - 0x340]
cmp eax, dword [ebp - 0x110]
jne 0x4106fb
cmp dword [ebp - 0x110], 0x40
jae 0x4106fb
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 0x410686
mov dword [ebp - 0x344], 0
jmp 0x41071c
mov edx, dword [ebp - 0x344]
add edx, 1
mov dword [ebp - 0x344], edx
mov eax, dword [ebp - 0x344]
cmp eax, dword [ebp - 0x318]
jae 0x410740
mov ecx, dword [ebp - 0x344]
mov edx, dword [ebp + ecx*4 - 0x314]
cmp edx, dword [ebp + 0xc]
jne 0x41073e
jmp 0x410740
jmp 0x41070d
mov eax, dword [ebp - 0x344]
cmp eax, dword [ebp - 0x318]
jne 0x410776
cmp dword [ebp - 0x318], 0x40
jae 0x410776
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 0x410701
mov edx, dword [ebp + 0xc]
cmp edx, dword [ebp - 0x31c]
jbe 0x410790
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x31c], eax
mov dword [ebp - 0x214], 0
cmp dword [ebp + 0x10], 0xffffffff
je 0x4108b4
xor ecx, ecx
test ecx, ecx
jne 0x4107a4
mov dword [ebp - 0x348], 0
jmp 0x4107c5
mov edx, dword [ebp - 0x348]
add edx, 1
mov dword [ebp - 0x348], edx
mov eax, dword [ebp - 0x348]
cmp eax, dword [ebp - 0x214]
jae 0x4107e9
mov ecx, dword [ebp - 0x348]
mov edx, dword [ebp + ecx*4 - 0x210]
cmp edx, dword [ebp + 0x10]
jne 0x4107e7
jmp 0x4107e9
jmp 0x4107b6
mov eax, dword [ebp - 0x348]
cmp eax, dword [ebp - 0x214]
jne 0x41081f
cmp dword [ebp - 0x214], 0x40
jae 0x41081f
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 0x4107aa
mov dword [ebp - 0x34c], 0
jmp 0x410840
mov edx, dword [ebp - 0x34c]
add edx, 1
mov dword [ebp - 0x34c], edx
mov eax, dword [ebp - 0x34c]
cmp eax, dword [ebp - 0x318]
jae 0x410864
mov ecx, dword [ebp - 0x34c]
mov edx, dword [ebp + ecx*4 - 0x314]
cmp edx, dword [ebp + 0x10]
jne 0x410862
jmp 0x410864
jmp 0x410831
mov eax, dword [ebp - 0x34c]
cmp eax, dword [ebp - 0x318]
jne 0x41089a
cmp dword [ebp - 0x318], 0x40
jae 0x41089a
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 0x410825
mov edx, dword [ebp + 0x10]
cmp edx, dword [ebp - 0x31c]
jbe 0x4108b4
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 0x4108f6
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 0x41090a
cmp dword [ebp + 0x14], 0
jne 0x41090a
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 0x41095c
jmp 0x4109d8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x32c], eax
cmp dword [ebp - 0x32c], 0
je 0x410988
cmp dword [0x477abc], 0
jne 0x410986
cmp dword [ebp - 0x32c], 0x2714
je 0x410988
jmp 0x4109d8
cmp dword [ebp + 0x14], 0
jle 0x4109cb
mov eax, dword [ebp - 0x320]
push eax
mov ecx, dword [ebp - 0x324]
push ecx
call fcn.00423490
push edx
push eax
call fcn.004234e0
add esp, 0x10
mov edx, dword [ebp + 0x14]
sub edx, eax
mov dword [ebp - 0x328], edx
cmp dword [ebp - 0x328], 0
jg 0x4109cb
mov dword [ebp - 0x330], 0
jmp 0x4109d8
cmp dword [ebp - 0x330], 0xffffffff
je 0x4108c6
cmp dword [ebp - 0x330], 0
jge 0x4109e9
or eax, 0xffffffff
jmp 0x410aed
cmp dword [ebp - 0x330], 0
jne 0x4109f9
xor eax, eax
jmp 0x410aed
mov dword [ebp - 0x334], 0
cmp dword [ebp + 8], 0xffffffff
je 0x410a4f
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x410a2c
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 0x410a4f
mov edx, dword [ebp - 0x334]
or edx, 4
mov dword [ebp - 0x334], edx
cmp dword [ebp + 0xc], 0xffffffff
je 0x410a9b
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x410a78
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 0x410a9b
mov edx, dword [ebp - 0x334]
or edx, 4
mov dword [ebp - 0x334], edx
cmp dword [ebp + 0x10], 0xffffffff
je 0x410ae7
lea eax, [ebp - 0x214]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x410ac4
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 0x410ae7
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