Function at 0x4144f0
Capabilities:
Get socket status

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x314
mov ebp, dword [esp + 0x334]
mov edi, dword [esp + 0x330]
mov edx, dword [esp + 0x32c]
mov esi, dword [esp + 0x328]
test esi, esi
sete al
test edx, edx
sete cl
or cl, al
jne 0x41453b
xor eax, eax
nop word cs:[eax + eax]
cmp dword [esi + eax*8], 0xffffffff
jne 0x41456b
inc eax
cmp edx, eax
jne 0x414530
xor ebx, ebx
mov eax, edi
or eax, ebp
je 0x414874
test ebp, ebp
js 0x4146d6
cmp edi, 0xfffffffe
mov eax, 0xfffffffe
cmovae edi, eax
test ebp, ebp
cmovne edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x414874
mov dword [esp + 0x210], 0
mov dword [esp + 0x10c], 0
mov dword [esp + 8], 0
xor esi, esi
xor ebp, ebp
xor edi, edi
xor ecx, ecx
jmp 0x4145b0
mov edx, dword [esp + 0x32c]
inc ecx
cmp ecx, edx
je 0x4146c2
mov ebx, dword [esp + 0x328]
mov word [ebx + ecx*8 + 6], 0
mov eax, dword [ebx + ecx*8]
cmp eax, 0xffffffff
je 0x4145a7
movzx ebx, word [ebx + ecx*8 + 4]
test ebx, 0x710
je 0x4145a7
test ebx, 0x300
je 0x41462c
xor edx, edx
test edi, edi
je 0x414600
nop word cs:[eax + eax]
cmp dword [esp + edx*4 + 0x214], eax
je 0x414600
inc edx
cmp edi, edx
jne 0x4145f0
mov edx, edi
cmp edx, edi
setne dl
cmp edi, 0x40
setae dh
or dh, dl
jne 0x414625
mov dword [esp + edi*4 + 0x214], eax
mov edi, dword [esp + 0x210]
inc edi
mov dword [esp + 0x210], edi
mov edx, dword [esp + 0x32c]
test bl, 0x10
je 0x41467c
xor edx, edx
test ebp, ebp
je 0x414650
nop word [eax + eax]
cmp dword [esp + edx*4 + 0x110], eax
je 0x414650
inc edx
cmp ebp, edx
jne 0x414640
mov edx, ebp
cmp edx, ebp
setne dl
cmp ebp, 0x40
setae dh
or dh, dl
jne 0x414675
mov dword [esp + ebp*4 + 0x110], eax
mov ebp, dword [esp + 0x10c]
inc ebp
mov dword [esp + 0x10c], ebp
mov edx, dword [esp + 0x32c]
test ebx, 0x600
je 0x4145a7
xor edx, edx
test esi, esi
je 0x41469d
nop
cmp dword [esp + edx*4 + 0xc], eax
je 0x41469d
inc edx
cmp esi, edx
jne 0x414690
mov edx, esi
cmp edx, esi
setne dl
cmp esi, 0x40
setae dh
or dh, dl
jne 0x4145a0
mov dword [esp + esi*4 + 0xc], eax
mov esi, dword [esp + 8]
inc esi
mov dword [esp + 8], esi
jmp 0x4145a0
test edi, edi
je 0x4146eb
lea ebx, [esp + 0x210]
mov edi, dword [esp + 0x328]
jmp 0x414741
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ebx, 0xffffffff
jmp 0x414874
xor ebx, ebx
mov eax, ebp
or eax, esi
mov edi, dword [esp + 0x328]
jne 0x414741
xor ebx, ebx
mov ecx, dword [esp + 0x330]
mov eax, ecx
mov edx, dword [esp + 0x334]
or eax, edx
je 0x41485d
test edx, edx
js 0x414881
cmp ecx, 0xfffffffe
mov eax, 0xfffffffe
cmovae ecx, eax
test edx, edx
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp ebx, 0xffffffff
jne 0x414874
jmp 0x414862
mov eax, esp
push dword [esp + 0x334]
push dword [esp + 0x334]
push eax
call fcn.0041ad40
add esp, 0xc
test ebp, ebp
lea ecx, [esp + 0x10c]
cmovne ebp, ecx
test esi, esi
lea ecx, [esp + 8]
cmovne esi, ecx
push eax
push esi
push ebp
push ebx
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x41485b
xor ebx, ebx
xor ebp, ebp
mov ecx, dword [esp + 0x32c]
jmp 0x4147ac
movzx eax, word [edi + ebp*8 + 6]
cmp ax, 1
sbb ebx, 0xffffffff
mov ecx, dword [esp + 0x32c]
inc ebp
cmp ecx, ebp
je 0x414874
mov word [edi + ebp*8 + 6], 0
mov eax, dword [edi + ebp*8]
cmp eax, 0xffffffff
je 0x4147a3
lea ecx, [esp + 0x210]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4147ea
movzx eax, word [edi + ebp*8 + 4]
test eax, 0x100
je 0x4147de
or byte [edi + ebp*8 + 7], 1
test eax, 0x300
je 0x4147ea
or byte [edi + ebp*8 + 7], 3
lea eax, [esp + 0x10c]
push eax
push dword [edi + ebp*8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41480a
test byte [edi + ebp*8 + 4], 0x10
je 0x41480a
or byte [edi + ebp*8 + 6], 0x10
lea eax, [esp + 8]
push eax
push dword [edi + ebp*8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x414790
movzx esi, word [edi + ebp*8 + 4]
mov ecx, esi
and ecx, 0x200
or cx, word [edi + ebp*8 + 6]
mov edx, esi
and dx, 0x400
mov eax, 1
cmove eax, ecx
test esi, 0x600
je 0x414795
movzx edx, dx
or edx, ecx
mov word [edi + ebp*8 + 6], dx
jmp 0x414795
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x414874
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ebx, ebx
cmp eax, 0x2714
setne bl
neg ebx
mov eax, ebx
add esp, 0x314
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ebx, 0xffffffff
cmp ebx, 0xffffffff
jne 0x414874
jmp 0x414862