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

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x80
mov rax, qword [0x14000c008]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov esi, r8d
mov rdi, rdx
call fcn.140001fa0
mov rbx, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140002690
xor eax, eax
mov qword [rsp + 0xb8], rbp
mov qword [rsp + 0x60], rax
xorps xmm0, xmm0
lea rax, [rsp + 0x60]
xor ebp, ebp
mov qword [rsp + 0x40], rbp
xor r9d, r9d
mov qword [rsp + 0x38], rax
xor r8d, r8d
mov dword [rsp + 0x30], esi
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rdi
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
movups xmmword [rsp + 0x68], xmm0
call qword [sym.imp.ntdll.dll_NtWriteFile]
test eax, eax
jns 0x14000256e
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.140002950
mov rcx, rax
lea rdx, [0x140001f80]
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 0x1400025d2
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 0x140002609
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.140002950
mov rcx, rax
lea rdx, [0x140001f80]
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, [0x140002b20]
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 + 0xb8]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140006410
add rsp, 0x80
pop rdi
pop rsi
pop rbx
ret
lea rcx, str.___Overwriting_file_content_n
call fcn.140001d40
lea rdx, [rsp + 0x5c]
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 0x14000267d
nop dword [rax]
lea r9, [rsp + 0x58]
mov qword [rsp + 0x20], rbp
mov r8d, 8
lea rdx, [0x140008d00]
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 0x140002640
mov rcx, rbx
call qword [sym.imp.ntdll.dll_NtClose]
mov rax, qword [rsp + 0x50]
jmp 0x1400025e9
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.140002950
mov rcx, rax
lea rdx, [0x140001f60]
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, [0x140002b20]
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 0x1400025f1