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

Disassembly:
push 0xffffffffffffffff
push 0x4898dc
mov eax, dword fs:[0]
push eax
sub esp, 0x790
mov eax, dword [0x4bc7b8]
xor eax, esp
mov dword [esp + 0x788], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4bc7b8]
xor eax, esp
push eax
lea eax, [esp + 0x7a4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x7b4]
xor ebp, ebp
push 0x206
lea edx, [esp + 0x392]
push ebp
push edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
mov word [esp + 0x398], bp
call fcn.0046adc0
add esp, 0xc
push 0x206
lea eax, [esp + 0x82]
push ebp
push eax
mov word [esp + 0x88], bp
call fcn.0046adc0
add esp, 0xc
push 0x206
lea ecx, [esp + 0x59a]
push ebp
push ecx
mov word [esp + 0x5a0], bp
call fcn.0046adc0
add esp, 0xc
push 0x103
lea edx, [esp + 0x289]
push ebp
push edx
mov byte [esp + 0x290], 0
call fcn.0046adc0
add esp, 0xc
push str.ScrubDrivers__...
mov dword [esp + 0x28], ebp
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push 0x104
push str.DRIVER_VER_FILE
call fcn.004277e0
push eax
lea edi, [esp + 0x5a0]
call fcn.00428060
lea eax, [esp + 0x24]
push eax
push 0x104
lea ecx, [esp + 0x28c]
push ecx
push 1
push ebp
push ebp
call sub.WINSPOOL.DRV_GetPrinterDriverDirectoryW
lea edx, [esp + 0x284]
push edx
lea eax, [esp + 0x390]
push 0x104
push eax
call fcn.00467e2b
add esp, 0xc
lea ecx, [esp + 0x38c]
push ecx
lea edx, [esp + 0x80]
push 0x104
push edx
call fcn.00467e2b
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
add esp, 0xc
push 0x498bf4
lea eax, [esp + 0x80]
push eax
call esi
mov ecx, edi
push ecx
lea edx, [esp + 0x80]
push edx
call esi
lea eax, [esp + 0x7c]
push eax
push str.Scrub_VerFile__s
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esp, 8
lea ecx, [esp + 0x7c]
push ecx
call ebx
test eax, eax
jne 0x41a807
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x7c]
push edx
call fcn.004520da
lea eax, [esp + 0x38c]
push eax
lea ecx, [esp + 0x80]
push 0x104
push ecx
call fcn.00467e2b
add esp, 0xc
lea edx, [esp + 0x594]
push edx
lea eax, [esp + 0x80]
push eax
call esi
lea ecx, [esp + 0x7c]
push ecx
push str.Scrub_VerFile__s
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
lea edx, [esp + 0x7c]
push edx
call ebx
test eax, eax
jne 0x41a873
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x41a873
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x7c]
push eax
call fcn.004520da
push 0xa
lea ecx, [esp + 0x48]
call fcn.00451be2
push 0xa
lea ecx, [esp + 0x2c]
mov dword [esp + 0x7b0], ebp
call fcn.00451be2
push 0xa
lea ecx, [esp + 0x64]
mov byte [esp + 0x7b0], 1
call fcn.00451be2
mov byte [esp + 0x7ac], 2
call fcn.004277e0
lea edx, [esp + 0x44]
mov ecx, str.TWAIN_FOLDERS
call fcn.004289c0
cmp dword [esp + 0x50], 0
jle 0x41aa03
mov ebx, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push ebp
lea ecx, [esp + 0x48]
call fcn.00451b7e
test eax, eax
je 0x41aa2f
mov esi, dword [eax + 8]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
sub esi, 0x10
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x41a90b
cmp eax, dword [esi]
jne 0x41a90b
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x41a946
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x41aa34
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.00467474
add esp, 0x10
lea esi, [edi + 0x10]
mov dword [esp + 0x18], esi
mov byte [esp + 0x7ac], 3
cmp dword [esi - 0xc], 0
jle 0x41a9d2
push 0x104
lea ecx, [esp + 0x80]
push ecx
call ebx
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push str.twain_32
lea edx, [esp + 0x80]
push edx
call edi
cmp dword [esi - 4], 1
jle 0x41a996
mov eax, dword [esi - 0xc]
push eax
lea ecx, [esp + 0x1c]
call fcn.00402280
mov esi, dword [esp + 0x18]
push esi
lea ecx, [esp + 0x80]
push ecx
call edi
lea edx, [esp + 0x7c]
push edx
push str.Scrub_twain_folder__s
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov ecx, dword [esp + 0x28]
add esp, 8
push 1
push 0x49bf20
lea eax, [esp + 0x84]
push eax
call fcn.00419bf0
lea eax, [esi - 0x10]
mov byte [esp + 0x7ac], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41a9f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebp, 1
cmp ebp, dword [esp + 0x50]
jl 0x41a8cf
cmp dword [0x4c4eec], 0
jne 0x41aa48
push 0x1c
call fcn.0044ac0d
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
mov byte [esp + 0x7ac], 4
je 0x41aa39
mov esi, eax
call fcn.00427850
jmp 0x41aa3b
call fcn.0045220a
call fcn.00402300
xor eax, eax
mov byte [esp + 0x7ac], 2
mov dword [0x4c4eec], eax
lea edx, [esp + 0x28]
mov ecx, str.WIA_DRIVERS
call fcn.004289c0
xor ebp, ebp
cmp dword [esp + 0x34], ebp
jle 0x41ab92
mov bl, 5
push ebp
lea ecx, [esp + 0x2c]
call fcn.00451b7e
test eax, eax
je 0x41aa2f
mov esi, dword [eax + 8]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
sub esi, 0x10
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x41aa9c
cmp eax, dword [esi]
jne 0x41aa9c
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x41aad3
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x41aa34
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.00467474
add esp, 0x10
lea esi, [edi + 0x10]
mov dword [esp + 0x18], esi
mov byte [esp + 0x7ac], bl
cmp dword [esi - 0xc], 0
jle 0x41ab61
push 0x104
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp dword [esi - 4], 1
jle 0x41ab11
mov edx, dword [esi - 0xc]
push edx
lea ecx, [esp + 0x1c]
call fcn.00402280
mov esi, dword [esp + 0x18]
push esi
lea eax, [esp + 0x80]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [esp + 0x7c]
push ecx
push str.Delete_wia_driver__s
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
lea edx, [esp + 0x7c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x41ab61
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x41ab61
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x7c]
push eax
call fcn.004520da
lea eax, [esi - 0x10]
mov byte [esp + 0x7ac], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41ab85
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebp, 1
cmp ebp, dword [esp + 0x34]
jl 0x41aa64
cmp dword [0x4c4eec], 0
jne 0x41abfa
push 0x1c
call fcn.0044ac0d
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
xor edi, edi
cmp esi, edi
mov byte [esp + 0x7ac], 6
je 0x41abea
push 0x10
call fcn.0044ac0d
add esp, 4
cmp eax, edi
je 0x41abdc
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
push esi
mov dword [esi + 0x18], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x41abec
xor eax, eax
push esi
mov dword [esi + 0x18], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x41abec
xor esi, esi
mov byte [esp + 0x7ac], 2
mov dword [0x4c4eec], esi
lea edx, [esp + 0x60]
mov ecx, str.SCRUB_SYSFILES
call fcn.004289c0
xor ebp, ebp
cmp dword [esp + 0x6c], ebp
jle 0x41ad4c
mov bl, 8
push ebp
lea ecx, [esp + 0x64]
call fcn.00451b7e
test eax, eax
je 0x41aa2f
mov esi, dword [eax + 8]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
sub esi, 0x10
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x41ac52
cmp eax, dword [esi]
jne 0x41ac52
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x41ac8d
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x41aa34
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.00467474
add esp, 0x10
lea esi, [edi + 0x10]
mov dword [esp + 0x18], esi
mov byte [esp + 0x7ac], bl
cmp dword [esi - 0xc], 0
jle 0x41ad1b
push 0x104
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp dword [esi - 4], 1
jle 0x41accb
mov edx, dword [esi - 0xc]
push edx
lea ecx, [esp + 0x1c]
call fcn.00402280
mov esi, dword [esp + 0x18]
push esi
lea eax, [esp + 0x80]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [esp + 0x7c]
push ecx
push str.Delete_system_file__s
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
lea edx, [esp + 0x7c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x41ad1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x41ad1b
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x7c]
push eax
call fcn.004520da
lea eax, [esi - 0x10]
mov byte [esp + 0x7ac], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41ad3f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebp, 1
cmp ebp, dword [esp + 0x6c]
jl 0x41ac16
lea ecx, [esp + 0x60]
mov byte [esp + 0x7ac], 1
call fcn.00451dd5
lea ecx, [esp + 0x28]
mov byte [esp + 0x7ac], 0
call fcn.00451dd5
lea ecx, [esp + 0x44]
mov dword [esp + 0x7ac], 0xffffffff
call fcn.00451dd5
mov ecx, dword [esp + 0x7a4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x788]
xor ecx, esp
call fcn.004677d8
add esp, 0x79c
ret 4