Function at 0x140019970
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xb0
mov qword [rbp - 0x51], 0xfffffffffffffffe
mov qword [rsp + 0x100], rbx
mov rax, qword [0x1400f5010]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r14, rdx
mov r13, rcx
call fcn.140003970
mov rcx, rax
test rax, rax
je 0x140019feb
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rbp - 0x39], rax
lea rbx, str.88D5B221_5F9E_41CA_8DE1_F3C4C9FE77A6_1
mov rdx, rbx
lea rcx, [rbp - 0x39]
call fcn.1400050d0
mov r15, 0xffffffffffffffff
test al, al
jne 0x140019a0a
mov rax, r15
nop dword [rax]
inc rax
cmp word [rbx + rax*2], 0
jne 0x1400199f0
mov r8d, eax
mov rdx, rbx
lea rcx, [rbp - 0x39]
call fcn.140003400
nop
call fcn.140003970
mov rcx, rax
test rax, rax
je 0x140019ff6
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rbp - 0x41], rax
lea rbx, str.88D5B221_5F9E_41CA_8DE1_F3C4C9FE77A6_2
mov rdx, rbx
lea rcx, [rbp - 0x41]
call fcn.1400050d0
test al, al
jne 0x140019a5d
mov rax, r15
inc rax
cmp word [rbx + rax*2], 0
jne 0x140019a43
mov r8d, eax
mov rdx, rbx
lea rcx, [rbp - 0x41]
call fcn.140003400
nop
call fcn.140003970
mov rcx, rax
test rax, rax
je 0x140019fe0
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
lea rdi, [rax + 0x18]
mov qword [rbp - 0x29], rdi
xor eax, eax
mov qword [rbp - 0x19], rax
xor r12d, r12d
mov qword [rbp - 0x21], r12
mov dword [rbp - 0x19], r12d
mov qword [rbp - 0x11], r12
mov dword [rbp - 0x31], r12d
mov dword [rbp - 0x59], r12d
mov qword [rbp - 0x49], r12
mov r8d, 0x273
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d
call fcn.14003f0e0
mov rdx, qword [r14 + 0x130]
lea rcx, [rdx - 0x18]
lea rbx, [rdi - 0x18]
cmp rcx, rbx
je 0x140019b15
cmp dword [rbx + 0x10], r12d
jl 0x140019b04
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x140019b04
call fcn.1400051f0
mov rdi, rax
mov ecx, r15d
lock xadd dword [rbx + 0x10], ecx
sub ecx, 1
jg 0x140019afa
mov rcx, qword [rbx]
mov r8, qword [rcx]
mov rdx, rbx
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
add rdi, 0x18
mov qword [rbp - 0x29], rdi
jmp 0x140019b15
mov r8d, dword [rdx - 0x10]
lea rcx, [rbp - 0x29]
call fcn.140003400
mov rdi, qword [rbp - 0x29]
cmp dword [rdi - 8], 1
jle 0x140019b2b
mov edx, dword [rdi - 0x10]
lea rcx, [rbp - 0x29]
call fcn.140003340
mov rdi, qword [rbp - 0x29]
mov r9d, 0x2001b
mov r8, rdi
mov rdx, 0xffffffff80000002
lea rcx, [rbp - 0x21]
call fcn.14001cc20
test eax, eax
jne 0x140019f2f
mov rbx, qword [rbp - 0x41]
cmp dword [rbx - 8], 1
jle 0x140019b66
mov edx, dword [rbx - 0x10]
lea rcx, [rbp - 0x41]
call fcn.140003340
mov rbx, qword [rbp - 0x41]
mov dword [rbp - 9], 4
lea rax, [rbp - 9]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x31]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 5]
xor r8d, r8d
mov rdx, rbx
mov rsi, qword [rbp - 0x21]
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov ecx, eax
mov eax, 0xd
test ecx, ecx
jne 0x140019bab
mov ecx, r12d
cmp dword [rbp - 5], 4
cmovne ecx, eax
mov eax, dword [rbp - 0x31]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov r9, rbx
mov r8d, 0x27c
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d__s_nRegRet_x_dwValue_d
call fcn.14003f0e0
mov eax, dword [r13 + 0x17c]
cmp eax, dword [rbp - 0x31]
jbe 0x140019c2b
mov dword [rbp - 0x59], 1
cmp dword [rbx - 8], 1
jle 0x140019c02
mov edx, dword [rbx - 0x10]
lea rcx, [rbp - 0x41]
call fcn.140003340
mov eax, dword [r13 + 0x17c]
mov rbx, qword [rbp - 0x41]
mov dword [rbp - 1], eax
mov dword [rsp + 0x28], 4
lea rax, [rbp - 1]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov r8d, 0x28b
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d
call fcn.14003f0e0
mov dword [rbp - 0x2d], r12d
mov rbx, qword [rbp - 0x39]
cmp dword [rbx - 8], 1
jle 0x140019c62
mov edx, dword [rbx - 0x10]
lea rcx, [rbp - 0x39]
call fcn.140003340
mov rbx, qword [rbp - 0x39]
mov dword [rbp + 7], 4
lea rax, [rbp + 7]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x2d]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0xb]
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov r12d, eax
test eax, eax
jne 0x140019ca2
cmp dword [rbp + 0xb], 4
mov eax, 0xd
cmovne r12d, eax
mov eax, dword [rbp - 0x2d]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], r12d
mov r9, rbx
mov r8d, 0x28e
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d__s_nRegRet_x_dwValue_d
call fcn.14003f0e0
test r12d, r12d
jne 0x140019cea
mov eax, dword [rbp - 0x2d]
test eax, eax
je 0x140019cea
cmp dword [rbp - 0x59], 1
je 0x140019cea
cmp eax, 1
jne 0x140019f53
jmp 0x140019f19
mov r9d, dword [r13 + 0xb0]
mov r8d, 0x291
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d_m_DatFileCount_d
call fcn.14003f0e0
xor r12d, r12d
lea rsi, [r14 + 0x20]
cmp dword [r13 + 0xb0], r12d
jle 0x140019e00
lea rax, [r13 + 0x60]
mov qword [rbp - 0x59], rax
nop word [rax + rax]
movsxd rax, r12d
mov rcx, qword [r13 + rax*8 + 0x60]
mov qword [rsp + 0x20], rcx
mov r9d, r12d
mov r8d, 0x297
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d_m_DatFileName__d__s
call fcn.14003f0e0
mov ecx, 0x8000
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__set_fmode]
lea r8, [0x1400aeb30]
mov rdx, qword [rbp - 0x59]
mov rdx, qword [rdx]
lea rcx, [rbp - 0x49]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d
test eax, eax
jne 0x140019f00
mov r8d, 0x2a2
call fcn.14003f0e0
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
cmp dword [r14 + 0x58], 0
jne 0x140019db5
mov rcx, r14
call fcn.1400121d0
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
mov r9d, dword [r14 + 0x8c]
lea r8, [rbp - 0x21]
mov rdx, qword [rbp - 0x49]
call fcn.14001a320
mov r8d, 0x2a4
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d
call fcn.14003f0e0
inc r12d
add qword [rbp - 0x59], 8
cmp r12d, dword [r13 + 0xb0]
jl 0x140019d30
mov r8d, 0x2a7
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d
call fcn.14003f0e0
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
cmp dword [r14 + 0x58], 0
jne 0x140019e31
mov rcx, r14
call fcn.1400121d0
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
lea rdx, [rbp - 0x21]
mov rcx, r13
call fcn.14001a010
mov r14d, eax
mov r8d, 0x2aa
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d
call fcn.14003f0e0
mov rsi, qword [rbp - 0x21]
test r14d, r14d
je 0x140019eca
mov r9d, r14d
mov r8d, 0x2ad
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d_write_extra_data___d
call fcn.14003f0e0
cmp dword [rbx - 8], 1
jle 0x140019e9d
mov edx, dword [rbx - 0x10]
lea rcx, [rbp - 0x39]
call fcn.140003340
mov rbx, qword [rbp - 0x39]
mov dword [rbp + 0xf], 1
mov dword [rsp + 0x28], 4
lea rax, [rbp + 0xf]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
test rsi, rsi
je 0x140019ede
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
xor esi, esi
mov qword [rbp - 0x21], rsi
mov dword [rbp - 0x19], 0
mov r8d, 0x2b1
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d
call fcn.14003f0e0
jmp 0x140019f53
mov r8d, 0x29c
call fcn.14003f0e0
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rsi, qword [rbp - 0x21]
test rsi, rsi
je 0x140019f53
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
xor esi, esi
mov qword [rbp - 0x21], rsi
jmp 0x140019f53
mov dword [rsp + 0x20], eax
mov r9, rdi
mov r8d, 0x2c0
lea rdx, str.CBssForAPOChange::CheckPresetDat
lea rcx, str._s__d_open_key__s___x
call fcn.14003f0e0
mov rsi, qword [rbp - 0x21]
test rsi, rsi
je 0x140019f62
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop
lea rdx, [rdi - 0x18]
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140019f7d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp - 0x41]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140019f9c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp - 0x39]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r15d
sub r15d, 1
jg 0x140019fb9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.14008ade0
mov rbx, qword [rsp + 0x100]
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.140003700
nop
mov ecx, 0x80004005
call fcn.140003700
nop
mov ecx, 0x80004005
call fcn.140003700
int3