Function at 0x140020240
Capabilities:
Check for time delay via queryperformancecounter
Write file on windows

Disassembly:
push rbp
push rsi
lea rbp, [rsp - 0x4f]
sub rsp, 0xd8
mov rsi, rcx
call fcn.140037ec0
test al, al
jne 0x140020265
add rsp, 0xd8
pop rsi
pop rbp
ret
mov qword [rsp + 0xd0], rbx
mov qword [rsp + 0xc8], rdi
mov qword [rsp + 0xc0], r12
xor r12d, r12d
cmp byte [0x14008eab8], r12b
mov qword [rsp + 0xb8], r14
je 0x1400203ff
mov rbx, qword [0x1400b70a0]
cmp dword [rbx + 0x38], 0x8000
mov byte [rbx + 0x3c], 1
jb 0x1400202d4
lea rdi, str.DriverInitData
xor r9d, r9d
mov r8d, 0x8000
mov qword [rsp + 0x20], rdi
lea rdx, str.profiler:_max_events___d__reached_on_thread__i___s_and_later_wont_be_recorded
lea ecx, [r12 + 2]
call fcn.140013a20
jmp 0x1400203ff
movsxd rax, dword [rbx + 0x38]
inc dword [rbx + 0x38]
lea rcx, [rax + rax*4]
mov rax, qword [rbx + 0x30]
lea r14, [rax + rcx*8]
lea rcx, [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x14002088d
mov rax, qword [rbp - 0x39]
lea rdi, str.DriverInitData
sub rax, qword [0x14008eac8]
xor edx, edx
imul rax, rax, 0xf4240
mov rcx, rdi
mov qword [rsp + 0xb0], r15
div qword [0x14008eac0]
mov edx, 0x20
add rax, qword [0x14008ead0]
mov qword [r14], rax
mov qword [r14 + 0x20], r12
call fcn.140048fbc
mov r15, rax
test rax, rax
je 0x140020379
mov r8, rax
mov rdx, rdi
sub r8, rdi
mov rcx, rbx
call fcn.14001e6c0
mov qword [r14 + 0x10], rax
lea rdx, [r15 + 1]
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], r12b
jne 0x140020366
mov rcx, rbx
call fcn.14001e6c0
jmp 0x1400203f3
mov rax, qword [rbx + 8]
mov rcx, rax
mov rdx, qword [rax + 0x18]
lea rax, [rdx + 0xf]
cmp rax, qword [rcx + 0x10]
jbe 0x14002039e
mov edx, 0xf
mov rcx, rbx
call fcn.140038a30
mov rdx, r12
mov rax, qword [rbx + 8]
lea rcx, [rdx + 0xf]
mov r8, qword [rax + 0x28]
mov qword [rax + 0x18], rcx
add r8, rdx
mov rax, qword [rbx + 8]
mov rdx, qword [rax + 0x20]
add rdx, qword [rax + 0x18]
mov qword [rbx + 0x10], rdx
movsd xmm0, qword [str.DriverInitData]
movsd qword [r8], xmm0
mov eax, dword [0x140080460]
mov dword [r8 + 8], eax
movzx eax, word [0x140080464]
mov word [r8 + 0xc], ax
lea rax, [0x14007d7e6]
mov byte [r8 + 0xe], r12b
mov qword [r14 + 0x10], r8
mov r15, qword [rsp + 0xb0]
mov qword [r14 + 0x18], rax
cmp qword [rsi + 0x118], r12
jne 0x1400205e8
cmp byte [rsi + 0xd8], r12b
jne 0x1400205e8
cmp byte [rsi + 0xd9], r12b
jne 0x1400205e8
mov rdx, qword [rsi + 0xb8]
mov eax, r12d
add rdx, 0x8c
sub eax, dword [rdx]
movsxd rcx, dword [rdx]
add rcx, rdx
neg eax
sbb rax, rax
and rcx, rax
call fcn.140013b10
mov rbx, qword [rsi + 0x128]
lea rcx, [rbp - 0x31]
mov dword [0x14008e898], r12d
mov dword [0x14008e89c], r12d
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x14002089a
mov rax, qword [rbp - 0x31]
lea rcx, [0x14008e870]
sub rax, qword [0x14008eac8]
xor edx, edx
imul rax, rax, 0xf4240
div qword [0x14008eac0]
add rax, qword [0x14008ead0]
mov qword [0x14008e8a0], rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov byte [0x1400c3c10], 1
test rbx, rbx
je 0x140020518
lea rdx, [0x14007e9e4]
mov rcx, rbx
call fcn.1400147a0
mov qword [0x14008e868], rax
test rax, rax
je 0x1400208a7
mov ebx, 4
mov dword [rbp + 0x6f], 0x2dd1ffe
add dword [0x14008e89c], ebx
lea rdi, [rbp + 0x6f]
nop word [rax + rax]
mov r8d, ebx
mov r9, rax
mov edx, 1
mov rcx, rdi
call fcn.1400529c8
movsxd rcx, eax
sub ebx, eax
add rdi, rcx
test ebx, ebx
jle 0x140020518
mov rax, qword [0x14008e868]
jmp 0x1400204f0
mov eax, dword [rsi + 0xf4]
inc eax
mov dword [rbp + 0x7f], eax
mov rax, qword [rsi + 0xb8]
mov ecx, dword [rax + 8]
mov rax, qword [0x14008eb08]
mov qword [rbp - 0x29], rax
lea rax, [rbp + 0x77]
mov qword [rbp - 0x11], rax
lea rax, [rbp + 0x7f]
mov qword [rbp - 9], rax
lea rax, [rbp - 0x29]
movups xmm0, xmmword [rbp - 0x11]
mov qword [rbp - 1], rax
movsd xmm1, qword [rbp - 1]
mov dword [rbp + 0x77], ecx
lea rcx, [rbp + 7]
movsd qword [rbp + 0x17], xmm1
movaps xmmword [rbp + 7], xmm0
call fcn.140023510
mov rcx, qword [rsi + 0xb8]
mov eax, r12d
add rcx, 0x6c
sub eax, dword [rcx]
movsxd rbx, dword [rcx]
add rbx, rcx
lea rcx, [rbp - 0x11]
neg eax
sbb rax, rax
and rbx, rax
mov rdx, rbx
call fcn.140026540
movsd xmm0, qword [rax + 0x10]
mov eax, dword [rax]
movsd qword [rbp - 0x49], xmm0
test al, 1
je 0x1400205d0
mov rax, qword [rsi + 0xb8]
mov rcx, rbx
add rax, 0x74
movsxd rdx, dword [rax]
add rdx, rax
cmp dword [rax], r12d
cmove rdx, r12
call fcn.1400146a0
test al, al
je 0x1400208b7
mov rcx, qword [rsi + 0xb8]
mov eax, r12d
add rcx, 0x74
movsxd r9, dword [rcx]
add r9, rcx
sub eax, dword [rcx]
jmp 0x1400205fe
mov rdx, qword [rsi + 0xb8]
mov eax, r12d
add rdx, 0x6c
movsxd r9, dword [rdx]
add r9, rdx
sub eax, dword [rdx]
neg eax
lea r8, [rsi + 0xc8]
lea rdx, [rsi + 0x78]
sbb rax, rax
and r9, rax
mov rcx, r9
call fcn.140021e20
mov rcx, qword [rsi + 0xb8]
mov eax, r12d
sub rcx, 0xffffffffffffff80
sub eax, dword [rcx]
movsxd rdx, dword [rcx]
add rdx, rcx
lea rcx, [rsi + 0x230]
neg eax
sbb rax, rax
and rdx, rax
call fcn.14001e750
mov rcx, qword [rsi + 0xb8]
mov eax, r12d
add rcx, 0x78
mov qword [rbp - 0x59], r12
mov qword [rbp - 0x51], r12
mov qword [rbp - 0x49], r12
mov qword [rbp - 0x41], r12
sub eax, dword [rcx]
movsxd rdi, dword [rcx]
add rdi, rcx
lea rcx, [rbp - 0x59]
neg eax
sbb rax, rax
and rdi, rax
mov rdx, rdi
call fcn.140038bd0
mov rbx, qword [rbp - 0x59]
mov r8, rdi
mov ecx, 8
test rbx, rbx
je 0x140020736
mov r14, qword [rbp - 0x51]
lea rdx, str._s:_successfully_mapped_at__p___d_bytes_
mov r9, rbx
mov dword [rsp + 0x20], r14d
call fcn.140013a20
cmp r14, 0x18
jae 0x1400206d1
mov r9d, r14d
mov dword [rsp + 0x20], 0x18
mov r8, rdi
lea rdx, str._s:_Bad_mmap_size__d___need_at_least__d_bytes
mov ecx, 2
call fcn.140013a20
jmp 0x140020742
cmp dword [rbx], 0x6d072211
je 0x1400206fa
mov r9d, dword [rbx]
lea rdx, str._s:_Bad_magic_number__08x___current_is__08x
mov r8, rdi
mov dword [rsp + 0x20], 0x6d072211
mov ecx, 8
call fcn.140013a20
jmp 0x140020742
cmp dword [rbx + 0x14], 0x6d072211
je 0x140020714
mov r8, rdi
lea rdx, str.Did_not_find_expected_magic_number_marker_at_the_end_of__s._This_most_likely_means_data_writing_code_for_that_file_is_writing_too_much_or_too_little_data
mov ecx, 1
jmp 0x14002073d
movups xmm0, xmmword [rbp - 0x59]
mov qword [rsi + 0xd0], rbx
movups xmm1, xmmword [rbp - 0x49]
movups xmmword [rsi + 0x98], xmm0
movups xmmword [rsi + 0xa8], xmm1
jmp 0x1400207e9
lea rdx, str._s:_mmap_failed
call fcn.140013a20
lea rcx, [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x1400208da
mov rax, qword [rbp - 0x21]
xor edx, edx
sub rax, qword [0x14008eac8]
imul rax, rax, 0xf4240
div qword [0x14008eac0]
mov rdi, rax
add rdi, qword [0x14008ead0]
test rbx, rbx
je 0x1400207a3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x1400208e7
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x140020880
mov rax, qword [rbp - 0x19]
xor edx, edx
sub rax, qword [0x14008eac8]
imul rax, rax, 0xf4240
div qword [0x14008eac0]
sub rax, rdi
add rax, qword [0x14008ead0]
lock inc dword [0x14008e7b0]
lock add qword [0x14008e7b8], rax
mov r14, qword [rsi + 0xd0]
mov qword [rsi + 0x178], r14
test r14, r14
je 0x140020844
movsxd rdi, dword [r14 + 4]
mov rbx, qword [rsi + 0x188]
lea rcx, [rdi + 8]
call fcn.140053cb4
mov qword [rax], rdi
lock add qword [rbx], rdi
lea rbx, [rax + 8]
mov r8, rdi
mov rcx, rbx
xor edx, edx
call fcn.140070780
mov qword [rsi + 0x1b0], rbx
lea rdx, str.Scan_cache_initialized_from_frozen_data____u_entries
mov r8d, dword [r14 + 4]
mov ecx, 8
call fcn.140013a20
cmp byte [0x14008eab8], r12b
je 0x140020854
xor ecx, ecx
call fcn.14003df60
mov r12, qword [rsp + 0xc0]
mov al, 1
mov rdi, qword [rsp + 0xc8]
mov rbx, qword [rsp + 0xd0]
mov r14, qword [rsp + 0xb8]
add rsp, 0xd8
pop rsi
pop rbp
ret
lea rcx, str.QueryPerformanceCounter_failed
call fcn.1400139a0
int3
lea rcx, str.QueryPerformanceCounter_failed
call fcn.1400139a0
int3
lea rcx, str.QueryPerformanceCounter_failed
call fcn.1400139a0
int3
mov rdx, rbx
lea rcx, str.failed_to_open_binlog_file_at__s
call fcn.140013920
int3
mov rcx, qword [rsi + 0xb8]
add rcx, 0x74
call fcn.1400030d0
mov r8, rax
lea rcx, str.Unable_to_rename_state_file__s____s
mov rdx, rbx
call fcn.140013920
int3
lea rcx, str.QueryPerformanceCounter_failed
call fcn.1400139a0
int3
lea rcx, str.UnMapViewOfFile___failed
call fcn.1400139a0
int3