Function at 0x4ed800
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6b6257
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x7adbc4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x238], ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x244], eax
test eax, eax
je 0x4ed847
mov dword [eax], 0x57
push 6
push 1
push 2
xor edi, edi
xor bl, bl
call dword [sym.imp.WSOCK32.dll_socket]
mov esi, eax
mov dword [ebp - 0x250], esi
mov dword [ebp - 4], edi
cmp esi, 0xffffffff
jne 0x4ed927
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov edi, eax
call fcn.00516890
mov esi, eax
mov ecx, esi
call fcn.00516630
cmp byte [0x7b8ad4], bl
jne 0x4ed8d4
mov ecx, 0xf0
call fcn.00516ef0
mov dword [ebp - 0x234], eax
mov byte [ebp - 4], 1
test eax, eax
je 0x4ed8c9
sub esp, 8
xorps xmm0, xmm0
mov ecx, eax
movsd qword [esp], xmm0
push 0x7b8ad4
sub esp, 0xc
push 0x1a9
push str.C:GitLab_Runner_buildsTzUW5DUw0windowswindows_agentRemoteInstallerInstallerUIutils_collector.cpp
push 0x50
call fcn.00516700
jmp 0x4ed8cb
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x7bb3dc], eax
mov ecx, esi
call fcn.00516640
mov ecx, dword [0x7bb3dc]
lea ecx, [ecx + 0xd0]
call fcn.00516630
mov eax, dword [0x7bb3dc]
push edi
push dword [ebp - 0x238]
mov ecx, dword [eax]
push str.Probe_socket_failed:__u:__d
push eax
call dword [ecx + 0x48]
mov ecx, dword [0x7bb3dc]
add esp, 0x10
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x7bb3dc]
lea ecx, [ecx + 0xd0]
call fcn.00516640
jmp 0x4edc64
xorps xmm0, xmm0
mov eax, 2
push 0x1bd
movlpd qword [ebp - 0x18], xmm0
mov word [ebp - 0x20], ax
call dword [sym.imp.WSOCK32.dll_htons]
push dword [ebp - 0x238]
mov word [ebp - 0x1e], ax
call dword [sym.imp.WSOCK32.dll_htonl]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x240]
push eax
push 0x8004667e
push esi
mov dword [ebp - 0x240], 1
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x4eda36
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov edi, eax
call fcn.00516890
mov ecx, eax
mov dword [ebp - 0x234], eax
call fcn.00516630
cmp byte [0x7b8ace], 0
jne 0x4ed9ea
mov ecx, 0xf0
call fcn.00516ef0
mov dword [ebp - 0x23c], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x4ed9df
sub esp, 8
xorps xmm0, xmm0
mov ecx, eax
movsd qword [esp], xmm0
push 0x7b8ace
sub esp, 0xc
push 0x1b6
push str.C:GitLab_Runner_buildsTzUW5DUw0windowswindows_agentRemoteInstallerInstallerUIutils_collector.cpp
push 0x50
call fcn.00516700
jmp 0x4ed9e1
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x7bb3bc], eax
mov ecx, dword [ebp - 0x234]
call fcn.00516640
mov ecx, dword [0x7bb3bc]
lea ecx, [ecx + 0xd0]
call fcn.00516630
mov eax, dword [0x7bb3bc]
push edi
push dword [ebp - 0x238]
mov ecx, dword [eax]
push str.Probe_ioctl_failed:__u:__d
push eax
call dword [ecx + 0x48]
mov ecx, dword [0x7bb3bc]
add esp, 0x10
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x7bb3bc]
jmp 0x4edc52
push 0x10
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.WSOCK32.dll_connect]
cmp eax, 0xffffffff
jne 0x4edb9d
mov ecx, dword [ebp + 8]
mov eax, 0x10624dd3
mul ecx
mov dword [ebp - 0x124], esi
shr edx, 6
imul eax, edx, 0x3e8
mov dword [ebp - 0x24c], edx
mov dword [ebp - 0x128], 1
mov dword [ebp - 0x22c], esi
mov dword [ebp - 0x230], 1
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [ebp - 0x248], eax
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x128]
push eax
push 0
push 0
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, 0xffffffff
jne 0x4edb75
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov edi, eax
call fcn.00516890
mov ecx, eax
mov dword [ebp - 0x234], eax
call fcn.00516630
cmp byte [0x7b8ad1], 0
jne 0x4edb29
mov ecx, 0xf0
call fcn.00516ef0
mov dword [ebp - 0x23c], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x4edb1e
sub esp, 8
xorps xmm0, xmm0
mov ecx, eax
movsd qword [esp], xmm0
push 0x7b8ad1
sub esp, 0xc
push 0x1cd
push str.C:GitLab_Runner_buildsTzUW5DUw0windowswindows_agentRemoteInstallerInstallerUIutils_collector.cpp
push 0x50
call fcn.00516700
jmp 0x4edb20
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x7bb3b8], eax
mov ecx, dword [ebp - 0x234]
call fcn.00516640
mov ecx, dword [0x7bb3b8]
lea ecx, [ecx + 0xd0]
call fcn.00516630
mov eax, dword [0x7bb3b8]
push edi
push dword [ebp - 0x238]
mov ecx, dword [eax]
push str.Probe_select_failed:__u:__d
push eax
call dword [ecx + 0x48]
mov ecx, dword [0x7bb3b8]
add esp, 0x10
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x7bb3b8]
jmp 0x4edc52
test eax, eax
je 0x4edc5d
lea eax, [ebp - 0x128]
push eax
push esi
call dword [sym.imp.WSOCK32.dll___WSAFDIsSet]
test eax, eax
movzx ebx, bl
mov ecx, 1
cmovne ebx, ecx
jmp 0x4edc5d
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov edi, eax
call fcn.00516890
mov ecx, eax
mov dword [ebp - 0x234], eax
call fcn.00516630
cmp byte [0x7b8acd], 0
jne 0x4edc0b
mov ecx, 0xf0
call fcn.00516ef0
mov dword [ebp - 0x23c], eax
mov byte [ebp - 4], 4
test eax, eax
je 0x4edc00
sub esp, 8
xorps xmm0, xmm0
mov ecx, eax
movsd qword [esp], xmm0
push 0x7b8acd
sub esp, 0xc
push 0x1dd
push str.C:GitLab_Runner_buildsTzUW5DUw0windowswindows_agentRemoteInstallerInstallerUIutils_collector.cpp
push 0x50
call fcn.00516700
jmp 0x4edc02
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x7bb3a0], eax
mov ecx, dword [ebp - 0x234]
call fcn.00516640
mov ecx, dword [0x7bb3a0]
lea ecx, [ecx + 0xd0]
call fcn.00516630
mov eax, dword [0x7bb3a0]
push edi
push dword [ebp - 0x238]
mov ecx, dword [eax]
push str.Probe_connect_failed:__u:__d
push eax
call dword [ecx + 0x48]
mov ecx, dword [0x7bb3a0]
add esp, 0x10
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x7bb3a0]
lea ecx, [ecx + 0xd0]
call fcn.00516640
push esi
call dword [sym.imp.WSOCK32.dll_closesocket]
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x4edc70
mov dword [eax], edi
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00669a8a
mov esp, ebp
pop ebp
ret