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

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x90
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov esi, r8d
mov rdi, rdx
call fcn.140001fd0
mov rbx, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400027b0
lea rax, [rsp + 0x60]
mov qword [rsp + 0xc8], rbp
xor ebp, ebp
xorps xmm0, xmm0
mov qword [rsp + 0x40], rbp
xor r9d, r9d
mov qword [rsp + 0x38], rax
xor r8d, r8d
mov dword [rsp + 0x30], esi
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rdi
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
movups xmmword [rsp + 0x70], xmm0
mov qword [rsp + 0x60], rbp
call qword [sym.imp.ntdll.dll_NtWriteFile]
test eax, eax
jns 0x14000268f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_writing_payload__Error:
mov ebx, eax
call fcn.1400028f0
mov rcx, rax
lea rdx, [0x140001fb0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
jmp 0x1400026f3
mov qword [rsp + 0x30], rbx
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x28], 0x1000000
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0xf001f
mov qword [rsp + 0x50], rbp
call qword [sym.imp.ntdll.dll_NtCreateSection]
mov edi, eax
test eax, eax
je 0x14000272d
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.NtCreateSection_failed:
call fcn.1400028f0
mov rcx, rax
lea rdx, [0x140001fb0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rcx, rax
mov edx, edi
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___long_int____ptr64]
mov rcx, rax
lea rdx, [0x140002ac0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rax, 0xffffffffffffffff
mov rbp, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140006450
add rsp, 0x90
pop rdi
pop rsi
pop rbx
ret
lea rcx, str.___Overwriting_file_content_n
call fcn.140001d70
lea rdx, [rsp + 0x68]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
lea edi, [rax - 0xc]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp edi, 8
jbe 0x14000279d
lea r9, [rsp + 0x58]
mov qword [rsp + 0x20], rbp
mov r8d, 8
lea rdx, [0x140008d10]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r9d, 1
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
sub edi, dword [rsp + 0x58]
cmp edi, 8
ja 0x140002760
mov rcx, rbx
call qword [sym.imp.ntdll.dll_NtClose]
mov rax, qword [rsp + 0x50]
jmp 0x14000270a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_create_file
mov ebx, eax
call fcn.1400028f0
mov rcx, rax
lea rdx, [0x140001f90]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x140002ac0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rax, 0xffffffffffffffff
jmp 0x140002712