Function at 0x1400220b0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rsi
mov qword [rsp + 0x18], r8
push rbp
push rdi
push r14
lea rbp, [rsp - 0x160]
sub rsp, 0x260
xor esi, esi
mov dword [rbp + 0x190], esi
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x104
lea rax, [rbp + 0x50]
mov qword [rsp + 0x20], rax
lea r9d, [rsi - 1]
lea r8, str.C:WindowsSystem32drivershatred.sys
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea rcx, str.C:WindowsSystem32drivershatred.sys
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140022126
mov al, 1
jmp 0x140022303
lea rax, [0x14015c618]
mov qword [rsp + 0x40], rax
lea rcx, [rbp - 0x18]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rbp + 0x190], 1
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea r14, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x40], r14
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x3c], edx
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x48], rax
mov byte [rbp - 0x3c], 0
mov byte [rbp - 0x47], 0
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x38], rsi
mov rax, qword [0x1408f36e8]
mov qword [rbp - 0x44], rax
mov qword [rbp - 0x50], rsi
mov r8d, Ordinal_35
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x48]
call fcn.14001e0e0
test rax, rax
jne 0x1400221fb
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
cmp qword [rbp - 0x38], 0
je 0x1400222bc
mov r8d, 0x444cc0
lea rdx, [0x1404acb10]
lea rcx, [rsp + 0x40]
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__::write_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
cmp dword [rsp + rcx + 0x50], 0
je 0x140022364
cmp qword [rbp - 0x38], 0
je 0x14002231b
mov rax, qword [rsp + 0x60]
lea rcx, [rbp - 0x48]
cmp qword [rax], rcx
jne 0x140022265
mov rdx, qword [rbp - 0x28]
mov rcx, qword [rbp - 0x30]
mov qword [rax], rcx
mov rax, qword [rbp - 0x80]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x68]
mov dword [rax], edx
lea rcx, [rsp + 0x48]
call fcn.14001df40
lea rbx, [rsp + 0x48]
test al, al
cmove rbx, rsi
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rdi, rsi
test eax, eax
cmove rdi, rbx
mov byte [rbp - 0x3c], 0
mov byte [rbp - 0x47], 0
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x38], rsi
mov rax, qword [0x1408f36e8]
mov qword [rbp - 0x44], rax
mov qword [rbp - 0x50], rsi
test rdi, rdi
je 0x140022341
xor bl, bl
mov rcx, qword [rsp + 0x40]
movsxd rdx, dword [rcx + 4]
mov qword [rsp + rdx + 0x40], r14
mov rcx, qword [rsp + 0x40]
movsxd rdx, dword [rcx + 4]
lea r8d, [rdx - 0xa8]
mov dword [rsp + rdx + 0x3c], r8d
lea rcx, [rsp + 0x48]
call fcn.14001c870
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp - 0x18]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
movzx eax, bl
lea r11, [rsp + 0x260]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
mov byte [rbp - 0x3c], 0
mov byte [rbp - 0x47], 0
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x38], rsi
mov rax, qword [0x1408f36e8]
mov qword [rbp - 0x44], rax
mov qword [rbp - 0x50], rsi
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
jmp 0x1400222bc
cmp qword [rbp - 0x38], 0
je 0x1400223e8
mov rax, qword [rsp + 0x60]
lea rcx, [rbp - 0x48]
cmp qword [rax], rcx
jne 0x140022393
mov rdx, qword [rbp - 0x28]
mov rcx, qword [rbp - 0x30]
mov qword [rax], rcx
mov rax, qword [rbp - 0x80]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x68]
mov dword [rax], edx
lea rcx, [rsp + 0x48]
call fcn.14001df40
lea rbx, [rsp + 0x48]
test al, al
cmove rbx, rsi
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rdi, rsi
test eax, eax
cmove rdi, rbx
mov byte [rbp - 0x3c], 0
mov byte [rbp - 0x47], 0
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x38], rsi
mov rax, qword [0x1408f36e8]
mov qword [rbp - 0x44], rax
mov qword [rbp - 0x50], rsi
test rdi, rdi
jne 0x14002242c
jmp 0x14002240e
mov byte [rbp - 0x3c], 0
mov byte [rbp - 0x47], 0
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x38], rsi
mov rax, qword [0x1408f36e8]
mov qword [rbp - 0x44], rax
mov qword [rbp - 0x50], rsi
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov bl, 1
jmp 0x1400222be