Function at 0x45c130
Capabilities:
Connect socket

Disassembly:
push 0xffffffffffffffff
push 0x507a80
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x5894dc]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5894dc]
xor eax, esp
push eax
lea eax, [esp + 0x9c]
mov dword fs:[0], eax
mov eax, dword [esp + 0xc0]
mov ebx, dword [esp + 0xac]
mov esi, dword [esp + 0xbc]
mov edi, ecx
mov ecx, dword [esp + 0xc4]
mov dword [esp + 0x20], ecx
lea ebp, [edi + 0x128]
mov ecx, ebp
mov dword [esp + 0x28], ebx
mov dword [esp + 0x18], eax
mov dword [edi + 0x150], 0
call fcn.00407610
mov eax, dword [esp + 0x20]
test eax, eax
je 0x45c797
cmp dword [esp + 0xb4], 0
je 0x45c797
test ebx, ebx
mov edx, dword [esp + 0x18]
mov byte [edx], 0
jne 0x45c1f0
mov dword [edi + 0x150], 1
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push str.Cannot_connect__hostname_is_NULL
mov ecx, esi
call edx
xor al, al
jmp 0x45c7ae
push ebx
lea ecx, [esp + 0x3c]
call fcn.00407f30
lea ecx, [esp + 0x38]
mov dword [esp + 0xa4], 0
call fcn.00407400
lea ecx, [esp + 0x38]
call fcn.0046fb80
test eax, eax
jne 0x45c24e
mov dword [edi + 0x150], 1
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push str.Cannot_connect__hostname_is_zero_length
mov ecx, esi
call edx
lea ecx, [esp + 0x38]
mov dword [esp + 0xa4], 0xffffffff
call fcn.00408310
xor al, al
jmp 0x45c7ae
push str.localhost
lea ecx, [esp + 0x3c]
call fcn.00409680
test al, al
je 0x45c289
push str.127.0.0.1
mov ecx, ebp
call fcn.004091c0
push str.127.0.0.1
lea ecx, [esp + 0x3c]
call fcn.004091c0
lea ecx, [esp + 0x38]
call fcn.004e81e0
mov dword [esp + 0x28], eax
mov ebx, eax
cmp byte [0x58134c], 0
je 0x45c299
mov ecx, esi
call fcn.00457ca0
xor eax, eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0xb0]
push eax
mov word [esp + 0x8c], 2
call dword [sym.imp.WS2_32.dll_htons]
push ebx
mov word [esp + 0x8e], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
lea ecx, [esp + 0x60]
mov dword [esp + 0x8c], eax
call fcn.00408020
cmp dword [esp + 0x8c], 0xffffffff
mov ecx, dword [edi + 0x11c]
mov byte [esp + 0xa4], 1
mov dword [esp + 0x2c], 0
mov dword [esp + 0x1c], ecx
jne 0x45c488
mov byte [esp + 0x15], 0
mov byte [esp + 0x16], 0
call fcn.0041e170
mov ecx, dword [edi + 0xac]
lea edx, [esp + 0x16]
push edx
lea edx, [esp + 0x19]
push edx
lea edx, [esp + 0x34]
push edx
lea edx, [esp + 0x6c]
push edx
mov edx, dword [esp + 0x30]
push edx
mov edx, dword [esp + 0xc8]
push esi
push edx
mov dword [esp + 0x40], eax
mov eax, dword [edi + 0x11c]
push eax
push 0
push ecx
push ebx
call fcn.00458520
mov byte [esp + 0x43], al
add esp, 0x2c
lea eax, [esp + 0x60]
push eax
mov ecx, ebp
call fcn.00409270
cmp byte [esp + 0x17], 0
je 0x45c417
lea ecx, [esp + 0x60]
call fcn.0046fb80
test eax, eax
je 0x45c417
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x45c3f7
mov ebx, dword [esp + 0x1c]
test ebx, ebx
mov dword [esp + 0x8c], eax
je 0x45c494
call fcn.0041e170
mov ecx, dword [esp + 0x24]
cmp eax, ecx
jbe 0x45c494
sub eax, ecx
cmp eax, ebx
jb 0x45c3f0
mov dword [edi + 0x150], 3
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Application_timeout_after_DNS
mov ecx, esi
call eax
lea ecx, [esp + 0x60]
mov byte [esp + 0xa4], 0
call fcn.00408310
jmp 0x45c233
sub ebx, eax
jmp 0x45c494
lea ecx, [esp + 0x60]
mov dword [edi + 0x150], 2
mov byte [esp + 0xa4], 0
call fcn.00408310
jmp 0x45c233
mov ecx, dword [esp + 0x18]
mov byte [ecx], 1
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Cannot_get_host_by_name.
mov ecx, esi
call eax
push ebx
push str.hostname
mov ecx, esi
call fcn.00424660
cmp byte [esp + 0x15], 0
je 0x45c460
lea ecx, [esp + 0x60]
mov dword [edi + 0x150], 4
mov byte [esp + 0xa4], 0
call fcn.00408310
jmp 0x45c233
xor ecx, ecx
cmp byte [esp + 0x16], cl
mov byte [esp + 0xa4], 0
setne cl
add ecx, 2
mov dword [edi + 0x150], ecx
lea ecx, [esp + 0x60]
call fcn.00408310
jmp 0x45c233
push ebx
mov ecx, ebp
call fcn.004091c0
mov ebx, dword [esp + 0x1c]
push 1
push esi
mov ecx, edi
call fcn.0045aed0
test al, al
je 0x45c769
cmp dword [edi + 0xa4], 0xffffffff
je 0x45c769
test ebx, ebx
je 0x45c4be
mov ecx, edi
call fcn.00457f00
mov ebx, dword [edi + 0x11c]
mov dword [esp + 0x18], 0
mov byte [esp + 0x15], 0
mov ebp, 0x64
call fcn.0041e170
cmp dword [esp + 0x18], 0
mov dword [esp + 0x1c], eax
je 0x45c4fb
cmp ebx, ebp
jb 0x45c4f1
sub ebx, ebp
cmp ebx, 0x64
jae 0x45c4fb
mov ebx, 0x64
mov byte [esp + 0x15], 1
mov eax, dword [edi + 0xa4]
push 0x10
lea edx, [esp + 0x8c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
mov dword [esp + 0x34], eax
je 0x45c6f9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
mov dword [esp + 0x24], ebp
je 0x45c5a3
cmp ebp, 0x2726
jne 0x45c594
mov ebp, dword [esi]
lea ecx, [esp + 0x60]
add ebp, 0x28
call fcn.004e81e0
mov edx, dword [ebp]
push eax
push str.IP_Address
mov ecx, esi
call edx
mov ecx, dword [esp + 0x2c]
mov eax, dword [esi]
mov edx, dword [eax + 0x34]
push ecx
push str.ipAddr
mov ecx, esi
call edx
mov ecx, dword [esp + 0x28]
mov eax, dword [esi]
mov edx, dword [eax + 0x28]
push ecx
push str.Hostname
mov ecx, esi
call edx
mov ecx, dword [edi + 0xa4]
mov eax, dword [esi]
mov edx, dword [eax + 0x34]
push ecx
push str.SocketHandle
mov ecx, esi
call edx
mov ebp, dword [esp + 0x24]
mov eax, dword [esi]
mov edx, dword [eax + 0x2c]
push ebp
push str.sockError
mov ecx, esi
call edx
test ebx, ebx
je 0x45c704
cmp ebp, 0x2733
jne 0x45c6f9
lea eax, [esp + 0x17]
push eax
lea ecx, [esp + 0x37]
push ecx
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x1e]
push edx
mov edx, dword [esp + 0xc4]
lea eax, [esp + 0x3e]
push eax
mov eax, dword [esp + 0xc4]
push ecx
push esi
push 1
push ebx
push edx
push eax
mov ecx, edi
mov byte [esp + 0x3e], 0
call fcn.00458c40
test al, al
jne 0x45c660
cmp byte [esp + 0x16], al
jne 0x45c6a5
cmp byte [esp + 0x15], al
jne 0x45c6cc
call fcn.0041e170
mov edx, dword [esp + 0x1c]
cmp eax, edx
mov ecx, 0x64
jbe 0x45c61e
sub eax, edx
mov ecx, eax
cmp ebx, ecx
jbe 0x45c6f9
sub ebx, ecx
cmp ebx, 0x3e8
jbe 0x45c648
mov ebp, 0x3e8
push ebp
call fcn.0041e160
add esp, 4
add dword [esp + 0x18], 1
jmp 0x45c4d6
mov ebp, 0x64
push ebp
call fcn.0041e160
add esp, 4
add dword [esp + 0x18], 1
jmp 0x45c4d6
mov ecx, edi
call fcn.00457f30
lea ecx, [edi + 0xb0]
mov byte [edi + 0xa0], 1
call fcn.004b68d0
lea ecx, [esp + 0x60]
mov byte [esp + 0xa4], 0
call fcn.00408310
lea ecx, [esp + 0x38]
mov dword [esp + 0xa4], 0xffffffff
call fcn.00408310
mov al, 1
jmp 0x45c7ae
mov ecx, edi
call fcn.00457f30
lea ecx, [esp + 0x60]
mov dword [edi + 0x150], 4
mov byte [esp + 0xa4], 0
call fcn.00408310
jmp 0x45c233
mov eax, dword [edi + 0x11c]
mov dword [edi + 0x150], 6
mov edx, dword [esi]
mov edx, dword [edx + 0x2c]
push eax
push str.ConnectTimeoutMs
mov ecx, esi
call edx
push esi
push 0x2733
call fcn.00458120
add esp, 8
test ebx, ebx
je 0x45c704
mov ecx, edi
call fcn.00457f30
cmp dword [esp + 0x34], 0
jne 0x45c732
lea ecx, [edi + 0xb0]
mov byte [edi + 0xa0], 1
call fcn.004b68d0
lea ecx, [edi + 0x10]
call fcn.004b6930
lea ecx, [edi + 0x58]
call fcn.004b6930
jmp 0x45c679
cmp dword [edi + 0x150], 0
jne 0x45c745
mov dword [edi + 0x150], 7
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push str.Connect_function_failed
mov ecx, esi
call edx
lea ecx, [esp + 0x60]
mov byte [esp + 0xa4], 0
call fcn.00408310
jmp 0x45c233
mov dword [edi + 0x150], 5
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push str.Cannot_connect__invalid_socket__3_
mov ecx, esi
call edx
lea ecx, [esp + 0x60]
mov byte [esp + 0xa4], 0
call fcn.00408310
jmp 0x45c233
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xb0]
push ecx
push eax
push esi
push edx
push ebx
mov ecx, edi
call fcn.0045b2d0
mov ecx, dword [esp + 0x9c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x84]
xor ecx, esp
call fcn.004ec47e
add esp, 0x94
ret 0x1c