Function at 0x14009e630
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.1400c9920
sub rsp, rax
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x1110], rbx
mov rax, qword [0x14015b010]
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.1400c71e0
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, [0x14011db00]
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 0x14009e710
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.14005f240
nop
lea r14d, [r12 - 1]
jmp 0x14009ea05
mov r9, qword [rdi]
mov r8d, 0x1e6
lea rcx, str._s__d_DAT_s
call fcn.14005f240
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 0x14009e9ed
nop
xor eax, eax
mov qword [rbp - 0x58], rax
lea rdx, [rbp - 0x78]
lea rcx, [rbp - 0x58]
call fcn.14004ede0
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 0x14009e9b0
cmp edi, 0xfff
jb 0x14009e83b
cmp ebx, edi
jae 0x14009e7ee
test r12, r12
je 0x14009e7c3
mov rcx, r12
call fcn.1400c094c
mov edi, dword [rbp - 0x60]
mov dword [rsp + 0x50], edi
lea ecx, [rdi + 2]
call fcn.1400c0f4c
mov r12, rax
mov r9d, edi
mov r8d, 0x20b
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, str._s__d_new_HeapBufSize_d
call fcn.14005f240
mov rbx, r12
mov r8d, 0x210
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, [0x1400e4bf0]
call fcn.14005f240
mov r8d, dword [rsp + 0x50]
add r8d, 2
xor edx, edx
mov rcx, r12
call fcn.1400c71e0
mov r8d, 0x214
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, [0x1400e4bf0]
call fcn.14005f240
mov edi, dword [rbp - 0x60]
jmp 0x14009e850
lea rbx, [rbp - 0x40]
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp - 0x40]
call fcn.1400c71e0
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 0x14009e8b1
mov eax, dword [rbx]
mov dword [rsp + 0x28], 4
mov r9d, 4
xor r8d, r8d
mov rdx, qword [rbp - 0x58]
test esi, esi
je 0x14009e8a3
mov dword [rbp - 0x50], eax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x58]
jmp 0x14009e90b
mov dword [rbp - 0x48], eax
lea rax, [rbp - 0x48]
mov qword [rsp + 0x20], rax
jmp 0x14009e906
cmp eax, 0x10000
jne 0x14009e8e4
mov rax, rcx
xor ecx, ecx
mov word [rax + rbx], cx
mov r8, rbx
mov rdx, qword [rbp - 0x58]
test esi, esi
je 0x14009e8d8
mov rcx, qword [rsp + 0x58]
call fcn.140027cf0
jmp 0x14009e914
mov rcx, qword [rsp + 0x60]
call fcn.140027cf0
jmp 0x14009e914
cmp eax, 1
jne 0x14009e917
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 0x14009e90b
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 0x14009e93a
sub r13d, 0x1c
call fcn.14005f050
test eax, eax
je 0x14009e983
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.14005f240
nop
mov rdx, qword [rbp - 0x58]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14009e9a1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test rbx, rbx
mov ebx, dword [rsp + 0x50]
jne 0x14009e770
jmp 0x14009e9e8
mov r8d, 0x1fc
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, str._s__d_over_buffer_size
call fcn.14005f240
nop
mov rdx, qword [rbp - 0x58]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14009e9e8
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 0x14009ea05
mov rcx, r12
call fcn.1400c094c
nop
mov rdx, qword [rdi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x14009ea21
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.1400c0920
mov rbx, qword [rsp + 0x1110]
add rsp, 0x10d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret