Function at 0x1403743f0
Capabilities:
Get file size
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov r8d, 0x20000
mov rdi, rdx
lea r9, [rsp + 0x50]
xor edx, edx
mov rbx, rcx
mov qword [rsp + 0x50], 0
call sym.mdb_txn_begin
mov esi, eax
test eax, eax
jne 0x140374522
mov r12, qword [rbx + 0x48]
mov rbp, qword [rsp + 0x50]
test r12, r12
je 0x140374480
mov edx, 4
mov rcx, rbp
call sym.mdb_txn_end
mov r12, qword [rbx + 0xf8]
mov edx, 0xffffffff
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r8d, eax
test eax, eax
je 0x140374538
mov rdx, r12
mov rcx, rbx
call fcn.140373fd0
test eax, eax
je 0x140374538
mov esi, eax
jmp 0x1403744ec
mov eax, dword [rbx + 0x1c]
mov r13, qword [rbx + 0x40]
lea edx, [rax + rax]
mov qword [rsp + 0x38], rdx
mov r8, rdx
test edx, edx
je 0x1403746a0
mov r14, qword [sym.imp.KERNEL32.dll_WriteFile]
lea r15, [rsp + 0x4c]
mov dword [rsp + 0x34], r8d
mov r9, r15
mov rdx, r13
mov rcx, rdi
mov qword [rsp + 0x20], 0
call r14
mov r8d, dword [rsp + 0x34]
test eax, eax
je 0x140374670
mov eax, dword [rsp + 0x4c]
test eax, eax
jne 0x140374588
test r12, r12
je 0x1403744e7
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov esi, 5
test rbp, rbp
je 0x140374522
mov rbx, qword [rbp + 8]
test rbx, rbx
je 0x140374515
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140374508
call sym.mdb_txn_abort
mov edx, 0x200022
mov rcx, rbx
call sym.mdb_txn_end
mov edx, 0x200022
mov rcx, rbp
call sym.mdb_txn_end
mov eax, esi
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rbp
call sym.mdb_txn_renew0
mov r13d, eax
test eax, eax
jne 0x140374630
mov eax, dword [rbx + 0x1c]
mov r13, qword [rbx + 0x40]
lea edx, [rax + rax]
mov qword [rsp + 0x38], rdx
mov r8, rdx
test edx, edx
jne 0x14037449a
mov qword [rsp + 0x38], 0
test r12, r12
je 0x1403745ab
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [rbx + 0x1c]
jmp 0x1403745ab
mov edx, eax
add r13, rdx
sub r8d, eax
jne 0x1403744a6
test r12, r12
je 0x1403745a8
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
nop dword [rax]
mov eax, dword [rbx + 0x1c]
mov r12d, eax
mov rcx, qword [rbx]
imul r12, qword [rbp + 0x10]
lea rdx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140374658
mov rax, qword [rsp + 0x58]
cmp r12, rax
cmovbe rax, r12
mov rbx, rax
mov rax, qword [rsp + 0x38]
sub rbx, rax
je 0x1403744f1
mov r14, qword [sym.imp.KERNEL32.dll_WriteFile]
lea r15, [rsp + 0x4c]
mov r8d, 0x40000000
mov r9, r15
mov rdx, r13
mov rcx, rdi
mov qword [rsp + 0x20], 0
cmp rbx, r8
cmovbe r8, rbx
call r14
test eax, eax
je 0x1403746ae
mov eax, dword [rsp + 0x4c]
test eax, eax
jne 0x140374648
mov esi, 5
jmp 0x1403744f1
mov rcx, r12
mov esi, r13d
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x1403744ec
add r13, rax
sub rbx, rax
jne 0x1403745f2
jmp 0x1403744f1
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1403746bb
mov esi, eax
jmp 0x1403744f1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test r12, r12
je 0x140374687
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test r14d, r14d
je 0x1403745a8
mov esi, r14d
jmp 0x1403744ec
mov qword [rsp + 0x38], 0
jmp 0x1403745ab
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x1403744f1
mov rbx, qword [rsp + 0x38]
neg rbx
jne 0x1403745e6
jmp 0x1403744f1