Function at 0x413550
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x384
push ebx
push esi
push edi
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x320], 0
mov dword [ebp - 0x328], 1
mov dword [ebp - 0x330], 0
cmp dword [ebp + 8], 0
je 0x4135cd
mov dword [ebp - 0x32c], 0
jmp 0x4135a5
mov eax, dword [ebp - 0x32c]
add eax, 1
mov dword [ebp - 0x32c], eax
mov ecx, dword [ebp - 0x32c]
cmp ecx, dword [ebp + 0xc]
jae 0x4135cd
mov edx, dword [ebp - 0x32c]
mov eax, dword [ebp + 8]
cmp dword [eax + edx*8], 0xffffffff
je 0x4135cb
mov dword [ebp - 0x328], 0
jmp 0x4135cd
jmp 0x413596
cmp dword [ebp - 0x328], 0
je 0x4135f3
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00412ec0
add esp, 4
mov dword [ebp - 0x338], eax
mov eax, dword [ebp - 0x338]
jmp 0x413b8c
cmp dword [ebp + 0x10], 0
jle 0x413613
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x330], edx
call fcn.00425ec0
mov dword [ebp - 0x324], eax
mov dword [ebp - 0x320], edx
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x214], 0
mov dword [ebp - 0x318], 0
mov dword [ebp - 0x31c], 0xffffffff
mov dword [ebp - 0x32c], 0
jmp 0x413656
mov eax, dword [ebp - 0x32c]
add eax, 1
mov dword [ebp - 0x32c], eax
mov ecx, dword [ebp - 0x32c]
cmp ecx, dword [ebp + 0xc]
jae 0x4138ce
mov edx, dword [ebp - 0x32c]
mov eax, dword [ebp + 8]
mov word [eax + edx*8 + 6], 0
mov ecx, dword [ebp - 0x32c]
mov edx, dword [ebp + 8]
cmp dword [edx + ecx*8], 0xffffffff
jne 0x413686
jmp 0x413647
xor eax, eax
test eax, eax
jne 0x413686
mov ecx, dword [ebp - 0x32c]
mov edx, dword [ebp + 8]
movsx eax, word [edx + ecx*8 + 4]
and eax, 7
test eax, eax
je 0x4138c9
mov ecx, dword [ebp - 0x32c]
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx*8]
cmp eax, dword [ebp - 0x31c]
jbe 0x4136cb
mov ecx, dword [ebp - 0x32c]
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx*8]
mov dword [ebp - 0x31c], eax
mov ecx, dword [ebp - 0x32c]
mov edx, dword [ebp + 8]
movsx eax, word [edx + ecx*8 + 4]
and eax, 1
test eax, eax
je 0x413775
mov dword [ebp - 0x33c], 0
jmp 0x4136ff
mov ecx, dword [ebp - 0x33c]
add ecx, 1
mov dword [ebp - 0x33c], ecx
mov edx, dword [ebp - 0x33c]
cmp edx, dword [ebp - 0x110]
jae 0x41372c
mov eax, dword [ebp - 0x33c]
mov ecx, dword [ebp - 0x32c]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + eax*4 - 0x10c]
cmp eax, dword [edx + ecx*8]
jne 0x41372a
jmp 0x41372c
jmp 0x4136f0
mov ecx, dword [ebp - 0x33c]
cmp ecx, dword [ebp - 0x110]
jne 0x41376b
cmp dword [ebp - 0x110], 0x40
jae 0x41376b
mov edx, dword [ebp - 0x33c]
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + eax*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 0x4136e4
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + eax*8 + 4]
and edx, 4
test edx, edx
je 0x41381f
mov dword [ebp - 0x340], 0
jmp 0x4137a9
mov eax, dword [ebp - 0x340]
add eax, 1
mov dword [ebp - 0x340], eax
mov ecx, dword [ebp - 0x340]
cmp ecx, dword [ebp - 0x214]
jae 0x4137d6
mov edx, dword [ebp - 0x340]
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + edx*4 - 0x210]
cmp edx, dword [ecx + eax*8]
jne 0x4137d4
jmp 0x4137d6
jmp 0x41379a
mov eax, dword [ebp - 0x340]
cmp eax, dword [ebp - 0x214]
jne 0x413815
cmp dword [ebp - 0x214], 0x40
jae 0x413815
mov ecx, dword [ebp - 0x340]
mov edx, dword [ebp - 0x32c]
mov eax, dword [ebp + 8]
mov edx, dword [eax + edx*8]
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 0x41378e
mov edx, dword [ebp - 0x32c]
mov eax, dword [ebp + 8]
movsx ecx, word [eax + edx*8 + 4]
and ecx, 2
test ecx, ecx
je 0x4138c9
mov dword [ebp - 0x344], 0
jmp 0x413853
mov edx, dword [ebp - 0x344]
add edx, 1
mov dword [ebp - 0x344], edx
mov eax, dword [ebp - 0x344]
cmp eax, dword [ebp - 0x318]
jae 0x413880
mov ecx, dword [ebp - 0x344]
mov edx, dword [ebp - 0x32c]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + ecx*4 - 0x314]
cmp ecx, dword [eax + edx*8]
jne 0x41387e
jmp 0x413880
jmp 0x413844
mov edx, dword [ebp - 0x344]
cmp edx, dword [ebp - 0x318]
jne 0x4138bf
cmp dword [ebp - 0x318], 0x40
jae 0x4138bf
mov eax, dword [ebp - 0x344]
mov ecx, dword [ebp - 0x32c]
mov edx, dword [ebp + 8]
mov ecx, dword [edx + ecx*8]
mov dword [ebp + eax*4 - 0x314], ecx
mov edx, dword [ebp - 0x318]
add edx, 1
mov dword [ebp - 0x318], edx
xor eax, eax
test eax, eax
jne 0x413838
jmp 0x413647
cmp dword [ebp - 0x110], 0
jne 0x413906
cmp dword [ebp - 0x214], 0
jne 0x413906
cmp dword [ebp - 0x318], 0
jne 0x413906
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00412ec0
add esp, 4
mov dword [ebp - 0x338], eax
mov eax, dword [ebp - 0x338]
jmp 0x413b8c
xor edx, edx
cmp dword [ebp + 0x10], 0
setl dl
dec edx
lea eax, [ebp - 8]
and edx, eax
mov dword [ebp - 0xc], edx
cmp dword [ebp + 0x10], 0
jle 0x413948
mov eax, dword [ebp - 0x330]
cdq
mov ecx, 0x3e8
idiv ecx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x330]
cdq
mov ecx, 0x3e8
idiv ecx
imul edx, edx, 0x3e8
mov dword [ebp - 4], edx
jmp 0x41395c
cmp dword [ebp + 0x10], 0
jne 0x41395c
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x318]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x318]
and eax, ecx
push eax
mov edx, dword [ebp - 0x214]
neg edx
sbb edx, edx
lea eax, [ebp - 0x214]
and edx, eax
push edx
mov ecx, dword [ebp - 0x110]
neg ecx
sbb ecx, ecx
lea edx, [ebp - 0x110]
and ecx, edx
push ecx
mov eax, dword [ebp - 0x31c]
add eax, 1
push eax
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x338], eax
cmp dword [ebp - 0x338], 0xffffffff
je 0x4139ba
jmp 0x413a36
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x334], eax
cmp dword [ebp - 0x334], 0
je 0x4139e6
cmp dword [0x479810], 0
jne 0x4139e4
cmp dword [ebp - 0x334], 0x2714
je 0x4139e6
jmp 0x413a36
cmp dword [ebp + 0x10], 0
jle 0x413a29
mov ecx, dword [ebp - 0x320]
push ecx
mov edx, dword [ebp - 0x324]
push edx
call fcn.00425ec0
push edx
push eax
call fcn.00425f10
add esp, 0x10
mov ecx, dword [ebp + 0x10]
sub ecx, eax
mov dword [ebp - 0x330], ecx
cmp dword [ebp - 0x330], 0
jg 0x413a29
mov dword [ebp - 0x338], 0
jmp 0x413a36
cmp dword [ebp - 0x338], 0xffffffff
je 0x413918
cmp dword [ebp - 0x338], 0
jge 0x413a47
or eax, 0xffffffff
jmp 0x413b8c
cmp dword [ebp - 0x338], 0
jne 0x413a57
xor eax, eax
jmp 0x413b8c
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x32c], 0
jmp 0x413a7c
mov edx, dword [ebp - 0x32c]
add edx, 1
mov dword [ebp - 0x32c], edx
mov eax, dword [ebp - 0x32c]
cmp eax, dword [ebp + 0xc]
jae 0x413b86
mov ecx, dword [ebp - 0x32c]
mov edx, dword [ebp + 8]
mov word [edx + ecx*8 + 6], 0
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
cmp dword [ecx + eax*8], 0xffffffff
jne 0x413aac
jmp 0x413a6d
lea edx, [ebp - 0x110]
push edx
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax*8]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x413ae8
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
mov dx, word [ecx + eax*8 + 6]
or dl, 1
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
mov word [ecx + eax*8 + 6], dx
lea edx, [ebp - 0x214]
push edx
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax*8]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x413b24
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
mov dx, word [ecx + eax*8 + 6]
or dl, 4
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
mov word [ecx + eax*8 + 6], dx
lea edx, [ebp - 0x318]
push edx
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax*8]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x413b60
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
mov dx, word [ecx + eax*8 + 6]
or dl, 2
mov eax, dword [ebp - 0x32c]
mov ecx, dword [ebp + 8]
mov word [ecx + eax*8 + 6], dx
mov edx, dword [ebp - 0x32c]
mov eax, dword [ebp + 8]
movsx ecx, word [eax + edx*8 + 6]
test ecx, ecx
je 0x413b81
mov edx, dword [ebp - 0x338]
add edx, 1
mov dword [ebp - 0x338], edx
jmp 0x413a6d
mov eax, dword [ebp - 0x338]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret