Function at 0x4a1610
Capabilities:
Get socket status

Disassembly:
sub esp, 0x334
mov eax, dword [0x5503c8]
xor eax, esp
mov dword [esp + 0x330], eax
mov edx, dword [esp + 0x340]
push ebx
mov ebx, dword [esp + 0x348]
push edi
mov edi, dword [esp + 0x340]
mov dword [esp + 0x24], edi
test edi, edi
je 0x4a165b
mov ecx, dword [esp + 0x344]
xor eax, eax
test ecx, ecx
je 0x4a165b
cmp dword [edi + eax*8], 0xffffffff
jne 0x4a169c
inc eax
cmp eax, ecx
jb 0x4a1650
mov eax, edx
or eax, ebx
je 0x4a1adb
test ebx, ebx
jg 0x4a1ac7
jl 0x4a1677
test edx, edx
jae 0x4a1abc
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop edi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.004cf8bc
add esp, 0x334
ret
push ebp
xor edx, edx
xor ebx, ebx
push esi
xor ebp, ebp
mov dword [esp + 0x138], ebx
or esi, 0xffffffff
mov dword [esp + 0x23c], ebp
mov dword [esp + 0x34], edx
add edi, 4
mov dword [esp + 0x18], esi
mov eax, ecx
mov dword [esp + 0x1c], edx
xor ecx, ecx
mov dword [esp + 0x24], esi
mov word [edi + 2], cx
mov ecx, dword [edi - 4]
cmp ecx, 0xffffffff
je 0x4a17bc
jae 0x4a17ff
movzx eax, word [edi]
mov edx, eax
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x34]
test eax, 0x710
je 0x4a17b5
cmp ecx, dword [esp + 0x24]
mov esi, ecx
cmovbe esi, dword [esp + 0x24]
mov dword [esp + 0x18], esi
test eax, 0x300
je 0x4a1743
xor eax, eax
test ebx, ebx
je 0x4a1724
cmp dword [esp + eax*4 + 0x13c], ecx
je 0x4a1724
inc eax
cmp eax, ebx
jb 0x4a1716
cmp eax, ebx
jne 0x4a1743
cmp ebx, 0x40
jae 0x4a1743
mov dword [esp + eax*4 + 0x13c], ecx
mov ebx, dword [esp + 0x138]
inc ebx
mov dword [esp + 0x138], ebx
mov eax, dword [esp + 0x10]
test al, 0x10
je 0x4a1782
xor eax, eax
test ebp, ebp
je 0x4a175f
cmp dword [esp + eax*4 + 0x240], ecx
je 0x4a175f
inc eax
cmp eax, ebp
jb 0x4a1751
cmp eax, ebp
jne 0x4a177e
cmp ebp, 0x40
jae 0x4a177e
mov dword [esp + eax*4 + 0x240], ecx
mov ebp, dword [esp + 0x23c]
inc ebp
mov dword [esp + 0x23c], ebp
mov eax, dword [esp + 0x10]
test eax, 0x600
je 0x4a17b5
xor eax, eax
test edx, edx
je 0x4a179b
nop
cmp dword [esp + eax*4 + 0x38], ecx
je 0x4a179b
inc eax
cmp eax, edx
jb 0x4a1790
cmp eax, edx
jne 0x4a17b1
cmp edx, 0x40
jae 0x4a17b1
mov dword [esp + eax*4 + 0x38], ecx
mov edx, dword [esp + 0x34]
inc edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x34c]
mov ecx, dword [esp + 0x1c]
add edi, 8
inc ecx
mov dword [esp + 0x1c], ecx
cmp ecx, eax
jb 0x4a16c6
test ebx, ebx
jne 0x4a1877
test ebp, ebp
jne 0x4a1877
test edx, edx
jne 0x4a1877
mov eax, dword [esp + 0x350]
mov ecx, dword [esp + 0x354]
or eax, ecx
jne 0x4a1826
jmp 0x4a19da
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop esi
pop ebp
pop edi
pop ebx
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.004cf8bc
add esp, 0x334
ret
test ecx, ecx
jg 0x4a184a
jl 0x4a1837
mov eax, dword [esp + 0x350]
test eax, eax
jae 0x4a1851
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x4a19da
mov eax, dword [esp + 0x350]
test ecx, ecx
jl 0x4a1869
jg 0x4a185c
cmp eax, 0xffffffff
jb 0x4a1869
mov eax, 0xfffffffe
mov dword [esp + 0x20], 0
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x4a19da
lea eax, [esp + 0x10]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x354]
test eax, eax
jg 0x4a18a4
jl 0x4a1897
mov ecx, dword [esp + 0x350]
test ecx, ecx
jae 0x4a18ab
mov dword [esp + 0x1c], 0
jmp 0x4a199b
mov ecx, dword [esp + 0x350]
test eax, eax
jl 0x4a198b
jg 0x4a18bd
test ecx, ecx
je 0x4a198b
mov eax, ecx
mov ebx, 0x1a9fbe77
mul ebx
mov ebp, 0x624dd2f
mov dword [esp + 0x10], eax
mov esi, edx
mov eax, ecx
mul ebp
push 0
mov edi, eax
mov ebp, edx
mov eax, dword [esp + 0x358]
mul ebx
push 0x3e8
mov ecx, eax
mov ebx, edx
mov eax, dword [esp + 0x35c]
mov edx, 0x624dd2f
mul edx
add ecx, esi
mov dword [esp + 0x18], eax
adc ebx, 0
add edi, ecx
mov ecx, dword [esp + 0x18]
adc ebp, 0
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x358]
xor eax, eax
add ebx, ebp
mov ebp, edi
adc eax, eax
add ecx, ebx
mov ebx, dword [esp + 0x35c]
mov esi, ebx
adc edx, eax
sub ebp, ecx
sbb esi, edx
shrd ebp, esi, 1
shr esi, 1
add ebp, ecx
adc esi, edx
shrd ebp, esi, 9
shr esi, 9
push esi
push ebp
call fcn.004d0490
sub edi, eax
push 0
push 0x3e8
sbb ebx, edx
push ebx
push edi
call fcn.004d0490
mov dword [esp + 0x14], edx
test esi, esi
jl 0x4a197a
jg 0x4a196d
cmp ebp, 0x7fffffff
jbe 0x4a197a
mov ebp, closesocket
mov dword [esp + 0x14], 0
mov ebx, dword [esp + 0x138]
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], eax
jmp 0x4a199b
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
push dword [esp + 0x1c]
xor eax, eax
lea edx, [esp + 0x38]
cmp dword [esp + 0x38], eax
lea ecx, [esp + 0x240]
cmove edx, eax
cmp dword [esp + 0x240], eax
push edx
cmove ecx, eax
xor esi, esi
test ebx, ebx
lea eax, [esp + 0x140]
push ecx
cmove eax, esi
push eax
mov eax, dword [esp + 0x28]
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x4a180d
mov esi, dword [esp + 0x2c]
xor edi, edi
mov eax, dword [esp + 0x34c]
add esi, 6
mov ebp, 0x100
mov ebx, 0x200
nop dword [eax]
xor ecx, ecx
mov word [esi], cx
mov ecx, dword [esi - 6]
cmp ecx, 0xffffffff
je 0x4a1aa2
lea eax, [esp + 0x138]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4a1a44
movzx ecx, word [esi - 2]
test ebp, ecx
je 0x4a1a2e
or word [esi], bp
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x300
je 0x4a1a44
or eax, 0x300
mov word [esi], ax
lea eax, [esp + 0x23c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4a1a62
test byte [esi - 2], 0x10
je 0x4a1a62
or word [esi], 0x10
lea eax, [esp + 0x34]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4a1a94
movzx ecx, word [esi - 2]
test ebx, ecx
je 0x4a1a7e
or word [esi], bx
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x400
je 0x4a1a94
or eax, 0x400
mov word [esi], ax
cmp word [esi], 0
mov eax, dword [esp + 0x34c]
je 0x4a1aa2
inc edi
add esi, 8
sub eax, 1
mov dword [esp + 0x34c], eax
jne 0x4a1a00
mov eax, edi
jmp 0x4a180d
test ebx, ebx
jl 0x4a1ad4
jg 0x4a1ac7
cmp edx, 0xffffffff
jb 0x4a1ad4
mov edx, 0xfffffffe
mov dword [esp + 0x28], 0
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x338]
xor eax, eax
pop edi
pop ebx
xor ecx, esp
call fcn.004cf8bc
add esp, 0x334
ret