Function at 0x403434
Capabilities:
Get socket status

Disassembly:
push ebp
xor eax, eax
push esp
pop ebp
push edi
push esi
push ebx
sub esp, 0x34c
mov dword [ebp - 0x348], 0
mov edi, dword [ebp + 8]
mov dword [ebp - 0x344], 0
test edi, edi
jne 0x40346a
jmp 0x40346f
cmp dword [edi + eax*8], 0xffffffff
jne 0x403731
inc eax
cmp eax, dword [ebp + 0xc]
jne 0x40345f
sub esp, 0xc
push dword [ebp + 0x10]
call fcn.00403400
add esp, 0x10
mov esi, eax
jmp 0x40375e
call fcn.0040c374
mov dword [ebp - 0x334], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x338], edx
mov dword [ebp - 0x33c], eax
xor ebx, ebx
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x340], 0xffffffff
jmp 0x4035a2
mov ecx, dword [edi + ebx*8]
mov word [edi + ebx*8 + 6], 0
cmp ecx, 0xffffffff
je 0x4035a1
movsx eax, word [edi + ebx*8 + 4]
test al, 7
je 0x4035a1
cmp dword [ebp - 0x340], ecx
jae 0x4034fb
mov dword [ebp - 0x340], ecx
test al, 1
je 0x40352d
mov eax, dword [ebp - 0x11c]
xor edx, edx
lea esi, [ebp - 0x11c]
jmp 0x403516
cmp dword [esi + edx*4 + 4], ecx
je 0x40352d
inc edx
cmp edx, eax
jne 0x40350f
cmp eax, 0x3f
ja 0x40352d
mov dword [ebp + eax*4 - 0x118], ecx
inc eax
mov dword [ebp - 0x11c], eax
test byte [edi + ebx*8 + 4], 4
je 0x403567
mov edx, dword [ebp - 0x220]
sub ecx, ecx
jmp 0x40354b
mov eax, dword [ebp + ecx*4 - 0x21c]
cmp eax, dword [edi + ebx*8]
je 0x403567
inc ecx
cmp ecx, edx
jne 0x40353e
cmp edx, 0x3f
ja 0x403567
mov eax, dword [edi + ebx*8]
mov dword [ebp + edx*4 - 0x21c], eax
lea eax, [edx + 1]
mov dword [ebp - 0x220], eax
test byte [edi + ebx*8 + 4], 2
je 0x4035a1
mov edx, dword [ebp - 0x324]
sub ecx, ecx
jmp 0x403585
mov eax, dword [ebp + ecx*4 - 0x320]
cmp eax, dword [edi + ebx*8]
je 0x4035a1
inc ecx
cmp ecx, edx
jne 0x403578
cmp edx, 0x3f
ja 0x4035a1
mov eax, dword [edi + ebx*8]
mov dword [ebp + edx*4 - 0x320], eax
lea eax, [edx + 1]
mov dword [ebp - 0x324], eax
inc ebx
cmp ebx, dword [ebp + 0xc]
jne 0x4034cd
sub ebx, ebx
cmp dword [ebp + 0x10], 0
js 0x4035b6
lea ebx, [ebp - 0x18]
cmp dword [ebp + 0x10], 0
jle 0x4035da
mov edx, 0x3e8
mov eax, dword [ebp - 0x33c]
push edx
pop esi
cdq
idiv esi
imul edx, edx, 0x3e8
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
jmp 0x4035ee
cmp dword [ebp + 0x10], 0
jne 0x4035ee
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
sub esp, 0xc
lea eax, [ebp - 0x324]
lea edx, [ebp - 0x220]
lea ecx, [ebp - 0x11c]
push ebx
push eax
mov eax, dword [ebp - 0x340]
push edx
inc eax
push ecx
push eax
call sub.WS2_32.DLL_select
add esp, 0xc
push eax
pop esi
cmp eax, 0xffffffff
jne 0x403690
call sub.WS2_32.DLL_WSAGetLastError
test eax, eax
je 0x40363f
cmp dword [0x423060], 0
jne 0x40375e
cmp eax, 0x2714
jne 0x40375e
cmp dword [ebp + 0x10], 0
jle 0x4035da
call fcn.0040c374
mov ecx, dword [ebp - 0x338]
mov dword [ebp - 0x344], ecx
mov ecx, dword [ebp - 0x334]
push dword [ebp - 0x344]
mov dword [ebp - 0x348], ecx
push dword [ebp - 0x348]
push edx
push eax
call fcn.0040c308
mov edx, dword [ebp + 0x10]
sub edx, eax
add esp, 0x10
mov dword [ebp - 0x33c], edx
test edx, edx
jle 0x40375e
jmp 0x4035b6
cmp eax, 0
jge 0x40369d
or esi, 0xffffffff
jmp 0x40375e
je 0x40375e
mov ecx, dword [ebp + 0xc]
xor esi, esi
inc ecx
pushfd
xor ebx, ebx
inc ebx
popfd
mov dword [ebp - 0x34c], ecx
jmp 0x403727
mov eax, dword [edi + ebx*8 - 8]
mov word [edi + ebx*8 - 2], 0
cmp eax, 0xffffffff
je 0x403726
push edx
push edx
lea edx, [ebp - 0x11c]
push edx
push eax
call sub.WS2_32.DLL___WSAFDIsSet
pop edx
or eax, eax
pop ecx
je 0x4036e1
or word [edi + ebx*8 - 2], 1
push eax
push eax
lea eax, [ebp - 0x220]
push eax
push dword [edi + ebx*8 - 8]
call sub.WS2_32.DLL___WSAFDIsSet
pop edx
or eax, eax
pop ecx
je 0x4036ff
or word [edi + ebx*8 - 2], 4
push eax
push eax
lea eax, [ebp - 0x324]
push eax
push dword [edi + ebx*8 - 8]
call sub.WS2_32.DLL___WSAFDIsSet
pop edx
or eax, eax
pop ecx
je 0x40371d
or word [edi + ebx*8 - 2], 2
cmp word [edi + ebx*8 - 2], 1
sbb esi, 0xffffffff
inc ebx
cmp ebx, dword [ebp - 0x34c]
jne 0x4036b6
jmp 0x40375e
cmp dword [ebp + 0x10], 0
jg 0x403484
mov dword [ebp - 0x33c], 0
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x334], 0
jmp 0x40349e
lea esp, [ebp - 0xc]
push esi
pop eax
pop ebx
pop esi
pop edi
pop ebp
ret