Function at 0x451310
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x328
mov eax, dword [0x4c0980]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x324], ebx
test ebx, ebx
je 0x45134b
mov ecx, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
je 0x45134b
nop word [eax + eax]
cmp dword [ebx + eax*8], 0xffffffff
jne 0x45138a
inc eax
cmp eax, ecx
jb 0x451340
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov edx, dword [ebp + 0x14]
or eax, edx
je 0x451680
test edx, edx
jg 0x45166a
jl 0x45136d
test ecx, ecx
jae 0x45165f
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046ca44
mov esp, ebp
pop ebp
ret
push esi
xor edx, edx
mov dword [ebp - 0x314], 0xffffffff
push edi
xor edi, edi
mov dword [ebp - 0x310], edx
xor esi, esi
mov dword [ebp - 0x108], edi
mov dword [ebp - 0x20c], esi
add ebx, 4
mov dword [ebp - 0x31c], edx
mov eax, ecx
nop dword [eax]
xor ecx, ecx
cmp dword [ebx - 4], 0xffffffff
mov word [ebx + 2], cx
je 0x4514be
jae 0x4514f2
movzx eax, word [ebx]
mov ecx, eax
mov dword [ebp - 0x318], ecx
mov ecx, dword [ebx - 4]
test eax, 0x710
je 0x4514bb
mov eax, dword [ebp - 0x314]
cmp ecx, eax
cmova eax, ecx
mov dword [ebp - 0x314], eax
movzx eax, word [ebx]
test eax, 0x300
je 0x45143b
xor eax, eax
test edi, edi
je 0x45141e
cmp dword [ebp + eax*4 - 0x104], ecx
je 0x45141e
inc eax
cmp eax, edi
jb 0x451410
cmp eax, edi
jne 0x45143b
cmp edi, 0x40
jae 0x45143b
mov dword [ebp + eax*4 - 0x104], ecx
mov edi, dword [ebp - 0x108]
inc edi
mov dword [ebp - 0x108], edi
mov eax, dword [ebp - 0x318]
test al, 0x10
je 0x451481
xor eax, eax
test esi, esi
je 0x45145e
nop dword [eax + eax]
cmp dword [ebp + eax*4 - 0x208], ecx
je 0x45145e
inc eax
cmp eax, esi
jb 0x451450
cmp eax, esi
jne 0x45147b
cmp esi, 0x40
jae 0x45147b
mov dword [ebp + eax*4 - 0x208], ecx
mov esi, dword [ebp - 0x20c]
inc esi
mov dword [ebp - 0x20c], esi
mov eax, dword [ebp - 0x318]
test eax, 0x600
je 0x4514bb
xor eax, eax
test edx, edx
je 0x45149e
nop
cmp dword [ebp + eax*4 - 0x30c], ecx
je 0x45149e
inc eax
cmp eax, edx
jb 0x451490
cmp eax, edx
jne 0x4514bb
cmp edx, 0x40
jae 0x4514bb
mov dword [ebp + eax*4 - 0x30c], ecx
mov edx, dword [ebp - 0x310]
inc edx
mov dword [ebp - 0x310], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x31c]
add ebx, 8
inc ecx
mov dword [ebp - 0x31c], ecx
cmp ecx, eax
jb 0x4513c0
test edi, edi
jne 0x451511
test esi, esi
jne 0x451511
test edx, edx
jne 0x451511
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.004517c0
add esp, 8
jmp 0x451569
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046ca44
mov esp, ebp
pop ebp
ret
push dword [ebp + 0x14]
lea eax, [ebp - 0x320]
push dword [ebp + 0x10]
push eax
call fcn.00465b60
add esp, 0xc
lea esi, [ebp - 0x310]
lea ecx, [ebp - 0x20c]
push eax
xor eax, eax
cmp dword [ebp - 0x310], eax
cmove esi, eax
cmp dword [ebp - 0x20c], eax
push esi
cmove ecx, eax
xor edi, edi
cmp dword [ebp - 0x108], edi
lea eax, [ebp - 0x108]
push ecx
cmove eax, edi
push eax
mov eax, dword [ebp - 0x314]
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
test esi, esi
jg 0x451597
cmp esi, 0xffffffff
jne 0x451584
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
cmp eax, 0x2714
cmove esi, ecx
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046ca44
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x324]
xor edi, edi
add esi, 6
mov ebx, 0x400
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x45163f
lea ecx, [ebp - 0x108]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4515eb
movzx eax, word [esi - 2]
test eax, 0x100
je 0x4515dc
mov ecx, 0x100
or word [esi], cx
test eax, 0x300
je 0x4515eb
mov eax, 0x300
or word [esi], ax
lea eax, [ebp - 0x20c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x451608
test byte [esi - 2], 0x10
je 0x451608
or word [esi], 0x10
lea eax, [ebp - 0x310]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x451638
movzx eax, word [esi - 2]
test eax, 0x200
je 0x45162e
mov ecx, 0x200
or word [esi], cx
test eax, 0x400
je 0x451638
or word [esi], bx
cmp word [esi], 0
je 0x45163f
inc edi
add esi, 8
sub dword [ebp + 0xc], 1
jne 0x4515a7
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046ca44
mov esp, ebp
pop ebp
ret
test edx, edx
jl 0x451679
jg 0x45166a
cmp ecx, 0xffffffff
jb 0x451679
mov ecx, 0xfffffffe
mov dword [ebp - 0x324], 0
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop ebx
call fcn.0046ca44
mov esp, ebp
pop ebp
ret