Function at 0x140019340
Capabilities:
Delete directory
Delete file
Delete registry key
Enumerate files on windows
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x618]
sub rsp, 0x6f0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x14026fdb0]
xor rax, rsp
mov qword [rbp + 0x5e0], rax
xor r8d, r8d
lea rdx, str.Tool_PortSetToolDelete
lea rcx, [rsp + 0x48]
call fcn.140001190
nop
xor r13d, r13d
mov qword [rsp + 0x40], r13
mov dword [rsp + 0x3c], r13d
mov dword [rsp + 0x38], r13d
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x1c0]
call fcn.14019d7c0
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x3d0]
call fcn.14019d7c0
xor edx, edx
mov r8d, 0x250
lea rcx, [rsp + 0x70]
call fcn.14019d7c0
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20119
xor r8d, r8d
lea rdx, str.SOFTWARECanonPortSet
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea r12d, [r13 + 1]
test eax, eax
je 0x14001942e
mov r9d, r12d
lea r8, str.return___08x
lea edx, [r13 + 2]
lea rcx, [rsp + 0x48]
call fcn.140001370
nop
jmp 0x140019825
mov dword [rsp + 0x3c], 0x208
mov dword [rsp + 0x38], r12d
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x1c0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
xor r8d, r8d
lea rdx, str.Path
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x40]
test eax, eax
je 0x1400194a4
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor r9d, r9d
lea r8, str.return___08x
lea edx, [r9 + 2]
lea rcx, [rsp + 0x48]
call fcn.140001370
nop
lea rcx, [rsp + 0x48]
call fcn.140001320
xor eax, eax
jmp 0x140019832
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.14001e050
test eax, eax
jne 0x1400194d0
mov r9d, r12d
lea r8, str.return___08x
lea edx, [rax + 2]
lea rcx, [rsp + 0x48]
call fcn.140001370
nop
jmp 0x140019825
lea rdx, str.SOFTWARECanonPortSet
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea rdx, str.SOFTWARECANON_
mov rcx, 0xffffffff80000002
call fcn.1400224a0
cmp eax, r12d
jne 0x140019510
lea rdx, str.SOFTWARECANON_
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea r8, [rbp + 0x1c0]
lea rdx, [0x14021f0f0]
lea rcx, [rbp + 0x3d0]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rdx, [rsp + 0x70]
lea rcx, [rbp + 0x3d0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140019597
nop word [rax + rax]
lea r9, [rbp - 0x64]
lea r8, [rbp + 0x1c0]
lea rdx, str._s_s
lea rcx, [rbp + 0x3d0]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rbp + 0x3d0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rsp + 0x70]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140019550
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, [rbp + 0x1c0]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov r15d, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
call fcn.140056384
mov rdx, rax
mov ecx, r13d
test rax, rax
setne cl
test ecx, ecx
jne 0x1400195cd
mov ecx, 0x80004005
call fcn.140004550
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x30], rbx
lea rcx, [rbp + 0x1c0]
lea rax, [rbp + 0x1c0]
or rsi, 0xffffffffffffffff
test rax, 0xffffffffffff0000
jne 0x140019626
movzx edi, cx
mov ecx, edi
call fcn.140056158
test rax, rax
je 0x140019723
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.140005730
mov rbx, qword [rsp + 0x30]
jmp 0x140019723
xor eax, eax
mov rcx, rsi
lea rdi, [rbp + 0x1c0]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x1400196a1
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140019723
cmp dword [rdx + 0x10], eax
jge 0x140019674
cmp dword [rbx - 0xc], eax
jge 0x140019667
mov ecx, 0x80070057
call fcn.140004550
int3
mov dword [rbx - 0x10], r13d
mov word [rbx], r13w
jmp 0x140019723
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14001968a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x30], rbx
jmp 0x140019723
mov r14d, dword [rbx - 0x10]
lea r13, [rbp + 0x1c0]
sub r13, rbx
sar r13, 1
test ecx, ecx
jns 0x1400196c1
mov ecx, 0x80070057
call fcn.140004550
int3
sub r12d, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, ecx
or eax, r12d
jge 0x1400196e0
mov edx, ecx
lea rcx, [rsp + 0x30]
call fcn.140005ae0
mov rbx, qword [rsp + 0x30]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
lea r12, [rax + rax]
add rdx, rdx
mov r9, r12
cmp r13, r14
ja 0x140019704
lea r8, [rbx + r13*2]
call fcn.140199418
jmp 0x140019710
lea r8, [rbp + 0x1c0]
call fcn.140199918
cmp edi, dword [rbx - 0xc]
jg 0x14001981a
mov dword [rbx - 0x10], edi
xor eax, eax
mov word [r12 + rbx], ax
mov edx, 0x5c
mov rcx, rbx
call fcn.14019a074
test rax, rax
jne 0x140019739
mov eax, esi
jmp 0x14001973f
sub rax, rbx
sar rax, 1
mov r8d, eax
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x30]
call fcn.1400121e0
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rbx, 0xffffffffffffffe8
cmp rcx, rbx
je 0x1400197ab
cmp dword [rbx + 0x10], 0
jl 0x14001979c
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x14001979c
call fcn.140006db0
mov rdi, rax
mov ecx, esi
lock xadd dword [rbx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140019791
mov rcx, qword [rbx]
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rdi + 0x18]
mov qword [rsp + 0x30], rax
jmp 0x1400197ab
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.1400059f0
nop
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400197ca
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdi, qword [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov r9d, r15d
lea r8, str.return___08x
mov edx, 2
lea rcx, [rsp + 0x48]
call fcn.140001370
nop
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x14001980b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rcx, [rsp + 0x48]
call fcn.140001320
mov eax, r15d
jmp 0x140019832
mov ecx, 0x80070057
call fcn.140004550
nop
lea rcx, [rsp + 0x48]
call fcn.140001320
mov eax, r12d
mov rcx, qword [rbp + 0x5e0]
xor rcx, rsp
call fcn.140198b40
lea r11, [rsp + 0x6f0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret