Function at 0x414380
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x35c
mov edi, dword [ebp + 8]
mov dword [ebp - 0x340], 0
mov dword [ebp - 0x344], 0
test edi, edi
je 0x4143cd
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x4143cd
mov eax, dword [ebp + 8]
cmp dword [eax], 0xffffffff
jne 0x4143e2
xor eax, eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
jmp 0x4143c6
cmp dword [ecx + eax*8], 0xffffffff
jne 0x4143e2
add eax, 1
cmp eax, edx
jne 0x4143c0
mov ebx, dword [ebp + 0x10]
test ebx, ebx
jne 0x414770
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp + 0x10]
xor ebx, ebx
test ecx, ecx
jle 0x4143ff
call fcn.00420e30
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x340], eax
mov dword [ebp - 0x344], edx
mov esi, dword [ebp + 0xc]
xor edi, edi
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x220], 0
lea eax, [eax + esi*8]
xor esi, esi
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x348], 0
mov dword [ebp - 0x33c], eax
mov dword [ebp - 0x350], ebx
mov eax, dword [ecx]
xor ebx, ebx
mov word [ecx + 6], bx
cmp eax, 0xffffffff
je 0x414533
movzx ebx, word [ecx + 4]
test bl, 7
je 0x414533
test bl, 1
je 0x4144b3
mov edx, dword [ebp - 0x348]
test edx, edx
je 0x41479c
cmp eax, dword [ebp - 0x320]
je 0x4144b3
mov dword [ebp - 0x34c], edi
xor edx, edx
mov edi, dword [ebp - 0x348]
jmp 0x41449d
cmp eax, dword [ebp + edx*4 - 0x320]
je 0x414680
add edx, 1
cmp edx, edi
jne 0x414490
cmp edx, 0x3f
mov edi, dword [ebp - 0x34c]
jbe 0x41479e
test bl, 4
je 0x4144f0
test edi, edi
je 0x41478b
cmp eax, dword [ebp - 0x21c]
je 0x4144f0
xor edx, edx
jmp 0x4144dd
cmp eax, dword [ebp + edx*4 - 0x21c]
je 0x414670
add edx, 1
cmp edx, edi
jne 0x4144d0
cmp edi, 0x3f
jbe 0x41478d
lea esi, [esi]
and ebx, 2
je 0x414533
test esi, esi
je 0x4147b1
cmp eax, dword [ebp - 0x118]
je 0x414533
xor edx, edx
jmp 0x41451d
cmp eax, dword [ebp + edx*4 - 0x118]
je 0x414690
add edx, 1
cmp edx, esi
jne 0x414510
cmp esi, 0x3f
ja 0x414533
mov dword [ebp + edx*4 - 0x118], eax
add esi, 1
add ecx, 8
cmp ecx, dword [ebp - 0x33c]
jne 0x414443
mov eax, dword [ebp - 0x348]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x220], edi
mov ebx, dword [ebp - 0x350]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x324], eax
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x11c], esi
xor esi, esi
test ecx, ecx
cmovns esi, eax
cmp dword [ebp + 0x10], 0
jle 0x414650
mov eax, 0x10624dd3
imul ebx
mov eax, ebx
sar eax, 0x1f
sar edx, 6
sub edx, eax
mov eax, ebx
mov dword [ebp - 0x32c], edx
imul edx, edx, 0x3e8
sub eax, edx
imul eax, eax, 0x3e8
mov dword [ebp - 0x328], eax
lea eax, [ebp - 0x11c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x220]
mov dword [esp + 8], eax
lea eax, [ebp - 0x324]
mov dword [esp + 0x10], esi
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.WS2_32.dll_select]
sub esp, 0x14
cmp eax, 0xffffffff
jne 0x4146b0
call edi
test eax, eax
je 0x4145ff
mov edx, dword [0x473280]
test edx, edx
jne 0x41463c
cmp eax, 0x2714
jne 0x41463c
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x414576
call fcn.00420e30
mov ecx, dword [ebp - 0x340]
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x344]
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 0xc], ecx
call fcn.00420e60
mov ebx, dword [ebp + 0x10]
sub ebx, eax
test ebx, ebx
jg 0x414576
lea esp, [ebp - 0xc]
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
jne 0x4145ad
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x328], 0
jmp 0x4145ad
cmp edi, edx
jne 0x4144f0
jmp 0x4144e4
mov edi, dword [ebp - 0x34c]
jmp 0x4144b3
cmp esi, edx
je 0x414524
add ecx, 8
cmp ecx, dword [ebp - 0x33c]
jne 0x414443
jmp 0x414542
test eax, eax
js 0x41463c
je 0x4143d8
mov edi, dword [ebp + 8]
xor esi, esi
xor ebx, ebx
mov dword [ebp - 0x33c], esi
mov esi, edi
mov edi, dword [ebp + 0xc]
jmp 0x4146e1
cmp word [esi + 6], 0
jne 0x41474c
add ebx, 1
add esi, 8
cmp ebx, edi
je 0x41475d
xor eax, eax
mov word [esi + 6], ax
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4146d7
lea ecx, [ebp - 0x324]
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x41470c
or word [esi + 6], 1
lea eax, [ebp - 0x220]
mov dword [esp + 4], eax
mov eax, dword [esi]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x41472c
or word [esi + 6], 4
lea eax, [ebp - 0x11c]
mov dword [esp + 4], eax
mov eax, dword [esi]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x4146d0
or word [esi + 6], 2
add ebx, 1
add esi, 8
add dword [ebp - 0x33c], 1
cmp ebx, edi
jne 0x4146e1
mov esi, dword [ebp - 0x33c]
lea esp, [ebp - 0xc]
pop ebx
mov eax, esi
pop esi
pop edi
pop ebp
ret
js 0x4147b8
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor edx, edx
mov dword [ebp + edx*4 - 0x21c], eax
add edi, 1
jmp 0x4144f0
xor edx, edx
mov dword [ebp + edx*4 - 0x320], eax
add dword [ebp - 0x348], 1
jmp 0x4144b3
xor edx, edx
jmp 0x414529
mov dword [esp], 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, 0xffffffff
sub esp, 4
jmp 0x4143da