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

Disassembly:
push rbp
mov rax, rdx
mov rbp, rsp
push r15
mov r15, rcx
push r14
push r13
push r12
push rdi
push rsi
push rbx
and rsp, 0xfffffffffffffff0
add rsp, 0xffffffffffffff80
mov rbx, qword [rcx + 0x40]
mov r8d, dword [rdx]
mov qword [rbp + 0x18], rdx
mov rdi, qword [rdx + 0x10]
mov r12, qword [rbx + 0x10]
cmp r8d, 1
jne 0x140137290
lea rax, [rsp + 0x60]
mov rsi, qword [rdx + 0x28]
mov r13, qword [rdx + 0x20]
lea r9, [rsp + 0x5c]
mov qword [rsp + 0x40], rax
mov r14, qword [sym.imp.KERNEL32.dll_WriteFile]
mov r8d, 0x1000000
mov qword [rsp + 0x48], r9
mov rdx, r13
mov rcx, r12
cmp rsi, r8
mov qword [rsp + 0x70], rdi
cmovbe r8, rsi
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x78], 0
call r14
mov r9, qword [rsp + 0x48]
test eax, eax
je 0x1401372d0
mov eax, dword [rsp + 0x5c]
cmp rsi, rax
jne 0x1401372db
xor r13d, r13d
mov rax, qword [rbp + 0x18]
mov esi, dword [rax]
mov rax, qword [r15 + 0x40]
mov rdx, qword [rax + 0x70]
mov eax, esi
mov dword [rsp + 0x48], esi
mov rcx, qword [rdx + 0x78]
add rax, rcx
mov qword [rdx + 0x78], rax
mov rax, qword [rbp + 0x18]
mov dword [rax], 0
mov qword [rax + 8], 0
test esi, esi
je 0x140137288
mov qword [rsp + 0x30], 0
lea rdi, [rax + 0x28]
xor esi, esi
jmp 0x140137073
mov r13d, r12d
mov rax, qword [r15 + 0x40]
mov r14, qword [rdi - 8]
mov r12d, r13d
mov r9, qword [rdi]
movzx ecx, byte [rax + 0x80]
mov r10d, dword [r14 + 0x10]
shl r10, cl
add r10, qword [rax + 8]
mov rax, r9
test r13d, r13d
jne 0x1401370c8
mov rdx, r10
mov r8, rax
mov rcx, r14
mov qword [rsp + 0x40], r10
mov qword [rsp + 0x38], rax
call sub.msvcrt.dll_memcmp
mov r10, qword [rsp + 0x40]
mov r9, qword [rsp + 0x38]
test eax, eax
mov r12d, eax
jne 0x140137208
movzx ecx, byte [rbx + 0x80]
shr r9, cl
test byte [rbx + 7], 8
jne 0x1401371e0
cmp r9d, 1
jne 0x1401371b0
mov eax, dword [rbx + 0xe8]
cmp dword [rbx + 0x178], eax
jae 0x1401371b0
mov rax, qword [rbx + 0x170]
mov qword [r14], rax
add dword [rbx + 0x178], 1
mov qword [rbx + 0x170], r14
add esi, 1
cmp dword [rsp + 0x48], esi
je 0x140137198
add rdi, 0x10
test r13d, r13d
je 0x140137070
jmp 0x140137160
mov eax, dword [rbx + 0x178]
cmp dword [rbx + 0xe8], eax
jbe 0x140137187
mov rax, qword [rbx + 0x170]
add esi, 1
mov qword [r9], rax
mov qword [rbx + 0x170], r9
add dword [rbx + 0x178], 1
cmp esi, dword [rsp + 0x48]
jae 0x140137198
nop
mov eax, esi
movzx ecx, byte [rbx + 0x80]
shl rax, 4
add rax, qword [rbp + 0x18]
mov rdi, qword [rax + 0x28]
mov r9, qword [rax + 0x20]
shr rdi, cl
test byte [rbx + 7], 8
jne 0x1401371c0
cmp edi, 1
je 0x140137130
mov rcx, r9
add esi, 1
call sub.msvcrt.dll_free
cmp esi, dword [rsp + 0x48]
jb 0x140137160
lea rsp, [rbp - 0x38]
mov eax, r12d
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rcx, r14
call sub.msvcrt.dll_free
jmp 0x140137110
mov r8d, edi
mov edx, 0xffffffff
shl r8, cl
mov rcx, r9
call sub.msvcrt.dll_memset
mov r9, rax
jmp 0x140137182
mov r8d, r9d
mov edx, 0xffffffff
mov qword [rsp + 0x40], r9
shl r8, cl
mov rcx, r14
call sub.msvcrt.dll_memset
mov r9, qword [rsp + 0x40]
jmp 0x1401370dc
cmp qword [rsp + 0x30], 0
mov qword [rsp + 0x40], r10
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x60], 0
je 0x140137260
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x60]
sub rax, qword [rsp + 0x30]
cmp rax, 0x1999
mov r10, qword [rsp + 0x40]
ja 0x1401372ee
mov qword [rsp + 0x40], r10
call qword [sym.imp.KERNEL32.dll_SwitchToThread]
mov rax, qword [rdi]
mov r10, qword [rsp + 0x40]
jmp 0x14013709b
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x60]
mov r10, qword [rsp + 0x40]
cmp byte [0x1403eba08], 1
mov qword [rsp + 0x30], rax
jbe 0x140137244
jmp 0x140221910
mov r12d, r13d
jmp 0x140137198
mov rax, qword [rax + 8]
lea rdx, [rdx + 0x20]
mov r9, rdi
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.14013bb90
mov r13d, eax
test r13d, r13d
je 0x140137023
cmp byte [0x1403eba08], 0
je 0x140137023
jmp 0x1402218e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r13d, eax
jmp 0x1401372ab
sub rsi, rax
add rdi, rax
add r13, rax
mov rax, qword [rsp + 0x40]
jmp 0x140136fd8
cmp byte [0x1403eba08], 0
jne 0x140221951
call qword [sym.imp.KERNEL32.dll_SwitchToThread]
mov r12d, 0xffff87b4
mov r9, qword [rdi]
jmp 0x1401370c8
mov ecx, r13d
call fcn.1402218c0
mov r8d, 0x2100
mov ecx, 1
lea r9, str.Write_error:__s_n
mov qword [rsp + 0x20], rax
lea rdx, str.mdbx_iov_write
call fcn.14021df10
jmp 0x140137023
mov r8d, 0x211a
lea rax, str._workaround_for_incoherent_flaw_of_unified_page_buffer_cache_
lea r9, str.catch_delayed_non_arrived_page__u__s_n
mov ecx, 2
mov qword [rsp + 0x28], rax
mov eax, dword [r14 + 0x10]
lea rdx, str.mdbx_iov_write
mov qword [rsp + 0x40], r10
mov dword [rsp + 0x20], eax
call fcn.14021df10
mov r10, qword [rsp + 0x40]
jmp 0x140137244
lea rax, str._workaround_for_incoherent_flaw_of_unified_page_buffer_cache_
lea r9, str.bailout_waiting_for__u_page_arrival__s_n
mov r8d, 0x211e
mov ecx, 1
mov qword [rsp + 0x28], rax
mov eax, dword [r14 + 0x10]
lea rdx, str.mdbx_iov_write
mov r12d, 0xffff87b4
mov dword [rsp + 0x20], eax
call fcn.14021df10
call qword [sym.imp.KERNEL32.dll_SwitchToThread]
mov r9, qword [rdi]
jmp 0x1401370c8