Function at 0x4c7fa0
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d35d9
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x6b4774]
xor eax, ebp
mov dword [ebp - 0x30], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x144], ecx
mov eax, dword [ebp + 0x1c]
mov byte [eax], 0
mov ecx, dword [ebp - 0x144]
mov dword [ecx + 0x150], 0
mov edx, dword [ebp + 0x18]
mov byte [edx], 0
mov ecx, dword [ebp - 0x144]
add ecx, 0x128
call fcn.0041ff70
cmp dword [ebp + 8], 0
jne 0x4c802d
mov eax, dword [ebp - 0x144]
mov dword [eax + 0x150], 1
push 0x6367c0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x10]
call eax
xor al, al
jmp 0x4c8aae
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x6c]
call fcn.00421620
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x6c]
call fcn.0041f980
push 0x635431
push 0x6367e4
lea ecx, [ebp - 0x6c]
call fcn.004222c0
push 0x635432
push 0x6367ec
lea ecx, [ebp - 0x6c]
call fcn.004222c0
push 0x2f
lea ecx, [ebp - 0x6c]
call fcn.00423af0
lea ecx, [ebp - 0x6c]
call fcn.00424460
test eax, eax
jne 0x4c80c5
mov edx, dword [ebp - 0x144]
mov dword [edx + 0x150], 1
push 0x6367f8
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x10]
call eax
mov byte [ebp - 0x139], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.00421bd0
mov al, byte [ebp - 0x139]
jmp 0x4c8aae
push 0x636820
lea ecx, [ebp - 0x6c]
call fcn.00424250
movzx ecx, al
test ecx, ecx
je 0x4c80fc
push 0x63682c
mov ecx, dword [ebp - 0x144]
add ecx, 0x128
call fcn.004239b0
push 0x636838
lea ecx, [ebp - 0x6c]
call fcn.004239b0
movzx edx, byte [0x6ab7c4]
test edx, edx
je 0x4c8113
mov eax, dword [ebp + 0x10]
push eax
call fcn.004c5940
add esp, 4
lea ecx, [ebp - 0xbc]
call fcn.00421800
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0xbc]
call fcn.00420b20
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0xc0], 0
push 0x20
push 0
lea edx, [ebp - 0x94]
push edx
call fcn.0058de90
add esp, 0xc
mov dword [ebp - 0x94], 8
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 1
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x6c]
call fcn.0055afa0
push eax
push 2
call fcn.004c8ad0
add esp, 0xc
movzx ecx, al
test ecx, ecx
je 0x4c81be
push str.This_is_an_IPV4_numeric_address...
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax + 0x14]
call edx
mov dword [ebp - 0x90], 2
mov eax, dword [ebp - 0x94]
or eax, 4
mov dword [ebp - 0x94], eax
jmp 0x4c8207
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x6c]
call fcn.0055afa0
push eax
push 0x17
call fcn.004c8ad0
add esp, 0xc
movzx edx, al
test edx, edx
je 0x4c8207
push str.This_is_an_IPV6_numeric_address...
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
call eax
mov dword [ebp - 0x90], 0x17
mov ecx, dword [ebp - 0x94]
or ecx, 4
mov dword [ebp - 0x94], ecx
cmp dword [0x6b8e98], 0
jne 0x4c825e
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x144]
call fcn.004c7430
mov byte [ebp - 0x13a], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.00421bd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.00421bd0
mov al, byte [ebp - 0x13a]
jmp 0x4c8aae
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x94]
push edx
lea ecx, [ebp - 0xbc]
call fcn.0055afa0
push eax
lea ecx, [ebp - 0x6c]
call fcn.0055afa0
push eax
call dword [0x6b8e98]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4c836c
push str.Failed_to_get_host_address_info.__1_
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x10]
call eax
push 0x6368b8
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
call eax
push 0x636908
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.004c6420
add esp, 4
lea ecx, [ebp - 0x6c]
call fcn.0055afa0
push eax
push 0x63697c
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax + 0x28]
call edx
lea ecx, [ebp - 0xbc]
call fcn.0055afa0
push eax
push 0x63698c
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x28]
call eax
push str.reverting_to_gethostbyname...
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x144]
call fcn.004c7430
mov byte [ebp - 0x13b], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.00421bd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.00421bd0
mov al, byte [ebp - 0x13b]
jmp 0x4c8aae
cmp dword [ebp - 0x1c], 0
je 0x4c84b1
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov ecx, dword [ebp - 0x144]
call fcn.004c7dd0
mov edx, dword [ebp - 0x1c]
push edx
mov ecx, dword [ebp - 0x144]
call fcn.004c7f00
mov dword [ebp - 0xc0], eax
cmp dword [ebp - 0xc0], 0
jne 0x4c83bc
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x144]
call fcn.004c7f50
mov dword [ebp - 0xc0], eax
cmp dword [ebp - 0xc0], 0
jne 0x4c83ce
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc0], ecx
mov edx, dword [ebp - 0xc0]
cmp dword [edx + 4], 2
jne 0x4c83ee
push str.Connect_using_IPV4.
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
call eax
jmp 0x4c8400
push str.Connect_using_IPV6.
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
call eax
mov dword [ebp - 0xc8], 0
mov ecx, dword [ebp - 0xc0]
cmp dword [ecx + 4], 2
jne 0x4c8436
mov edx, dword [ebp - 0xc0]
mov eax, dword [edx + 0x18]
mov dword [ebp - 0xcc], eax
mov ecx, dword [ebp - 0xcc]
add ecx, 4
mov dword [ebp - 0xc8], ecx
jmp 0x4c8454
mov edx, dword [ebp - 0xc0]
mov eax, dword [edx + 0x18]
mov dword [ebp - 0xd0], eax
mov ecx, dword [ebp - 0xd0]
add ecx, 8
mov dword [ebp - 0xc8], ecx
mov ecx, dword [ebp - 0x144]
add ecx, 0x128
call fcn.0041ff70
mov edx, dword [ebp - 0x144]
add edx, 0x128
push edx
mov eax, dword [ebp - 0xc8]
push eax
mov ecx, dword [ebp - 0xc0]
mov edx, dword [ecx + 4]
push edx
call fcn.004c4cc0
add esp, 0xc
mov ecx, dword [ebp - 0x144]
add ecx, 0x128
call fcn.0055afa0
push eax
push str.ipAddress1
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x28]
call eax
jmp 0x4c8510
push str.Failed_to_get_host_address_info.__5_
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x10]
call eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call fcn.004c8b20
add esp, 8
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp + 0x1c]
mov byte [eax], 1
mov byte [ebp - 0x13c], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.00421bd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.00421bd0
mov al, byte [ebp - 0x13c]
jmp 0x4c8aae
push 1
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0xc0]
push edx
mov ecx, dword [ebp - 0x144]
call fcn.004c5d90
mov byte [ebp - 0x25], al
movzx eax, byte [ebp - 0x25]
test eax, eax
je 0x4c8542
mov ecx, dword [ebp - 0x144]
cmp dword [ecx + 0xa4], 0xffffffff
jne 0x4c85ab
mov edx, dword [ebp - 0x144]
mov dword [edx + 0x150], 5
push str.Cannot_connect__invalid_socket__2_
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x10]
call eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call fcn.004c8b20
add esp, 8
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x13d], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.00421bd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.00421bd0
mov al, byte [ebp - 0x13d]
jmp 0x4c8aae
mov eax, dword [ebp - 0x144]
cmp dword [eax + 0x11c], 0
je 0x4c85c5
mov ecx, dword [ebp - 0x144]
call fcn.004c5670
mov ecx, dword [ebp - 0x144]
mov edx, dword [ecx + 0x11c]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x14], 0
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x70], 0x64
call fcn.00450670
mov dword [ebp - 0xc4], eax
cmp dword [ebp - 0x14], 0
je 0x4c8626
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x70]
jb 0x4c861b
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 0x70]
mov dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x2c], 0x64
jae 0x4c8619
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x2c], 0x64
jmp 0x4c8626
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x2c], 0x64
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x71], 0
mov edx, dword [ebp - 0xc0]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 0xc0]
mov edx, dword [ecx + 0x18]
push edx
mov eax, dword [ebp - 0x144]
mov ecx, dword [eax + 0xa4]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x4c86cc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x2733
je 0x4c86cc
cmp dword [ebp - 0x20], 0x2726
jne 0x4c86b6
lea ecx, [ebp - 0x6c]
call fcn.0055afa0
push eax
push 0x636a34
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax + 0x28]
call edx
mov eax, dword [ebp - 0x144]
mov ecx, dword [eax + 0xa4]
push ecx
push 0x636a44
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax + 0x34]
call edx
mov eax, dword [ebp - 0x20]
push eax
push 0x636a54
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x2c]
call eax
cmp dword [ebp - 0x24], 0
je 0x4c88b3
cmp dword [ebp - 0x2c], 0
je 0x4c88b3
cmp dword [ebp - 0x20], 0x2733
jne 0x4c88b3
lea ecx, [ebp - 0xd1]
push ecx
lea edx, [ebp - 0xd3]
push edx
lea eax, [ebp - 0xd2]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 1
mov edx, dword [ebp - 0x2c]
push edx
mov ecx, dword [ebp - 0x144]
call fcn.004ca760
movzx eax, al
test eax, eax
je 0x4c8816
mov ecx, dword [ebp - 0x144]
call fcn.004c56b0
mov ecx, dword [ebp - 0x144]
mov byte [ecx + 0xa0], 1
mov ecx, dword [ebp - 0x144]
add ecx, 0xb0
call fcn.00521ed0
lea ecx, [ebp - 0xfc]
call fcn.00421800
mov byte [ebp - 4], 2
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x100]
push eax
lea ecx, [ebp - 0xfc]
push ecx
mov ecx, dword [ebp - 0x144]
call fcn.004c6ab0
lea ecx, [ebp - 0xfc]
call fcn.0055afa0
push eax
push str.myIP_3
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax + 0x28]
call edx
mov eax, dword [ebp - 0x100]
push eax
push str.myPort_3
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x2c]
call eax
push 0x636a74
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call fcn.004c8b20
add esp, 8
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x13e], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xfc]
call fcn.00421bd0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.00421bd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.00421bd0
mov al, byte [ebp - 0x13e]
jmp 0x4c8aae
movzx eax, byte [ebp - 0xd]
test eax, eax
jne 0x4c88ac
call fcn.00450670
mov dword [ebp - 0x104], eax
mov dword [ebp - 0x108], 0x64
mov ecx, dword [ebp - 0x104]
cmp ecx, dword [ebp - 0xc4]
jbe 0x4c8857
mov edx, dword [ebp - 0x104]
sub edx, dword [ebp - 0xc4]
mov dword [ebp - 0x108], edx
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x108]
jbe 0x4c88ac
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 0x108]
mov dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x2c], 0x3e8
jbe 0x4c888d
mov dword [ebp - 0x70], 0x3e8
push 0x3e8
call fcn.00450660
add esp, 4
jmp 0x4c889e
mov dword [ebp - 0x70], 0x64
push 0x64
call fcn.00450660
add esp, 4
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x4c85e6
mov byte [ebp - 0xd3], 1
mov eax, dword [ebp - 0x144]
cmp dword [eax + 0x11c], 0
je 0x4c88cd
mov ecx, dword [ebp - 0x144]
call fcn.004c56b0
cmp dword [ebp - 0x24], 0
jne 0x4c89e1
mov ecx, dword [ebp - 0x144]
mov byte [ecx + 0xa0], 1
mov ecx, dword [ebp - 0x144]
add ecx, 0xb0
call fcn.00521ed0
mov ecx, dword [ebp - 0x144]
add ecx, 0x10
call fcn.004d0e40
mov ecx, dword [ebp - 0x144]
add ecx, 0x58
call fcn.004d0e40
lea ecx, [ebp - 0x134]
call fcn.00421800
mov byte [ebp - 4], 3
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x138]
push eax
lea ecx, [ebp - 0x134]
push ecx
mov ecx, dword [ebp - 0x144]
call fcn.004c6ab0
lea ecx, [ebp - 0x134]
call fcn.0055afa0
push eax
push str.myIP_4
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax + 0x28]
call edx
mov eax, dword [ebp - 0x138]
push eax
push str.myPort_4
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x2c]
call eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call fcn.004c8b20
add esp, 8
mov dword [ebp - 0x1c], 0
push str.connect_successful..
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
call eax
mov byte [ebp - 0x13f], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x134]
call fcn.00421bd0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.00421bd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.00421bd0
mov al, byte [ebp - 0x13f]
jmp 0x4c8aae
movzx ecx, byte [ebp - 0x71]
test ecx, ecx
je 0x4c8a1a
mov edx, dword [ebp - 0x144]
mov eax, dword [edx + 0x11c]
push eax
push 0x636ab4
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x2c]
call eax
mov ecx, dword [ebp - 0x144]
mov dword [ecx + 0x150], 6
jmp 0x4c8a2a
mov edx, dword [ebp - 0x144]
mov dword [edx + 0x150], 7
push str.Connect_function_failed.
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x10]
call eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call fcn.004c6450
add esp, 8
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.004c8b20
add esp, 8
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x140], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.00421bd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.00421bd0
mov al, byte [ebp - 0x140]
jmp 0x4c8aae
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x30]
xor ecx, ebp
call fcn.0058bad0
mov esp, ebp
pop ebp
ret 0x18