Function at 0x4ce960
Capabilities:
Copy file
Get common file path
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7ec
mov eax, dword [0x5552b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push str._check_and_copy_driver_file_
push str.Driver
xor edx, edx
xor ecx, ecx
call fcn.004a3520
add esp, 0xc
push 0x103
lea eax, [ebp - 0x447]
push ebx
push eax
mov byte [ebp - 0x448], bl
call fcn.004e8ba0
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x448]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x448]
push 0x5c
push edx
call fcn.004e7790
mov byte [eax], bl
push 0x103
lea eax, [ebp - 0x75f]
push ebx
push eax
mov byte [ebp - 0x760], bl
call fcn.004e8ba0
mov ecx, dword [0x56831c]
mov edx, dword [ecx*4 + 0x556624]
add esp, 0x14
push edx
push str.Smrf
lea eax, [ebp - 0x448]
push eax
lea ecx, [ebp - 0x760]
push str._s_s.inf_s
push ecx
call fcn.004e5b0c
add esp, 0x14
push ebx
push 0x80
push 3
push ebx
push 1
push ebx
lea edx, [ebp - 0x760]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x4cf07b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x103
lea eax, [ebp - 0x237]
push ebx
push eax
mov byte [ebp - 0x238], bl
call fcn.004e8ba0
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x238]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x238]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4cea73
mov edx, dword [str.System32drivers_]
mov ecx, dword [0x54c968]
mov dword [eax], edx
mov edx, dword [0x54c96c]
mov dword [eax + 4], ecx
mov ecx, dword [0x54c970]
mov dword [eax + 8], edx
mov dx, word [0x54c974]
mov dword [eax + 0xc], ecx
mov cl, byte [0x54c976]
mov word [eax + 0x10], dx
mov byte [eax + 0x12], cl
mov eax, str.Smrf
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x4ceac0
lea edi, [ebp - 0x238]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x4cead2
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x238]
rep movsb byte es:[edi], byte [esi]
dec eax
nop
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4ceaf0
mov edx, dword [str..inf]
mov cl, byte [0x54c97c]
mov dword [eax], edx
push 0x80
lea edx, [ebp - 0x238]
push edx
mov byte [eax + 4], cl
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
lea eax, [ebp - 0x238]
push eax
lea ecx, [ebp - 0x760]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
xor edx, edx
xor ecx, ecx
push ebx
test eax, eax
jne 0x4ceb43
push str._inf_copy_fail_
jmp 0x4cf06e
push str._inf_copy_success_
push str.Driver
call fcn.004a3520
add esp, 0xc
push 0x103
lea edx, [ebp - 0x657]
push ebx
push edx
mov edi, 1
mov byte [ebp - 0x658], bl
call fcn.004e8ba0
mov eax, dword [0x56831c]
mov ecx, dword [eax*4 + 0x556624]
add esp, 0xc
push ecx
push str.Smrf
lea edx, [ebp - 0x448]
push edx
lea eax, [ebp - 0x658]
push str._s_s.cat_s
push eax
call fcn.004e5b0c
add esp, 0x14
push ebx
push 0x80
push 3
push ebx
push edi
push ebx
lea ecx, [ebp - 0x658]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4cec27
mov eax, dword [0x56831c]
cmp eax, 0xd
je 0x4ced38
cmp eax, 0xc
je 0x4ced38
cmp eax, 0xb
je 0x4ced38
cmp eax, 0xa
je 0x4ced38
cmp eax, 9
je 0x4ced38
cmp eax, 8
je 0x4ced38
cmp eax, 7
je 0x4ced38
cmp eax, 6
je 0x4ced38
push ebx
push str._os_is_not_need_cat_
push str.Driver
xor edx, edx
xor ecx, ecx
call fcn.004a3520
add esp, 0xc
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x4ced55
push 0x103
lea edx, [ebp - 0x33f]
push ebx
push edx
mov byte [ebp - 0x340], bl
call fcn.004e8ba0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x340]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x340]
dec eax
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4cec70
mov ecx, dword [str.System32drivers_]
mov edx, dword [0x54c968]
mov dword [eax], ecx
mov ecx, dword [0x54c96c]
mov dword [eax + 4], edx
mov edx, dword [0x54c970]
mov dword [eax + 8], ecx
mov cx, word [0x54c974]
mov dword [eax + 0xc], edx
mov dl, byte [0x54c976]
mov word [eax + 0x10], cx
mov byte [eax + 0x12], dl
mov eax, str.Smrf
mov ecx, eax
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x4cecb6
lea edi, [ebp - 0x340]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x4cecc8
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x340]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4cece5
mov ecx, dword [str..cat]
mov dl, byte [0x54ca7c]
mov dword [eax], ecx
mov byte [eax + 4], dl
push 0x80
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
lea ecx, [ebp - 0x340]
push ecx
lea edx, [ebp - 0x658]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
xor edx, edx
xor ecx, ecx
push ebx
test eax, eax
jne 0x4ced43
push str._cat_copy_fail_
jmp 0x4cf06e
push ebx
push str._need_cat__but_source_not_exists_
jmp 0x4cf06a
push str._cat_copy_success_
push str.Driver
call fcn.004a3520
add esp, 0xc
push 0x103
lea eax, [ebp - 0x54f]
push ebx
push eax
mov byte [ebp - 0x550], bl
call fcn.004e8ba0
mov ecx, dword [0x56831c]
mov edx, dword [ecx*4 + 0x556624]
add esp, 0xc
push edx
push str.Smrf
lea eax, [ebp - 0x448]
push eax
lea ecx, [ebp - 0x550]
push str._s_s.sys_s
push ecx
call fcn.004e5b0c
add esp, 0x14
push ebx
push 0x80
push 3
push ebx
push 1
push ebx
lea edx, [ebp - 0x550]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4cf07b
lea eax, [ebp - 0x7b4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
lea ecx, [ebp - 0x770]
push ecx
lea edx, [ebp - 0x7a0]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x103
lea eax, [ebp - 0x12f]
push ebx
push eax
mov byte [ebp - 0x130], bl
call fcn.004e8ba0
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x130]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x130]
dec eax
nop
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4cee20
mov edx, dword [str.System32drivers_]
mov ecx, dword [0x54c968]
mov dword [eax], edx
mov edx, dword [0x54c96c]
mov dword [eax + 4], ecx
mov ecx, dword [0x54c970]
mov dword [eax + 8], edx
mov dx, word [0x54c974]
mov dword [eax + 0xc], ecx
mov cl, byte [0x54c976]
mov word [eax + 0x10], dx
mov byte [eax + 0x12], cl
mov eax, str.Smrf
mov ecx, eax
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x4cee66
lea edi, [ebp - 0x130]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x4cee78
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x130]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4cee95
mov edx, dword [str..sys]
mov cl, byte [0x54caf0]
push ebx
push 0x80
push 3
push ebx
push 1
mov dword [eax], edx
push ebx
lea edx, [ebp - 0x130]
push edx
mov byte [eax + 4], cl
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4cef1b
push ebx
lea eax, [ebp - 0x130]
push eax
lea ecx, [ebp - 0x550]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
xor edx, edx
xor ecx, ecx
push ebx
test eax, eax
jne 0x4ceef6
push str._sys_copy_fail_
jmp 0x4cf06e
push str._sys_copy_success_
push str.Driver
call fcn.004a3520
add esp, 0xc
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x7e8]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
lea eax, [ebp - 0x780]
push eax
lea ecx, [ebp - 0x7d4]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, word [ebp - 0x780]
movzx ecx, word [ebp - 0x770]
cmp ecx, eax
jne 0x4cef88
movzx eax, word [ebp - 0x77e]
movzx ecx, word [ebp - 0x76e]
mov edx, eax
shl edx, 4
sub edx, eax
movzx eax, word [ebp - 0x77a]
lea eax, [eax + edx*2]
mov edx, ecx
shl edx, 4
sub edx, ecx
movzx ecx, word [ebp - 0x76a]
lea ecx, [ecx + edx*2]
cmp ecx, eax
jle 0x4cefe9
push 0x80
lea edx, [ebp - 0x130]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
lea eax, [ebp - 0x130]
push eax
lea ecx, [ebp - 0x550]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
xor edx, edx
xor ecx, ecx
push ebx
test eax, eax
jne 0x4cefc4
push str._sys_overwrite_fail_
jmp 0x4cf06e
push str._sys_overwrite_success_
push str.Driver
call fcn.004a3520
add esp, 0xc
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
xor eax, eax
lea edx, [ebp - 0x24]
push edx
mov byte [ebp - 0x24], bl
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov dword [ebp - 0x13], eax
mov dword [ebp - 0xf], eax
mov dword [ebp - 0xb], eax
mov word [ebp - 7], ax
mov byte [ebp - 5], al
call fcn.004cffc0
add esp, 4
test eax, eax
jne 0x4cf064
push ebx
push str._sys_not_need_overwrite__pnp_fail_
push str.Driver
xor edx, edx
xor ecx, ecx
call fcn.004a3520
add esp, 0xc
call fcn.004cf890
test al, al
jne 0x4cf064
push ebx
push str._install_pnp_fail_and_try_again_
push str.Driver
xor edx, edx
xor ecx, ecx
call fcn.004a3520
add esp, 0xc
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
push ebx
push str._sys_not_need_overwrite_
xor edx, edx
xor ecx, ecx
push str.Driver
call fcn.004a3520
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor al, al
pop ebx
call fcn.004e4746
mov esp, ebp
pop ebp
ret