Function at 0x403768
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x33c
mov dword [ebp - 0x348], 0
mov dword [ebp - 0x344], 0
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x14]
cmp dword [ebp + 8], 0xffffffff
jne 0x4037b2
cmp esi, 0xffffffff
jne 0x4037b2
cmp dword [ebp + 0x10], 0xffffffff
jne 0x4037b2
sub esp, 0xc
push edi
call fcn.00403400
add esp, 0x10
mov ebx, eax
jmp 0x403aa6
test edi, edi
jg 0x4037ce
xor ebx, ebx
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x334], 0
jmp 0x4037e1
call fcn.0040c374
mov ebx, edi
mov dword [ebp - 0x338], edx
mov dword [ebp - 0x334], eax
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x33c], 0xffffffff
cmp dword [ebp + 8], 0xffffffff
je 0x40382e
mov eax, dword [ebp + 8]
mov dword [ebp - 0x11c], 1
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x320], eax
mov dword [ebp - 0x324], 1
mov dword [ebp - 0x33c], eax
cmp esi, 0xffffffff
je 0x40389d
mov eax, dword [ebp - 0x11c]
xor edx, edx
lea ecx, [ebp - 0x11c]
jmp 0x40384a
cmp dword [ecx + edx*4 + 4], esi
je 0x403861
inc edx
cmp edx, eax
jne 0x403843
cmp eax, 0x3f
ja 0x403861
mov dword [ebp + eax*4 - 0x118], esi
inc eax
mov dword [ebp - 0x11c], eax
mov eax, dword [ebp - 0x324]
xor edx, edx
lea ecx, [ebp - 0x324]
jmp 0x403878
cmp dword [ecx + edx*4 + 4], esi
je 0x40388f
inc edx
cmp edx, eax
jne 0x403871
cmp eax, 0x3f
ja 0x40388f
mov dword [ebp + eax*4 - 0x320], esi
inc eax
mov dword [ebp - 0x324], eax
cmp esi, dword [ebp - 0x33c]
jbe 0x40389d
mov dword [ebp - 0x33c], esi
mov dword [ebp - 0x220], 0
cmp dword [ebp + 0x10], 0xffffffff
je 0x403905
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x324]
mov dword [ebp - 0x21c], edx
xor edx, edx
mov dword [ebp - 0x220], 1
jmp 0x4038d7
mov ecx, dword [ebp + 0x10]
cmp dword [ebp + edx*4 - 0x320], ecx
je 0x4038f1
inc edx
cmp edx, eax
jne 0x4038ca
cmp eax, 0x3f
ja 0x4038f1
mov edx, dword [ebp + 0x10]
mov dword [ebp + eax*4 - 0x320], edx
inc eax
mov dword [ebp - 0x324], eax
mov ecx, dword [ebp - 0x33c]
cmp dword [ebp + 0x10], ecx
jbe 0x403905
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x33c], eax
mov dword [ebp - 0x340], 0
test edi, edi
js 0x40391c
lea edx, [ebp - 0x18]
mov dword [ebp - 0x340], edx
test edi, edi
jle 0x40393a
mov edx, 0x3e8
mov eax, ebx
mov ecx, edx
cdq
idiv ecx
imul edx, edx, 0x3e8
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
jmp 0x40394c
test edi, edi
jne 0x40394c
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
sub esp, 0xc
lea eax, [ebp - 0x324]
push dword [ebp - 0x340]
push eax
mov eax, dword [ebp - 0x33c]
inc eax
lea edx, [ebp - 0x220]
lea ecx, [ebp - 0x11c]
push edx
push ecx
push eax
call sub.WS2_32.DLL_select
add esp, 0xc
mov ebx, eax
cmp eax, 0xffffffff
jne 0x4039ec
call sub.WS2_32.DLL_WSAGetLastError
test eax, eax
je 0x4039a2
cmp dword [0x423060], 0
jne 0x403aa6
cmp eax, 0x2714
jne 0x403aa6
test edi, edi
jle 0x40393a
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
mov ebx, edi
push dword [ebp - 0x348]
push edx
push eax
call fcn.0040c308
add esp, 0x10
sub ebx, eax
test ebx, ebx
jg 0x40391c
xor ebx, ebx
jmp 0x403aa6
cmp eax, 0
jge 0x4039f9
or ebx, 0xffffffff
jmp 0x403aa6
je 0x403aa6
xor ebx, ebx
cmp dword [ebp + 8], 0xffffffff
je 0x403a37
lea eax, [ebp - 0x11c]
push ecx
push ecx
push eax
push dword [ebp + 8]
call sub.WS2_32.DLL___WSAFDIsSet
lea edx, [ebp - 0x324]
xor ebx, ebx
test eax, eax
push edx
push dword [ebp + 8]
setne bl
call sub.WS2_32.DLL___WSAFDIsSet
pop edi
test eax, eax
pop edx
je 0x403a37
or ebx, 4
cmp esi, 0xffffffff
je 0x403a6c
lea eax, [ebp - 0x11c]
push ecx
push ecx
push eax
push esi
call sub.WS2_32.DLL___WSAFDIsSet
pop edi
test eax, eax
pop edx
je 0x403a54
or ebx, 8
lea eax, [ebp - 0x324]
push ecx
push ecx
push eax
push esi
call sub.WS2_32.DLL___WSAFDIsSet
pop edi
test eax, eax
pop edx
je 0x403a6c
or ebx, 4
cmp dword [ebp + 0x10], 0xffffffff
je 0x403aa6
lea eax, [ebp - 0x220]
push esi
push esi
push eax
push dword [ebp + 0x10]
call sub.WS2_32.DLL___WSAFDIsSet
pop edx
test eax, eax
pop ecx
je 0x403a8c
or ebx, 2
lea eax, [ebp - 0x324]
push edi
push edi
push eax
push dword [ebp + 0x10]
call sub.WS2_32.DLL___WSAFDIsSet
pop ecx
test eax, eax
pop esi
je 0x403aa6
or ebx, 4
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret