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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x17]
sub rsp, 0xa8
mov qword [rbp - 0x21], 0xfffffffffffffffe
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rbp - 1], rax
mov qword [rbp - 0x31], r9
mov ebx, r8d
mov dword [rbp - 0x61], ebx
mov rsi, rdx
mov qword [rbp - 0x59], rdx
mov r15, rcx
mov rax, qword [rbp + 0x7f]
mov qword [rbp - 0x29], rax
xor edi, edi
test rax, rax
je 0x1800c6ac4
mov dword [rax], edi
mov dword [r9], edi
cmp qword [rcx], 0xffffffffffffffff
je 0x1800c6cfa
mov ecx, 0x100000
mov r13d, ebx
cmp ebx, ecx
cmova r13d, ecx
mov dword [rbp - 0x11], edi
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x11]
mov r8d, r13d
mov rdx, rsi
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, 0x80004005
test eax, eax
cmovne edx, edi
cmp qword [r15 + 0x28], 0
je 0x1800c6ce3
test edx, edx
je 0x1800c6ce3
mov ecx, dword [rbp - 0x11]
nop word [rax + rax]
cmp ecx, r13d
jae 0x1800c6cb5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov rbx, rdi
mov rcx, qword [r15]
cmp rcx, 0xffffffffffffffff
jne 0x1800c6b42
xor cl, cl
jmp 0x1800c6b72
mov dword [rbp - 0xd], edi
lea rdx, [rbp - 0xd]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x1800c6b64
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1800c6b64
xor cl, cl
jmp 0x1800c6b70
mov ebx, dword [rbp - 0xd]
shl rbx, 0x20
add rbx, rdi
mov cl, 1
xor edi, edi
mov r14, rdi
test cl, cl
cmovne r14, rbx
lea rax, [rbp - 0x51]
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x41], rdi
mov qword [rbp - 0x39], rdi
lea rbx, [r15 + 8]
mov rdi, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 8
jb 0x1800c6b9d
mov rbx, qword [rbx]
cmp rdi, 8
jae 0x1800c6bb7
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x51], xmm0
mov qword [rbp - 0x39], 7
jmp 0x1800c6c5c
mov rsi, rdi
or rsi, 7
movabs rax, 0x7ffffffffffffffe
cmp rsi, rax
cmova rsi, rax
lea rax, [rsi + 1]
lea rdx, [rax + rax]
movabs rcx, 0x7fffffffffffffff
cmp rax, rcx
jbe 0x1800c6bf2
mov rax, 0xffffffffffffffff
mov rdx, rax
jmp 0x1800c6c02
cmp rdx, 0x1000
jb 0x1800c6c2c
mov rax, 0xffffffffffffffff
lea rcx, [rdx + 0x27]
cmp rcx, rdx
cmovbe rcx, rax
call fcn.1800c87e0
mov rcx, rax
test rax, rax
je 0x1800c6ce8
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x1800c6c3d
test rdx, rdx
je 0x1800c6c3b
mov rcx, rdx
call fcn.1800c87e0
jmp 0x1800c6c3d
xor eax, eax
mov qword [rbp - 0x51], rax
lea r8, [rdi*2 + 2]
mov rdx, rbx
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov qword [rbp - 0x39], rsi
mov rsi, qword [rbp - 0x59]
mov qword [rbp - 0x41], rdi
mov rcx, qword [r15 + 0x28]
mov rax, qword [rcx]
mov r9, r12
mov r8, r14
lea rdx, [rbp - 0x51]
call qword [rax + 0x30]
mov edx, eax
xor edi, edi
test eax, eax
jne 0x1800c6cde
mov dword [rbp - 9], edi
mov edx, dword [rbp - 0x11]
add rdx, rsi
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 9]
mov r8d, r13d
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, 0x80004005
test eax, eax
cmovne edx, edi
mov ecx, dword [rbp - 0x11]
add ecx, dword [rbp - 9]
mov dword [rbp - 0x11], ecx
test eax, eax
je 0x1800c6b20
mov ebx, dword [rbp - 0x61]
mov rax, qword [rbp - 0x31]
add dword [rax], ecx
test edx, edx
jne 0x1800c6cef
test ecx, ecx
je 0x1800c6cda
mov eax, ecx
add rsi, rax
mov qword [rbp - 0x59], rsi
sub ebx, ecx
mov dword [rbp - 0x61], ebx
jne 0x1800c6ad1
mov al, 1
jmp 0x1800c6cfc
mov ecx, dword [rbp - 0x11]
jmp 0x1800c6cb5
mov ecx, dword [rbp - 0x11]
jmp 0x1800c6cb8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rax, qword [rbp - 0x29]
test rax, rax
je 0x1800c6cfa
mov dword [rax], edx
xor al, al
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret