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

Disassembly:
push rbx
push rdi
push r13
push r14
push r15
sub rsp, 0xa0
mov rax, qword [0x140177090]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov r15, qword [rcx]
xor r14d, r14d
mov qword [rsp + 0x48], r8
mov dword [r8], r14d
mov rbx, rcx
mov edi, r14d
mov dword [rsp + 0x30], r14d
cmp dword [rcx + 0x2cc], r14d
je 0x140050414
mov r13d, 1
xor eax, eax
mov dword [r8], r13d
jmp 0x14005086c
mov qword [rsp + 0x90], r12
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r13d, 1
mov r8d, eax
mov eax, 0x10624dd3
mov r12d, 0x493e0
mul r8d
mov r9d, edx
mov edx, dword [r15 + 0x33c]
shr r9d, 6
mov dword [rsp + 0x40], r9d
mov dword [rsp + 0x38], r9d
imul ecx, r9d, 0x3e8
sub r8d, ecx
mov ecx, r14d
imul eax, r8d, 0x3e8
mov r8d, dword [r15 + 0x338]
test r8d, r8d
mov dword [rsp + 0x3c], eax
cmovg ecx, r13d
test edx, edx
jle 0x14005047e
or ecx, 2
dec ecx
je 0x14005049b
dec ecx
je 0x140050496
dec ecx
jne 0x14005049e
mov r12d, edx
cmp r8d, edx
cmovl r12d, r8d
jmp 0x14005049e
mov r12d, edx
jmp 0x14005049e
mov r12d, r8d
mov rcx, qword [r15 + 0x7d0]
mov rdx, qword [rsp + 0x38]
shr rdx, 0x20
mov rax, rcx
sub ecx, r9d
shr rax, 0x20
sub edx, eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, ecx, 0x3e8
sub eax, edx
add r12d, eax
test r12d, r12d
jg 0x1400504f4
lea rdx, [0x1401785d8]
mov rcx, r15
call fcn.140052c80
mov eax, 0x1c
jmp 0x140050864
mov qword [rsp + 0xd8], rbp
mov qword [rsp + 0x98], rsi
lea rsi, [rbx + 0x1b8]
mov ebp, r14d
nop
mov r8, qword [rsi]
cmp r8, 0xffffffffffffffff
je 0x140050706
xor r9d, r9d
or rcx, 0xffffffffffffffff
call fcn.140052450
test eax, eax
jne 0x1400505f3
mov rcx, qword [rbx + 0x30c]
mov r10d, dword [rsp + 0x3c]
mov r9d, dword [rsp + 0x40]
mov r8d, dword [rbx + 0x318]
mov rax, rcx
mov edx, r10d
shr rax, 0x20
sub edx, eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r9d
sub eax, ecx
imul ecx, eax, 0x3e8
add edx, ecx
cmp edx, r8d
jl 0x14005059a
lea rdx, str.After__ldms_connect_time__move_on__n
mov rcx, r15
call fcn.140052ba0
mov r9d, dword [rsp + 0x40]
mov r10d, dword [rsp + 0x3c]
mov edi, 0x274c
mov dword [rsp + 0x30], edi
test ebp, ebp
jne 0x140050633
cmp qword [rbx + 0x68], 0
jne 0x140050633
mov rcx, qword [rbx + 0x30c]
mov edx, r10d
mov rax, rcx
shr rax, 0x20
sub edx, eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r9d
sub eax, ecx
imul ecx, eax, 0x3e8
add edx, ecx
cmp edx, 0xc8
jl 0x140050633
mov r8d, r13d
mov rcx, rbx
call fcn.14004ff80
jmp 0x140050633
cmp eax, 2
jne 0x14005061e
mov rcx, qword [rsi]
lea rdx, [rsp + 0x30]
call fcn.14004fef0
test eax, eax
jne 0x140050751
lea rdx, str.Connection_failed_n
mov rcx, r15
call fcn.140052ba0
jmp 0x14005062f
test al, 4
je 0x140050633
mov rcx, qword [rsi]
lea rdx, [rsp + 0x30]
call fcn.14004fef0
mov edi, dword [rsp + 0x30]
test edi, edi
je 0x140050706
mov ecx, edi
mov dword [r15 + 0x88d4], edi
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, qword [rsi - 0x158]
test rcx, rcx
je 0x140050706
mov eax, dword [rcx + 4]
cmp eax, 2
je 0x140050671
cmp eax, 0x17
jne 0x1400506b2
mov rcx, qword [rcx + 0x20]
add rcx, 8
jmp 0x140050679
mov rcx, qword [rcx + 0x20]
add rcx, 4
cmp eax, 2
je 0x1400506a2
cmp eax, 0x17
je 0x140050690
mov ecx, 0x273f
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400506b2
lea rdx, [rsp + 0x50]
mov r8d, 0x2e
call fcn.140064350
jmp 0x1400506b2
lea rdx, [rsp + 0x50]
mov r8d, 0x2e
call fcn.140064280
mov edx, edi
mov rcx, rbx
call fcn.1400649c0
mov r9d, dword [rbx + 0xe8]
lea r8, [rsp + 0x50]
lea rdx, str.connect_to__s_port__ld_failed:__s_n
mov rcx, r15
mov qword [rsp + 0x20], rax
call fcn.140052ba0
mov rax, qword [rsi - 0x158]
cmp qword [rax + 0x28], 0
mov eax, r12d
je 0x1400506f2
cdq
sub eax, edx
sar eax, 1
mov r8d, ebp
mov rcx, rbx
mov dword [rbx + 0x318], eax
call fcn.14004ff80
mov r14d, eax
inc ebp
add rsi, 8
cmp ebp, 2
jl 0x140050510
test r14d, r14d
je 0x140050851
cmp qword [rbx + 0x68], 0
jne 0x140050738
mov r8d, r13d
mov rcx, rbx
call fcn.14004ff80
test eax, eax
je 0x14005081e
cmp dword [rbx + 0x2b0], 0
je 0x140050822
mov rsi, qword [rbx + 0xd8]
jmp 0x140050829
movsxd rcx, ebp
mov edx, ebp
mov rax, qword [rbx + rcx*8 + 0x1b8]
xor edx, r13d
mov qword [rbx + 0x1a8], rax
mov rax, qword [rbx + rcx*8 + 0x60]
movsxd rdi, edx
mov qword [rbx + 0x58], rax
mov qword [rbx + rcx*8 + 0x1b8], 0xffffffffffffffff
mov rdx, qword [rbx + rdi*8 + 0x1b8]
cmp rdx, 0xffffffffffffffff
je 0x1400507a2
mov rcx, rbx
call fcn.140051050
mov qword [rbx + rdi*8 + 0x1b8], 0xffffffffffffffff
mov rcx, rbx
call fcn.14004c600
test eax, eax
jne 0x140050854
mov rcx, qword [rsp + 0x48]
mov dword [rbx + 0x2cc], r13d
mov dword [rcx], r13d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
shr edx, 6
mov dword [rsp + 0x38], edx
imul edx, edx, 0x3e8
sub r8d, edx
mov rdx, qword [r15 + 0x7d0]
imul eax, r8d, 0x3e8
mov dword [rsp + 0x3c], eax
mov rcx, qword [rsp + 0x38]
call fcn.1400534d0
mov rcx, rbx
movsd qword [r15 + 0x7a0], xmm0
mov rdx, qword [rbx + 0x1a8]
call fcn.1400501e0
mov rcx, rbx
call fcn.14004c690
xor eax, eax
jmp 0x140050854
mov rsi, qword [rbx + 0xb8]
mov edx, edi
mov rcx, rbx
call fcn.1400649c0
mov r9d, dword [rbx + 0xe8]
lea rdx, str.Failed_to_connect_to__s_port__ld:__s
mov r8, rsi
mov rcx, r15
mov qword [rsp + 0x20], rax
call fcn.140052c80
mov eax, r14d
mov rsi, qword [rsp + 0x98]
mov rbp, qword [rsp + 0xd8]
mov r12, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140129b50
add rsp, 0xa0
pop r15
pop r14
pop r13
pop rdi
pop rbx
ret