Function at 0x14005ae20
Capabilities:
Check for time delay via gettickcount

Disassembly:
push rbx
push rdi
push r13
push r14
mov eax, 0xa8
call fcn.1401ef830
sub rsp, rax
mov rax, qword [0x140310170]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov r14, qword [rcx]
xor ebx, ebx
movsxd r13, edx
mov rdi, rcx
mov byte [r8], bl
mov qword [rsp + 0x48], r8
mov dword [rsp + 0x34], 0
mov dword [rsp + 0x30], ebx
cmp byte [r13 + rcx + 0x3d5], bl
je 0x14005ae7a
mov byte [r8], 1
xor eax, eax
jmp 0x14005b355
mov qword [rsp + 0x98], r12
call qword [sym.imp.KERNEL32.dll_GetTickCount]
movsxd r9, dword [r14 + 0x328]
mov r12d, 0x493e0
movsxd r8, dword [r14 + 0x32c]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov r10d, edx
xor edx, edx
shr r10d, 6
imul eax, r10d, 0x3e8
mov dword [rsp + 0x38], r10d
mov dword [rsp + 0x40], r10d
sub ecx, eax
imul eax, ecx, 0x3e8
test r9d, r9d
setg dl
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0x38]
test r8d, r8d
jle 0x14005aede
or edx, 2
sub edx, 1
je 0x14005aefe
sub edx, 1
je 0x14005aef9
cmp edx, 1
jne 0x14005af01
cmp r9d, r8d
cmovl r8d, r9d
movsxd r12, r8d
jmp 0x14005af01
mov r12, r8
jmp 0x14005af01
mov r12, r9
mov rcx, qword [r14 + 0x8b8]
shr rax, 0x20
mov rdx, rcx
shr rdx, 0x20
sub eax, edx
movsxd rdx, eax
movabs rax, 0x20c49ba5e353f7cf
imul rdx
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov eax, r10d
sub eax, ecx
sub r12, rdx
imul eax, eax, 0x3e8
movsxd rcx, eax
sub r12, rcx
je 0x14005b3ce
test r12, r12
js 0x14005b3ce
mov qword [rsp + 0xe8], rbp
xor ebp, ebp
mov qword [rsp + 0xa0], rsi
lea rsi, [rdi + 0x240]
mov qword [rsp + 0x90], r15
nop word [rax + rax]
mov r8, qword [rsi]
mov r15d, ebp
xor r15d, 1
cmp r8, 0xffffffffffffffff
je 0x14005b20a
or rdx, 0xffffffffffffffff
xor r9d, r9d
or rcx, rdx
call fcn.14005bc60
test eax, eax
jne 0x14005b0a7
mov rcx, qword [rdi + 0x3ec]
xor ebx, ebx
mov r10d, dword [rsp + 0x3c]
mov rdx, rcx
mov r9d, dword [rsp + 0x40]
mov eax, r10d
mov r8, qword [rdi + 0x3f8]
movabs r11, 0x20c49ba5e353f7cf
shr rdx, 0x20
sub eax, edx
mov dword [rsp + 0x30], ebx
movsxd rdx, eax
mov rax, r11
imul rdx
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov eax, r9d
sub eax, ecx
imul eax, eax, 0x3e8
movsxd rcx, eax
add rdx, rcx
cmp rdx, r8
jl 0x14005b038
lea rdx, str.After__ldms_connect_time__move_on__n
mov rcx, r14
call fcn.140059720
mov r9d, dword [rsp + 0x40]
mov ebx, 0x274c
mov r10d, dword [rsp + 0x3c]
movabs r11, 0x20c49ba5e353f7cf
mov dword [rsp + 0x30], ebx
test ebp, ebp
jne 0x14005b14f
cmp qword [rdi + 0x68], 0
jne 0x14005b14f
mov rcx, qword [rdi + 0x3ec]
mov eax, r10d
mov rdx, rcx
shr rdx, 0x20
sub eax, edx
movsxd rdx, eax
mov rax, r11
imul rdx
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov eax, r9d
sub eax, ecx
imul eax, eax, 0x3e8
movsxd rcx, eax
add rdx, rcx
cmp rdx, 0xc8
jl 0x14005b14f
lea r8d, [rbp + 1]
mov edx, r13d
mov rcx, rdi
call fcn.14005a980
jmp 0x14005b14f
cmp eax, 2
je 0x14005b0d0
cmp byte [rdi + 0x3e6], 0
jne 0x14005b0d0
test al, 4
je 0x14005b14f
mov rcx, qword [rsi]
lea rdx, [rsp + 0x30]
call fcn.14005a8f0
mov ebx, dword [rsp + 0x30]
jmp 0x14005b14f
mov rbx, qword [rsi]
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x44], 4
call qword [sym.imp.KERNEL32.dll_SleepEx]
lea rax, [rsp + 0x44]
mov edx, 0xffff
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r8d, 0x1007
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
je 0x14005b11e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
jmp 0x14005b122
mov ebx, dword [rsp + 0x30]
test ebx, ebx
je 0x14005b132
cmp ebx, 0x2748
je 0x14005b132
xor al, al
jmp 0x14005b134
mov al, 1
mov dword [rsp + 0x30], ebx
test al, al
jne 0x14005b263
lea rdx, str.Connection_failed_n
mov rcx, r14
call fcn.140059720
test ebx, ebx
je 0x14005b20a
mov ecx, ebx
mov dword [r14 + 0x89e4], ebx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, qword [rsi - 0x1e0]
test rcx, rcx
je 0x14005b20a
cmp dword [rcx + 4], 2
jne 0x14005b194
mov rcx, qword [rcx + 0x20]
lea rdx, [rsp + 0x50]
add rcx, 4
mov r8d, reloc.WLDAP32.dll_Ordinal_46
call fcn.1400757c0
mov edx, ebx
mov rcx, rdi
call fcn.1400755c0
mov r9d, dword [rdi + 0x180]
lea r8, [rsp + 0x50]
lea rdx, str.connect_to__s_port__ld_failed:__s_n
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.140059720
mov rax, qword [rsi - 0x1e0]
cmp qword [rax + 0x28], 0
mov rax, r12
je 0x14005b1d7
cqo
sub rax, rdx
sar rax, 1
mov r8d, ebp
mov qword [rdi + 0x3f8], rax
mov edx, r13d
mov rcx, rdi
call fcn.14005a980
mov ecx, eax
cmp eax, 7
jne 0x14005b201
movsxd rax, r15d
cmp qword [rdi + rax*8 + 0x240], 0xffffffffffffffff
jne 0x14005b20a
mov r15d, ecx
mov dword [rsp + 0x34], ecx
jmp 0x14005b20f
mov r15d, dword [rsp + 0x34]
inc ebp
add rsi, 8
cmp ebp, 2
jl 0x14005af80
test r15d, r15d
je 0x14005b3c6
cmp qword [rdi + 0x68], 0
jne 0x14005b24a
mov r8d, 1
mov edx, r13d
mov rcx, rdi
call fcn.14005a980
mov r15d, eax
test eax, eax
je 0x14005b333
cmp byte [rdi + 0x3cf], 0
je 0x14005b373
mov rsi, qword [rdi + 0x120]
jmp 0x14005b39e
movsxd rcx, ebp
movsxd rbx, r15d
mov rax, qword [rdi + rcx*8 + 0x240]
mov qword [rdi + r13*8 + 0x230], rax
mov rax, qword [rdi + rcx*8 + 0x60]
mov qword [rdi + 0x58], rax
mov qword [rdi + rcx*8 + 0x240], 0xffffffffffffffff
mov rdx, qword [rdi + rbx*8 + 0x240]
cmp rdx, 0xffffffffffffffff
je 0x14005b2b0
mov rcx, rdi
call fcn.14005bb40
mov qword [rdi + rbx*8 + 0x240], 0xffffffffffffffff
mov edx, r13d
mov rcx, rdi
call fcn.140060b60
test eax, eax
jne 0x14005b335
mov rcx, qword [rsp + 0x48]
mov byte [r13 + rdi + 0x3d5], 1
mov byte [rcx], 1
test r13d, r13d
jne 0x14005b31b
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
shr edx, 6
imul eax, edx, 0x3e8
mov dword [rsp + 0x38], edx
mov rdx, qword [r14 + 0x8b8]
sub r8d, eax
imul eax, r8d, 0x3e8
mov dword [rsp + 0x3c], eax
mov rcx, qword [rsp + 0x38]
call fcn.140068490
movsd qword [r14 + 0x888], xmm0
mov rdx, qword [rdi + r13*8 + 0x230]
mov rcx, rdi
call fcn.14005abf0
mov rcx, rdi
call fcn.140060c90
xor eax, eax
mov rbp, qword [rsp + 0xe8]
mov rsi, qword [rsp + 0xa0]
mov r15, qword [rsp + 0x90]
mov r12, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.1401ef4e0
add rsp, 0xa8
pop r14
pop r13
pop rdi
pop rbx
ret
cmp byte [rdi + 0x3ce], 0
je 0x14005b385
mov rsi, qword [rdi + 0x158]
jmp 0x14005b39e
cmp byte [rdi + 0x3cb], 0
je 0x14005b397
mov rsi, qword [rdi + 0xe0]
jmp 0x14005b39e
mov rsi, qword [rdi + 0xb8]
mov edx, ebx
mov rcx, rdi
call fcn.1400755c0
mov r9d, dword [rdi + 0x180]
lea rdx, str.Failed_to_connect_to__s_port__ld:__s
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.140059810
mov eax, r15d
jmp 0x14005b335
lea rdx, str.Connection_time_out
mov rcx, r14
call fcn.140059810
mov eax, Ordinal_30
jmp 0x14005b34d