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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x640719
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
mov eax, dword [0x703eb0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov edi, ecx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x18]
mov dword [edi + 0x150], 0
lea ecx, [edi + 0x128]
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x2c], eax
mov byte [eax], 0
call fcn.0053aff0
test ebx, ebx
jne 0x5a922e
mov dword [edi + 0x150], 1
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Cannot_connect__hostname_is_NULL
mov ecx, esi
call eax
jmp 0x5a9788
push ebx
lea ecx, [ebp - 0x6c]
call fcn.0053b950
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], 0
call fcn.0053ad90
lea ecx, [ebp - 0x6c]
call fcn.0053acf0
test eax, eax
jne 0x5a926f
mov dword [edi + 0x150], 1
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Cannot_connect__hostname_is_zero_length
mov ecx, esi
call eax
jmp 0x5a9779
push str.localhost
lea ecx, [ebp - 0x6c]
call fcn.0053d010
test al, al
je 0x5a92aa
push str.127.0.0.1
lea ecx, [edi + 0x128]
call fcn.0053cb20
push str.127.0.0.1
lea ecx, [ebp - 0x6c]
call fcn.0053cb20
lea ecx, [ebp - 0x6c]
call fcn.00595640
mov dword [ebp - 0x3c], eax
mov ebx, eax
cmp byte [0x711614], 0
je 0x5a92ba
mov ecx, esi
call fcn.005a5100
mov edx, dword [ebp + 0xc]
xor eax, eax
mov ecx, 2
mov dword [ebp - 0x20], eax
push edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov word [ebp - 0x20], cx
call dword [sym.imp.WS2_32.dll_htons]
push ebx
mov word [ebp - 0x1e], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x1c], eax
call fcn.0053ba20
cmp dword [ebp - 0x1c], 0xffffffff
mov byte [ebp - 4], 1
mov dword [ebp - 0x40], 0
jne 0x5a941c
mov eax, dword [edi + 0x11c]
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x21], 0
mov byte [ebp - 0x22], 0
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [edi + 0xac]
lea edx, [ebp - 0x22]
push edx
lea edx, [ebp - 0x21]
push edx
lea edx, [ebp - 0x40]
push edx
lea edx, [ebp - 0x94]
push edx
mov edx, dword [ebp - 0x38]
push edx
push esi
push 0xc8
mov dword [ebp - 0x28], eax
mov eax, dword [edi + 0x11c]
push eax
push 0
push ecx
push ebx
call fcn.005a5940
mov byte [ebp - 0x23], al
add esp, 0x2c
lea eax, [ebp - 0x94]
push eax
lea ecx, [edi + 0x128]
call fcn.0053cbf0
cmp byte [ebp - 0x23], 0
je 0x5a93d0
lea ecx, [ebp - 0x94]
call fcn.0053acf0
test eax, eax
je 0x5a93d0
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x5a93c1
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x5a9428
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [ebp - 0x28]
cmp eax, ecx
jbe 0x5a9428
sub eax, ecx
cmp eax, ebx
jb 0x5a9428
mov dword [edi + 0x150], 3
push str.Application_timeout_after_DNS
jmp 0x5a9761
mov dword [edi + 0x150], 2
jmp 0x5a976a
mov ecx, dword [ebp - 0x2c]
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.00561de0
cmp byte [ebp - 0x21], 0
je 0x5a9406
mov dword [edi + 0x150], 4
jmp 0x5a976a
xor ecx, ecx
cmp byte [ebp - 0x22], cl
setne cl
add ecx, 2
mov dword [edi + 0x150], ecx
jmp 0x5a976a
push ebx
lea ecx, [edi + 0x128]
call fcn.0053cb20
push 1
push esi
mov ecx, edi
call fcn.005a8db0
test al, al
je 0x5a9752
cmp dword [edi + 0xa4], 0xffffffff
je 0x5a9752
cmp dword [edi + 0x11c], 0
je 0x5a9457
mov ecx, edi
call fcn.005a5360
mov ebx, dword [edi + 0x11c]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x21], 0
mov dword [ebp - 0x28], 0x64
call sub.KERNEL32.dll_GetTickCount
cmp dword [ebp - 0x30], 0
mov dword [ebp - 0x34], eax
je 0x5a949f
mov eax, dword [ebp - 0x28]
cmp ebx, eax
jb 0x5a9491
sub ebx, eax
mov dword [ebp - 0x2c], ebx
cmp ebx, 0x64
jae 0x5a949f
mov dword [ebp - 0x2c], 0x64
mov ebx, dword [ebp - 0x2c]
mov byte [ebp - 0x21], 1
mov eax, dword [edi + 0xa4]
push 0x10
lea edx, [ebp - 0x20]
push edx
push eax
mov dword [ebp - 0x28], 0
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x38], eax
test eax, eax
je 0x5a9687
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x28], eax
cmp eax, 0x2733
je 0x5a9543
cmp eax, 0x2726
jne 0x5a9534
mov ebx, dword [esi]
lea ecx, [ebp - 0x94]
call fcn.00595640
mov edx, dword [ebx + 0x28]
push eax
push str.IP_Address
mov ecx, esi
call edx
mov ecx, dword [ebp - 0x40]
mov eax, dword [esi]
mov edx, dword [eax + 0x34]
push ecx
push str.ipAddr
mov ecx, esi
call edx
mov ecx, dword [ebp - 0x3c]
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 ebx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0x2c]
push str.sockError
mov ecx, esi
call eax
test ebx, ebx
je 0x5a9684
cmp dword [ebp - 0x28], 0x2733
jne 0x5a9684
lea ecx, [ebp - 0x23]
push ecx
lea edx, [ebp - 0x22]
push edx
lea eax, [ebp - 0x41]
push eax
push esi
push 1
push ebx
mov ecx, edi
call fcn.005a5ed0
test al, al
jne 0x5a95db
cmp byte [ebp - 0x21], al
jne 0x5a9684
call sub.KERNEL32.dll_GetTickCount
mov edx, dword [ebp - 0x34]
mov ecx, 0x64
cmp eax, edx
jbe 0x5a9591
sub eax, edx
mov ecx, eax
cmp ebx, ecx
jbe 0x5a9684
sub ebx, ecx
mov dword [ebp - 0x2c], ebx
cmp ebx, 0x3e8
jbe 0x5a95c2
push 0x3e8
mov dword [ebp - 0x28], 0x3e8
call fcn.00550010
add esp, 4
inc dword [ebp - 0x30]
jmp 0x5a9472
push 0x64
mov dword [ebp - 0x28], 0x64
call fcn.00550010
add esp, 4
inc dword [ebp - 0x30]
jmp 0x5a9472
mov ecx, edi
call fcn.005a5390
lea ecx, [edi + 0xb0]
mov byte [edi + 0xa0], 1
call fcn.005f4120
lea ecx, [ebp - 0xbc]
call fcn.0053ba20
push esi
lea ecx, [ebp - 0x34]
push ecx
lea edx, [ebp - 0xbc]
push edx
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.005a7a30
mov edi, dword [esi]
lea ecx, [ebp - 0xbc]
call fcn.00595640
push eax
mov eax, dword [edi + 0x28]
push str.myIP_1
mov ecx, esi
call eax
mov eax, dword [ebp - 0x34]
mov edx, dword [esi]
mov edx, dword [edx + 0x2c]
push eax
push str.myPort_1
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 - 0xbc]
mov byte [ebp - 4], 1
call fcn.0053bcf0
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 0
call fcn.0053bcf0
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], 0xffffffff
call fcn.0053bcf0
mov al, 1
jmp 0x5a978a
mov eax, dword [ebp - 0x38]
cmp dword [edi + 0x11c], 0
je 0x5a969a
mov ecx, edi
call fcn.005a5390
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x5a972b
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 - 0xe4]
call fcn.0053ba20
push esi
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0xe4]
push ecx
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.005a7a30
mov edi, dword [esi]
lea ecx, [ebp - 0xe4]
call fcn.00595640
mov edx, dword [edi + 0x28]
push eax
push str.myIP_2
mov ecx, esi
call edx
mov ecx, dword [ebp - 0x34]
mov eax, dword [esi]
mov edx, dword [eax + 0x2c]
push ecx
push str.myPort_2
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 - 0xe4]
jmp 0x5a9656
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 - 0x28]
push esi
push eax
call fcn.005a5550
add esp, 8
jmp 0x5a976a
mov dword [edi + 0x150], 5
push str.Cannot_connect__invalid_socket__1_
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
mov ecx, esi
call eax
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 0
call fcn.0053bcf0
lea ecx, [ebp - 0x6c]
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 ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret 0x14