Function at 0x4fd040
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c1b08
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x68cc00]
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 edi, ecx
cmp dword [edi + 0xd0], 0x4901fb2a
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
je 0x4fd095
xor al, al
jmp 0x4fd202
movzx eax, byte [esi + 0x129]
lea ecx, [ebp - 0x28]
push eax
push str.connect
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
push esi
movq qword [ebp - 0x28], xmm0
call fcn.00447f20
mov ecx, dword [edi + 0x294]
mov dword [ebp - 4], 0
cmp ecx, 0xffffffff
jne 0x4fd0e4
mov dword [ebx + 0x28], 5
mov ecx, esi
mov eax, dword [esi]
push str.Cannot_connect__invalid_socket
call dword [eax + 0x14]
jmp 0x4fd1f6
mov eax, dword [ebp - 0x14]
mov edx, 0x1499700
mov dword [ebp - 0x1c], 1
mov eax, dword [eax + 0xc20]
test eax, eax
cmove eax, edx
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
push eax
push 0x8004667e
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
call sub.KERNEL32.DLL_GetTickCount
push dword [ebp + 0x10]
push dword [ebp - 0x18]
push dword [edi + 0x294]
call dword [sym.imp.WS2_32.dll_connect]
cmp dword [edi + 0xd0], 0x4901fb2a
jne 0x4fd1f6
test eax, eax
je 0x4fd248
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x4fd2e9
cmp byte [esi + 0x129], 0
je 0x4fd175
mov eax, dword [esi]
mov ecx, esi
push str.Waiting_for_the_connect_to_complete...
call dword [eax + 0x18]
push dword [ebp - 0x14]
mov ecx, esi
push str.connectTimeoutMs
call fcn.00448710
push esi
push ebx
push 1
push 0
push dword [ebp - 0x14]
mov ecx, edi
call fcn.00501490
cmp dword [edi + 0xd0], 0x4901fb2a
jne 0x4fd1f6
test al, al
je 0x4fd2aa
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x18], 4
push eax
push 0x1007
push 0xffff
push dword [edi + 0x294]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4fd228
cmp dword [ebp - 0x14], eax
je 0x4fd220
mov eax, dword [esi]
mov ecx, esi
push str.getsockopt_indicates_an_error.
call dword [eax + 0x14]
push esi
push 0
push dword [ebp - 0x14]
call fcn.004ff220
add esp, 0xc
mov dword [ebx + 0x28], 7
mov ecx, edi
call fcn.004fe3d0
xor bl, bl
lea ecx, [ebp - 0x28]
call fcn.00447ff0
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.005af5a8
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [edi + 0xd0]
jmp 0x4fd241
mov eax, dword [esi]
mov ecx, esi
push str.Failed_to_get_SO_ERROR_on_socket.
call dword [eax + 0x14]
mov eax, dword [edi + 0xd0]
cmp eax, 0x4901fb2a
jne 0x4fd1f6
cmp eax, 0x4901fb2a
jne 0x4fd1f6
mov byte [edi + 0x290], 1
mov byte [edi + 0x292], 0
cmp byte [esi + 0x129], 0
je 0x4fd336
push 0x74
lea eax, [ebp - 0x9c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x9c]
call fcn.0042a8a0
cmp dword [edi + 0x298], 2
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x9c]
mov byte [ebp - 4], 1
mov dword [ebp - 0x14], 0
mov ecx, edi
push eax
jne 0x4fd300
call fcn.004fce00
jmp 0x4fd305
cmp byte [ebx + 0x15], 0
je 0x4fd2c9
push esi
push str.failedWaitToConnect
mov ecx, ebx
mov dword [ebx + 0x28], 4
call fcn.0046d4b0
jmp 0x4fd1ef
xor eax, eax
mov ecx, ebx
cmp byte [ebx + 0x14], al
push esi
sete al
add eax, 6
push str.failedWaitToConnect
mov dword [ebx + 0x28], eax
call fcn.0046d4b0
jmp 0x4fd1ef
push esi
push ebx
push eax
mov dword [ebx + 0x28], 7
call fcn.004ff220
add esp, 0xc
jmp 0x4fd1ef
call fcn.004fcf20
lea eax, [ebp - 0x9c]
mov ecx, esi
push eax
push str.myIP
call fcn.00448a80
push dword [ebp - 0x14]
mov ecx, esi
push str.myPort
call fcn.00448710
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 0
call fcn.0042a8f0
push esi
lea ecx, [edi + 0xe0]
call fcn.004e0970
push esi
lea ecx, [edi + 0x128]
call fcn.004e0970
cmp byte [esi + 0x129], 0
je 0x4fd363
mov eax, dword [esi]
mov ecx, esi
push str.socket_connect_successful.
call dword [eax + 0x18]
mov bl, 1
jmp 0x4fd1f8