Function at 0x5aa540
Capabilities:
Check for time delay via gettickcount
Connect socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x640814
mov eax, dword fs:[0]
push eax
sub esp, 0xe4
push ebx
push esi
push edi
mov eax, dword [0x703eb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
lea ecx, [edi + 0x128]
mov dword [edi + 0x150], ebx
call fcn.0053aff0
cmp dword [ebp + 0x20], ebx
je 0x5aad46
cmp dword [ebp + 0x10], ebx
je 0x5aad46
mov eax, dword [ebp + 0x1c]
mov byte [eax], bl
mov eax, dword [ebp + 8]
cmp eax, ebx
jne 0x5aa5cd
mov ecx, dword [ebp + 0x18]
mov dword [edi + 0x150], 1
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
push str.Cannot_connect__hostname_is_NULL
call eax
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
push eax
lea ecx, [ebp - 0x68]
call fcn.0053b950
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], ebx
call fcn.0053ad90
lea ecx, [ebp - 0x68]
call fcn.0053acf0
test eax, eax
jne 0x5aa62b
mov ecx, dword [ebp + 0x18]
mov dword [edi + 0x150], 1
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
push str.Cannot_connect__hostname_is_zero_length
call eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], 0xffffffff
call fcn.0053bcf0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
push str.localhost
lea ecx, [ebp - 0x68]
call fcn.0053d010
test al, al
je 0x5aa659
push str.127.0.0.1
lea ecx, [edi + 0x128]
call fcn.0053cb20
push str.127.0.0.1
lea ecx, [ebp - 0x68]
call fcn.0053cb20
cmp byte [0x711614], 0
mov esi, dword [ebp + 0x18]
je 0x5aa66c
mov ecx, esi
call fcn.005a5100
lea ecx, [ebp - 0x90]
call fcn.0053ba20
mov ebx, dword [ebp + 0xc]
push ebx
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 1
call fcn.0053d6f0
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x3c], 8
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], 1
call fcn.00595640
lea ecx, [ebp - 0xa0]
push ecx
push eax
call fcn.005a4d80
add esp, 8
test al, al
je 0x5aa6eb
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.This_is_an_IPV4_numeric_address.
mov ecx, esi
call eax
mov dword [ebp - 0x38], 2
jmp 0x5aa71d
lea ecx, [ebp - 0x68]
call fcn.00595640
lea ecx, [ebp - 0xa0]
push ecx
mov edx, eax
call fcn.005a4e30
add esp, 4
mov ecx, esi
test al, al
je 0x5aa770
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.This_is_an_IPV6_numeric_address.
call eax
mov dword [ebp - 0x38], 0x17
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
or dword [ebp - 0x3c], 4
push str.Hostname_to_IP_address_resolution_not_needed.
mov ecx, esi
call eax
lea ecx, [ebp - 0x10]
push ecx
push esi
lea edx, [ebp - 0x3c]
push edx
push ebx
lea ecx, [ebp - 0x68]
call fcn.00595640
push eax
call fcn.005a7da0
add esp, 0x14
test al, al
jne 0x5aa873
lea ecx, [ebp - 0x90]
mov dword [edi + 0x150], 2
mov byte [ebp - 4], 0
call fcn.0053bcf0
jmp 0x5aa606
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Multi_threaded_hostname_to_IP_address_resolution
call edx
push 0x50
call fcn.00419f69
add esp, 4
mov dword [ebp + 8], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x5aa79c
mov ecx, eax
call fcn.005f42e0
mov ebx, eax
jmp 0x5aa79e
xor ebx, ebx
mov byte [ebp - 4], 1
test ebx, ebx
jne 0x5aa7d1
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push str.Memory_allocation_failure.
mov ecx, esi
call edx
lea ecx, [ebp - 0x90]
mov dword [edi + 0x150], 5
mov byte [ebp - 4], bl
call fcn.0053bcf0
jmp 0x5aa606
push 0x1446
mov ecx, ebx
call fcn.005f4c00
mov eax, dword [edi + 0x11c]
lea ecx, [ebp + 0x1f]
push ecx
lea edx, [ebp + 0x1b]
push edx
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp + 0x20]
lea edx, [ebp - 0x3c]
push edx
mov edx, dword [ebp + 0x10]
push ecx
push esi
push edx
push eax
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x68]
mov byte [ebp + 0x1b], 0
mov byte [ebp + 0x1f], 0
call fcn.00595640
push eax
mov ecx, ebx
call fcn.005f4460
mov edx, dword [ebx]
mov byte [ebp + 0xf], al
mov eax, dword [edx]
mov ecx, ebx
call eax
cmp byte [ebp + 0xf], 0
jne 0x5aa873
cmp byte [ebp + 0x1b], 0
je 0x5aa84e
lea ecx, [ebp - 0x90]
mov dword [edi + 0x150], 4
mov byte [ebp - 4], 0
call fcn.0053bcf0
jmp 0x5aa606
xor ecx, ecx
cmp byte [ebp + 0x1f], cl
mov byte [ebp - 4], 0
setne cl
add ecx, 2
mov dword [edi + 0x150], ecx
lea ecx, [ebp - 0x90]
call fcn.0053bcf0
jmp 0x5aa606
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x5aa752
mov edx, dword [esi]
cmp dword [eax + 4], 2
mov eax, dword [edx + 0x14]
mov ecx, esi
jne 0x5aa892
push str.Connecting_to_IPV4_address.
jmp 0x5aa897
push str.Connecting_to_IPV6_address.
call eax
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 4]
mov ecx, dword [eax + 0x18]
cmp edx, 2
jne 0x5aa8ac
add ecx, 4
jmp 0x5aa8af
add ecx, 8
lea eax, [edi + 0x128]
push eax
push ecx
push edx
call fcn.005a4d40
mov ebx, dword [esi]
add esp, 0xc
lea ecx, [edi + 0x128]
call fcn.00595640
mov edx, dword [ebx + 0x28]
push eax
push str.ipAddress
mov ecx, esi
call edx
mov eax, dword [ebp - 0x10]
push 1
push esi
push eax
mov ecx, edi
call fcn.005a8fb0
test al, al
je 0x5aad06
cmp dword [edi + 0xa4], 0xffffffff
je 0x5aad06
mov ebx, dword [edi + 0x11c]
mov dword [ebp + 0xc], ebx
test ebx, ebx
je 0x5aa911
mov ecx, edi
call fcn.005a5360
mov dword [ebp - 0x18], 0
mov byte [ebp + 0x1b], 0
mov dword [ebp + 0x1c], 0x64
call sub.KERNEL32.dll_GetTickCount
cmp dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], eax
je 0x5aa94e
mov eax, dword [ebp + 0x1c]
cmp ebx, eax
jb 0x5aa942
sub ebx, eax
mov dword [ebp + 0xc], ebx
cmp ebx, 0x64
jae 0x5aa94e
mov ebx, 0x64
mov dword [ebp + 0xc], ebx
mov byte [ebp + 0x1b], 1
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x18]
mov eax, dword [edi + 0xa4]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x40], eax
test eax, eax
je 0x5aabf6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp + 0x1c], eax
cmp eax, 0x2733
je 0x5aa9c9
cmp eax, 0x2726
jne 0x5aa9b7
mov ebx, dword [esi]
lea ecx, [ebp - 0x68]
call fcn.00595640
mov edx, dword [ebx + 0x28]
push eax
push str.HostOrIpAddress
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 ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x1c]
mov eax, dword [esi]
mov edx, dword [eax + 0x2c]
push ecx
push str.sockError
mov ecx, esi
call edx
test ebx, ebx
je 0x5aac01
cmp dword [ebp + 0x1c], 0x2733
jne 0x5aabf6
lea eax, [ebp + 0x1f]
push eax
lea ecx, [ebp + 0xb]
push ecx
mov ecx, dword [ebp + 0x20]
lea edx, [ebp + 0xf]
push edx
mov edx, dword [ebp + 0x14]
lea eax, [ebp - 0x11]
push eax
mov eax, dword [ebp + 0x10]
push ecx
push esi
push 1
push ebx
push edx
push eax
mov ecx, edi
mov byte [ebp + 0xf], 0
mov byte [ebp + 0xb], 0
mov byte [ebp + 0x1f], 0
mov byte [ebp - 0x11], 0
call fcn.005a6080
test al, al
jne 0x5aaa89
cmp byte [ebp + 0xf], al
jne 0x5aab89
cmp byte [ebp + 0x1b], al
jne 0x5aabc9
call sub.KERNEL32.dll_GetTickCount
mov ecx, 0x64
cmp eax, dword [ebp - 0x1c]
jbe 0x5aaa3f
sub eax, dword [ebp - 0x1c]
mov ecx, eax
cmp ebx, ecx
jbe 0x5aabf6
sub ebx, ecx
mov dword [ebp + 0xc], ebx
cmp ebx, 0x3e8
jbe 0x5aaa70
push 0x3e8
mov dword [ebp + 0x1c], 0x3e8
call fcn.00550010
add esp, 4
inc dword [ebp - 0x18]
jmp 0x5aa923
push 0x64
mov dword [ebp + 0x1c], 0x64
call fcn.00550010
add esp, 4
inc dword [ebp - 0x18]
jmp 0x5aa923
mov ecx, edi
call fcn.005a5390
lea ecx, [edi + 0xb0]
mov byte [edi + 0xa0], 1
call fcn.005f4120
lea ecx, [edi + 0x10]
call fcn.005ab280
lea ecx, [edi + 0x58]
call fcn.005ab280
lea ecx, [ebp - 0xc8]
call fcn.0053ba20
cmp dword [edi + 0xa8], 2
mov byte [ebp - 4], 3
push esi
jne 0x5aaadf
lea ecx, [ebp + 0x20]
push ecx
lea edx, [ebp - 0xc8]
push edx
mov ecx, edi
call fcn.005a7a30
jmp 0x5aaaf1
lea eax, [ebp + 0x20]
push eax
lea ecx, [ebp - 0xc8]
push ecx
mov ecx, edi
call fcn.005a7b10
mov edi, dword [esi]
lea ecx, [ebp - 0xc8]
call fcn.00595640
mov edx, dword [edi + 0x28]
push eax
push str.myIP_5
mov ecx, esi
call edx
mov ecx, dword [ebp + 0x20]
mov eax, dword [esi]
mov edx, dword [eax + 0x2c]
push ecx
push str.myPort_5
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.connect_successful.
mov ecx, esi
call edx
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x5aab3f
mov ecx, dword [0x72080c]
test ecx, ecx
je 0x5aab3f
push eax
call ecx
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 1
mov dword [ebp - 0x10], 0
call fcn.0053bcf0
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 0
call fcn.0053bcf0
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], 0xffffffff
call fcn.0053bcf0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, edi
call fcn.005a5390
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x150], 4
test eax, eax
je 0x5aabae
mov ecx, dword [0x72080c]
test ecx, ecx
je 0x5aabae
push eax
call ecx
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x10], 0
mov byte [ebp - 4], 0
call fcn.0053bcf0
jmp 0x5aa606
mov ecx, dword [edi + 0x11c]
mov dword [edi + 0x150], 6
mov eax, dword [esi]
mov edx, dword [eax + 0x2c]
push ecx
push str.ConnectTimeoutMs
mov ecx, esi
call edx
push esi
push 0x2733
call fcn.005a5550
add esp, 8
test ebx, ebx
je 0x5aac01
mov ecx, edi
call fcn.005a5390
cmp dword [ebp - 0x40], 0
jne 0x5aacc5
lea ecx, [edi + 0xb0]
mov byte [edi + 0xa0], 1
call fcn.005f4120
lea ecx, [edi + 0x10]
call fcn.005ab280
lea ecx, [edi + 0x58]
call fcn.005ab280
lea ecx, [ebp - 0xf0]
call fcn.0053ba20
cmp dword [edi + 0xa8], 2
mov byte [ebp - 4], 4
push esi
jne 0x5aac5a
lea eax, [ebp + 0x20]
push eax
lea ecx, [ebp - 0xf0]
push ecx
mov ecx, edi
call fcn.005a7a30
jmp 0x5aac6c
lea edx, [ebp + 0x20]
push edx
lea eax, [ebp - 0xf0]
push eax
mov ecx, edi
call fcn.005a7b10
mov edi, dword [esi]
lea ecx, [ebp - 0xf0]
call fcn.00595640
mov edx, dword [edi + 0x28]
push eax
push str.myIP_6
mov ecx, esi
call edx
mov ecx, dword [ebp + 0x20]
mov eax, dword [esi]
mov edx, dword [eax + 0x2c]
push ecx
push str.myPort_6
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.connect_successful.
mov ecx, esi
call edx
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x5aacba
mov ecx, dword [0x72080c]
test ecx, ecx
je 0x5aacba
push eax
call ecx
lea ecx, [ebp - 0xf0]
jmp 0x5aab45
cmp dword [edi + 0x150], 0
jne 0x5aacd8
mov dword [edi + 0x150], 7
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push str.Connect_function_failed
mov ecx, esi
call edx
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x5aabae
mov eax, dword [0x72080c]
test eax, eax
je 0x5aabae
push ecx
call eax
jmp 0x5aabae
mov dword [edi + 0x150], 5
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push str.Cannot_connect__invalid_socket__4_
mov ecx, esi
call edx
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x5aad32
mov ecx, dword [0x72080c]
test ecx, ecx
je 0x5aad32
push eax
call ecx
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 0
call fcn.0053bcf0
jmp 0x5aa606
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x20]
mov esi, dword [ebp + 0x18]
lea eax, [ebp + 0x13]
push eax
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
push edx
push esi
push eax
push ecx
mov ecx, edi
mov byte [ebp + 0x13], bl
call fcn.005a97b0
mov bl, al
test bl, bl
jne 0x5aada6
cmp byte [ebp + 0x13], al
je 0x5aada6
mov edx, dword [esi]
mov eax, dword [edx + 0x20]
push 1
push str.IPV4_retry2
mov ecx, esi
call eax
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
push edx
push esi
push eax
push ecx
mov ecx, edi
call fcn.005a91b0
mov edx, dword [esi]
mov bl, al
mov eax, dword [edx + 0x24]
mov ecx, esi
call eax
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c