Function at 0x14009cbf0
Capabilities:
Read file on windows
Set registry value

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xfd0]
mov eax, 0x10d0
call fcn.1400c7b20
sub rsp, rax
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x1110], rbx
mov rax, qword [0x140158010]
xor rax, rsp
mov qword [rbp + 0xfc0], rax
mov qword [rsp + 0x60], r9
mov qword [rsp + 0x58], r8
mov rdi, rdx
mov qword [rsp + 0x68], rdx
mov qword [rsp + 0x78], rdx
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp - 0x40]
call fcn.1400c53e0
xor ecx, ecx
mov r12d, ecx
mov ebx, ecx
mov dword [rsp + 0x50], ecx
mov r15d, ecx
xor eax, eax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rax
mov dword [rbp - 0x60], eax
mov qword [rbp - 0x80], rcx
mov ecx, 0x8000
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__set_fmode]
lea r8, [0x14011ab00]
mov rdx, qword [rdi]
lea rcx, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
mov r9d, eax
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
test eax, eax
je 0x14009ccd0
mov rax, qword [rdi]
mov qword [rsp + 0x20], rax
mov r8d, 0x1e2
lea rcx, str._s__d__tfopen_s_ret_d_FilePath_s
call fcn.14005dbf0
nop
lea r14d, [r12 - 1]
jmp 0x14009cfc5
mov r9, qword [rdi]
mov r8d, 0x1e6
lea rcx, str._s__d_DAT_s
call fcn.14005dbf0
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov esi, eax
mov dword [rsp + 0x54], eax
mov r9, qword [rbp - 0x80]
mov edx, 1
lea r8d, [rdx + 0x1b]
lea rcx, [rbp - 0x78]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
lea r13d, [rsi - 0x1c]
mov r14d, 0xffffffff
test rax, rax
je 0x14009cfad
nop
xor eax, eax
mov qword [rbp - 0x58], rax
lea rdx, [rbp - 0x78]
lea rcx, [rbp - 0x58]
call fcn.14004d790
nop
mov eax, dword [rbp - 0x64]
mov esi, eax
shr esi, 0x1f
and eax, 0xfffff
mov dword [rbp - 0x64], eax
mov edi, dword [rbp - 0x60]
cmp edi, 0x1000000
jae 0x14009cf70
cmp edi, 0xfff
jb 0x14009cdfb
cmp ebx, edi
jae 0x14009cdae
test r12, r12
je 0x14009cd83
mov rcx, r12
call fcn.1400beb4c
mov edi, dword [rbp - 0x60]
mov dword [rsp + 0x50], edi
lea ecx, [rdi + 2]
call fcn.1400bf14c
mov r12, rax
mov r9d, edi
mov r8d, 0x20b
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, str._s__d_new_HeapBufSize_d
call fcn.14005dbf0
mov rbx, r12
mov r8d, 0x210
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, [0x1400e2bd0]
call fcn.14005dbf0
mov r8d, dword [rsp + 0x50]
add r8d, 2
xor edx, edx
mov rcx, r12
call fcn.1400c53e0
mov r8d, 0x214
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, [0x1400e2bd0]
call fcn.14005dbf0
mov edi, dword [rbp - 0x60]
jmp 0x14009ce10
lea rbx, [rbp - 0x40]
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp - 0x40]
call fcn.1400c53e0
mov r8d, edi
mov r9, qword [rbp - 0x80]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, dword [rbp - 0x60]
sub r13d, ecx
mov eax, dword [rbp - 0x64]
cmp eax, 0x10001
jne 0x14009ce71
mov eax, dword [rbx]
mov dword [rsp + 0x28], 4
mov r9d, 4
xor r8d, r8d
mov rdx, qword [rbp - 0x58]
test esi, esi
je 0x14009ce63
mov dword [rbp - 0x50], eax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x58]
jmp 0x14009cecb
mov dword [rbp - 0x48], eax
lea rax, [rbp - 0x48]
mov qword [rsp + 0x20], rax
jmp 0x14009cec6
cmp eax, 0x10000
jne 0x14009cea4
mov rax, rcx
xor ecx, ecx
mov word [rax + rbx], cx
mov r8, rbx
mov rdx, qword [rbp - 0x58]
test esi, esi
je 0x14009ce98
mov rcx, qword [rsp + 0x58]
call fcn.1400279e0
jmp 0x14009ced4
mov rcx, qword [rsp + 0x60]
call fcn.1400279e0
jmp 0x14009ced4
cmp eax, 1
jne 0x14009ced7
mov dword [rsp + 0x28], ecx
lea r9d, [rax + 2]
xor r8d, r8d
mov rdx, qword [rbp - 0x58]
mov qword [rsp + 0x20], rbx
test esi, esi
mov rax, qword [rsp + 0x58]
jne 0x14009cecb
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov r15d, eax
mov r9, qword [rbp - 0x80]
mov edx, 1
lea r8d, [rdx + 0x1b]
lea rcx, [rbp - 0x78]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rbx, rax
test rax, rax
jne 0x14009cefa
sub r13d, 0x1c
call fcn.14005da00
test eax, eax
je 0x14009cf43
mov eax, dword [rsp + 0x54]
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x38], r13d
mov dword [rsp + 0x30], r15d
mov eax, dword [rbp - 0x60]
mov dword [rsp + 0x28], eax
mov rax, qword [rbp - 0x58]
mov qword [rsp + 0x20], rax
mov r9d, dword [rbp - 0x64]
mov r8d, 0x23b
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, str._s__d_Type_x_Key_s_DataSize_d_RegRet_d_RemindFileSize_d_FileSize_d
call fcn.14005dbf0
nop
mov rdx, qword [rbp - 0x58]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14009cf61
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test rbx, rbx
mov ebx, dword [rsp + 0x50]
jne 0x14009cd30
jmp 0x14009cfa8
mov r8d, 0x1fc
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, str._s__d_over_buffer_size
call fcn.14005dbf0
nop
mov rdx, qword [rbp - 0x58]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14009cfa8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdi, qword [rsp + 0x68]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test r12, r12
je 0x14009cfc5
mov rcx, r12
call fcn.1400beb4c
nop
mov rdx, qword [rdi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x14009cfe1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rbp + 0xfc0]
xor rcx, rsp
call fcn.1400beb20
mov rbx, qword [rsp + 0x1110]
add rsp, 0x10d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret