Function at 0x1400a1a40
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.1400ce860
sub rsp, rax
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x1110], rbx
mov rax, qword [0x140162010]
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.1400cc120
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, [0x140123f90]
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 0x1400a1b20
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.140061d00
nop
lea r14d, [r12 - 1]
jmp 0x1400a1e15
mov r9, qword [rdi]
mov r8d, 0x1e6
lea rcx, str._s__d_DAT_s
call fcn.140061d00
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 0x1400a1dfd
nop
xor eax, eax
mov qword [rbp - 0x58], rax
lea rdx, [rbp - 0x78]
lea rcx, [rbp - 0x58]
call fcn.140050a80
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 0x1400a1dc0
cmp edi, 0xfff
jb 0x1400a1c4b
cmp ebx, edi
jae 0x1400a1bfe
test r12, r12
je 0x1400a1bd3
mov rcx, r12
call fcn.1400c588c
mov edi, dword [rbp - 0x60]
mov dword [rsp + 0x50], edi
lea ecx, [rdi + 2]
call fcn.1400c5e8c
mov r12, rax
mov r9d, edi
mov r8d, 0x20b
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, str._s__d_new_HeapBufSize_d
call fcn.140061d00
mov rbx, r12
mov r8d, 0x210
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, [0x1400e9c70]
call fcn.140061d00
mov r8d, dword [rsp + 0x50]
add r8d, 2
xor edx, edx
mov rcx, r12
call fcn.1400cc120
mov r8d, 0x214
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, [0x1400e9c70]
call fcn.140061d00
mov edi, dword [rbp - 0x60]
jmp 0x1400a1c60
lea rbx, [rbp - 0x40]
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp - 0x40]
call fcn.1400cc120
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 0x1400a1cc1
mov eax, dword [rbx]
mov dword [rsp + 0x28], 4
mov r9d, 4
xor r8d, r8d
mov rdx, qword [rbp - 0x58]
test esi, esi
je 0x1400a1cb3
mov dword [rbp - 0x50], eax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x58]
jmp 0x1400a1d1b
mov dword [rbp - 0x48], eax
lea rax, [rbp - 0x48]
mov qword [rsp + 0x20], rax
jmp 0x1400a1d16
cmp eax, 0x10000
jne 0x1400a1cf4
mov rax, rcx
xor ecx, ecx
mov word [rax + rbx], cx
mov r8, rbx
mov rdx, qword [rbp - 0x58]
test esi, esi
je 0x1400a1ce8
mov rcx, qword [rsp + 0x58]
call fcn.140028090
jmp 0x1400a1d24
mov rcx, qword [rsp + 0x60]
call fcn.140028090
jmp 0x1400a1d24
cmp eax, 1
jne 0x1400a1d27
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 0x1400a1d1b
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 0x1400a1d4a
sub r13d, 0x1c
call fcn.140061b10
test eax, eax
je 0x1400a1d93
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.140061d00
nop
mov rdx, qword [rbp - 0x58]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400a1db1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test rbx, rbx
mov ebx, dword [rsp + 0x50]
jne 0x1400a1b80
jmp 0x1400a1df8
mov r8d, 0x1fc
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, str._s__d_over_buffer_size
call fcn.140061d00
nop
mov rdx, qword [rbp - 0x58]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400a1df8
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 0x1400a1e15
mov rcx, r12
call fcn.1400c588c
nop
mov rdx, qword [rdi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x1400a1e31
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.1400c5860
mov rbx, qword [rsp + 0x1110]
add rsp, 0x10d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret