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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x640779
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
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
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
mov byte [eax], 0
xor ebx, ebx
mov dword [edi + 0x150], ebx
mov byte [ecx], bl
lea ecx, [edi + 0x128]
call fcn.0053aff0
mov eax, dword [ebp + 8]
cmp eax, ebx
jne 0x5a9820
mov ecx, dword [ebp + 0x10]
mov dword [edi + 0x150], 1
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
push str.Cannot_connect__hostname_is_NULL
call eax
jmp 0x5a9f18
push eax
lea ecx, [ebp - 0x60]
call fcn.0053b950
lea ecx, [ebp - 0x60]
mov dword [ebp - 4], ebx
call fcn.0053ad90
push 0x676352
push str.http:__
lea ecx, [ebp - 0x60]
call fcn.0053c1c0
push 0x676352
push str.https:__
lea ecx, [ebp - 0x60]
call fcn.0053c1c0
push 0x2f
lea ecx, [ebp - 0x60]
call fcn.0053cc50
lea ecx, [ebp - 0x60]
call fcn.0053acf0
test eax, eax
jne 0x5a988c
mov ecx, dword [ebp + 0x10]
mov dword [edi + 0x150], 1
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
push str.Cannot_connect__hostname_is_zero_length
call eax
jmp 0x5a9f09
push str.localhost
lea ecx, [ebp - 0x60]
call fcn.0053d010
test al, al
je 0x5a98ba
push str.127.0.0.1
lea ecx, [edi + 0x128]
call fcn.0053cb20
push str.127.0.0.1
lea ecx, [ebp - 0x60]
call fcn.0053cb20
cmp byte [0x711614], 0
mov esi, dword [ebp + 0x10]
je 0x5a98cd
mov ecx, esi
call fcn.005a5100
lea ecx, [ebp - 0x8c]
call fcn.0053ba20
mov ebx, dword [ebp + 0xc]
push ebx
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 1
call fcn.0053d6f0
xor eax, eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x38], 8
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 1
call fcn.00595640
lea ecx, [ebp - 0x9c]
push ecx
push eax
call fcn.005a4d80
add esp, 8
test al, al
je 0x5a994c
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 - 0x34], 2
jmp 0x5a997e
lea ecx, [ebp - 0x60]
call fcn.00595640
lea ecx, [ebp - 0x9c]
push ecx
mov edx, eax
call fcn.005a4e30
add esp, 4
test al, al
je 0x5a9982
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.This_is_an_IPV6_numeric_address...
mov ecx, esi
call eax
mov dword [ebp - 0x34], 0x17
or dword [ebp - 0x38], 4
cmp dword [0x720808], 0
jne 0x5a99d6
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
push ecx
push edx
push esi
push ebx
push eax
mov ecx, edi
call fcn.005a91b0
lea ecx, [ebp - 0x8c]
mov bl, al
mov byte [ebp - 4], 0
call fcn.0053bcf0
lea ecx, [ebp - 0x60]
mov dword [ebp - 4], 0xffffffff
call fcn.0053bcf0
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 0x18
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x38]
push edx
lea ecx, [ebp - 0x8c]
call fcn.00595640
push eax
lea ecx, [ebp - 0x60]
call fcn.00595640
push eax
call dword [0x720808]
test eax, eax
je 0x5a9ac8
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push str.Failed_to_get_host_address_info.__1_
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Versions_of_Windows_earlier_than_Windows_XP_are_limited_to_handling_IPv4_only
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.On_Windows_Server_2003_and_Windows_XP__IPv6_addresses_are_returned_only_if_IPv6_is_installed_on_the_local_computer.
mov ecx, esi
call edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
push eax
call fcn.005a5550
mov ebx, dword [esi]
add esp, 8
lea ecx, [ebp - 0x60]
call fcn.00595640
push eax
mov eax, dword [ebx + 0x28]
push str.hostOrIpAddr
mov ecx, esi
call eax
mov ebx, dword [esi]
lea ecx, [ebp - 0x8c]
call fcn.00595640
mov edx, dword [ebx + 0x28]
push eax
push str.port
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.reverting_to_gethostbyname...
mov ecx, esi
call edx
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push ecx
push esi
push edx
push eax
mov ecx, edi
call fcn.005a91b0
lea ecx, [ebp - 0x8c]
mov bl, al
mov byte [ebp - 4], 0
call fcn.0053bcf0
lea ecx, [ebp - 0x60]
mov dword [ebp - 4], 0xffffffff
call fcn.0053bcf0
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 0x18
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x5a9b68
mov edx, dword [esi]
cmp dword [eax + 4], 2
mov eax, dword [edx + 0x14]
mov ecx, esi
jne 0x5a9ae7
push str.Connect_using_IPV4.
jmp 0x5a9aec
push str.Connect_using_IPV6.
call eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
mov eax, dword [ecx + 0x18]
cmp edx, 2
jne 0x5a9b01
add eax, 4
jmp 0x5a9b04
add eax, 8
mov ecx, dword [ecx + 0xc]
cmp ecx, 6
je 0x5a9b3a
mov edx, dword [esi]
mov eax, dword [edx + 0x2c]
push ecx
push str.ai_protocol
mov ecx, esi
call eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x5a9b2f
mov ecx, dword [0x72080c]
test ecx, ecx
je 0x5a9b2f
push eax
call ecx
mov ecx, dword [ebp + 0x1c]
mov byte [ecx], 1
jmp 0x5a9efa
lea ecx, [edi + 0x128]
push ecx
push eax
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 0x5a9ece
cmp dword [edi + 0xa4], 0xffffffff
je 0x5a9ece
cmp dword [edi + 0x11c], 0
je 0x5a9b98
mov ecx, edi
call fcn.005a5360
mov ebx, dword [edi + 0x11c]
mov dword [ebp + 0xc], ebx
mov dword [ebp - 0x14], 0
mov byte [ebp + 0x13], 0
mov dword [ebp + 0x1c], 0x64
call sub.KERNEL32.dll_GetTickCount
cmp dword [ebp - 0x14], 0
mov dword [ebp - 0x64], eax
je 0x5a9be0
mov eax, dword [ebp + 0x1c]
cmp ebx, eax
jb 0x5a9bd2
sub ebx, eax
mov dword [ebp + 0xc], ebx
cmp ebx, 0x64
jae 0x5a9be0
mov dword [ebp + 0xc], 0x64
mov ebx, dword [ebp + 0xc]
mov byte [ebp + 0x13], 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
mov dword [ebp + 0x1c], 0
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x5a9de6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp + 0x1c], eax
cmp eax, 0x2733
je 0x5a9c62
cmp eax, 0x2726
jne 0x5a9c53
mov ebx, dword [esi]
lea ecx, [ebp - 0x60]
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 eax, dword [ebp + 0x1c]
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0x2c]
push str.sockError
mov ecx, esi
call eax
test ebx, ebx
je 0x5a9de3
cmp dword [ebp + 0x1c], 0x2733
jne 0x5a9de3
lea ecx, [ebp + 0x1b]
push ecx
lea edx, [ebp + 0xb]
push edx
lea eax, [ebp + 0x17]
push eax
push esi
push 1
push ebx
mov ecx, edi
call fcn.005a5ed0
test al, al
jne 0x5a9cfa
cmp byte [ebp + 0x13], al
jne 0x5a9de3
call sub.KERNEL32.dll_GetTickCount
mov edx, dword [ebp - 0x64]
mov ecx, 0x64
cmp eax, edx
jbe 0x5a9cb0
sub eax, edx
mov ecx, eax
cmp ebx, ecx
jbe 0x5a9de3
sub ebx, ecx
mov dword [ebp + 0xc], ebx
cmp ebx, 0x3e8
jbe 0x5a9ce1
push 0x3e8
mov dword [ebp + 0x1c], 0x3e8
call fcn.00550010
add esp, 4
inc dword [ebp - 0x14]
jmp 0x5a9bb3
push 0x64
mov dword [ebp + 0x1c], 0x64
call fcn.00550010
add esp, 4
inc dword [ebp - 0x14]
jmp 0x5a9bb3
mov ecx, edi
call fcn.005a5390
lea ecx, [edi + 0xb0]
mov byte [edi + 0xa0], 1
call fcn.005f4120
lea ecx, [ebp - 0xc4]
call fcn.0053ba20
cmp dword [edi + 0xa8], 2
mov byte [ebp - 4], 2
push esi
jne 0x5a9d40
lea ecx, [ebp + 0x10]
push ecx
lea edx, [ebp - 0xc4]
push edx
mov ecx, edi
call fcn.005a7a30
jmp 0x5a9d52
lea eax, [ebp + 0x10]
push eax
lea ecx, [ebp - 0xc4]
push ecx
mov ecx, edi
call fcn.005a7b10
mov edi, dword [esi]
lea ecx, [ebp - 0xc4]
call fcn.00595640
mov edx, dword [edi + 0x28]
push eax
push str.myIP_3
mov ecx, esi
call edx
mov ecx, dword [ebp + 0x10]
mov eax, dword [esi]
mov edx, dword [eax + 0x2c]
push ecx
push str.myPort_3
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 0x5a9da0
mov ecx, dword [0x72080c]
test ecx, ecx
je 0x5a9da0
push eax
call ecx
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 1
call fcn.0053bcf0
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 0
call fcn.0053bcf0
lea ecx, [ebp - 0x60]
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 0x18
mov eax, dword [ebp - 0x18]
cmp dword [edi + 0x11c], 0
je 0x5a9df9
mov ecx, edi
call fcn.005a5390
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x5a9ea7
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 - 0xec]
call fcn.0053ba20
cmp dword [edi + 0xa8], 2
mov byte [ebp - 4], 3
push esi
jne 0x5a9e50
lea eax, [ebp + 0x10]
push eax
lea ecx, [ebp - 0xec]
push ecx
mov ecx, edi
call fcn.005a7a30
jmp 0x5a9e62
lea edx, [ebp + 0x10]
push edx
lea eax, [ebp - 0xec]
push eax
mov ecx, edi
call fcn.005a7b10
mov edi, dword [esi]
lea ecx, [ebp - 0xec]
call fcn.00595640
mov edx, dword [edi + 0x28]
push eax
push str.myIP_4
mov ecx, esi
call edx
mov ecx, dword [ebp + 0x10]
mov eax, dword [esi]
mov edx, dword [eax + 0x2c]
push ecx
push str.myPort_4
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.connect_successful..
mov ecx, esi
call edx
lea ecx, [ebp - 0xec]
jmp 0x5a9da6
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 eax, dword [ebp + 0x1c]
push esi
push eax
call fcn.005a5550
add esp, 8
jmp 0x5a9ee6
mov dword [edi + 0x150], 5
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Cannot_connect__invalid_socket__2_
mov ecx, esi
call eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x5a9efa
mov ecx, dword [0x72080c]
test ecx, ecx
je 0x5a9efa
push eax
call ecx
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 0
call fcn.0053bcf0
lea ecx, [ebp - 0x60]
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 0x18