Function at 0x180335410
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 [0x1806c4cd8]
xor rax, rsp
mov qword [rbp - 1], rax
mov qword [rbp - 0x31], r9
mov edi, r8d
mov dword [rbp - 0x61], r8d
mov rbx, rdx
mov qword [rbp - 0x59], rdx
mov r15, rcx
mov rax, qword [rbp + 0x7f]
mov qword [rbp - 0x29], rax
xor esi, esi
test rax, rax
je 0x180335465
mov dword [rax], esi
mov dword [r9], esi
cmp qword [rcx], 0xffffffffffffffff
je 0x18033564e
mov ecx, 0x100000
nop word [rax + rax]
mov r12d, edi
cmp edi, ecx
cmova r12d, ecx
mov dword [rbp - 0x11], esi
mov qword [rsp + 0x20], rsi
lea r9, [rbp - 0x11]
mov r8d, r12d
mov rdx, rbx
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, 0x80004005
test eax, eax
cmovne edx, esi
cmp qword [r15 + 0x28], 0
je 0x18033563e
test edx, edx
je 0x18033563e
mov ecx, dword [rbp - 0x11]
cmp ecx, r12d
jae 0x18033560b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r13d, eax
mov rbx, rsi
mov rcx, qword [r15]
cmp rcx, 0xffffffffffffffff
jne 0x1803354e6
xor cl, cl
jmp 0x180335514
mov dword [rbp - 0xd], esi
lea rdx, [rbp - 0xd]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x180335508
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x180335508
xor cl, cl
jmp 0x180335514
mov ebx, dword [rbp - 0xd]
shl rbx, 0x20
add rbx, rdi
mov cl, 1
mov r14, rsi
test cl, cl
cmovne r14, rbx
lea rax, [rbp - 0x51]
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x41], rsi
mov qword [rbp - 0x39], rsi
lea rdi, [r15 + 8]
mov rsi, qword [rdi + 0x10]
cmp qword [rdi + 0x18], 8
jb 0x18033553f
mov rdi, qword [rdi]
cmp rsi, 8
jae 0x180335556
movups xmm0, xmmword [rdi]
movups xmmword [rbp - 0x51], xmm0
mov qword [rbp - 0x39], 7
jmp 0x1803355ae
mov rbx, rsi
or rbx, 7
movabs rax, 0x7ffffffffffffffe
cmp rbx, rax
cmova rbx, rax
lea rax, [rbx + 1]
lea rcx, [rax + rax]
movabs rdx, 0x7fffffffffffffff
cmp rax, rdx
mov rax, 0xffffffffffffffff
cmova rcx, rax
call fcn.18007e040
mov qword [rbp - 0x51], rax
lea r8, [rsi*2 + 2]
mov rdx, rdi
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov qword [rbp - 0x39], rbx
mov qword [rbp - 0x41], rsi
mov rcx, qword [r15 + 0x28]
mov rax, qword [rcx]
mov r9, r13
mov r8, r14
lea rdx, [rbp - 0x51]
call qword [rax + 0x30]
mov edx, eax
xor esi, esi
mov rbx, qword [rbp - 0x59]
test eax, eax
jne 0x180335639
mov dword [rbp - 9], esi
mov edx, dword [rbp - 0x11]
add rdx, rbx
mov qword [rsp + 0x20], rsi
lea r9, [rbp - 9]
mov r8d, r12d
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, 0x80004005
test eax, eax
cmovne edx, esi
mov ecx, dword [rbp - 0x11]
add ecx, dword [rbp - 9]
mov dword [rbp - 0x11], ecx
test eax, eax
je 0x1803354c4
mov edi, dword [rbp - 0x61]
mov rax, qword [rbp - 0x31]
add dword [rax], ecx
test edx, edx
jne 0x180335643
test ecx, ecx
je 0x180335635
mov eax, ecx
add rbx, rax
mov qword [rbp - 0x59], rbx
sub edi, ecx
mov dword [rbp - 0x61], edi
mov ecx, 0x100000
jne 0x180335480
mov al, 1
jmp 0x180335650
mov ecx, dword [rbp - 0x11]
jmp 0x18033560b
mov ecx, dword [rbp - 0x11]
jmp 0x18033560e
mov rax, qword [rbp - 0x29]
test rax, rax
je 0x18033564e
mov dword [rax], edx
xor al, al
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.1804688c0
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret