Function at 0x487520
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x547bc3
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
mov eax, dword [0x5f5618]
xor eax, ebp
mov dword [ebp - 0x3c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xc4], ecx
mov eax, dword [ebp + 0x18]
movzx ecx, byte [eax + 0x48]
push ecx
push str.connect
mov edx, dword [ebp + 0x18]
push edx
lea ecx, [ebp - 0x20]
call fcn.004618f0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xc4]
cmp dword [eax + 0xa4], 0xffffffff
jne 0x4875bd
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 0x1c], 5
push str.Cannot_connect__invalid_socket
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x14]
call edx
mov byte [ebp - 0xb9], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00461950
mov al, byte [ebp - 0xb9]
jmp 0x4878db
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb54]
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 0
jne 0x4875d6
mov dword [ebp - 0x14], 0x1499700
mov ecx, dword [ebp - 0xc4]
call fcn.00484b40
call fcn.00460590
mov dword [ebp - 0x24], eax
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0xc4]
mov edx, dword [ecx + 0xa4]
push edx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4877ee
call fcn.00486ff0
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0x2733
jne 0x4877a4
mov eax, dword [ebp + 0x18]
movzx ecx, byte [eax + 0x48]
test ecx, ecx
je 0x487643
push str.Waiting_for_the_connect_to_complete...
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x18]
call edx
mov byte [ebp - 0x29], 0
mov byte [ebp - 0x2b], 1
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
movzx edx, byte [ebp - 0x2b]
push edx
movzx eax, byte [ebp - 0x29]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0xc4]
call fcn.004890d0
mov byte [ebp - 0x2a], al
movzx edx, byte [ebp - 0x2a]
test edx, edx
je 0x48772d
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 4
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x34]
push ecx
push 0x1007
push 0xffff
mov edx, dword [ebp - 0xc4]
mov eax, dword [edx + 0xa4]
push eax
call dword [sym.imp.WS2_32.dll_getsockopt]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x487719
cmp dword [ebp - 0x34], 0
je 0x487717
push str.getsockopt_indicates_an_error.
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 0x18]
push ecx
push 0
mov edx, dword [ebp - 0x34]
push edx
call fcn.00485a60
add esp, 0xc
mov eax, dword [ebp + 0x14]
mov dword [eax + 0x1c], 7
mov ecx, dword [ebp - 0xc4]
call fcn.0048a120
mov byte [ebp - 0xba], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00461950
mov al, byte [ebp - 0xba]
jmp 0x4878db
jmp 0x48772b
push str.Failed_to_get_SO_ERROR_on_socket.
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
jmp 0x4877a2
mov ecx, dword [ebp + 0x14]
movzx edx, byte [ecx + 0xd]
test edx, edx
je 0x487744
mov eax, dword [ebp + 0x14]
mov dword [eax + 0x1c], 4
jmp 0x487765
mov ecx, dword [ebp + 0x14]
movzx edx, byte [ecx + 0xc]
test edx, edx
je 0x48775b
mov eax, dword [ebp + 0x14]
mov dword [eax + 0x1c], 6
jmp 0x487765
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 0x1c], 7
mov edx, dword [ebp + 0x18]
push edx
push str.failedWaitToConnect
mov ecx, dword [ebp + 0x14]
call fcn.004a9240
mov ecx, dword [ebp - 0xc4]
call fcn.0048a120
mov byte [ebp - 0xbb], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00461950
mov al, byte [ebp - 0xbb]
jmp 0x4878db
jmp 0x4877ee
mov eax, dword [ebp + 0x14]
mov dword [eax + 0x1c], 7
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0x28]
push eax
call fcn.00485a60
add esp, 0xc
mov ecx, dword [ebp - 0xc4]
call fcn.0048a120
mov byte [ebp - 0xbc], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00461950
mov al, byte [ebp - 0xbc]
jmp 0x4878db
mov ecx, dword [ebp - 0xc4]
call fcn.00484b80
mov ecx, dword [ebp - 0xc4]
mov byte [ecx + 0xa0], 1
mov edx, dword [ebp + 0x18]
movzx eax, byte [edx + 0x48]
test eax, eax
je 0x48787e
lea ecx, [ebp - 0xb4]
call fcn.004292c0
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 0x18]
push ecx
lea edx, [ebp - 0xb8]
push edx
lea eax, [ebp - 0xb4]
push eax
mov ecx, dword [ebp - 0xc4]
call fcn.00486120
lea ecx, [ebp - 0xb4]
call fcn.004a9e20
push eax
push str.myIP
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x2c]
call eax
mov ecx, dword [ebp - 0xb8]
push ecx
push str.myPort
mov ecx, dword [ebp + 0x18]
call fcn.00461550
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00429410
mov edx, dword [ebp + 0x18]
push edx
mov ecx, dword [ebp - 0xc4]
add ecx, 0x10
call fcn.004e4640
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp - 0xc4]
add ecx, 0x58
call fcn.004e4640
mov ecx, dword [ebp + 0x18]
movzx edx, byte [ecx + 0x48]
test edx, edx
je 0x4878bf
push str.socket_connect_successful.
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x18]
call eax
mov byte [ebp - 0xbd], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00461950
mov al, byte [ebp - 0xbd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x3c]
xor ecx, ebp
call fcn.00541cc8
mov esp, ebp
pop ebp
ret 0x14