Function at 0x4221a0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x32c
mov eax, dword [0x481b08]
xor eax, esp
mov dword [esp + 0x328], eax
xor eax, eax
push ebp
mov ebp, dword [esp + 0x33c]
push esi
mov esi, dword [esp + 0x344]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x338]
push edi
mov edi, dword [esp + 0x340]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
cmp eax, 0xffffffff
jne 0x422243
cmp edi, 0xffffffff
jne 0x422243
cmp ebp, edi
jne 0x422243
test esi, esi
je 0x422229
jns 0x422222
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, edi
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.00449824
add esp, 0x32c
ret
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.00449824
add esp, 0x32c
ret
test esi, esi
jle 0x42225f
mov dword [esp + 0x18], esi
call fcn.00419e60
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x33c]
mov dword [esp + 0x10], edx
push ebx
xor ecx, ecx
xor edx, edx
or ebx, 0xffffffff
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x130], edx
cmp eax, 0xffffffff
je 0x422296
mov edx, 1
mov ecx, edx
mov dword [esp + 0x134], eax
mov dword [esp + 0x130], edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], ecx
mov ebx, eax
cmp edi, 0xffffffff
je 0x4222f6
xor eax, eax
test edx, edx
je 0x4222af
cmp dword [esp + eax*4 + 0x134], edi
je 0x4222af
inc eax
cmp eax, edx
jb 0x4222a1
cmp eax, edx
jne 0x4222c6
cmp edx, 0x40
jae 0x4222c6
mov dword [esp + eax*4 + 0x134], edi
inc dword [esp + 0x130]
xor eax, eax
test ecx, ecx
je 0x4222db
lea esp, [esp]
cmp dword [esp + eax*4 + 0x30], edi
je 0x4222db
inc eax
cmp eax, ecx
jb 0x4222d0
cmp eax, ecx
jne 0x4222f1
cmp ecx, 0x40
jae 0x4222f1
mov dword [esp + eax*4 + 0x30], edi
mov ecx, dword [esp + 0x2c]
inc ecx
mov dword [esp + 0x2c], ecx
cmp edi, ebx
cmova ebx, edi
mov dword [esp + 0x234], 0
cmp ebp, 0xffffffff
je 0x422341
xor eax, eax
mov dword [esp + 0x238], ebp
mov dword [esp + 0x234], 1
test ecx, ecx
je 0x42232b
mov edi, edi
cmp dword [esp + eax*4 + 0x30], ebp
je 0x42232b
inc eax
cmp eax, ecx
jb 0x422320
cmp eax, ecx
jne 0x42233c
cmp ecx, 0x40
jae 0x42233c
mov dword [esp + eax*4 + 0x30], ebp
inc dword [esp + 0x2c]
cmp ebp, ebx
cmova ebx, ebp
xor ecx, ecx
lea eax, [esp + 0x20]
test esi, esi
cmovs eax, ecx
lea ecx, [ebx + 1]
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], ecx
jmp 0x422360
test esi, esi
jle 0x422393
mov eax, 0x10624dd3
imul ebx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [esp + 0x20], ecx
imul ecx, ecx, 0x3e8
mov eax, ebx
sub eax, ecx
imul eax, eax, 0x3e8
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10]
jmp 0x4223a5
jne 0x4223a5
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x23c]
push eax
lea eax, [esp + 0x13c]
push eax
push dword [esp + 0x38]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x422414
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x4223e4
cmp dword [0x4830c0], 0
jne 0x422418
cmp eax, 0x2714
jne 0x422418
mov eax, dword [esp + 0x10]
test esi, esi
jle 0x422393
push dword [esp + 0x14]
push dword [esp + 0x1c]
call fcn.00419e60
push edx
push eax
call fcn.00419dd0
mov ebx, esi
sub ebx, eax
add esp, 0x10
test ebx, ebx
jle 0x422422
mov eax, dword [esp + 0x10]
jmp 0x422360
test eax, eax
jns 0x422420
or eax, 0xffffffff
jmp 0x4224bb
jne 0x422429
xor eax, eax
jmp 0x4224bb
mov ebx, dword [esp + 0x340]
xor esi, esi
cmp ebx, 0xffffffff
je 0x422461
lea eax, [esp + 0x130]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
lea eax, [esp + 0x2c]
push eax
mov ecx, 1
push ebx
cmovne esi, ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x422461
or esi, 4
cmp edi, 0xffffffff
je 0x42248d
lea eax, [esp + 0x130]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x42247b
or esi, 8
lea eax, [esp + 0x2c]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x42248d
or esi, 4
cmp ebp, 0xffffffff
je 0x4224b9
lea eax, [esp + 0x234]
push eax
push ebp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4224a7
or esi, 2
lea eax, [esp + 0x2c]
push eax
push ebp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4224b9
or esi, 4
mov eax, esi
mov ecx, dword [esp + 0x338]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00449824
add esp, 0x32c
ret