Function at 0x4f2cf0
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 0x4f2d3e
cmp eax, 3
je 0x4f2d3e
test eax, eax
jne 0x4f2d1b
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.004f19d0
mov ebp, dword [esi + 0x40]
test ebp, ebp
mov dword [esp + 0x14], ebp
jne 0x4f2d76
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 0x4f2f00
jmp 0x4f2da5
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.004f2480
test al, al
je 0x4f2eb4
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 0x4f2e86
mov ecx, esi
call fcn.004ef190
cmp eax, 0x2733
jne 0x4f2e95
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, esi
call fcn.004ef180
cmp eax, 0xffffffff
je 0x4f2e95
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 0x4f2e5c
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
jmp 0x4f2e5e
mov bl, 1
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esp + 0x14]
call fcn.004f19d0
mov edx, dword [esp + 0x14]
cmp dword [edx + 4], 3
je 0x4f2e7e
xor bl, bl
mov al, bl
mov ebx, dword [esp + 0x20]
jmp 0x4f2e8d
add edi, eax
cmp edi, ebp
setne al
test al, al
jne 0x4f2de0
cmp edi, 0xffffffff
je 0x4f2ee9
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
sub ecx, eax
mov dword [esp + 0x10], ecx
jne 0x4f2d9d
jmp 0x4f2ef9
lea eax, [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x4f2ed2
mov ecx, ebp
call fcn.004f1f10
push ebp
call fcn.0043f020
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.004ef190
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 0x4f2f24
mov ecx, ebp
call fcn.004f1f10
push ebp
call fcn.0043f020
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