Function at 0x180004640
Capabilities:
Create directory
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x190
xor r12d, r12d
test byte [0x18000f5c8], 1
mov eax, 0x100
mov r13d, r12d
mov rdi, rdx
mov r15, rcx
cmovne r13d, eax
cmp r9d, 8
mov ebx, r12d
jbe 0x180004b6c
mov r14d, r9d
lea rax, [r14 + 0x41]
cmp rax, 0x104
jae 0x180004b6c
mov dx, 0x5f
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_StrChrA]
cmp rax, r12
jne 0x180004b6c
lea rcx, [rsp + 0x80]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea rdx, [0x1800114ca]
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
lea rdx, [0x18001151a]
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
lea r8, [rsp + 0x48]
lea rdx, [rsp + 0x80]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
cmp eax, r12d
jne 0x180004b6c
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x1d8]
lea r9, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rdx, [0x180011568]
xor r8d, r8d
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [rsp + 0x1d8], r12d
je 0x180004b5c
mov rcx, qword [0x18000f648]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
xor edx, edx
add eax, 2
movsxd rcx, eax
mov eax, dword [rsp + 0x1d8]
lea r8, [rax + rcx*2 + 0x20]
mov rcx, qword [0x18000f5b0]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp rax, r12
mov rsi, rax
je 0x180004b5c
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x1d8]
lea r9, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rdx, [0x180011568]
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, r12d
jne 0x180004b48
mov eax, dword [rsp + 0x1d8]
mov rdx, rsi
mov rcx, rsi
shr rax, 1
mov word [rsi + rax*2], r12w
mov r8, qword [0x18000f650]
call qword [sym.imp.SHLWAPI.dll_PathCombineW]
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov r8, qword [0x18000f648]
mov rdx, rsi
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathCombineW]
mov rdx, qword [0x18000f5e0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, r12d
je 0x180004b43
mov rdi, qword [rsp + 0x1e8]
mov rbp, qword [rdi + 8]
cmp rbp, r12
je 0x18000486d
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov rcx, rsi
movsxd rbx, eax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [0x18000f5b0]
movsxd r8, eax
xor edx, edx
add r8, rbx
lea r8, [r8 + r8 + 0x22]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov r12, rax
je 0x18000487a
lea rdx, [0x1800115f0]
mov r9, rbp
mov r8, rsi
mov rcx, rax
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x18000487a
xor edx, edx
mov rcx, rsi
call fcn.1800054c0
mov r12, rax
test r12, r12
je 0x180004b3c
lea rcx, [rsp + r14 + 0xaa]
lea rdx, [0x1800114a9]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea rax, [rsp + 0x30]
or r13d, 0xf003f
lea rdx, [rsp + 0x80]
mov r9d, r13d
xor r8d, r8d
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x18000490a
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, qword [0x18000f640]
mov rcx, qword [rsp + 0x30]
lea eax, [rax + rax + 2]
mov r9d, 1
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x30]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x180004b28
cmp qword [rdi + 0x28], 0
jne 0x18000492f
mov rcx, qword [0x18000f5e0]
lea r8, [rdi + 0x30]
lea rdx, [rdi + 0x28]
call fcn.18000414c
test eax, eax
mov ebx, eax
jne 0x180004b28
mov r8d, dword [rdi + 0x30]
mov rdx, qword [rdi + 0x28]
mov rcx, rsi
call fcn.18000420c
xor ebp, ebp
cmp eax, ebp
mov ebx, eax
jne 0x180004ab4
cmp qword [rdi], rbp
jne 0x18000495d
xor edx, edx
mov rcx, r12
call fcn.1800054c0
mov qword [rdi], rax
mov rdx, qword [0x18000f638]
lea rcx, [rsp + r14 + 0x81]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x80]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
cmp eax, ebp
jne 0x180004b28
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x1d8]
lea r9, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
lea rdx, [0x180011624]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov r13d, 3
cmp eax, ebp
jne 0x180004a03
cmp dword [rsp + 0x1d8], 0x28
jne 0x180004a03
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x50]
lea rdx, [0x180011624]
mov r9d, r13d
xor r8d, r8d
mov dword [rsp + 0x28], 0x28
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], ebp
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8d, dword [0x18000f5cc]
xor r9d, r9d
lea edx, [rax + rax + 2]
mov rcx, rsi
mov dword [rsp + 0x1d8], edx
call fcn.180007160
mov r11d, dword [rsp + 0x1d8]
mov rcx, qword [rsp + 0x30]
mov dword [rsp + 0x28], r11d
lea rdx, [0x180011532]
mov r9d, r13d
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov r11d, dword [rdi + 0x20]
cmp r11d, ebp
je 0x180004a82
mov rax, qword [rdi + 0x10]
mov rcx, qword [rsp + 0x30]
mov dword [rsp + 0x28], r11d
lea rdx, [0x1800114ae]
mov r9d, r13d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [rdi + 0x24]
cmp eax, ebp
je 0x180004b19
mov rcx, qword [rsp + 0x30]
mov dword [rsp + 0x28], eax
mov rax, qword [rdi + 0x18]
lea rdx, [0x1800114b7]
mov r9d, r13d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x180004b19
cmp eax, 0x20
je 0x180004b26
lea rax, [rsp + 0x30]
lea rdx, [rsp + 0x80]
mov r9d, r13d
xor r8d, r8d
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebp
jne 0x180004b28
mov rcx, qword [rsp + 0x30]
mov rdi, qword [0x18000f640]
lea r8, [rsp + 0x40]
xor edx, edx
mov qword [rsp + 0x40], rbp
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
cmp eax, ebp
jne 0x180004b19
mov rcx, qword [rsp + 0x40]
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x180004b28
mov ebx, ebp
mov rcx, qword [0x18000f5b0]
mov r8, r12
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x180004b48
mov ebx, 8
jmp 0x180004b48
mov ebx, 0xb7
mov rcx, qword [0x18000f5b0]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x180004b61
mov ebx, 8
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rax, qword [rsp + 0x1e0]
lea r11, [rsp + 0x190]
add dword [rax], 1
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret