Function at 0x14001cd58
Capabilities:
Check if file exists
Get common file path
Get file attributes
Persist via run registry key
Set current directory
Set registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r13
push r14
lea rbp, [rax - 0x618]
sub rsp, 0x700
mov rax, qword [0x1400592a0]
xor rax, rsp
mov qword [rbp + 0x5f0], rax
mov edi, r8d
mov dword [rsp + 0x38], r8d
mov r14d, edx
mov dword [rsp + 0x3c], edx
mov rsi, rcx
mov ebx, 0x80070002
call fcn.14001ab20
xor r13d, r13d
test eax, eax
je 0x14001d2ef
mov r8, rsi
mov dword [rsp + 0x30], r13d
lea rdx, str._Registering_DLL:__S._r_n
mov ebx, r13d
lea ecx, [r13 + 4]
call fcn.140019b1c
lea eax, [r13 + 1]
inc eax
mov dword [rsp + 0x40], eax
test edi, edi
je 0x14001d073
mov edi, 0x208
lea rcx, [rbp - 0x30]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
nop dword [rax + rax]
test eax, eax
je 0x14001d2cc
lea r8, str._regsvr32.exe
mov edx, edi
lea rcx, [rbp - 0x30]
call fcn.140010d0c
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x14001ce2e
test al, 0x10
mov eax, 1
je 0x14001ce31
mov eax, r13d
test eax, eax
je 0x14001d04c
test rsi, rsi
je 0x14001cee0
mov edx, 0x5c
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcsrchr]
nop dword [rax + rax]
lea rcx, [rsp + 0x50]
test rax, rax
je 0x14001ce9e
mov r8d, 0x3c
lea rdx, [rsp + 0x50]
sub rax, rcx
lea rcx, [r8 + 0x7fffffc2]
test rcx, rcx
je 0x14001ce91
movzx ecx, word [rax + rdx + 2]
test cx, cx
je 0x14001ce91
mov word [rdx], cx
add rdx, 2
sub r8, 1
jne 0x14001ce6e
test r8, r8
lea rax, [rdx - 2]
cmovne rax, rdx
jmp 0x14001cedc
lea rax, [rsp + 0x50]
mov r8, rsi
sub r8, rax
mov edx, 0x3c
lea rax, [rdx + 0x7fffffc2]
test rax, rax
je 0x14001ced1
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14001ced1
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14001ceae
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r13w
lea rax, str.__s__u__
test r14d, r14d
lea r8, str.__s__
mov rdx, rdi
cmove r8, rax
lea rcx, [rbp - 0x30]
call fcn.140010d0c
mov r8, rsi
lea rcx, [rbp - 0x30]
mov rdx, rdi
call fcn.140010d0c
lea r8, [0x14004c34c]
mov rdx, rdi
lea rcx, [rbp - 0x30]
call fcn.140010d0c
lea rax, [rsp + 0x30]
mov qword [rsp + 0x30], r13
mov edi, 3
mov qword [rsp + 0x20], rax
mov r9d, edi
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionRunOnce
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
je 0x14001cf8f
lea rax, [rsp + 0x30]
mov r9d, edi
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionRunOnce
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
mov edi, eax
test eax, eax
jne 0x14001d019
mov rcx, qword [rsp + 0x30]
lea r8, [rbp - 0x30]
call fcn.14001bf74
mov r14, rax
test rax, rax
je 0x14001cffb
lea rax, [rbp - 0x30]
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], r13w
jne 0x14001cfad
lea eax, [rcx*2 + 2]
mov r9d, 1
mov rcx, qword [rsp + 0x30]
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov rdx, r14
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [rax + rax]
mov rcx, r14
mov edi, eax
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_free]
nop dword [rax + rax]
jmp 0x14001d000
mov edi, 0x80004005
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
test edi, edi
je 0x14001d2ab
test edi, edi
jle 0x14001d026
movzx edi, di
or edi, 0x80070000
mov r9d, edi
lea r8, [rsp + 0x50]
lea rdx, str.ERROR:_Could_not_store_delayed_action_for_component__S:_0x_x._r_n
mov ecx, 2
call fcn.140019b1c
test edi, edi
jns 0x14001d2c3
mov dword [rsp + 0x30], r13d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jle 0x14001d067
movzx ebx, ax
or ebx, 0x80070000
lea rdx, str.ERROR:_Failed_delaying_dll_registration_for_file__S:_0x_x._r_n
jmp 0x14001d273
xor ecx, ecx
call qword [sym.imp.ole32.dll_OleInitialize]
nop dword [rax + rax]
xor r14d, r14d
mov ebx, eax
test eax, eax
js 0x14001d2dc
lea rdx, [rbp - 0x30]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
nop dword [rax + rax]
test eax, eax
je 0x14001d130
lea rax, [rbp + 0x3e0]
mov r8, rsi
sub r8, rax
lea rcx, [rbp + 0x3e0]
mov edx, 0x103
lea rax, [rdx + 0x7ffffefb]
test rax, rax
je 0x14001d0e7
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14001d0e7
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14001d0c4
test rdx, rdx
lea rax, [rcx - 2]
mov edx, 0x5c
cmovne rax, rcx
lea rcx, [rbp + 0x3e0]
mov word [rax], r14w
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcsrchr]
nop dword [rax + rax]
test rax, rax
je 0x14001d130
lea rcx, [rbp + 0x3e0]
mov word [rax], r14w
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
nop dword [rax + rax]
mov r13d, 1
or rcx, 0xffffffffffffffff
mov rdi, rcx
inc rdi
cmp word [rsi + rdi*2], r14w
jne 0x14001d137
add rdi, 5
mov eax, 2
mul rdi
cmovo rax, rcx
mov rcx, rax
call fcn.1400014a0
mov r14, rax
test rax, rax
je 0x14001d214
mov r8, rdi
mov rdx, rax
mov rcx, rsi
call fcn.14001f72c
xor edx, edx
mov rcx, r14
lea r8d, [rdx + 8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
nop dword [rax + rax]
mov rdi, rax
cmp rax, 0x20
jbe 0x14001d1ea
cmp dword [rsp + 0x3c], 0
lea rax, str.DllUnregisterServer
lea rdx, str.DllRegisterServer
mov rcx, rdi
cmove rdx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
nop dword [rax + rax]
test rax, rax
je 0x14001d1d9
movabs r10, 0xd43837ae10dbc970
call qword [0x140048188]
mov ebx, eax
xor eax, eax
test ebx, ebx
setns al
mov dword [rsp + 0x30], eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop dword [rax + rax]
jmp 0x14001d20c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jne 0x14001d201
lea ebx, [rax + 0x57]
jmp 0x14001d203
jle 0x14001d20c
movzx ebx, bx
or ebx, 0x80070000
mov rcx, r14
call fcn.140001454
test r13d, r13d
je 0x14001d229
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
nop dword [rax + rax]
call qword [sym.imp.ole32.dll_OleUninitialize]
nop dword [rax + rax]
xor r13d, r13d
cmp dword [rsp + 0x30], r13d
jne 0x14001d2d3
test ebx, ebx
jne 0x14001d26c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jle 0x14001d262
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
mov eax, 0x80004005
cmove ebx, eax
lea rdx, str.ERROR:_Dll_Registration:_Failed_for_file__S:_0x_x._r_n
mov r9d, ebx
mov r8, rsi
mov ecx, 2
call fcn.140019b1c
cmp dword [rsp + 0x38], r13d
mov eax, r13d
sete al
mov edi, eax
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x40]
cmp eax, 2
jge 0x14001d321
mov r14d, dword [rsp + 0x3c]
jmp 0x14001cdd1
lea rdx, str.__Delayed_action_until_reboot._r_n
mov ecx, 4
call fcn.140019ae0
or dword [0x140059568], 1
lea rdx, str.____Delayed_Dll_Registration:_Succeeded_for_file__S._r_n
jmp 0x14001d314
mov ebx, 0x80004005
jmp 0x14001d321
lea rdx, str.____Dll_Registration:_Succeeded_for_file__S._r_n
jmp 0x14001d314
mov r8d, ebx
lea rdx, str.ERROR:_OLE_Initialization_failed:_0x_x._r_n
xor ecx, ecx
call fcn.140019b1c
jmp 0x14001d321
test r14d, r14d
je 0x14001d30d
mov r9d, ebx
lea rdx, str.ERROR:_Dll_Registration:_Could_not_find_file__S:_0x_x._r_n
mov r8, rsi
mov ecx, 2
call fcn.140019b1c
jmp 0x14001d321
lea rdx, str.Dll_UnRegistration:_Could_not_find_file__S._r_n
mov r8, rsi
mov ecx, 4
call fcn.140019b1c
mov eax, ebx
mov rcx, qword [rbp + 0x5f0]
xor rcx, rsp
call fcn.1400017f0
lea r11, [rsp + 0x700]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop rbp
ret