Function at 0x140029420
Capabilities:
Create directory
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbp
push rbx
push rdi
push r12
lea rbp, [rsp - 0x7a8]
sub rsp, 0x8a8
mov rax, qword [0x140079010]
xor rax, rsp
mov qword [rbp + 0x790], rax
mov r12, rcx
test rcx, rcx
je 0x1400297a1
mov rcx, qword [0x140079b70]
lea rax, [0x140079b70]
cmp rcx, rax
je 0x140029485
test byte [rcx + 0x1c], 4
je 0x140029485
mov rcx, qword [rcx + 0x10]
lea rax, str.SaveECCommandError
mov edx, 0xa
mov qword [rsp + 0x20], rax
call fcn.14003f070
xor edx, edx
lea rcx, [rbp + 0x580]
mov r8d, 0x208
call fcn.1400423d0
xor edx, edx
lea rcx, [rbp + 0x160]
mov r8d, 0x208
call fcn.1400423d0
xor ebx, ebx
lea r9, [rsp + 0x40]
xor r8d, r8d
mov qword [rsp + 0x40], rbx
xor edx, edx
lea rcx, [0x14005bc00]
mov edi, ebx
call qword [sym.imp.ext_ms_win_shell32_shellfolders_l1_1_0.dll_SHGetKnownFolderPath]
test eax, eax
jne 0x1400294ea
mov r8, qword [rsp + 0x40]
lea rcx, [rbp + 0x160]
mov edx, 0x104
call fcn.140044288
lea edi, [rbx + 1]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1400294fa
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
test edi, edi
je 0x1400297a1
xor edx, edx
mov qword [rsp + 0x8a0], r15
mov r8d, 0x208
lea rcx, [rbp + 0x370]
call fcn.1400423d0
lea r9, [rbp + 0x160]
mov edx, 0x104
lea r8, str._sASUSASUS_System_Control_Interfacelog
lea rcx, [rbp + 0x370]
call fcn.14000a160
mov qword [rsp + 0x30], rbx
lea rcx, [rbp + 0x370]
mov dword [rsp + 0x28], 0x2000080
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
xor edx, edx
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x14002957b
mov rcx, rax
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
jmp 0x1400295fd
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x208
call fcn.1400423d0
lea r9, [rbp + 0x160]
mov edx, 0x104
lea r8, str._sASUS
lea rcx, [rsp + 0x50]
call fcn.14000a160
xor edx, edx
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateDirectoryW]
lea r8, str.ASUS_System_Control_Interface
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.14004dbd4
xor edx, edx
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateDirectoryW]
lea r8, str.log
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.14004dbd4
xor edx, edx
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateDirectoryW]
lea r9, [rbp + 0x370]
mov edx, 0x104
lea r8, str._sAsusUefiLog.txt
lea rcx, [rbp + 0x580]
call fcn.14000a160
mov qword [rsp + 0x30], rbx
lea rcx, [rbp + 0x580]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 4
mov edx, 0xc0000000
mov r15d, ebx
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140029795
xor edx, edx
mov qword [rsp + 0x8e0], r14
mov rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileSize]
mov r14d, eax
test eax, eax
jne 0x14002967c
lea r15d, [rax + 1]
jmp 0x14002973e
cmp r14d, 0x48
jbe 0x14002973e
mov ecx, 0x48
mov qword [rsp + 0x8d8], rsi
call fcn.140040704
mov rsi, rax
test rax, rax
je 0x140029736
xor eax, eax
lea edx, [r14 - 0x48]
mov qword [rsi], rax
xor r9d, r9d
mov qword [rsi + 8], rax
xor r8d, r8d
mov qword [rsi + 0x10], rax
mov rcx, rdi
mov qword [rsi + 0x18], rax
mov qword [rsi + 0x20], rax
mov qword [rsi + 0x28], rax
mov qword [rsi + 0x30], rax
mov qword [rsi + 0x38], rax
mov qword [rsi + 0x40], rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbx
mov r8d, 0x48
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetEndOfFile]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rbx
mov r8d, 0x48
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
mov rcx, rsi
call fcn.14004070c
mov rsi, qword [rsp + 0x8d8]
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rbx
mov r8d, 8
mov rdx, r12
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov r14, qword [rsp + 0x8e0]
mov ebx, 1
test r15d, r15d
je 0x140029795
lea rcx, [rbp + 0x580]
call fcn.14003e790
mov r15, qword [rsp + 0x8a0]
mov eax, ebx
jmp 0x1400297a3
xor eax, eax
mov rcx, qword [rbp + 0x790]
xor rcx, rsp
call fcn.1400406e0
add rsp, 0x8a8
pop r12
pop rdi
pop rbx
pop rbp
ret