Function at 0x404830
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea esi, [ebp - 0x18]
sub esp, 0x3cc
mov dword [ebp - 0x34c], esi
lea esi, [ebp - 0x36c]
fld qword [ebp + 8]
mov dword [ebp - 0x3a0], ecx
mov dword [ebp - 0x354], 0x607c20
mov dword [ebp - 0x350], 0x60e512
fstp qword [ebp - 0x3a8]
mov dword [ebp - 0x348], 0x404fe5
mov dword [ebp - 0x344], esp
mov dword [esp], esi
call fcn.004cf190
mov eax, dword [ebp - 0x3a0]
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x11c], 0
mov esi, dword [eax]
mov eax, dword [eax + 4]
cmp esi, eax
mov dword [ebp - 0x38c], eax
je 0x404b44
lea edi, [ebp - 0x220]
lea eax, [ebp - 0x324]
mov byte [ebp - 0x3a9], 0
xor ecx, ecx
mov byte [ebp - 0x3aa], 0
xor edx, edx
mov dword [ebp - 0x398], edi
lea edi, [ebp - 0x11c]
mov byte [ebp - 0x390], 0
xor ebx, ebx
mov dword [ebp - 0x384], 0
mov dword [ebp - 0x39c], eax
mov dword [ebp - 0x394], edi
mov dword [ebp - 0x378], eax
lea esi, [esi]
mov eax, dword [esi]
mov dword [ebp - 0x380], ebx
mov edi, dword [eax + 4]
mov eax, dword [esi + 4]
test al, 1
mov dword [ebp - 0x37c], eax
je 0x404990
test ebx, ebx
je 0x404b1c
cmp edi, dword [ebp - 0x320]
je 0x404990
xor eax, eax
mov dword [ebp - 0x380], edx
jmp 0x404952
mov edx, dword [ebp - 0x378]
cmp dword [edx + eax*4 + 4], edi
je 0x404b00
add eax, 1
cmp eax, ebx
jne 0x404942
cmp ebx, 0x3f
mov edx, dword [ebp - 0x380]
mov dword [ebp - 0x380], eax
ja 0x404990
lea eax, [ebx + 1]
mov dword [ebp - 0x380], eax
mov dword [ebp + ebx*4 - 0x320], edi
mov eax, dword [esi + 4]
mov byte [ebp - 0x390], 1
mov dword [ebp - 0x37c], eax
lea esi, [esi]
test byte [ebp - 0x37c], 2
mov dword [ebp - 0x388], edx
je 0x404a00
test edx, edx
je 0x404b35
cmp dword [ebp - 0x21c], edi
je 0x404a00
xor eax, eax
mov ebx, dword [ebp - 0x398]
jmp 0x4049ca
cmp dword [ebx + eax*4 + 4], edi
je 0x404b11
add eax, 1
cmp edx, eax
jne 0x4049c0
cmp edx, 0x3f
ja 0x404b11
lea eax, [edx + 1]
mov dword [ebp - 0x388], eax
mov dword [ebp + edx*4 - 0x21c], edi
mov eax, dword [esi + 4]
mov byte [ebp - 0x3aa], 1
mov dword [ebp - 0x37c], eax
lea esi, [esi]
test byte [ebp - 0x37c], 4
mov eax, ecx
je 0x404a70
test ecx, ecx
je 0x404b2b
cmp edi, dword [ebp - 0x118]
je 0x404a70
xor eax, eax
mov ebx, dword [ebp - 0x378]
mov edx, dword [ebp - 0x394]
jmp 0x404a3a
cmp dword [edx + eax*4 + 4], edi
je 0x404af0
add eax, 1
cmp ecx, eax
jne 0x404a30
cmp ecx, 0x3f
mov dword [ebp - 0x378], ebx
ja 0x404fde
lea eax, [ecx + 1]
mov dword [ebp + ecx*4 - 0x118], edi
mov ecx, dword [esi + 4]
mov byte [ebp - 0x3a9], 1
mov dword [ebp - 0x37c], ecx
lea esi, [esi]
mov ebx, dword [ebp - 0x384]
cmp edi, ebx
jbe 0x404a8b
mov edx, dword [ebp - 0x37c]
test edx, edx
cmove edi, ebx
mov dword [ebp - 0x384], edi
add esi, 8
cmp dword [ebp - 0x38c], esi
mov ebx, dword [ebp - 0x380]
mov edx, dword [ebp - 0x388]
mov ecx, eax
jne 0x404910
cmp byte [ebp - 0x390], 0
mov esi, eax
jne 0x404fd3
cmp byte [ebp - 0x3aa], 0
je 0x404acc
mov eax, dword [ebp - 0x388]
mov dword [ebp - 0x220], eax
cmp byte [ebp - 0x3a9], 0
je 0x404adb
mov dword [ebp - 0x11c], esi
mov eax, dword [ebp - 0x384]
add eax, 1
mov dword [ebp - 0x378], eax
jmp 0x404b80
mov dword [ebp - 0x378], ebx
mov eax, ecx
jmp 0x404a70
mov edx, dword [ebp - 0x380]
mov dword [ebp - 0x380], ebx
jmp 0x404990
mov dword [ebp - 0x388], edx
jmp 0x404a00
mov dword [ebp - 0x380], 1
jmp 0x404973
mov eax, 1
jmp 0x404a53
mov dword [ebp - 0x388], 1
jmp 0x4049e3
lea eax, [ebp - 0x324]
mov dword [ebp - 0x378], 1
mov dword [ebp - 0x384], 0
mov dword [ebp - 0x39c], eax
lea eax, [ebp - 0x220]
mov dword [ebp - 0x398], eax
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x394], eax
lea esi, [esi]
mov eax, dword [ebp - 0x3a0]
fld qword [eax + 0x10]
fldz
fucompi st(1)
fstp st(0)
ja 0x404f5e
fld qword [ebp - 0x3a8]
fstp qword [esp]
call fcn.004d4b10
fnstcw word [ebp - 0x36e]
movzx eax, word [ebp - 0x36e]
mov ah, 0xc
mov word [ebp - 0x370], ax
fldcw word [ebp - 0x370]
fist dword [ebp - 0x32c]
fldcw word [ebp - 0x36e]
fsubr qword [ebp - 0x3a8]
fmul dword [0x634ac0]
fstp qword [esp]
call fcn.004d4b10
fnstcw word [ebp - 0x36e]
movzx eax, word [ebp - 0x36e]
mov edx, 0x431bde83
mov ah, 0xc
mov word [ebp - 0x370], ax
fldcw word [ebp - 0x370]
fistp dword [ebp - 0x374]
fldcw word [ebp - 0x36e]
mov ecx, dword [ebp - 0x374]
mov eax, ecx
imul edx
mov eax, ecx
sar eax, 0x1f
sar edx, 0x12
sub edx, eax
imul eax, edx, 0xf4240
sub ecx, eax
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x328], ecx
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x394]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x398]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x39c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x378]
mov dword [esp], eax
mov dword [ebp - 0x368], 0xffffffff
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x378], eax
mov ebx, dword [ebp - 0x378]
sub esp, 0x14
test ebx, ebx
js 0x404f6b
mov eax, dword [ebp - 0x3a0]
mov esi, dword [eax + 4]
mov edi, dword [eax]
mov edx, esi
sub edx, edi
mov eax, edx
sar eax, 3
test eax, eax
je 0x404fad
cmp eax, 0x1fffffff
ja 0x404fc4
mov dword [esp], edx
mov dword [ebp - 0x368], 0xffffffff
call fcn.00606ce0
mov dword [ebp - 0x3a8], eax
mov eax, dword [ebp - 0x3a0]
mov esi, dword [eax + 4]
mov edi, dword [eax]
cmp edi, esi
je 0x404f2a
mov eax, dword [ebp - 0x3a8]
mov dword [ebp - 0x378], eax
mov edx, eax
mov eax, edi
nop
lea esi, [esi]
test edx, edx
je 0x404cfe
mov ecx, dword [eax]
mov ebx, dword [eax + 4]
mov dword [edx], ecx
mov dword [edx + 4], ebx
add eax, 8
add edx, 8
cmp eax, esi
jne 0x404cf0
add edi, 8
mov esi, dword [ebp - 0x3a8]
sub eax, edi
shr eax, 3
lea eax, [esi + eax*8 + 8]
cmp eax, esi
mov dword [ebp - 0x388], eax
jne 0x404d49
jmp 0x404f20
add dword [ebp - 0x378], 8
mov eax, dword [ebp - 0x378]
cmp dword [ebp - 0x388], eax
je 0x404f20
mov eax, dword [ebp - 0x378]
mov eax, dword [eax]
mov dword [ebp - 0x380], eax
mov eax, dword [eax + 4]
cmp eax, dword [ebp - 0x384]
mov dword [ebp - 0x37c], eax
ja 0x404d30
mov eax, dword [ebp - 0x39c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x37c]
mov dword [esp], eax
mov dword [ebp - 0x368], 1
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x404e94
mov ecx, dword [ebp - 0x380]
mov eax, dword [ecx]
mov dword [esp], 1
call dword [eax + 0xc]
sub esp, 4
mov dword [ebp - 0x38c], eax
mov dword [ebp - 0x390], 1
mov eax, dword [ebp - 0x398]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x37c]
mov dword [esp], eax
mov dword [ebp - 0x368], 1
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x404e05
mov ecx, dword [ebp - 0x380]
mov eax, dword [ecx]
mov dword [esp], 2
call dword [eax + 0xc]
or dword [ebp - 0x38c], eax
add dword [ebp - 0x390], 1
sub esp, 4
mov eax, dword [ebp - 0x394]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x37c]
mov dword [esp], eax
mov dword [ebp - 0x368], 1
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
jne 0x404eb0
mov edx, dword [ebp - 0x390]
test edx, edx
je 0x404d30
mov eax, dword [ebp - 0x38c]
test eax, eax
je 0x404ed9
mov eax, dword [ebp - 0x3a0]
mov edx, dword [eax]
mov ecx, dword [eax + 4]
cmp ecx, edx
je 0x404d30
mov eax, dword [ebp - 0x380]
cmp eax, dword [edx]
je 0x404e86
mov ebx, dword [ebp - 0x380]
lea eax, [edx + 8]
cmp ecx, eax
mov edx, eax
je 0x404d30
add eax, 8
cmp ebx, dword [eax - 8]
jne 0x404e74
mov eax, dword [ebp - 0x38c]
mov dword [edx + 4], eax
jmp 0x404d30
mov dword [ebp - 0x390], 0
mov dword [ebp - 0x38c], 0
jmp 0x404dba
mov ecx, dword [ebp - 0x380]
mov eax, dword [ecx]
mov dword [esp], 4
call dword [eax + 0xc]
or dword [ebp - 0x38c], eax
sub esp, 4
mov eax, dword [ebp - 0x38c]
test eax, eax
jne 0x404e4e
mov eax, dword [ebp - 0x380]
mov dword [esp], eax
mov ecx, dword [ebp - 0x3a0]
call fcn.00404630
mov eax, dword [ebp - 0x380]
sub esp, 4
cmp byte [eax + 9], 0
jne 0x404d30
mov ecx, eax
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov dword [ebp - 0x368], 1
call eax
jmp 0x404d30
mov ecx, dword [ebp - 0x3a8]
test ecx, ecx
je 0x404f38
mov eax, dword [ebp - 0x3a8]
mov dword [esp], eax
call fcn.00606c40
mov byte [ebp - 0x378], 1
lea eax, [ebp - 0x36c]
mov dword [esp], eax
call fcn.004cf200
movzx eax, byte [ebp - 0x378]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov dword [esp + 0x10], 0
jmp 0x404c38
mov dword [ebp - 0x368], 0xffffffff
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
je 0x404c86
mov eax, dword [ebp - 0x378]
mov dword [esp], 0x634a80
mov dword [esp + 4], eax
mov dword [ebp - 0x368], 0xffffffff
call fcn.0040b190
mov byte [ebp - 0x378], 0
jmp 0x404f3f
cmp esi, edi
mov dword [ebp - 0x3a8], 0
jne 0x404cd8
jmp 0x404f38
mov dword [ebp - 0x368], 0xffffffff
call fcn.005fe520
mov dword [ebp - 0x324], ebx
jmp 0x404ab7
mov eax, ecx
jmp 0x404a70