Function at 0x415990
Capabilities:
Get socket status

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x314
mov ebp, dword [esp + 0x334]
mov edi, dword [esp + 0x330]
mov edx, dword [esp + 0x32c]
mov esi, dword [esp + 0x328]
test esi, esi
sete al
test edx, edx
sete cl
or cl, al
jne 0x4159db
xor eax, eax
nop word cs:[eax + eax]
cmp dword [esi + eax*8], 0xffffffff
jne 0x415a0b
inc eax
cmp edx, eax
jne 0x4159d0
xor ebx, ebx
mov eax, edi
or eax, ebp
je 0x415d14
test ebp, ebp
js 0x415b76
cmp edi, 0xfffffffe
mov eax, 0xfffffffe
cmovae edi, eax
test ebp, ebp
cmovne edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x415d14
mov dword [esp + 0x210], 0
mov dword [esp + 0x10c], 0
mov dword [esp + 8], 0
xor esi, esi
xor ebp, ebp
xor edi, edi
xor ecx, ecx
jmp 0x415a50
mov edx, dword [esp + 0x32c]
inc ecx
cmp ecx, edx
je 0x415b62
mov ebx, dword [esp + 0x328]
mov word [ebx + ecx*8 + 6], 0
mov eax, dword [ebx + ecx*8]
cmp eax, 0xffffffff
je 0x415a47
movzx ebx, word [ebx + ecx*8 + 4]
test ebx, 0x710
je 0x415a47
test ebx, 0x300
je 0x415acc
xor edx, edx
test edi, edi
je 0x415aa0
nop word cs:[eax + eax]
cmp dword [esp + edx*4 + 0x214], eax
je 0x415aa0
inc edx
cmp edi, edx
jne 0x415a90
mov edx, edi
cmp edx, edi
setne dl
cmp edi, 0x40
setae dh
or dh, dl
jne 0x415ac5
mov dword [esp + edi*4 + 0x214], eax
mov edi, dword [esp + 0x210]
inc edi
mov dword [esp + 0x210], edi
mov edx, dword [esp + 0x32c]
test bl, 0x10
je 0x415b1c
xor edx, edx
test ebp, ebp
je 0x415af0
nop word [eax + eax]
cmp dword [esp + edx*4 + 0x110], eax
je 0x415af0
inc edx
cmp ebp, edx
jne 0x415ae0
mov edx, ebp
cmp edx, ebp
setne dl
cmp ebp, 0x40
setae dh
or dh, dl
jne 0x415b15
mov dword [esp + ebp*4 + 0x110], eax
mov ebp, dword [esp + 0x10c]
inc ebp
mov dword [esp + 0x10c], ebp
mov edx, dword [esp + 0x32c]
test ebx, 0x600
je 0x415a47
xor edx, edx
test esi, esi
je 0x415b3d
nop
cmp dword [esp + edx*4 + 0xc], eax
je 0x415b3d
inc edx
cmp esi, edx
jne 0x415b30
mov edx, esi
cmp edx, esi
setne dl
cmp esi, 0x40
setae dh
or dh, dl
jne 0x415a40
mov dword [esp + esi*4 + 0xc], eax
mov esi, dword [esp + 8]
inc esi
mov dword [esp + 8], esi
jmp 0x415a40
test edi, edi
je 0x415b8b
lea ebx, [esp + 0x210]
mov edi, dword [esp + 0x328]
jmp 0x415be1
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ebx, 0xffffffff
jmp 0x415d14
xor ebx, ebx
mov eax, ebp
or eax, esi
mov edi, dword [esp + 0x328]
jne 0x415be1
xor ebx, ebx
mov ecx, dword [esp + 0x330]
mov eax, ecx
mov edx, dword [esp + 0x334]
or eax, edx
je 0x415cfd
test edx, edx
js 0x415d21
cmp ecx, 0xfffffffe
mov eax, 0xfffffffe
cmovae ecx, eax
test edx, edx
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp ebx, 0xffffffff
jne 0x415d14
jmp 0x415d02
mov eax, esp
push dword [esp + 0x334]
push dword [esp + 0x334]
push eax
call fcn.0041c1e0
add esp, 0xc
test ebp, ebp
lea ecx, [esp + 0x10c]
cmovne ebp, ecx
test esi, esi
lea ecx, [esp + 8]
cmovne esi, ecx
push eax
push esi
push ebp
push ebx
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x415cfb
xor ebx, ebx
xor ebp, ebp
mov ecx, dword [esp + 0x32c]
jmp 0x415c4c
movzx eax, word [edi + ebp*8 + 6]
cmp ax, 1
sbb ebx, 0xffffffff
mov ecx, dword [esp + 0x32c]
inc ebp
cmp ecx, ebp
je 0x415d14
mov word [edi + ebp*8 + 6], 0
mov eax, dword [edi + ebp*8]
cmp eax, 0xffffffff
je 0x415c43
lea ecx, [esp + 0x210]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x415c8a
movzx eax, word [edi + ebp*8 + 4]
test eax, 0x100
je 0x415c7e
or byte [edi + ebp*8 + 7], 1
test eax, 0x300
je 0x415c8a
or byte [edi + ebp*8 + 7], 3
lea eax, [esp + 0x10c]
push eax
push dword [edi + ebp*8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x415caa
test byte [edi + ebp*8 + 4], 0x10
je 0x415caa
or byte [edi + ebp*8 + 6], 0x10
lea eax, [esp + 8]
push eax
push dword [edi + ebp*8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x415c30
movzx esi, word [edi + ebp*8 + 4]
mov ecx, esi
and ecx, 0x200
or cx, word [edi + ebp*8 + 6]
mov edx, esi
and dx, 0x400
mov eax, 1
cmove eax, ecx
test esi, 0x600
je 0x415c35
movzx edx, dx
or edx, ecx
mov word [edi + ebp*8 + 6], dx
jmp 0x415c35
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x415d14
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ebx, ebx
cmp eax, 0x2714
setne bl
neg ebx
mov eax, ebx
add esp, 0x314
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ebx, 0xffffffff
cmp ebx, 0xffffffff
jne 0x415d14
jmp 0x415d02