Function at 0x4f1f70
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 0x4f1fbe
cmp eax, 3
je 0x4f1fbe
test eax, eax
jne 0x4f1f9b
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.004f0ee0
mov ebp, dword [edi + 0x40]
test ebp, ebp
mov dword [esp + 0x10], 0
jne 0x4f1ff6
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 0x4f2022
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 0x4f203d
push 0
push 0
mov ecx, ebp
call fcn.004f17d0
cmp eax, 1
jne 0x4f2080
mov eax, dword [ebp + 0x64]
cmp esi, eax
jbe 0x4f2048
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 0x4f21b4
mov edi, dword [esp + 0x1c]
mov edx, dword [ebp + 0x6c]
test edx, edx
je 0x4f20a2
mov eax, dword [ebp + 0x68]
mov ecx, dword [ebp + 0x58]
cmp eax, ecx
je 0x4f20a2
push edx
push eax
push ecx
call fcn.005d27d0
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 0x4f217c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
mov esi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jne 0x4f216a
push ebx
call esi
lea ecx, [edi + 8]
call fcn.004ee750
cmp eax, 0xffffffff
je 0x4f216a
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 0x4f212e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [esp + 0x13], 0
jmp 0x4f2133
mov byte [esp + 0x13], 1
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 4], 2
jne 0x4f2158
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 0x4f2140
cmp dword [edi + 4], 3
jne 0x4f216a
mov al, byte [esp + 0x13]
test al, al
jne 0x4f2080
lea ecx, [edi + 8]
call fcn.004ee760
mov dword [esp + 0x14], 0xffffffff
jmp 0x4f21c0
push eax
push esi
mov ecx, ebp
call fcn.004f17d0
cmp eax, 2
je 0x4f2196
mov esi, dword [esp + 0x230]
jmp 0x4f2022
mov ecx, ebp
call fcn.004f1ea0
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 0x4f21c0
mov dword [esp + 0x14], eax
lea eax, [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x4f21de
mov ecx, ebp
call fcn.004f1420
push ebp
call fcn.0043f0a0
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