Function at 0x4b8790
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c3089
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x6926dc]
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.00410760
cmp dword [ebp + 8], 0
jne 0x4b881d
mov eax, dword [ebp - 0x144]
mov dword [eax + 0x150], 1
push 0x6227c0
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 0x4b929e
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x6c]
call fcn.00411e10
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x6c]
call fcn.00410170
push 0x621431
push 0x6227e4
lea ecx, [ebp - 0x6c]
call fcn.00412ab0
push 0x621432
push 0x6227ec
lea ecx, [ebp - 0x6c]
call fcn.00412ab0
push 0x2f
lea ecx, [ebp - 0x6c]
call fcn.004142e0
lea ecx, [ebp - 0x6c]
call fcn.004d7b80
test eax, eax
jne 0x4b88b5
mov edx, dword [ebp - 0x144]
mov dword [edx + 0x150], 1
push 0x6227f8
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.004123c0
mov al, byte [ebp - 0x139]
jmp 0x4b929e
push 0x622820
lea ecx, [ebp - 0x6c]
call fcn.00414a40
movzx ecx, al
test ecx, ecx
je 0x4b88ec
push 0x62282c
mov ecx, dword [ebp - 0x144]
add ecx, 0x128
call fcn.004141a0
push 0x622838
lea ecx, [ebp - 0x6c]
call fcn.004141a0
movzx edx, byte [0x6897c4]
test edx, edx
je 0x4b8903
mov eax, dword [ebp + 0x10]
push eax
call fcn.004b6130
add esp, 4
lea ecx, [ebp - 0xbc]
call fcn.00411ff0
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0xbc]
call fcn.00411310
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0xc0], 0
push 0x20
push 0
lea edx, [ebp - 0x94]
push edx
call fcn.0057df80
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.0049ea10
push eax
push 2
call fcn.004b92c0
add esp, 0xc
movzx ecx, al
test ecx, ecx
je 0x4b89ae
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 0x4b89f7
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x6c]
call fcn.0049ea10
push eax
push 0x17
call fcn.004b92c0
add esp, 0xc
movzx edx, al
test edx, edx
je 0x4b89f7
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 [0x697418], 0
jne 0x4b8a4e
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.004b7c20
mov byte [ebp - 0x13a], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.004123c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004123c0
mov al, byte [ebp - 0x13a]
jmp 0x4b929e
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x94]
push edx
lea ecx, [ebp - 0xbc]
call fcn.0049ea10
push eax
lea ecx, [ebp - 0x6c]
call fcn.0049ea10
push eax
call dword [0x697418]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4b8b5c
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 0x6228b8
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
call eax
push 0x622908
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.004b6c10
add esp, 4
lea ecx, [ebp - 0x6c]
call fcn.0049ea10
push eax
push 0x62297c
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.0049ea10
push eax
push 0x62298c
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.004b7c20
mov byte [ebp - 0x13b], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.004123c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004123c0
mov al, byte [ebp - 0x13b]
jmp 0x4b929e
cmp dword [ebp - 0x1c], 0
je 0x4b8ca1
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov ecx, dword [ebp - 0x144]
call fcn.004b85c0
mov edx, dword [ebp - 0x1c]
push edx
mov ecx, dword [ebp - 0x144]
call fcn.004b86f0
mov dword [ebp - 0xc0], eax
cmp dword [ebp - 0xc0], 0
jne 0x4b8bac
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x144]
call fcn.004b8740
mov dword [ebp - 0xc0], eax
cmp dword [ebp - 0xc0], 0
jne 0x4b8bbe
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc0], ecx
mov edx, dword [ebp - 0xc0]
cmp dword [edx + 4], 2
jne 0x4b8bde
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 0x4b8bf0
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 0x4b8c26
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 0x4b8c44
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.00410760
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.004b54b0
add esp, 0xc
mov ecx, dword [ebp - 0x144]
add ecx, 0x128
call fcn.0049ea10
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 0x4b8d00
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.004b9310
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.004123c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004123c0
mov al, byte [ebp - 0x13c]
jmp 0x4b929e
push 1
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0xc0]
push edx
mov ecx, dword [ebp - 0x144]
call fcn.004b6580
mov byte [ebp - 0x25], al
movzx eax, byte [ebp - 0x25]
test eax, eax
je 0x4b8d32
mov ecx, dword [ebp - 0x144]
cmp dword [ecx + 0xa4], 0xffffffff
jne 0x4b8d9b
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.004b9310
add esp, 8
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x13d], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.004123c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004123c0
mov al, byte [ebp - 0x13d]
jmp 0x4b929e
mov eax, dword [ebp - 0x144]
cmp dword [eax + 0x11c], 0
je 0x4b8db5
mov ecx, dword [ebp - 0x144]
call fcn.004b5e60
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.00440e00
mov dword [ebp - 0xc4], eax
cmp dword [ebp - 0x14], 0
je 0x4b8e16
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x70]
jb 0x4b8e0b
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 0x70]
mov dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x2c], 0x64
jae 0x4b8e09
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x2c], 0x64
jmp 0x4b8e16
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 0x4b8ebc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x2733
je 0x4b8ebc
cmp dword [ebp - 0x20], 0x2726
jne 0x4b8ea6
lea ecx, [ebp - 0x6c]
call fcn.0049ea10
push eax
push 0x622a34
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 0x622a44
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 0x622a54
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 0x4b90a3
cmp dword [ebp - 0x2c], 0
je 0x4b90a3
cmp dword [ebp - 0x20], 0x2733
jne 0x4b90a3
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.004baf50
movzx eax, al
test eax, eax
je 0x4b9006
mov ecx, dword [ebp - 0x144]
call fcn.004b5ea0
mov ecx, dword [ebp - 0x144]
mov byte [ecx + 0xa0], 1
mov ecx, dword [ebp - 0x144]
add ecx, 0xb0
call fcn.00512690
lea ecx, [ebp - 0xfc]
call fcn.00411ff0
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.004b72a0
lea ecx, [ebp - 0xfc]
call fcn.0049ea10
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 0x622a74
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.004b9310
add esp, 8
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x13e], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xfc]
call fcn.004123c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.004123c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004123c0
mov al, byte [ebp - 0x13e]
jmp 0x4b929e
movzx eax, byte [ebp - 0xd]
test eax, eax
jne 0x4b909c
call fcn.00440e00
mov dword [ebp - 0x104], eax
mov dword [ebp - 0x108], 0x64
mov ecx, dword [ebp - 0x104]
cmp ecx, dword [ebp - 0xc4]
jbe 0x4b9047
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 0x4b909c
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 0x108]
mov dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x2c], 0x3e8
jbe 0x4b907d
mov dword [ebp - 0x70], 0x3e8
push 0x3e8
call fcn.00440df0
add esp, 4
jmp 0x4b908e
mov dword [ebp - 0x70], 0x64
push 0x64
call fcn.00440df0
add esp, 4
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x4b8dd6
mov byte [ebp - 0xd3], 1
mov eax, dword [ebp - 0x144]
cmp dword [eax + 0x11c], 0
je 0x4b90bd
mov ecx, dword [ebp - 0x144]
call fcn.004b5ea0
cmp dword [ebp - 0x24], 0
jne 0x4b91d1
mov ecx, dword [ebp - 0x144]
mov byte [ecx + 0xa0], 1
mov ecx, dword [ebp - 0x144]
add ecx, 0xb0
call fcn.00512690
mov ecx, dword [ebp - 0x144]
add ecx, 0x10
call fcn.004c1630
mov ecx, dword [ebp - 0x144]
add ecx, 0x58
call fcn.004c1630
lea ecx, [ebp - 0x134]
call fcn.00411ff0
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.004b72a0
lea ecx, [ebp - 0x134]
call fcn.0049ea10
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.004b9310
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.004123c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.004123c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004123c0
mov al, byte [ebp - 0x13f]
jmp 0x4b929e
movzx ecx, byte [ebp - 0x71]
test ecx, ecx
je 0x4b920a
mov edx, dword [ebp - 0x144]
mov eax, dword [edx + 0x11c]
push eax
push 0x622ab4
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 0x4b921a
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.004b6c40
add esp, 8
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.004b9310
add esp, 8
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x140], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.004123c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004123c0
mov al, byte [ebp - 0x140]
jmp 0x4b929e
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x30]
xor ecx, ebp
call fcn.0057bc02
mov esp, ebp
pop ebp
ret 0x18