Function at 0x421e40
Capabilities:
Get socket status

Disassembly:
sub esp, 0x334
mov eax, dword [0x481b08]
xor eax, esp
mov dword [esp + 0x330], eax
mov ecx, dword [esp + 0x340]
push ebp
push esi
mov esi, dword [esp + 0x340]
xor eax, eax
mov dword [esp + 0x18], esi
mov dword [esp + 0xc], ecx
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 8], eax
test esi, esi
je 0x421e9c
mov ebp, dword [esp + 0x344]
test ebp, ebp
je 0x421e9c
cmp dword [esi + eax*8], 0xffffffff
jne 0x421ecf
inc eax
cmp eax, ebp
jb 0x421e91
test ecx, ecx
je 0x42217b
jns 0x422174
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop esi
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.00449824
add esp, 0x334
ret
test ecx, ecx
jle 0x421ee4
mov dword [esp + 8], ecx
call fcn.00419e60
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edx
push ebx
or ebx, 0xffffffff
push edi
xor edi, edi
xor edx, edx
xor esi, esi
xor eax, eax
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x34], edi
mov dword [esp + 0x138], edx
mov dword [esp + 0x23c], esi
mov dword [esp + 0x18], eax
nop
xor ecx, ecx
mov word [ebx + eax*8 + 6], cx
mov ecx, dword [ebx + eax*8]
cmp ecx, 0xffffffff
je 0x421ff5
movzx ebx, word [ebx + eax*8 + 4]
test bl, 7
je 0x421ff1
mov eax, dword [esp + 0x1c]
cmp ecx, eax
cmova eax, ecx
mov dword [esp + 0x1c], eax
test bl, 1
je 0x421f71
xor eax, eax
test edi, edi
je 0x421f5b
lea esp, [esp]
cmp dword [esp + eax*4 + 0x38], ecx
je 0x421f5b
inc eax
cmp eax, edi
jb 0x421f50
cmp eax, edi
jne 0x421f71
cmp edi, 0x40
jae 0x421f71
mov dword [esp + eax*4 + 0x38], ecx
mov edi, dword [esp + 0x34]
inc edi
mov dword [esp + 0x34], edi
test bl, 4
je 0x421fad
xor eax, eax
test edx, edx
je 0x421f8e
lea esp, [esp]
cmp dword [esp + eax*4 + 0x13c], ecx
je 0x421f8e
inc eax
cmp eax, edx
jb 0x421f80
cmp eax, edx
jne 0x421fad
cmp edx, 0x40
jae 0x421fad
mov dword [esp + eax*4 + 0x13c], ecx
mov edx, dword [esp + 0x138]
inc edx
mov dword [esp + 0x138], edx
test bl, 2
je 0x421fed
xor eax, eax
test esi, esi
je 0x421fce
jmp 0x421fc0
cmp dword [esp + eax*4 + 0x240], ecx
je 0x421fce
inc eax
cmp eax, esi
jb 0x421fc0
cmp eax, esi
jne 0x421fed
cmp esi, 0x40
jae 0x421fed
mov dword [esp + eax*4 + 0x240], ecx
mov esi, dword [esp + 0x23c]
inc esi
mov dword [esp + 0x23c], esi
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
inc eax
mov dword [esp + 0x18], eax
cmp eax, ebp
jb 0x421f10
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
mov ebp, dword [sym.imp.WS2_32.dll_select]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
test eax, eax
lea esi, [esp + 0x2c]
cmovs esi, ecx
mov ecx, dword [esp + 0x10]
inc ebx
test eax, eax
jle 0x422057
mov eax, 0x10624dd3
imul ecx
mov eax, dword [esp + 0x10]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [esp + 0x2c], ecx
imul ecx, ecx, 0x3e8
sub eax, ecx
imul eax, eax, 0x3e8
mov dword [esp + 0x30], eax
jmp 0x422069
jne 0x422069
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
push esi
lea eax, [esp + 0x240]
push eax
lea eax, [esp + 0x140]
push eax
lea eax, [esp + 0x40]
push eax
push ebx
call ebp
cmp eax, 0xffffffff
jne 0x4220d7
call edi
test eax, eax
je 0x42209d
cmp dword [0x4830c0], 0
jne 0x4220db
cmp eax, 0x2714
jne 0x4220db
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
test eax, eax
jle 0x422057
push dword [esp + 0x24]
push dword [esp + 0x2c]
call fcn.00419e60
push edx
push eax
call fcn.00419dd0
mov ecx, dword [esp + 0x24]
sub ecx, eax
add esp, 0x10
mov dword [esp + 0x10], ecx
test ecx, ecx
jle 0x4220db
mov eax, dword [esp + 0x14]
jmp 0x422026
test eax, eax
jns 0x4220f7
or eax, 0xffffffff
pop edi
pop ebx
pop esi
pop ebp
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.00449824
add esp, 0x334
ret
jne 0x4220fd
xor eax, eax
jmp 0x4220de
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x34c]
xor edi, edi
add esi, 6
lea ecx, [ecx]
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x422167
lea ecx, [esp + 0x34]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x422130
or word [esi], 1
lea eax, [esp + 0x138]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x422148
or word [esi], 4
lea eax, [esp + 0x23c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x422160
or word [esi], 2
cmp word [esi], 0
je 0x422167
inc edi
add esi, 8
dec ebx
jne 0x422110
mov eax, edi
jmp 0x4220de
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x338]
pop esi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.00449824
add esp, 0x334
ret