Function at 0x40eff2
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Get file attributes
Set file attributes

Disassembly:
push 0x9f4
mov eax, 0x5aedf7
call fcn.0058f792
mov edi, ecx
mov dword [ebp - 0x9e0], edi
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x9e8], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x9e4], eax
test eax, eax
je 0x40f9f4
push eax
lea ecx, [ebp - 0x678]
call fcn.00401c0c
xor eax, eax
lea ecx, [ebp - 0xa00]
mov dword [ebp - 4], eax
call fcn.0046d5d4
lea ecx, [ebp - 0x9d8]
mov byte [ebp - 4], 1
call fcn.0046d5d4
lea ecx, [ebp - 0x9b8]
mov byte [ebp - 4], 2
call sym.SETUP.exe_public:_void___thiscall_CDeviceInfSection::constructor_void_
push 7
pop ecx
xor edx, edx
mov dword [ebp - 0x634], ecx
xor eax, eax
mov dword [ebp - 0x638], edx
mov word [ebp - 0x648], ax
mov dword [ebp - 0x64c], ecx
mov dword [ebp - 0x650], edx
mov word [ebp - 0x660], ax
mov dword [ebp - 0x61c], ecx
mov dword [ebp - 0x620], edx
mov word [ebp - 0x630], ax
mov dword [ebp - 0x67c], ecx
mov dword [ebp - 0x680], edx
mov word [ebp - 0x690], ax
mov eax, dword [ebx + 0x100]
mov byte [ebp - 4], cl
mov ecx, dword [eax]
cmp ecx, eax
jne 0x40f0f8
xor ebx, ebx
lea ecx, [ebp - 0x690]
xor esi, esi
push ebx
inc esi
push esi
call fcn.00404970
push ebx
push esi
lea ecx, [ebp - 0x630]
call fcn.00404970
push ebx
push esi
lea ecx, [ebp - 0x660]
call fcn.00404970
push ebx
push esi
jmp 0x40f9af
mov eax, dword [ecx + 0x20]
add ecx, 0x10
cmp dword [ecx + 0x14], 8
jb 0x40f106
mov ecx, dword [ecx]
lea edx, [ebp - 0x690]
push edx
xor edx, edx
inc eax
push edx
push edx
push edx
push edx
push edx
push eax
push ecx
mov ecx, esi
call sym.SETUP.exe_public:_unsigned_long_int___thiscall_CDeviceInf::GetInstallSection_wchar_t_const___unsigned_int__int__wchar_t___unsigned_long_int___wchar_t___unsigned_long_int___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t____
test eax, eax
jne 0x40f12c
push str.InstallSection_is_not_found._n
jmp 0x40f971
cmp dword [ebp - 0x664], 8
lea eax, [ebp - 0x678]
lea ecx, [ebp - 0x690]
cmovae eax, dword [ebp - 0x678]
lea edx, [edi + 4]
cmp dword [ebp - 0x67c], 8
mov dword [ebp - 0x9dc], edx
cmovae ecx, dword [ebp - 0x690]
xor esi, esi
push esi
push edx
push eax
push 0x200
lea eax, [ebp - 0x410]
push eax
push 0x5c5a54
push str.CopyFiles
push ecx
call fcn.00470de9
add esp, 0x20
lea eax, [ebp - 0x410]
lea ecx, [ebp - 0xa00]
push 0x2c
push eax
call fcn.0046eb6a
push 0x400
lea eax, [ebp - 0x410]
push esi
push eax
call fcn.0058e700
add esp, 0xc
mov dword [ebp - 0x9bc], esi
lea ecx, [ebp - 0xa00]
call fcn.0046d95f
test eax, eax
je 0x40f96c
lea ecx, [ebp - 0x9b8]
call sym.SETUP.exe_public:_void___thiscall_CDeviceInfSection::Clear_void_
cmp dword [ebp - 0x664], 8
lea edi, [ebp - 0x678]
push dword [ebp - 0x9bc]
mov esi, dword [ebp - 0x668]
lea ecx, [ebp - 0xa00]
cmovae edi, dword [ebp - 0x678]
call fcn.0046dbf8
mov ecx, eax
xor eax, eax
push eax
lea eax, [esi + 1]
push eax
push edi
lea eax, [ebp - 0x9b8]
push eax
push ecx
call fcn.00470c0a
add esp, 0x14
lea ecx, [ebp - 0x690]
xor esi, esi
push esi
push 0x5c4f10
call fcn.00404be0
mov edi, dword [ebp - 0x9e4]
push esi
push 2
push esi
push edi
call dword [sym.imp.SETUPAPI.dll_SetupOpenInfFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40f29e
xor eax, eax
lea ecx, [ebp - 0xa00]
push eax
push 0x200
lea eax, [ebp - 0x410]
push eax
push dword [ebp - 0x9bc]
call fcn.0046dbf8
push eax
xor eax, eax
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupGetTargetPathW]
cmp word [ebp - 0x410], 0
jne 0x40f277
xor eax, eax
jmp 0x40f284
lea eax, [ebp - 0x410]
push eax
call fcn.0058edd4
pop ecx
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x690]
call fcn.00404be0
push esi
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
xor eax, eax
lea ecx, [ebp - 0x9b8]
mov esi, eax
mov dword [ebp - 0x9c0], esi
call sym.SETUP.exe_public:_unsigned_long_int___thiscall_CDeviceInfSection::Count_void_
test eax, eax
je 0x40f94c
push 0x2c
push esi
lea ecx, [ebp - 0x9b8]
call sym.SETUP.exe_public:_wchar_t_const____thiscall_CDeviceInfSection::GetKey_unsigned_long_int_
push eax
lea ecx, [ebp - 0x9d8]
call fcn.0046eb6a
lea ecx, [ebp - 0x9d8]
call fcn.0046d95f
test eax, eax
je 0x40f92d
xor eax, eax
lea ecx, [ebp - 0x9d8]
push eax
call fcn.0046dbf8
mov esi, eax
xor eax, eax
cmp word [esi], ax
je 0x40f306
push esi
call fcn.0058edd4
pop ecx
push eax
push esi
lea ecx, [ebp - 0x660]
call fcn.00404be0
cmp dword [ebp - 0x64c], 8
lea ecx, [ebp - 0x618]
push 0x104
push ecx
lea eax, [ebp - 0x660]
cmovae eax, dword [ebp - 0x660]
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push eax
call fcn.00592b69
mov eax, dword [ebp - 0x9e8]
add esp, 0x24
test eax, eax
je 0x40f365
push eax
lea eax, [ebp - 0x618]
push eax
call fcn.005921d4
pop ecx
pop ecx
test eax, eax
jne 0x40f92d
lea esi, [ebx + 0x88]
lea eax, [ebp - 0x690]
cmp esi, eax
je 0x40f388
push 0xffffffffffffffff
xor eax, eax
mov ecx, esi
push eax
lea eax, [ebp - 0x690]
push eax
call fcn.00404b26
cmp dword [ebp - 0x64c], 8
lea eax, [ebp - 0x660]
cmovae eax, dword [ebp - 0x660]
push eax
push esi
call fcn.0047026a
cmp dword [ebp - 0x64c], 8
lea eax, [ebp - 0x660]
mov esi, str.CInitInfoStorage::GetDriverVersionFromFile
cmovae eax, dword [ebp - 0x660]
push eax
push str.found_the_version_file.__1_s___n
push esi
push 4
call fcn.00424dad
cmp dword [ebp - 0x664], 8
lea eax, [ebp - 0x678]
lea ecx, [ebp - 0x660]
cmovae eax, dword [ebp - 0x678]
cmp dword [ebp - 0x64c], 8
cmovae ecx, dword [ebp - 0x660]
xor edx, edx
push edx
push dword [ebp - 0x9dc]
push eax
push 0x200
lea eax, [ebp - 0x410]
push eax
push 0x5c5a54
push ecx
push str.SourceDisksFiles
call fcn.00470de9
xor eax, eax
add esp, 0x38
cmp ax, word [ebp - 0x410]
je 0x40f92d
lea eax, [ebp - 0x410]
push eax
push str.SourceDisksFiles___1_s__n
push esi
push 4
call fcn.00424dad
add esp, 0x10
lea eax, [ebp - 0x410]
lea ecx, [ebp - 0x9d8]
push 0x2c
push eax
call fcn.0046eb6a
lea ecx, [ebp - 0x9d8]
call fcn.0046d95f
cmp eax, 2
jb 0x40f48f
push 1
lea ecx, [ebp - 0x9d8]
call fcn.0046dbf8
mov esi, eax
xor eax, eax
cmp word [esi], ax
je 0x40f482
push esi
call fcn.0058edd4
pop ecx
push eax
push esi
lea ecx, [ebp - 0x648]
call fcn.00404be0
cmp dword [ebp - 0x664], 8
lea esi, [ebp - 0x678]
lea ecx, [ebp - 0x9d8]
cmovae esi, dword [ebp - 0x678]
xor eax, eax
push eax
call fcn.0046dbf8
xor edx, edx
lea ecx, [ebp - 0x410]
push edx
push dword [ebp - 0x9dc]
push esi
push 0x200
push ecx
push 0x5c5a54
push eax
push str.SourceDisksNames
call fcn.00470de9
xor eax, eax
add esp, 0x20
cmp ax, word [ebp - 0x410]
je 0x40f92d
lea eax, [ebp - 0x410]
xor esi, esi
push eax
push esi
lea ecx, [ebp - 0x9d8]
call fcn.0046dbf8
push eax
push str.SourceDisksNames__1_s_____2_s_._n
push str.CInitInfoStorage::GetDriverVersionFromFile
push 4
call fcn.00424dad
add esp, 0x14
lea eax, [ebp - 0x410]
lea ecx, [ebp - 0x9d8]
push 0x2c
push eax
call fcn.0046eb6a
push esi
push 0x5c4f10
lea ecx, [ebp - 0x630]
call fcn.00404be0
lea ecx, [ebp - 0x9d8]
call fcn.0046d95f
cmp eax, 4
jb 0x40f5f2
push 0x20
lea ecx, [ebp - 0x9d8]
call fcn.0046f50b
push 3
lea ecx, [ebp - 0x9d8]
call fcn.0046dbf8
mov esi, eax
xor eax, eax
cmp word [esi], ax
je 0x40f576
push esi
call fcn.0058edd4
pop ecx
push eax
push esi
lea ecx, [ebp - 0x630]
call fcn.00404be0
cmp dword [ebp - 0x620], 0
je 0x40f5f0
push 0xffffffffffffffff
xor eax, eax
lea ecx, [ebp - 0x630]
push eax
lea eax, [ebp - 0x648]
push eax
call fcn.00404b26
push 3
lea ecx, [ebp - 0x9d8]
call fcn.0046dbf8
mov esi, eax
xor eax, eax
cmp word [esi], ax
je 0x40f5c0
push esi
call fcn.0058edd4
pop ecx
push eax
push esi
lea ecx, [ebp - 0x648]
call fcn.00404be0
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push eax
lea eax, [ebp - 0x648]
push eax
call fcn.0047026a
pop ecx
pop ecx
xor esi, esi
cmp dword [ebp - 0x634], 8
lea eax, [ebp - 0x648]
cmovae eax, dword [ebp - 0x648]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x40f6dd
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0x648]
push eax
lea ecx, [ebp - 0x630]
call fcn.00404b26
push esi
push 0x5c4f10
lea ecx, [ebp - 0x648]
call fcn.00404be0
xor ecx, ecx
lea eax, [ebp - 0x410]
push ecx
push ecx
push ecx
push ecx
push 0x200
push eax
push ecx
push ecx
push edi
call fcn.00592b69
mov ax, word [ebp - 0x410]
add esp, 0x24
push 0x2e
pop ecx
cmp ax, cx
je 0x40f691
cmp word [ebp - 0x40e], 0x5c
je 0x40f691
mov esi, 0x5c6e08
push esi
call fcn.0058edd4
pop ecx
push eax
push esi
lea ecx, [ebp - 0x648]
call fcn.00404be0
mov ax, word [ebp - 0x410]
test ax, ax
jne 0x40f69a
xor eax, eax
jmp 0x40f6a7
lea eax, [ebp - 0x410]
push eax
call fcn.0058edd4
pop ecx
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x648]
call fcn.00404a83
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push eax
lea eax, [ebp - 0x648]
push eax
call fcn.0047026a
pop ecx
pop ecx
push 0xffffffffffffffff
xor eax, eax
lea ecx, [ebp - 0x630]
push eax
lea eax, [ebp - 0x648]
push eax
call fcn.00404b26
cmp dword [ebp - 0x64c], 8
lea eax, [ebp - 0x660]
cmovae eax, dword [ebp - 0x660]
push eax
lea eax, [ebp - 0x630]
push eax
call fcn.0047026a
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push eax
push str.target_file___1_s_._n
push str.CInitInfoStorage::GetDriverVersionFromFile
push 4
call fcn.00424dad
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x630]
add esp, 0x18
cmp dword [ebp - 0x61c], 8
cmovae eax, dword [ebp - 0x630]
push eax
call esi
cmp eax, 0xffffffff
je 0x40f7b3
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
lea ecx, [ebp - 0x660]
cmovae eax, dword [ebp - 0x630]
xor edx, edx
push edx
push ecx
mov ecx, dword [ebp - 0x9e0]
push eax
call fcn.004156a4
test eax, eax
je 0x40f92d
lea ecx, [ebx + 0x58]
xor ebx, ebx
lea eax, [ebp - 0x660]
cmp ecx, eax
je 0x40fb9d
push 0xffffffffffffffff
push ebx
push eax
call fcn.00404b26
jmp 0x40fb9d
cmp dword [ebp - 0x64c], 8
lea eax, [ebp - 0x660]
lea ecx, [ebp - 0x410]
cmovae eax, dword [ebp - 0x660]
xor edx, edx
push edx
push edx
push 0x200
push ecx
push edx
push edx
push edx
push edx
push eax
call fcn.00592b69
add esp, 0x24
lea ecx, [ebp - 0x630]
xor eax, eax
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x648]
push eax
call fcn.00404b26
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x630]
push eax
call fcn.0047026a
lea eax, [ebp - 0x618]
push 0x104
push eax
call fcn.00591dbe
add esp, 0x10
cmp eax, 4
jae 0x40f867
push 0x2e
pop eax
cmp ax, word [ebp - 0x618]
je 0x40f84c
push 0x5c5de0
lea eax, [ebp - 0x618]
push 0x104
push eax
call fcn.00591c0a
add esp, 0xc
push 0x5ca1f4
lea eax, [ebp - 0x618]
push 0x104
push eax
call fcn.00591c0a
add esp, 0xc
jmp 0x40f87a
push 0x5f
pop eax
mov word [ebp - 0x612], ax
xor eax, eax
mov word [ebp - 0x610], ax
cmp word [ebp - 0x618], 0
jne 0x40f888
xor eax, eax
jmp 0x40f895
lea eax, [ebp - 0x618]
push eax
call fcn.0058edd4
pop ecx
push eax
lea eax, [ebp - 0x618]
push eax
lea ecx, [ebp - 0x630]
call fcn.00404a83
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push eax
push str.target_file___1_s_._n
push str.CInitInfoStorage::GetDriverVersionFromFile
push 4
call fcn.00424dad
add esp, 0x10
lea eax, [ebp - 0x630]
cmp dword [ebp - 0x61c], 8
cmovae eax, dword [ebp - 0x630]
push eax
call esi
cmp eax, 0xffffffff
je 0x40fb9b
lea eax, [ebp - 0x618]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x40f92d
mov esi, dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x410]
push eax
xor eax, eax
push eax
push 0x5ca1f8
lea eax, [ebp - 0x618]
push eax
call esi
test eax, eax
jne 0x40f9fe
inc dword [ebp - 0x9c0]
lea ecx, [ebp - 0x9b8]
call sym.SETUP.exe_public:_unsigned_long_int___thiscall_CDeviceInfSection::Count_void_
mov esi, dword [ebp - 0x9c0]
cmp esi, eax
jb 0x40f2bb
mov esi, dword [ebp - 0x9bc]
lea ecx, [ebp - 0xa00]
inc esi
mov dword [ebp - 0x9bc], esi
call fcn.0046d95f
cmp esi, eax
jb 0x40f1c3
push str.no_driver_version_info_has_found._ExitFunc._n
push str.CInitInfoStorage::GetDriverVersionFromFile
push 4
call fcn.00424dad
add esp, 0xc
lea ecx, [ebp - 0x690]
xor ebx, ebx
push ebx
push 1
call fcn.00404970
push ebx
push 1
lea ecx, [ebp - 0x630]
call fcn.00404970
push ebx
push 1
lea ecx, [ebp - 0x660]
call fcn.00404970
push ebx
push 1
lea ecx, [ebp - 0x648]
call fcn.00404970
lea ecx, [ebp - 0x9b8]
mov byte [ebp - 4], 2
call sym.SETUP.exe_public_virtual:_void___thiscall_CDeviceInfSection::destructor_void_
lea ecx, [ebp - 0x9d8]
mov byte [ebp - 4], 1
call fcn.0046d690
lea ecx, [ebp - 0xa00]
mov byte [ebp - 4], bl
call fcn.0046d690
push ebx
push 1
lea ecx, [ebp - 0x678]
call fcn.00404970
xor eax, eax
call fcn.0058f741
ret 0x10
cmp word [ebp - 0x410], 0
jne 0x40fa0e
xor edi, edi
mov eax, edi
jmp 0x40fa1d
lea eax, [ebp - 0x410]
push eax
call fcn.0058edd4
pop ecx
xor edi, edi
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x648]
call fcn.00404be0
cmp dword [ebp - 0x634], 8
lea ecx, [ebp - 0x648]
push edi
cmovae ecx, dword [ebp - 0x648]
lea eax, [ebp - 0x630]
cmp dword [ebp - 0x61c], 8
push ecx
cmovae eax, dword [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40fb9b
lea eax, [ebp - 0x410]
push eax
push edi
push 0x5ca1f8
lea eax, [ebp - 0x618]
push eax
call esi
test eax, eax
je 0x40fb2c
cmp word [ebp - 0x410], 0
jne 0x40fa95
mov eax, edi
jmp 0x40faa2
lea eax, [ebp - 0x410]
push eax
call fcn.0058edd4
pop ecx
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x630]
call fcn.00404be0
cmp dword [ebp - 0x61c], 8
lea ecx, [ebp - 0x630]
lea eax, [ebp - 0x648]
cmovae ecx, dword [ebp - 0x630]
cmp dword [ebp - 0x634], 8
push ecx
cmovae eax, dword [ebp - 0x648]
push eax
call fcn.0043671f
pop ecx
pop ecx
test eax, eax
je 0x40fb2c
cmp dword [ebp - 0x61c], 8
lea ecx, [ebp - 0x660]
push edi
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push ecx
mov ecx, dword [ebp - 0x9e0]
push eax
call fcn.004156a4
test eax, eax
je 0x40fb2c
lea ecx, [ebx + 0x58]
lea eax, [ebp - 0x660]
cmp ecx, eax
je 0x40fb2c
push 0xffffffffffffffff
push edi
push eax
call fcn.00404b26
cmp dword [ebp - 0x634], 8
lea eax, [ebp - 0x648]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, 0x80
cmovae eax, dword [ebp - 0x648]
push ebx
push eax
call edi
cmp dword [ebp - 0x634], 8
lea eax, [ebp - 0x648]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmovae eax, dword [ebp - 0x648]
push eax
call esi
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
push ebx
cmovae eax, dword [ebp - 0x630]
push eax
call edi
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push eax
call esi
xor ebx, ebx
push ebx
push 1
lea ecx, [ebp - 0x690]
call fcn.00404970
push ebx
push 1
lea ecx, [ebp - 0x630]
call fcn.00404970
push ebx
push 1
lea ecx, [ebp - 0x660]
call fcn.00404970
push ebx
push 1
lea ecx, [ebp - 0x648]
call fcn.00404970
lea ecx, [ebp - 0x9b8]
mov byte [ebp - 4], 2
call sym.SETUP.exe_public_virtual:_void___thiscall_CDeviceInfSection::destructor_void_
lea ecx, [ebp - 0x9d8]
mov byte [ebp - 4], 1
call fcn.0046d690
lea ecx, [ebp - 0xa00]
mov byte [ebp - 4], bl
call fcn.0046d690
push ebx
push 1
lea ecx, [ebp - 0x678]
call fcn.00404970
xor eax, eax
inc eax
jmp 0x40f9f6