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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor ebp, ebp
mov rbx, rdx
cmp dword [rcx + 0x218], ebp
mov r12d, ebp
mov rdi, rcx
mov dword [rsp + 0x78], ebp
setg r12b
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [rbx + 0x74], 1
mov qword [rbx + 0x38], rbp
mov qword [rbx + 0x30], rbp
cmp byte [rdi + 1], bpl
jne 0x14005842e
lea r9, [rsp + 0x70]
mov dword [rsp + 0x70], ebp
lea r8, [rsp + 0x78]
mov dword [rsp + 0x80], ebp
mov rdx, rbx
mov rcx, rdi
call fcn.140058ea8
cmp byte [rdi + 1], bpl
jne 0x14005846e
test r12d, r12d
je 0x1400582cd
mov eax, dword [rdi + 0x218]
test eax, eax
jle 0x1400582cd
mov edx, dword [rdi + 0x214]
dec eax
mov dword [rdi + 0x218], eax
mov r12d, ebp
mov eax, ebp
test edx, edx
jle 0x1400582cd
mov r8, qword [rdi + 0x220]
lea rcx, [r8 + 0x10]
cmp qword [rcx], rbp
je 0x1400582bb
inc eax
add rcx, 0x1b8
cmp eax, edx
jl 0x1400582a7
jmp 0x1400582cd
imul rdx, rax, 0x1b8
mov rcx, rdi
add rdx, r8
call fcn.140058730
mov rax, qword [rdi + 0x240]
mov esi, 1
test rax, rax
je 0x1400582f2
mov rdx, qword [rdi + 0x268]
mov rcx, rbx
call rax
test eax, eax
je 0x1400583bb
mov rdx, rbx
mov rcx, rdi
call fcn.140057f64
test eax, eax
je 0x1400583bb
lea r13, [rbx + 0x1a4]
lea r14, [rbx + 0x1a8]
lea r15, [rbx + 0x1a0]
and dword [rbx + 0x40], 0
mov r9, r15
mov rax, qword [rdi + 0x268]
mov r8, r14
mov rdx, qword [rbx + 0x198]
mov rcx, rbx
mov qword [rsp + 0x28], rax
mov esi, ebp
mov qword [rsp + 0x20], r13
call qword [rdi + 0x238]
mov cl, byte [rdi + 6]
test eax, eax
je 0x140058381
test cl, cl
jne 0x140058390
mov r8, qword [r14]
test r8, r8
je 0x140058390
mov r9d, dword [r15]
test r9d, r9d
je 0x140058390
and dword [rsp + 0x28], 0
lea rax, [rsp + 0x80]
mov rdx, rbx
mov qword [rsp + 0x20], rax
mov rcx, rdi
call fcn.1400584d0
jmp 0x140058390
test cl, cl
jne 0x140058390
mov rdx, rbx
mov rcx, rdi
call fcn.140059394
cmp dword [rbx + 0x40], 0
jne 0x1400583b9
cmp byte [rdi + 1], 0
jne 0x1400583b9
cmp byte [rdi + 5], 0
je 0x1400583b9
mov rdx, rbx
mov rcx, rdi
call fcn.140057f64
xor ebp, ebp
test eax, eax
jne 0x14005831a
jmp 0x1400583bb
xor ebp, ebp
cmp dword [rbx + 0x40], ebp
jne 0x1400583df
test esi, esi
je 0x1400583cf
mov rdx, rbx
mov rcx, rdi
call fcn.140059394
cmp byte [rdi + 1], bpl
jne 0x1400583df
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rax, qword [rdi + 0x248]
test rax, rax
je 0x1400583f7
mov rdx, qword [rdi + 0x268]
mov rcx, rbx
call rax
mov dl, byte [rdi + 1]
mov al, dl
test dl, dl
jne 0x140058426
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140058426
cmp rcx, 0xffffffffffffffff
je 0x140058426
mov dword [rbx + 0x74], 0x64
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov dword [rbx + 0x74], 0x65
mov al, byte [rdi + 1]
test al, al
je 0x14005824c
mov rcx, qword [rbx + 8]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140058454
mov dword [rbx + 0x74], 0xc8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], rbp
mov dword [rbx + 0x74], 0xc9
mov rbx, qword [rsp + 0x88]
xor eax, eax
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rcx, qword [rbx + 8]
mov esi, eax
test rcx, rcx
je 0x1400584bd
mov rdx, rcx
cmp dword [rsp + 0x70], ebp
je 0x14005849f
mov rdx, rbx
mov rcx, rdi
call fcn.140059394
mov rcx, qword [rbx + 8]
mov rdx, rcx
test rcx, rcx
je 0x1400584bd
cmp rdx, 0xffffffffffffffff
je 0x1400584bd
mov dword [rbx + 0x74], 0xc8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], rbp
mov dword [rbx + 0x74], 0xc9
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
add dword [rbx + 0x30], eax
mov dword [rbx + 0x3c], eax
jmp 0x140058454