Function at 0x4f2a60
Capabilities:
Get socket status

Disassembly:
sub esp, 0x218
push edi
mov edi, ecx
mov eax, dword [edi + 4]
cmp eax, 2
mov dword [esp + 0x10], edi
je 0x4f2aae
cmp eax, 3
je 0x4f2aae
test eax, eax
jne 0x4f2a8b
or eax, 0xffffffff
pop edi
add esp, 0x218
ret 8
mov edx, dword [esp + 0x224]
mov eax, dword [edi + 8]
push edx
mov edx, dword [esp + 0x224]
lea ecx, [edi + 8]
push edx
call dword [eax + 0x10]
pop edi
add esp, 0x218
ret 8
push ebx
push ebp
lea ebx, [edi + 0x28]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, edi
call fcn.004f19d0
mov ebp, dword [edi + 0x40]
test ebp, ebp
mov dword [esp + 0x10], 0
jne 0x4f2ae6
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebp
pop ebx
or eax, 0xffffffff
pop edi
add esp, 0x218
ret 8
push esi
lea eax, [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov esi, dword [esp + 0x230]
test esi, esi
jne 0x4f2b12
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebp
pop ebx
xor eax, eax
pop edi
add esp, 0x218
ret 8
mov eax, dword [ebp + 0x64]
test eax, eax
mov dword [esp + 0x18], esi
jne 0x4f2b2d
push 0
push 0
mov ecx, ebp
call fcn.004f22c0
cmp eax, 1
jne 0x4f2b70
mov eax, dword [ebp + 0x64]
cmp esi, eax
jbe 0x4f2b38
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x18]
mov esi, dword [ebp + 0x60]
mov edi, dword [esp + 0x22c]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 0x64]
mov edx, dword [ebp + 0x60]
sub esi, eax
add edx, eax
test eax, eax
mov dword [ebp + 0x64], esi
mov dword [ebp + 0x60], edx
jne 0x4f2ca4
mov edi, dword [esp + 0x1c]
mov edx, dword [ebp + 0x6c]
test edx, edx
je 0x4f2b92
mov eax, dword [ebp + 0x68]
mov ecx, dword [ebp + 0x58]
cmp eax, ecx
je 0x4f2b92
push edx
push eax
push ecx
call fcn.005d2b70
mov ecx, dword [ebp + 0x58]
add esp, 0xc
mov dword [ebp + 0x68], ecx
mov ecx, dword [ebp + 0x6c]
mov eax, dword [ebp + 0x5c]
mov esi, dword [ebp + 0x58]
mov edx, dword [edi + 8]
sub eax, ecx
add esi, ecx
lea ecx, [edi + 8]
push eax
push esi
call dword [edx + 0x10]
test eax, eax
jge 0x4f2c6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
mov esi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jne 0x4f2c5a
push ebx
call esi
lea ecx, [edi + 8]
call fcn.004ef180
cmp eax, 0xffffffff
je 0x4f2c5a
push 0
push 0
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x12c]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 1
mov dword [esp + 0x138], 0
mov dword [esp + 0x34], 1
call sub.WSOCK32.dll_select
cmp eax, 0xffffffff
jne 0x4f2c1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [esp + 0x13], 0
jmp 0x4f2c23
mov byte [esp + 0x13], 1
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 4], 2
jne 0x4f2c48
push ebx
call esi
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 4], 2
je 0x4f2c30
cmp dword [edi + 4], 3
jne 0x4f2c5a
mov al, byte [esp + 0x13]
test al, al
jne 0x4f2b70
lea ecx, [edi + 8]
call fcn.004ef190
mov dword [esp + 0x14], 0xffffffff
jmp 0x4f2cb0
push eax
push esi
mov ecx, ebp
call fcn.004f22c0
cmp eax, 2
je 0x4f2c86
mov esi, dword [esp + 0x230]
jmp 0x4f2b12
mov ecx, ebp
call fcn.004f2990
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebp
pop ebx
or eax, 0xffffffff
pop edi
add esp, 0x218
ret 8
mov esi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jbe 0x4f2cb0
mov dword [esp + 0x14], eax
lea eax, [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x4f2cce
mov ecx, ebp
call fcn.004f1f10
push ebp
call fcn.0043f020
add esp, 4
push ebx
call esi
mov eax, dword [esp + 0x14]
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x218
ret 8