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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
xor r13d, r13d
mov r12, r8
mov rbx, rcx
cmp byte [rcx], r13b
je 0x140058e88
mov byte [rcx + 3], dl
mov byte [rcx + 1], 1
mov rcx, qword [rcx + 0x270]
test rcx, rcx
je 0x140058b67
call qword [sym.imp.KERNEL32.dll_SetEvent]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r15d, eax
mov ebp, r13d
mov edi, r13d
mov r14d, r13d
cmp dword [rbx + 0x214], r13d
jle 0x140058e36
mov rsi, r13
mov rax, qword [rbx + 0x220]
mov rcx, qword [rsi + rax + 0x10]
test rcx, rcx
je 0x140058c09
mov eax, dword [rsi + rax + 0x74]
test eax, eax
jne 0x140058bcd
or dword [rsp + 0x50], 0xffffffff
lea edx, [rax + 5]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140058c05
mov rcx, qword [rbx + 0x220]
lea rdx, [rsp + 0x50]
mov rcx, qword [rsi + rcx + 0x10]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
jmp 0x140058bf4
cmp eax, 0xff
jne 0x140058bde
cmp byte [rbx + 3], r13b
je 0x140058be5
inc edi
jmp 0x140058c09
cmp eax, 0x100
je 0x140058c09
mov edx, 5
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140058c05
mov rax, qword [rbx + 0x220]
mov dword [rsi + rax + 0x74], 0x100
jmp 0x140058c09
inc edi
inc ebp
mov ecx, dword [rbx + 0x214]
inc r14d
add rsi, 0x1b8
cmp r14d, ecx
jl 0x140058b89
test ebp, ebp
jle 0x140058c40
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, r15d
cmp eax, 0xfa
jb 0x140058b70
mov ecx, dword [rbx + 0x214]
mov eax, ecx
mov r15d, 0x64
test edi, edi
jle 0x140058d25
mov ebp, r13d
test ecx, ecx
jle 0x140058d25
mov rdi, r13
mov r14d, 0x100
mov rax, qword [rbx + 0x220]
mov rcx, qword [rdi + rax + 0x10]
test rcx, rcx
je 0x140058d0e
cmp dword [rdi + rax + 0x74], r14d
je 0x140058d0e
cmp dword [rdi + rax + 0x74], 0xff
jne 0x140058c95
mov edx, 0xfa
jmp 0x140058c9f
cmp byte [rbx + 3], r13b
mov edx, r13d
sete dl
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x140058d0e
mov rsi, qword [rbx + 0x220]
mov rcx, qword [rdi + rsi + 0x10]
test rcx, rcx
je 0x140058d02
mov edx, ILGetSize
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x140058ce8
mov byte [r12], 1
lea r8, str.C:UsersMaksim.MoisiukDocumentsPersonalconemu_srccommonPipeServer.h
mov rcx, qword [rdi + rsi + 0x10]
mov r9d, 0x515
mov edx, r15d
call fcn.14011a0f4
mov rcx, qword [rdi + rsi + 0x10]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140058d02
mov qword [rdi + rsi + 0x10], r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbx + 0x220]
mov dword [rdi + rax + 0x74], r14d
mov eax, dword [rbx + 0x214]
inc ebp
add rdi, 0x1b8
cmp ebp, eax
jl 0x140058c64
mov ebp, r13d
test eax, eax
jle 0x140058e36
mov rdi, r13
mov rax, qword [rbx + 0x220]
lea rsi, [rax + rdi]
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x140058d7a
cmp rcx, 0xffffffffffffffff
je 0x140058d7a
mov dword [rsi + 0x74], r15d
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov rcx, qword [rsi + 8]
mov dword [rsi + 0x74], 0xc8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 8], r13
mov dword [rsi + 0x74], 0xc9
mov rax, qword [rbx + 0x220]
mov qword [rax + rdi + 8], r13
mov rdx, qword [rbx + 0x220]
mov rcx, qword [rdi + rdx + 0x48]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140058da0
mov qword [rdi + rdx + 0x48], r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, qword [rbx + 0x220]
mov rcx, qword [rdi + rdx + 0x10]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140058dc1
mov qword [rdi + rdx + 0x10], r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbx + 0x220]
mov rcx, qword [rax + rdi + 0x198]
test rcx, rcx
je 0x140058df0
call fcn.140113e18
mov rax, qword [rbx + 0x220]
mov qword [rdi + rax + 0x198], r13
mov rax, qword [rbx + 0x220]
mov rcx, qword [rax + rdi + 0x1a8]
test rcx, rcx
je 0x140058e21
mov rax, qword [rbx + 0x258]
test rax, rax
je 0x140058e21
mov rdx, qword [rbx + 0x268]
call rax
mov rax, qword [rbx + 0x220]
mov qword [rdi + rax + 0x1a8], r13
inc ebp
add rdi, 0x1b8
cmp ebp, dword [rbx + 0x214]
jl 0x140058d33
mov rcx, qword [rbx + 0x278]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140058e54
mov qword [rbx + 0x278], r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x270]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140058e72
mov qword [rbx + 0x270], r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x220]
call fcn.140113e18
mov qword [rbx + 0x220], r13
mov byte [rbx], r13b
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret