Function at 0x521a10
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6264f7
mov eax, dword fs:[0]
push eax
sub esp, 0x158
mov eax, dword [0x70bddc]
xor eax, ebp
mov dword [ebp - 0x2c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x160], ecx
mov eax, dword [ebp - 0x160]
mov dword [eax + 0x138], 0
mov ecx, dword [ebp - 0x160]
add ecx, 0x110
call fcn.00476590
cmp dword [ebp + 0x20], 0
je 0x521a72
cmp dword [ebp + 0x10], 0
jne 0x521b0c
mov byte [ebp - 0xbd], 0
lea ecx, [ebp - 0xbd]
push ecx
mov edx, dword [ebp + 0x1c]
push edx
mov eax, dword [ebp + 0x20]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x160]
call fcn.0051ff00
mov byte [ebp - 0xbe], al
movzx ecx, byte [ebp - 0xbe]
test ecx, ecx
jne 0x521b01
movzx edx, byte [ebp - 0xbd]
test edx, edx
je 0x521b01
push 1
push str.IPV4_retry2
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x24]
call eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 0x20]
push edx
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x160]
call fcn.0051f380
mov byte [ebp - 0xbe], al
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x28]
call eax
mov al, byte [ebp - 0xbe]
jmp 0x52273a
mov ecx, dword [ebp + 0x1c]
mov byte [ecx], 0
cmp dword [ebp + 8], 0
jne 0x521b41
mov edx, dword [ebp - 0x160]
mov dword [edx + 0x138], 1
push str.Cannot_connect__hostname_is_NULL
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
xor al, al
jmp 0x52273a
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x64]
call fcn.00478140
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x64]
call fcn.00475f60
lea ecx, [ebp - 0x64]
call fcn.00475bf0
test eax, eax
jne 0x521bab
mov edx, dword [ebp - 0x160]
mov dword [edx + 0x138], 1
push str.Cannot_connect__hostname_is_zero_length
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
mov byte [ebp - 0x149], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.00478a70
mov al, byte [ebp - 0x149]
jmp 0x52273a
push 0x68b60c
lea ecx, [ebp - 0x64]
call fcn.0047bc00
movzx ecx, al
test ecx, ecx
je 0x521be2
push 0x68b618
mov ecx, dword [ebp - 0x160]
add ecx, 0x110
call fcn.0047b1e0
push 0x68b624
lea ecx, [ebp - 0x64]
call fcn.0047b1e0
movzx edx, byte [0x703afc]
test edx, edx
je 0x521bf9
mov eax, dword [ebp + 0x18]
push eax
call fcn.0051d710
add esp, 4
lea ecx, [ebp - 0xb4]
call fcn.004786a0
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0xb4]
call fcn.004774f0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0xb8], 0
push 0x20
push 0
lea edx, [ebp - 0x88]
push edx
call fcn.005e0440
add esp, 0xc
mov dword [ebp - 0x88], 8
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], 1
mov byte [ebp - 0xe], 0
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x64]
call fcn.00510620
push eax
push 2
call fcn.00520b90
add esp, 0xc
movzx ecx, al
test ecx, ecx
je 0x521ca5
push str.This_is_an_IPV4_numeric_address.
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x18]
call edx
mov dword [ebp - 0x84], 2
mov eax, dword [ebp - 0x88]
or eax, 4
mov dword [ebp - 0x88], eax
jmp 0x521cf4
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x64]
call fcn.00510620
push eax
push 0x17
call fcn.00520b90
add esp, 0xc
movzx edx, al
test edx, edx
je 0x521cf0
push str.This_is_an_IPV6_numeric_address.
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x18]
call eax
mov dword [ebp - 0x84], 0x17
mov ecx, dword [ebp - 0x88]
or ecx, 4
mov dword [ebp - 0x88], ecx
jmp 0x521cf4
mov byte [ebp - 0xe], 1
movzx edx, byte [ebp - 0xe]
test edx, edx
jne 0x521d82
push str.Hostname_to_IP_address_resolution_not_needed.
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x18]
call eax
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp + 0x18]
push edx
lea eax, [ebp - 0x88]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x64]
call fcn.00510620
push eax
call fcn.005217c0
add esp, 0x14
movzx edx, al
test edx, edx
jne 0x521d7d
mov eax, dword [ebp - 0x160]
mov dword [eax + 0x138], 2
mov byte [ebp - 0x14a], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00478a70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.00478a70
mov al, byte [ebp - 0x14a]
jmp 0x52273a
jmp 0x521fa2
push str.Multi_threaded_hostname_to_IP_address_resolution
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x18]
call eax
push 0x60
call fcn.005b8d20
add esp, 4
mov dword [ebp - 0x154], eax
mov byte [ebp - 4], 2
cmp dword [ebp - 0x154], 0
je 0x521dc4
mov ecx, dword [ebp - 0x154]
call fcn.0057d910
mov dword [ebp - 0x164], eax
jmp 0x521dce
mov dword [ebp - 0x164], 0
mov ecx, dword [ebp - 0x164]
mov dword [ebp - 0x150], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x150]
mov dword [ebp - 0xc4], edx
cmp dword [ebp - 0xc4], 0
jne 0x521e45
push str.Memory_allocation_failure.
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp - 0x160]
mov dword [ecx + 0x138], 5
mov byte [ebp - 0x155], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00478a70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.00478a70
mov al, byte [ebp - 0x155]
jmp 0x52273a
push 0x1446
mov ecx, dword [ebp - 0xc4]
call fcn.0057dba0
mov edx, dword [ebp - 0x160]
mov eax, dword [edx + 0x104]
mov dword [ebp - 0xcc], eax
mov byte [ebp - 0xc6], 0
mov byte [ebp - 0xcd], 0
mov byte [ebp - 0xc5], 0
push 1
push str.resolveHostname6
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x24]
call eax
lea ecx, [ebp - 0xcd]
push ecx
lea edx, [ebp - 0xc6]
push edx
mov eax, dword [ebp - 0x80]
push eax
mov ecx, dword [ebp - 0x7c]
push ecx
mov edx, dword [ebp - 0x88]
push edx
mov eax, dword [ebp - 0x84]
push eax
mov ecx, dword [ebp + 0x20]
push ecx
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0xcc]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea ecx, [ebp - 0x64]
call fcn.00510620
push eax
mov ecx, dword [ebp - 0xc4]
call fcn.0057cef0
mov byte [ebp - 0xc5], al
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x28]
call eax
mov ecx, dword [ebp - 0xc4]
mov edx, dword [ecx + 0x58]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0xc4]
mov dword [eax + 0x58], 0
mov ecx, dword [ebp - 0xc4]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0xc4]
mov eax, dword [edx]
call eax
movzx ecx, byte [ebp - 0xc5]
test ecx, ecx
jne 0x521fa2
movzx edx, byte [ebp - 0xc6]
test edx, edx
je 0x521f45
mov eax, dword [ebp - 0x160]
mov dword [eax + 0x138], 4
jmp 0x521f72
movzx ecx, byte [ebp - 0xcd]
test ecx, ecx
je 0x521f62
mov edx, dword [ebp - 0x160]
mov dword [edx + 0x138], 3
jmp 0x521f72
mov eax, dword [ebp - 0x160]
mov dword [eax + 0x138], 2
mov byte [ebp - 0x156], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00478a70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.00478a70
mov al, byte [ebp - 0x156]
jmp 0x52273a
cmp dword [ebp - 0x18], 0
je 0x5220e7
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov ecx, dword [ebp - 0x160]
call fcn.0051fd50
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x160]
call fcn.0051fe60
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
jne 0x521ff2
mov ecx, dword [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 0x160]
call fcn.0051feb0
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
jne 0x522004
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0xb8], edx
mov eax, dword [ebp - 0xb8]
cmp dword [eax + 4], 2
jne 0x522024
push str.Connecting_to_IPV4_address.
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x18]
call eax
jmp 0x522036
push str.Connecting_to_IPV6_address.
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x18]
call eax
mov dword [ebp - 0xd4], 0
mov ecx, dword [ebp - 0xb8]
cmp dword [ecx + 4], 2
jne 0x52206c
mov edx, dword [ebp - 0xb8]
mov eax, dword [edx + 0x18]
mov dword [ebp - 0xd8], eax
mov ecx, dword [ebp - 0xd8]
add ecx, 4
mov dword [ebp - 0xd4], ecx
jmp 0x52208a
mov edx, dword [ebp - 0xb8]
mov eax, dword [edx + 0x18]
mov dword [ebp - 0xdc], eax
mov ecx, dword [ebp - 0xdc]
add ecx, 8
mov dword [ebp - 0xd4], ecx
mov ecx, dword [ebp - 0x160]
add ecx, 0x110
call fcn.00476590
mov edx, dword [ebp - 0x160]
add edx, 0x110
push edx
mov eax, dword [ebp - 0xd4]
push eax
mov ecx, dword [ebp - 0xb8]
mov edx, dword [ecx + 4]
push edx
call fcn.0051c6f0
add esp, 0xc
mov ecx, dword [ebp - 0x160]
add ecx, 0x110
call fcn.00510620
push eax
push str.ipAddress2
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x2c]
call eax
jmp 0x522127
mov ecx, dword [ebp - 0x160]
mov dword [ecx + 0x138], 2
mov byte [ebp - 0x157], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00478a70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.00478a70
mov al, byte [ebp - 0x157]
jmp 0x52273a
push 1
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp - 0xb8]
push eax
mov ecx, dword [ebp - 0x160]
call fcn.0051db60
mov byte [ebp - 0x21], al
movzx ecx, byte [ebp - 0x21]
test ecx, ecx
je 0x522159
mov edx, dword [ebp - 0x160]
cmp dword [edx + 0xa4], 0xffffffff
jne 0x5221c2
mov eax, dword [ebp - 0x160]
mov dword [eax + 0x138], 5
push str.Cannot_connect__invalid_socket__4_
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
mov edx, dword [ebp - 0x18]
push edx
call fcn.00520be0
add esp, 8
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x158], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00478a70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.00478a70
mov al, byte [ebp - 0x158]
jmp 0x52273a
mov eax, dword [ebp - 0x160]
mov ecx, dword [eax + 0x104]
mov dword [ebp - 0x28], ecx
cmp dword [ebp - 0x28], 0
je 0x5221e2
mov ecx, dword [ebp - 0x160]
call fcn.0051d350
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], 0
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x68], 0x64
call fcn.0048f310
mov dword [ebp - 0xbc], eax
cmp dword [ebp - 0x14], 0
je 0x52223b
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x68]
jb 0x522230
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x68]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0x64
jae 0x52222e
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x28], 0x64
jmp 0x52223b
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x28], 0x64
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0xb8]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 0xb8]
mov ecx, dword [eax + 0x18]
push ecx
mov edx, dword [ebp - 0x160]
mov eax, dword [edx + 0xa4]
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x5222d3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0x2733
je 0x5222d3
cmp dword [ebp - 0x1c], 0x2726
jne 0x5222c2
lea ecx, [ebp - 0x64]
call fcn.00510620
push eax
push str.HostOrIpAddress
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 - 0x160]
mov edx, dword [ecx + 0xa4]
push edx
push str.SocketHandle
mov ecx, dword [ebp + 0x18]
call fcn.00490470
mov eax, dword [ebp - 0x1c]
push eax
push str.sockError
mov ecx, dword [ebp + 0x18]
call fcn.004903d0
cmp dword [ebp - 0x20], 0
je 0x52259b
cmp dword [ebp - 0x28], 0
je 0x52259b
cmp dword [ebp - 0x1c], 0x2733
jne 0x52259b
mov byte [ebp - 0xdf], 0
mov byte [ebp - 0xe0], 0
mov byte [ebp - 0xdd], 0
mov byte [ebp - 0xde], 0
lea ecx, [ebp - 0xdd]
push ecx
lea edx, [ebp - 0xe0]
push edx
lea eax, [ebp - 0xdf]
push eax
lea ecx, [ebp - 0xde]
push ecx
mov edx, dword [ebp + 0x20]
push edx
mov eax, dword [ebp + 0x18]
push eax
push 1
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x160]
call fcn.00522c00
movzx ecx, al
test ecx, ecx
je 0x522457
mov ecx, dword [ebp - 0x160]
call fcn.0051d390
mov edx, dword [ebp - 0x160]
mov byte [edx + 0xa0], 1
mov ecx, dword [ebp - 0x160]
add ecx, 0x10
call fcn.00528850
mov ecx, dword [ebp - 0x160]
add ecx, 0x58
call fcn.00528850
lea ecx, [ebp - 0x10c]
call fcn.004786a0
mov byte [ebp - 4], 3
mov eax, dword [ebp + 0x18]
push eax
lea ecx, [ebp - 0x110]
push ecx
lea edx, [ebp - 0x10c]
push edx
mov ecx, dword [ebp - 0x160]
call fcn.0051e990
lea ecx, [ebp - 0x10c]
call fcn.00510620
push eax
push str.myIP_5
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x2c]
call eax
mov ecx, dword [ebp - 0x110]
push ecx
push str.myPort_5
mov ecx, dword [ebp + 0x18]
call fcn.004903d0
push str.connect_successful__3_
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x18]
call edx
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00520be0
add esp, 8
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x159], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10c]
call fcn.00478a70
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00478a70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.00478a70
mov al, byte [ebp - 0x159]
jmp 0x52273a
movzx edx, byte [ebp - 0xdf]
test edx, edx
je 0x5224c9
mov ecx, dword [ebp - 0x160]
call fcn.0051d390
mov eax, dword [ebp - 0x160]
mov dword [eax + 0x138], 4
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.00520be0
add esp, 8
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x15a], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00478a70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.00478a70
mov al, byte [ebp - 0x15a]
jmp 0x52273a
movzx eax, byte [ebp - 0xd]
test eax, eax
jne 0x522561
call fcn.0048f310
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x118], 0x64
mov ecx, dword [ebp - 0x114]
cmp ecx, dword [ebp - 0xbc]
jbe 0x52250a
mov edx, dword [ebp - 0x114]
sub edx, dword [ebp - 0xbc]
mov dword [ebp - 0x118], edx
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x118]
jbe 0x52255f
mov ecx, dword [ebp - 0x28]
sub ecx, dword [ebp - 0x118]
mov dword [ebp - 0x28], ecx
cmp dword [ebp - 0x28], 0x3e8
jbe 0x522540
mov dword [ebp - 0x68], 0x3e8
push 0x3e8
call fcn.0048f300
add esp, 4
jmp 0x522551
mov dword [ebp - 0x68], 0x64
push 0x64
call fcn.0048f300
add esp, 4
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x5221fb
jmp 0x52259b
mov eax, dword [ebp - 0x160]
mov dword [eax + 0x138], 6
mov ecx, dword [ebp - 0x160]
mov edx, dword [ecx + 0x104]
push edx
push str.ConnectTimeoutMs_5
mov ecx, dword [ebp + 0x18]
call fcn.004903d0
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.0051e2e0
add esp, 8
cmp dword [ebp - 0x28], 0
je 0x5225ac
mov ecx, dword [ebp - 0x160]
call fcn.0051d390
cmp dword [ebp - 0x20], 0
jne 0x5226a7
mov edx, dword [ebp - 0x160]
mov byte [edx + 0xa0], 1
mov ecx, dword [ebp - 0x160]
add ecx, 0x10
call fcn.00528850
mov ecx, dword [ebp - 0x160]
add ecx, 0x58
call fcn.00528850
lea ecx, [ebp - 0x144]
call fcn.004786a0
mov byte [ebp - 4], 4
mov eax, dword [ebp + 0x18]
push eax
lea ecx, [ebp - 0x148]
push ecx
lea edx, [ebp - 0x144]
push edx
mov ecx, dword [ebp - 0x160]
call fcn.0051e990
lea ecx, [ebp - 0x144]
call fcn.00510620
push eax
push str.myIP_6
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x2c]
call eax
mov ecx, dword [ebp - 0x148]
push ecx
push str.myPort_6
mov ecx, dword [ebp + 0x18]
call fcn.004903d0
push str.connect_successful__4_
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x18]
call edx
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00520be0
add esp, 8
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x15b], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x144]
call fcn.00478a70
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00478a70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.00478a70
mov al, byte [ebp - 0x15b]
jmp 0x52273a
mov edx, dword [ebp - 0x160]
cmp dword [edx + 0x138], 0
jne 0x5226c6
mov eax, dword [ebp - 0x160]
mov dword [eax + 0x138], 7
push str.Connect_function_failed
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
mov edx, dword [ebp - 0x18]
push edx
call fcn.00520be0
add esp, 8
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x15c], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb4]
call fcn.00478a70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.00478a70
mov al, byte [ebp - 0x15c]
jmp 0x52273a
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x2c]
xor ecx, ebp
call fcn.005dca77
mov esp, ebp
pop ebp
ret 0x1c