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

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x2c0
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x2b0], rax
mov rbp, rcx
xor bl, bl
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [0x140c45680]
repne scasb al, byte [rdi]
not rcx
cmp rcx, 1
jne 0x14017e317
xor esi, esi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0xc0000000
mov r8d, ecx
lea rcx, [0x140366e60]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14017e310
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [rsi + 1]
lea rcx, [0x140366e70]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14017e3db
mov byte [rsp + 0xb0], sil
xor edx, edx
mov r8d, Ordinal_512
lea rcx, [rsp + 0xb1]
call sub.ntdll.dll_memset
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, [0x140366e80]
mov edx, reloc.MFC80U.DLL_Ordinal_512
lea rcx, [rsp + 0xb0]
call fcn.140015300
xor al, al
jmp 0x14017e4fa
mov bl, 1
jmp 0x14017e3db
xor esi, esi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [rsi + 1]
lea rcx, [0x140c45680]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14017e3d9
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [rsi + 1]
lea rcx, [0x140c45680]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14017e3db
mov byte [rsp + 0xb0], sil
xor edx, edx
mov r8d, Ordinal_512
lea rcx, [rsp + 0xb1]
call sub.ntdll.dll_memset
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, [0x140c45680]
lea r8, [0x140366eb8]
mov edx, reloc.MFC80U.DLL_Ordinal_512
lea rcx, [rsp + 0xb0]
call fcn.140015300
xor al, al
jmp 0x14017e4fa
mov bl, 1
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void____ptr64]
nop
mov dword [rsp + 0x40], esi
xor eax, eax
mov dword [rsp + 0x44], eax
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14017e415
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
xor al, al
jmp 0x14017e4fa
test bl, bl
je 0x14017e442
cmp qword [rsp + 0x40], 0
je 0x14017e442
mov dword [rsp + 0x50], esi
xor eax, eax
mov dword [rsp + 0x54], eax
lea r9d, [rax + 2]
xor r8d, r8d
mov rdx, qword [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x14017e480
lea rcx, [rsp + 0x88]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void____ptr64]
nop
lea rcx, [rsp + 0x88]
call fcn.14017e040
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const____ptr64____ptr64]
nop
lea rcx, [rsp + 0x88]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
mov rdx, rbp
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const____ptr64____ptr64]
lea rdx, [0x140366e6c]
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const____ptr64____ptr64]
mov dword [rsp + 0x48], esi
lea rdx, [rsp + 0x68]
cmp qword [rsp + 0x80], 0x10
cmovae rdx, qword [rsp + 0x68]
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x78]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14017e4e3
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
xor al, al
jmp 0x14017e4fa
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
mov al, 1
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.140161080
lea r11, [rsp + 0x2c0]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret