Function at 0x1400a5590
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.1400f4480
sub rsp, rax
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x1110], rbx
mov rax, qword [0x14019b010]
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.1400d54b0
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, [0x140151e28]
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 0x1400a5670
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.140064950
nop
lea r14d, [r12 - 1]
jmp 0x1400a5965
mov r9, qword [rdi]
mov r8d, 0x1e6
lea rcx, str._s__d_DAT_s
call fcn.140064950
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 0x1400a594d
nop
xor eax, eax
mov qword [rbp - 0x58], rax
lea rdx, [rbp - 0x78]
lea rcx, [rbp - 0x58]
call fcn.140052f20
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 0x1400a5910
cmp edi, 0xfff
jb 0x1400a579b
cmp ebx, edi
jae 0x1400a574e
test r12, r12
je 0x1400a5723
mov rcx, r12
call fcn.1400ce23c
mov edi, dword [rbp - 0x60]
mov dword [rsp + 0x50], edi
lea ecx, [rdi + 2]
call fcn.1400ce878
mov r12, rax
mov r9d, edi
mov r8d, 0x20b
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, str._s__d_new_HeapBufSize_d
call fcn.140064950
mov rbx, r12
mov r8d, 0x210
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, [0x140114db0]
call fcn.140064950
mov r8d, dword [rsp + 0x50]
add r8d, 2
xor edx, edx
mov rcx, r12
call fcn.1400d54b0
mov r8d, 0x214
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, [0x140114db0]
call fcn.140064950
mov edi, dword [rbp - 0x60]
jmp 0x1400a57b0
lea rbx, [rbp - 0x40]
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp - 0x40]
call fcn.1400d54b0
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 0x1400a5811
mov eax, dword [rbx]
mov dword [rsp + 0x28], 4
mov r9d, 4
xor r8d, r8d
mov rdx, qword [rbp - 0x58]
test esi, esi
je 0x1400a5803
mov dword [rbp - 0x50], eax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x58]
jmp 0x1400a586b
mov dword [rbp - 0x48], eax
lea rax, [rbp - 0x48]
mov qword [rsp + 0x20], rax
jmp 0x1400a5866
cmp eax, 0x10000
jne 0x1400a5844
mov rax, rcx
xor ecx, ecx
mov word [rax + rbx], cx
mov r8, rbx
mov rdx, qword [rbp - 0x58]
test esi, esi
je 0x1400a5838
mov rcx, qword [rsp + 0x58]
call fcn.1400299e0
jmp 0x1400a5874
mov rcx, qword [rsp + 0x60]
call fcn.1400299e0
jmp 0x1400a5874
cmp eax, 1
jne 0x1400a5877
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 0x1400a586b
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 0x1400a589a
sub r13d, 0x1c
call fcn.140064760
test eax, eax
je 0x1400a58e3
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.140064950
nop
mov rdx, qword [rbp - 0x58]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400a5901
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test rbx, rbx
mov ebx, dword [rsp + 0x50]
jne 0x1400a56d0
jmp 0x1400a5948
mov r8d, 0x1fc
lea rdx, str.CRtkBssGen4PresetLoader::LoadPresetFromDATFile2ServiceRegStore
lea rcx, str._s__d_over_buffer_size
call fcn.140064950
nop
mov rdx, qword [rbp - 0x58]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400a5948
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 0x1400a5965
mov rcx, r12
call fcn.1400ce23c
nop
mov rdx, qword [rdi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x1400a5981
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.1400ce210
mov rbx, qword [rsp + 0x1110]
add rsp, 0x10d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret