Function at 0x14002cdc0
Capabilities:
Check if file exists
Delete file
Get common file path

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x880
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rsp + 0x8d0], rbx
mov rax, qword [0x14012ce40]
xor rax, rsp
mov qword [rsp + 0x870], rax
mov r14, rdx
mov r12, rcx
mov word [rsp + 0x430], 0
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x432]
call fcn.1400b57e0
mov word [rsp + 0x110], 0
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x112]
call fcn.1400b57e0
mov word [rsp + 0x640], 0
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x642]
call fcn.1400b57e0
mov byte [rsp + 0x320], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rsp + 0x321]
call fcn.1400b57e0
xor r15d, r15d
mov dword [rsp + 0x48], r15d
mov rax, qword [0x1401370f0]
test rax, rax
jne 0x14002ceb2
mov ecx, 0x310
call fcn.140084d88
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14002cea8
mov rcx, rax
call fcn.140050830
jmp 0x14002ceab
mov rax, r15
mov qword [0x1401370f0], rax
lea rdx, str.ScrubDrivers__...
mov rcx, rax
call fcn.140050c00
mov rdi, qword [0x140136ce8]
test rdi, rdi
jne 0x14002cf1c
lea ecx, [rdi + 0x30]
call fcn.140084d88
mov rdi, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14002cf12
mov ecx, 0x20
call fcn.140084d88
nop
test rax, rax
je 0x14002cf00
mov qword [rax + 8], r15
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
jmp 0x14002cf03
mov rax, r15
mov qword [rdi + 0x28], rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x14002cf15
mov rdi, r15
mov qword [0x140136ce8], rdi
mov r9d, 0x104
lea r8, [rsp + 0x640]
lea rdx, str.DRIVER_VER_FILE
mov rcx, rdi
call fcn.14004a950
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x20], 0x104
lea r9, [rsp + 0x320]
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call sub.WINSPOOL.DRV_GetPrinterDriverDirectoryW
lea r8, [rsp + 0x320]
mov edx, 0x104
lea rcx, [rsp + 0x430]
call fcn.1400b1b70
lea r8, [rsp + 0x430]
mov edx, 0x104
lea rcx, [rsp + 0x110]
call fcn.1400b1b70
lea rdx, [0x1400ecae4]
lea rcx, [rsp + 0x110]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
lea rdx, [rsp + 0x640]
lea rcx, [rsp + 0x110]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov rax, qword [0x1401370f0]
test rax, rax
jne 0x14002cff3
mov ecx, 0x310
call fcn.140084d88
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14002cfe9
mov rcx, rax
call fcn.140050830
jmp 0x14002cfec
mov rax, r15
mov qword [0x1401370f0], rax
lea r8, [rsp + 0x110]
lea rdx, str.Scrub_VerFile__s
mov rcx, rax
call fcn.140050c00
lea rcx, [rsp + 0x110]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14002d02c
lea rdx, [rsp + 0x110]
mov rcx, r14
call fcn.14008a454
lea r8, [rsp + 0x430]
mov edx, 0x104
lea rcx, [rsp + 0x110]
call fcn.1400b1b70
lea rdx, [rsp + 0x640]
lea rcx, [rsp + 0x110]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov rax, qword [0x1401370f0]
test rax, rax
jne 0x14002d090
mov ecx, 0x310
call fcn.140084d88
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14002d086
mov rcx, rax
call fcn.140050830
jmp 0x14002d089
mov rax, r15
mov qword [0x1401370f0], rax
lea r8, [rsp + 0x110]
lea rdx, str.Scrub_VerFile__s
mov rcx, rax
call fcn.140050c00
lea rcx, [rsp + 0x110]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14002d0d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x14002d0d4
lea rdx, [rsp + 0x110]
mov rcx, r14
call fcn.14008a454
mov edx, 0xa
lea rcx, [rsp + 0x98]
call fcn.140089fe8
nop
mov edx, 0xa
lea rcx, [rsp + 0xd0]
call fcn.140089fe8
nop
mov edx, 0xa
lea rcx, [rsp + 0x60]
call fcn.140089fe8
nop
mov rdi, qword [0x140136ce8]
test rdi, rdi
jne 0x14002d165
lea ecx, [rdi + 0x30]
call fcn.140084d88
mov rdi, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14002d15b
mov ecx, 0x20
call fcn.140084d88
nop
test rax, rax
je 0x14002d149
mov qword [rax + 8], r15
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
jmp 0x14002d14c
mov rax, r15
mov qword [rdi + 0x28], rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x14002d15e
mov rdi, r15
mov qword [0x140136ce8], rdi
lea r8, [rsp + 0x98]
lea rdx, str.TWAIN_FOLDERS
mov rcx, rdi
call fcn.14004c670
mov ebp, r15d
cmp qword [rsp + 0xb0], rbp
jle 0x14002d3a9
mov rax, r15
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.140089fc0
test rax, rax
je 0x14002d3a3
mov rdi, qword [rax + 0x10]
mov rcx, qword [rdi - 0x18]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rdi - 8], 0
jl 0x14002d1d1
cmp rax, qword [rdi - 0x18]
jne 0x14002d1d1
lea rbx, [rdi - 0x18]
lock add dword [rdi - 8], 1
jmp 0x14002d20d
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rdi - 0x10]
call qword [rax]
mov rbx, rax
test rax, rax
je 0x14002d39d
mov ecx, dword [rdi - 0x10]
mov dword [rax + 8], ecx
mov ecx, dword [rdi - 0x10]
add ecx, 1
movsxd rdx, ecx
lea r9, [rdx + rdx]
mov r8, rdi
add rdx, rdx
lea rcx, [rax + 0x18]
call fcn.1400b09f0
add rbx, 0x18
mov qword [rsp + 0x50], rbx
cmp dword [rbx - 0x10], 0
jle 0x14002d361
mov edx, 0x104
lea rcx, [rsp + 0x110]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rdx, str.twain_32
lea rcx, [rsp + 0x110]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp dword [rbx - 8], 1
jle 0x14002d260
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x50]
call fcn.140006380
mov rbx, qword [rsp + 0x50]
mov rdx, rbx
lea rcx, [rsp + 0x110]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov rsi, qword [0x1401370f0]
test rsi, rsi
jne 0x14002d32c
mov ecx, 0x310
call fcn.140084d88
mov rsi, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x14002d322
call fcn.140087bd0
mov ecx, r15d
test rax, rax
setne cl
test ecx, ecx
je 0x14002d392
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rsi], rax
mov word [rsi + 0x64], 0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [0x1400f5b5c]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [0x1400f5b5c]
mov rcx, rsi
call fcn.140006070
lea rcx, [rsi + 8]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rsi + 0x30]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rsi + 0x26c]
mov word [rcx], 0
lea r8, [0x1400f6478]
mov edx, 0x50
call fcn.1400b1b70
nop
jmp 0x14002d325
mov rsi, r15
mov qword [0x1401370f0], rsi
lea r8, [rsp + 0x110]
lea rdx, str.Scrub_twain_folder__s
mov rcx, rsi
call fcn.140050c00
mov r9d, 1
lea r8, [0x1400f15b8]
lea rdx, [rsp + 0x110]
mov rcx, r12
call fcn.14002bb00
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14002d37d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
add ebp, 1
movsxd rax, ebp
cmp rax, qword [rsp + 0xb0]
jge 0x14002d3a9
jmp 0x14002d190
mov ecx, 0x80004005
call fcn.140006300
nop
call fcn.1400062f0
int3
call fcn.14008bf60
int3
mov rdi, qword [0x140136ce8]
test rdi, rdi
jne 0x14002d404
lea ecx, [rdi + 0x30]
call fcn.140084d88
mov rdi, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x14002d3fa
mov ecx, 0x20
call fcn.140084d88
nop
test rax, rax
je 0x14002d3e8
mov qword [rax + 8], r15
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
jmp 0x14002d3eb
mov rax, r15
mov qword [rdi + 0x28], rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x14002d3fd
mov rdi, r15
mov qword [0x140136ce8], rdi
lea r8, [rsp + 0xd0]
lea rdx, str.WIA_DRIVERS
mov rcx, rdi
call fcn.14004c670
mov ebp, r15d
cmp qword [rsp + 0xe8], rbp
jle 0x14002d644
mov rax, r15
nop
mov rdx, rax
lea rcx, [rsp + 0xd0]
call fcn.140089fc0
test rax, rax
je 0x14002d63e
mov rdi, qword [rax + 0x10]
mov rcx, qword [rdi - 0x18]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rdi - 8], 0
jl 0x14002d471
cmp rax, qword [rdi - 0x18]
jne 0x14002d471
lea rbx, [rdi - 0x18]
lock add dword [rdi - 8], 1
jmp 0x14002d4ad
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rdi - 0x10]
call qword [rax]
mov rbx, rax
test rax, rax
je 0x14002d638
mov ecx, dword [rdi - 0x10]
mov dword [rax + 8], ecx
mov ecx, dword [rdi - 0x10]
add ecx, 1
movsxd rdx, ecx
lea r9, [rdx + rdx]
mov r8, rdi
add rdx, rdx
lea rcx, [rax + 0x18]
call fcn.1400b09f0
add rbx, 0x18
mov qword [rsp + 0x30], rbx
cmp dword [rbx - 0x10], 0
jle 0x14002d5fc
mov edx, 0x104
lea rcx, [rsp + 0x110]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp dword [rbx - 8], 1
jle 0x14002d4eb
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.140006380
mov rbx, qword [rsp + 0x30]
mov rdx, rbx
lea rcx, [rsp + 0x110]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov rsi, qword [0x1401370f0]
test rsi, rsi
jne 0x14002d5b7
mov ecx, 0x310
call fcn.140084d88
mov rsi, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x14002d5ad
call fcn.140087bd0
mov ecx, r15d
test rax, rax
setne cl
test ecx, ecx
je 0x14002d62d
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rsi], rax
mov word [rsi + 0x64], 0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [0x1400f5b5c]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [0x1400f5b5c]
mov rcx, rsi
call fcn.140006070
lea rcx, [rsi + 8]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rsi + 0x30]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rsi + 0x26c]
mov word [rcx], 0
lea r8, [0x1400f6478]
mov edx, 0x50
call fcn.1400b1b70
nop
jmp 0x14002d5b0
mov rsi, r15
mov qword [0x1401370f0], rsi
lea r8, [rsp + 0x110]
lea rdx, str.Delete_wia_driver__s
mov rcx, rsi
call fcn.140050c00
lea rcx, [rsp + 0x110]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14002d5fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x14002d5fc
lea rdx, [rsp + 0x110]
mov rcx, r14
call fcn.14008a454
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14002d618
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
add ebp, 1
movsxd rax, ebp
cmp rax, qword [rsp + 0xe8]
jge 0x14002d644
jmp 0x14002d430
mov ecx, 0x80004005
call fcn.140006300
nop
call fcn.1400062f0
int3
call fcn.14008bf60
int3
mov rdi, qword [0x140136ce8]
test rdi, rdi
jne 0x14002d69f
lea ecx, [rdi + 0x30]
call fcn.140084d88
mov rdi, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x14002d695
mov ecx, 0x20
call fcn.140084d88
nop
test rax, rax
je 0x14002d683
mov qword [rax + 8], r15
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
jmp 0x14002d686
mov rax, r15
mov qword [rdi + 0x28], rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x14002d698
mov rdi, r15
mov qword [0x140136ce8], rdi
lea r8, [rsp + 0x60]
lea rdx, str.SCRUB_SYSFILES
mov rcx, rdi
call fcn.14004c670
mov r13d, r15d
cmp qword [rsp + 0x78], r13
jle 0x14002d9d4
mov rax, r15
nop
nop
nop
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.140089fc0
test rax, rax
je 0x14002d9ce
mov rdi, qword [rax + 0x10]
mov rcx, qword [rdi - 0x18]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rdi - 8], 0
jl 0x14002d70e
cmp rax, qword [rdi - 0x18]
jne 0x14002d70e
lea rbx, [rdi - 0x18]
lock add dword [rdi - 8], 1
jmp 0x14002d74a
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rdi - 0x10]
call qword [rax]
mov rbx, rax
test rax, rax
je 0x14002d9c8
mov ecx, dword [rdi - 0x10]
mov dword [rax + 8], ecx
mov ecx, dword [rdi - 0x10]
add ecx, 1
movsxd rdx, ecx
lea r9, [rdx + rdx]
mov r8, rdi
add rdx, rdx
lea rcx, [rax + 0x18]
call fcn.1400b09f0
add rbx, 0x18
mov qword [rsp + 0x40], rbx
cmp dword [rbx - 0x10], 0
jle 0x14002d978
mov edx, 0x104
lea rcx, [rsp + 0x110]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp dword [rbx - 8], 1
jle 0x14002d788
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.140006380
mov rbx, qword [rsp + 0x40]
mov rdx, rbx
lea rcx, [rsp + 0x110]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov rsi, qword [0x1401370f0]
test rsi, rsi
jne 0x14002d933
mov ecx, 0x310
call fcn.140084d88
mov rsi, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x14002d929
call fcn.140087bd0
mov ecx, r15d
test rax, rax
setne cl
test ecx, ecx
je 0x14002d9bd
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
lea r8, [rax + 0x18]
mov qword [rsi], r8
mov word [rsi + 0x64], 0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [0x1400f5b5c]
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov rdi, rcx
test ecx, ecx
jne 0x14002d86e
lea rdx, [r8 - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x14002d8f5
cmp dword [rdx + 0x10], eax
jge 0x14002d83c
cmp dword [r8 - 0xc], eax
jl 0x14002d9a7
mov dword [r8 - 0x10], r15d
mov rax, qword [rsi]
mov word [rax], cx
jmp 0x14002d8f5
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14002d854
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]
add rax, 0x18
mov qword [rsi], rax
mov rbx, qword [rsp + 0x40]
jmp 0x14002d8f5
mov ebp, dword [r8 - 0x10]
lea r12, [0x1400f5b5c]
sub r12, r8
sar r12, 1
mov ecx, 1
sub ecx, dword [r8 - 8]
mov eax, dword [r8 - 0xc]
sub eax, edi
or eax, ecx
jge 0x14002d89c
mov edx, edi
mov rcx, rsi
call fcn.140006320
mov rcx, qword [rsi]
cmp r12, rbp
ja 0x14002d8bc
movsxd rax, edi
lea rbp, [rax + rax]
lea r8, [rcx + r12*2]
mov r9, rbp
mov rdx, rbp
call fcn.1400b0c60
jmp 0x14002d8d5
movsxd rax, edi
lea rbp, [rax + rax]
mov r9, rbp
lea r8, [0x1400f5b5c]
mov rdx, rbp
call fcn.1400b09f0
test edi, edi
js 0x14002d9b2
mov rax, qword [rsi]
cmp edi, dword [rax - 0xc]
jg 0x14002d9b2
mov dword [rax - 0x10], edi
mov rax, qword [rsi]
mov word [rax + rbp], 0
lea rcx, [rsi + 8]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rsi + 0x30]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rsi + 0x26c]
mov word [rcx], 0
lea r8, [0x1400f6478]
mov edx, 0x50
call fcn.1400b1b70
nop
jmp 0x14002d92c
mov rsi, r15
mov qword [0x1401370f0], rsi
lea r8, [rsp + 0x110]
lea rdx, str.Delete_system_file__s
mov rcx, rsi
call fcn.140050c00
lea rcx, [rsp + 0x110]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14002d978
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x14002d978
lea rdx, [rsp + 0x110]
mov rcx, r14
call fcn.14008a454
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14002d994
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
add r13d, 1
movsxd rax, r13d
cmp rax, qword [rsp + 0x78]
jge 0x14002d9d4
jmp 0x14002d6d0
mov ecx, 0x80070057
call fcn.140006300
int3
mov ecx, 0x80070057
call fcn.140006300
nop
mov ecx, 0x80004005
call fcn.140006300
nop
call fcn.1400062f0
int3
call fcn.14008bf60
nop
lea rcx, [rsp + 0x60]
call fcn.14008a1e8
nop
lea rcx, [rsp + 0xd0]
call fcn.14008a1e8
nop
lea rcx, [rsp + 0x98]
call fcn.14008a1e8
mov rcx, qword [rsp + 0x870]
xor rcx, rsp
call fcn.1400b09d0
mov rbx, qword [rsp + 0x8d0]
add rsp, 0x880
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret