Function at 0x4f2200
Capabilities:
Get socket status

Disassembly:
sub esp, 0x228
push esi
mov esi, ecx
mov eax, dword [esi + 4]
cmp eax, 2
mov dword [esp + 8], esi
je 0x4f224e
cmp eax, 3
je 0x4f224e
test eax, eax
jne 0x4f222b
or eax, 0xffffffff
pop esi
add esp, 0x228
ret 8
mov edx, dword [esp + 0x234]
mov eax, dword [esi + 8]
push edx
mov edx, dword [esp + 0x234]
lea ecx, [esi + 8]
push edx
call dword [eax + 0x14]
pop esi
add esp, 0x228
ret 8
push ebx
push ebp
lea ebx, [esi + 0x28]
push ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, esi
call fcn.004f0ee0
mov ebp, dword [esi + 0x40]
test ebp, ebp
mov dword [esp + 0x14], ebp
jne 0x4f2286
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebp
pop ebx
or eax, 0xffffffff
pop esi
add esp, 0x228
ret 8
push edi
lea eax, [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x240]
test eax, eax
mov edi, dword [esp + 0x23c]
mov dword [esp + 0x10], eax
je 0x4f2410
jmp 0x4f22b5
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x30]
push edx
push eax
push edi
mov ecx, ebp
call fcn.004f1990
test al, al
je 0x4f23c4
mov eax, dword [esp + 0x1c]
mov ebp, dword [esp + 0x24]
add edi, eax
mov dword [esp + 0x2c], edi
xor edi, edi
add esi, 8
lea esp, [esp]
mov ecx, dword [esp + 0x28]
mov edx, dword [esi]
mov eax, ebp
sub eax, edi
push eax
push ecx
mov ecx, esi
call dword [edx + 0x14]
test eax, eax
jge 0x4f2396
mov ecx, esi
call fcn.004ee760
cmp eax, 0x2733
jne 0x4f23a5
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, esi
call fcn.004ee750
cmp eax, 0xffffffff
je 0x4f23a5
push 0
push 0
lea edx, [esp + 0x38]
mov dword [esp + 0x3c], eax
push edx
lea eax, [esp + 0x140]
push eax
push 1
mov dword [esp + 0x148], 0
mov dword [esp + 0x44], 1
call sub.WSOCK32.dll_select
cmp eax, 0xffffffff
jne 0x4f236c
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
jmp 0x4f236e
mov bl, 1
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esp + 0x14]
call fcn.004f0ee0
mov edx, dword [esp + 0x14]
cmp dword [edx + 4], 3
je 0x4f238e
xor bl, bl
mov al, bl
mov ebx, dword [esp + 0x20]
jmp 0x4f239d
add edi, eax
cmp edi, ebp
setne al
test al, al
jne 0x4f22f0
cmp edi, 0xffffffff
je 0x4f23f9
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
sub ecx, eax
mov dword [esp + 0x10], ecx
jne 0x4f22ad
jmp 0x4f2409
lea eax, [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x4f23e2
mov ecx, ebp
call fcn.004f1420
push ebp
call fcn.0043f0a0
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop ebp
pop ebx
or eax, 0xffffffff
pop esi
add esp, 0x228
ret 8
mov ecx, dword [esp + 0x14]
add ecx, 8
call fcn.004ee760
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x240]
sub eax, dword [esp + 0x10]
mov esi, eax
lea eax, [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x4f2434
mov ecx, ebp
call fcn.004f1420
push ebp
call fcn.0043f0a0
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop ebp
pop ebx
mov eax, esi
pop esi
add esp, 0x228
ret 8