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

Disassembly:
push 0x9f4
mov eax, 0x5a7df3
call fcn.00588aeb
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 0x40ea63
push eax
lea ecx, [ebp - 0x678]
call fcn.004010bc
xor eax, eax
lea ecx, [ebp - 0xa00]
mov dword [ebp - 4], eax
call fcn.0046c48f
lea ecx, [ebp - 0x9d8]
mov byte [ebp - 4], 1
call fcn.0046c48f
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
xor eax, eax
mov dword [ebp - 0x634], ecx
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 0x40e167
xor ebx, ebx
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x690]
call fcn.00403a7f
push ebx
push esi
lea ecx, [ebp - 0x630]
call fcn.00403a7f
push ebx
push esi
lea ecx, [ebp - 0x660]
call fcn.00403a7f
push ebx
push esi
jmp 0x40ea1e
mov eax, dword [ecx + 0x20]
add ecx, 0x10
cmp dword [ecx + 0x14], 8
jb 0x40e175
mov ecx, dword [ecx]
lea edx, [ebp - 0x690]
push edx
xor edx, edx
push edx
push edx
push edx
push edx
push edx
inc eax
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 0x40e19b
push str.InstallSection_is_not_found._n
jmp 0x40e9e0
cmp dword [ebp - 0x664], 8
lea eax, [ebp - 0x678]
cmovae eax, dword [ebp - 0x678]
cmp dword [ebp - 0x67c], 8
lea ecx, [ebp - 0x690]
cmovae ecx, dword [ebp - 0x690]
lea edx, [edi + 4]
xor esi, esi
push esi
push edx
push eax
push 0x200
lea eax, [ebp - 0x410]
push eax
push 0x5bf874
push str.CopyFiles
push ecx
mov dword [ebp - 0x9dc], edx
call fcn.0046fbac
add esp, 0x20
lea eax, [ebp - 0x410]
push 0x2c
push eax
lea ecx, [ebp - 0xa00]
call fcn.0046d9ee
push 0x400
lea eax, [ebp - 0x410]
push esi
push eax
call fcn.00587a70
add esp, 0xc
lea ecx, [ebp - 0xa00]
mov dword [ebp - 0x9bc], esi
call fcn.0046c815
test eax, eax
je 0x40e9db
lea ecx, [ebp - 0x9b8]
call sym.SETUP.exe_public:_void___thiscall_CDeviceInfSection::Clear_void_
cmp dword [ebp - 0x664], 8
push dword [ebp - 0x9bc]
mov esi, dword [ebp - 0x668]
lea edi, [ebp - 0x678]
cmovae edi, dword [ebp - 0x678]
lea ecx, [ebp - 0xa00]
call fcn.0046caa8
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.0046f9cd
add esp, 0x14
xor esi, esi
push esi
push 0x5bef10
lea ecx, [ebp - 0x690]
call fcn.00403cef
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 0x40e30d
xor eax, eax
push eax
push 0x200
lea eax, [ebp - 0x410]
push eax
push dword [ebp - 0x9bc]
lea ecx, [ebp - 0xa00]
call fcn.0046caa8
push eax
xor eax, eax
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupGetTargetPathW]
cmp word [ebp - 0x410], 0
jne 0x40e2e6
xor eax, eax
jmp 0x40e2f3
lea eax, [ebp - 0x410]
push eax
call fcn.00588144
pop ecx
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x690]
call fcn.00403cef
push esi
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
xor eax, eax
mov esi, eax
lea ecx, [ebp - 0x9b8]
mov dword [ebp - 0x9c0], esi
call sym.SETUP.exe_public:_unsigned_long_int___thiscall_CDeviceInfSection::Count_void_
test eax, eax
je 0x40e9bb
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.0046d9ee
lea ecx, [ebp - 0x9d8]
call fcn.0046c815
test eax, eax
je 0x40e99c
xor eax, eax
push eax
lea ecx, [ebp - 0x9d8]
call fcn.0046caa8
mov esi, eax
xor eax, eax
cmp word [esi], ax
je 0x40e375
push esi
call fcn.00588144
pop ecx
push eax
push esi
lea ecx, [ebp - 0x660]
call fcn.00403cef
cmp dword [ebp - 0x64c], 8
push 0x104
lea ecx, [ebp - 0x618]
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.0058bead
mov eax, dword [ebp - 0x9e8]
add esp, 0x24
test eax, eax
je 0x40e3d4
push eax
lea eax, [ebp - 0x618]
push eax
call fcn.0058b527
pop ecx
pop ecx
test eax, eax
jne 0x40e99c
lea esi, [ebx + 0x88]
lea eax, [ebp - 0x690]
cmp esi, eax
je 0x40e3f7
push 0xffffffffffffffff
xor eax, eax
push eax
lea eax, [ebp - 0x690]
push eax
mov ecx, esi
call fcn.00403c35
cmp dword [ebp - 0x64c], 8
lea eax, [ebp - 0x660]
cmovae eax, dword [ebp - 0x660]
push eax
push esi
call fcn.0046f03c
cmp dword [ebp - 0x64c], 8
lea eax, [ebp - 0x660]
cmovae eax, dword [ebp - 0x660]
push eax
push str.found_the_version_file.__1_s___n
mov esi, str.CInitInfoStorage::GetDriverVersionFromFile
push esi
push 4
call fcn.00423f75
cmp dword [ebp - 0x664], 8
lea eax, [ebp - 0x678]
cmovae eax, dword [ebp - 0x678]
cmp dword [ebp - 0x64c], 8
lea ecx, [ebp - 0x660]
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 0x5bf874
push ecx
push str.SourceDisksFiles
call fcn.0046fbac
xor eax, eax
add esp, 0x38
cmp ax, word [ebp - 0x410]
je 0x40e99c
lea eax, [ebp - 0x410]
push eax
push str.SourceDisksFiles___1_s__n
push esi
push 4
call fcn.00423f75
add esp, 0x10
lea eax, [ebp - 0x410]
push 0x2c
push eax
lea ecx, [ebp - 0x9d8]
call fcn.0046d9ee
lea ecx, [ebp - 0x9d8]
call fcn.0046c815
cmp eax, 2
jb 0x40e4fe
push 1
lea ecx, [ebp - 0x9d8]
call fcn.0046caa8
mov esi, eax
xor eax, eax
cmp word [esi], ax
je 0x40e4f1
push esi
call fcn.00588144
pop ecx
push eax
push esi
lea ecx, [ebp - 0x648]
call fcn.00403cef
cmp dword [ebp - 0x664], 8
lea esi, [ebp - 0x678]
cmovae esi, dword [ebp - 0x678]
xor eax, eax
push eax
lea ecx, [ebp - 0x9d8]
call fcn.0046caa8
xor edx, edx
push edx
push dword [ebp - 0x9dc]
lea ecx, [ebp - 0x410]
push esi
push 0x200
push ecx
push 0x5bf874
push eax
push str.SourceDisksNames
call fcn.0046fbac
xor eax, eax
add esp, 0x20
cmp ax, word [ebp - 0x410]
je 0x40e99c
lea eax, [ebp - 0x410]
push eax
xor esi, esi
push esi
lea ecx, [ebp - 0x9d8]
call fcn.0046caa8
push eax
push str.SourceDisksNames__1_s_____2_s_._n
push str.CInitInfoStorage::GetDriverVersionFromFile
push 4
call fcn.00423f75
add esp, 0x14
lea eax, [ebp - 0x410]
push 0x2c
push eax
lea ecx, [ebp - 0x9d8]
call fcn.0046d9ee
push esi
push 0x5bef10
lea ecx, [ebp - 0x630]
call fcn.00403cef
lea ecx, [ebp - 0x9d8]
call fcn.0046c815
cmp eax, 4
jb 0x40e661
push 0x20
lea ecx, [ebp - 0x9d8]
call fcn.0046e2e7
push 3
lea ecx, [ebp - 0x9d8]
call fcn.0046caa8
mov esi, eax
xor eax, eax
cmp word [esi], ax
je 0x40e5e5
push esi
call fcn.00588144
pop ecx
push eax
push esi
lea ecx, [ebp - 0x630]
call fcn.00403cef
cmp dword [ebp - 0x620], 0
je 0x40e65f
push 0xffffffffffffffff
xor eax, eax
push eax
lea eax, [ebp - 0x648]
push eax
lea ecx, [ebp - 0x630]
call fcn.00403c35
push 3
lea ecx, [ebp - 0x9d8]
call fcn.0046caa8
mov esi, eax
xor eax, eax
cmp word [esi], ax
je 0x40e62f
push esi
call fcn.00588144
pop ecx
push eax
push esi
lea ecx, [ebp - 0x648]
call fcn.00403cef
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push eax
lea eax, [ebp - 0x648]
push eax
call fcn.0046f03c
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 0x40e74c
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0x648]
push eax
lea ecx, [ebp - 0x630]
call fcn.00403c35
push esi
push 0x5bef10
lea ecx, [ebp - 0x648]
call fcn.00403cef
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push 0x200
lea eax, [ebp - 0x410]
push eax
push ecx
push ecx
push edi
call fcn.0058bead
mov ax, word [ebp - 0x410]
add esp, 0x24
push 0x2e
pop ecx
cmp ax, cx
je 0x40e700
cmp word [ebp - 0x40e], 0x5c
je 0x40e700
mov esi, 0x5c0d18
push esi
call fcn.00588144
pop ecx
push eax
push esi
lea ecx, [ebp - 0x648]
call fcn.00403cef
mov ax, word [ebp - 0x410]
test ax, ax
jne 0x40e709
xor eax, eax
jmp 0x40e716
lea eax, [ebp - 0x410]
push eax
call fcn.00588144
pop ecx
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x648]
call fcn.00403b92
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push eax
lea eax, [ebp - 0x648]
push eax
call fcn.0046f03c
pop ecx
pop ecx
push 0xffffffffffffffff
xor eax, eax
push eax
lea eax, [ebp - 0x648]
push eax
lea ecx, [ebp - 0x630]
call fcn.00403c35
cmp dword [ebp - 0x64c], 8
lea eax, [ebp - 0x660]
cmovae eax, dword [ebp - 0x660]
push eax
lea eax, [ebp - 0x630]
push eax
call fcn.0046f03c
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.00423f75
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
add esp, 0x18
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push eax
call esi
cmp eax, 0xffffffff
je 0x40e822
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
xor edx, edx
push edx
lea ecx, [ebp - 0x660]
push ecx
mov ecx, dword [ebp - 0x9e0]
push eax
call fcn.00414702
test eax, eax
je 0x40e99c
lea ecx, [ebx + 0x58]
lea eax, [ebp - 0x660]
xor ebx, ebx
cmp ecx, eax
je 0x40ec0c
push 0xffffffffffffffff
push ebx
push eax
call fcn.00403c35
jmp 0x40ec0c
cmp dword [ebp - 0x64c], 8
lea eax, [ebp - 0x660]
cmovae eax, dword [ebp - 0x660]
xor edx, edx
push edx
push edx
push 0x200
lea ecx, [ebp - 0x410]
push ecx
push edx
push edx
push edx
push edx
push eax
call fcn.0058bead
add esp, 0x24
xor eax, eax
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x648]
push eax
lea ecx, [ebp - 0x630]
call fcn.00403c35
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x630]
push eax
call fcn.0046f03c
lea eax, [ebp - 0x618]
push 0x104
push eax
call fcn.0058b10d
add esp, 0x10
cmp eax, 4
jae 0x40e8d6
push 0x2e
pop eax
cmp ax, word [ebp - 0x618]
je 0x40e8bb
push 0x5bfcec
lea eax, [ebp - 0x618]
push 0x104
push eax
call fcn.0058af59
add esp, 0xc
push 0x5c4104
lea eax, [ebp - 0x618]
push 0x104
push eax
call fcn.0058af59
add esp, 0xc
jmp 0x40e8e9
push 0x5f
pop eax
mov word [ebp - 0x612], ax
xor eax, eax
mov word [ebp - 0x610], ax
cmp word [ebp - 0x618], 0
jne 0x40e8f7
xor eax, eax
jmp 0x40e904
lea eax, [ebp - 0x618]
push eax
call fcn.00588144
pop ecx
push eax
lea eax, [ebp - 0x618]
push eax
lea ecx, [ebp - 0x630]
call fcn.00403b92
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.00423f75
add esp, 0x10
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push eax
call esi
cmp eax, 0xffffffff
je 0x40ec0a
lea eax, [ebp - 0x618]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x40e99c
mov esi, dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x410]
push eax
xor eax, eax
push eax
push 0x5c4108
lea eax, [ebp - 0x618]
push eax
call esi
test eax, eax
jne 0x40ea6d
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 0x40e32a
mov esi, dword [ebp - 0x9bc]
inc esi
lea ecx, [ebp - 0xa00]
mov dword [ebp - 0x9bc], esi
call fcn.0046c815
cmp esi, eax
jb 0x40e232
push str.no_driver_version_info_has_found._ExitFunc._n
push str.CInitInfoStorage::GetDriverVersionFromFile
push 4
call fcn.00423f75
add esp, 0xc
xor ebx, ebx
push ebx
push 1
lea ecx, [ebp - 0x690]
call fcn.00403a7f
push ebx
push 1
lea ecx, [ebp - 0x630]
call fcn.00403a7f
push ebx
push 1
lea ecx, [ebp - 0x660]
call fcn.00403a7f
push ebx
push 1
lea ecx, [ebp - 0x648]
call fcn.00403a7f
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.0046c546
lea ecx, [ebp - 0xa00]
mov byte [ebp - 4], bl
call fcn.0046c546
push ebx
push 1
lea ecx, [ebp - 0x678]
call fcn.00403a7f
xor eax, eax
call fcn.00588a9a
ret 0x10
cmp word [ebp - 0x410], 0
jne 0x40ea7d
xor edi, edi
mov eax, edi
jmp 0x40ea8c
lea eax, [ebp - 0x410]
push eax
call fcn.00588144
pop ecx
xor edi, edi
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x648]
call fcn.00403cef
cmp dword [ebp - 0x634], 8
lea ecx, [ebp - 0x648]
cmovae ecx, dword [ebp - 0x648]
cmp dword [ebp - 0x61c], 8
push edi
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40ec0a
lea eax, [ebp - 0x410]
push eax
push edi
push 0x5c4108
lea eax, [ebp - 0x618]
push eax
call esi
test eax, eax
je 0x40eb9b
cmp word [ebp - 0x410], 0
jne 0x40eb04
mov eax, edi
jmp 0x40eb11
lea eax, [ebp - 0x410]
push eax
call fcn.00588144
pop ecx
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x630]
call fcn.00403cef
cmp dword [ebp - 0x61c], 8
lea ecx, [ebp - 0x630]
cmovae ecx, dword [ebp - 0x630]
cmp dword [ebp - 0x634], 8
lea eax, [ebp - 0x648]
cmovae eax, dword [ebp - 0x648]
push ecx
push eax
call fcn.004358db
pop ecx
pop ecx
test eax, eax
je 0x40eb9b
cmp dword [ebp - 0x61c], 8
push edi
lea ecx, [ebp - 0x660]
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push ecx
mov ecx, dword [ebp - 0x9e0]
push eax
call fcn.00414702
test eax, eax
je 0x40eb9b
lea ecx, [ebx + 0x58]
lea eax, [ebp - 0x660]
cmp ecx, eax
je 0x40eb9b
push 0xffffffffffffffff
push edi
push eax
call fcn.00403c35
cmp dword [ebp - 0x634], 8
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x648]
cmovae eax, dword [ebp - 0x648]
mov ebx, 0x80
push ebx
push eax
call edi
cmp dword [ebp - 0x634], 8
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x648]
cmovae eax, dword [ebp - 0x648]
push eax
call esi
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push ebx
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.00403a7f
push ebx
push 1
lea ecx, [ebp - 0x630]
call fcn.00403a7f
push ebx
push 1
lea ecx, [ebp - 0x660]
call fcn.00403a7f
push ebx
push 1
lea ecx, [ebp - 0x648]
call fcn.00403a7f
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.0046c546
lea ecx, [ebp - 0xa00]
mov byte [ebp - 4], bl
call fcn.0046c546
push ebx
push 1
lea ecx, [ebp - 0x678]
call fcn.00403a7f
xor eax, eax
inc eax
jmp 0x40ea65