Function at 0x1001af10
Capabilities:
Check if file exists
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004150b
mov eax, dword fs:[0]
push eax
mov eax, 0x12d8
call fcn.1002b940
mov eax, dword [0x100582a0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x1250], eax
mov eax, dword [ebp + 0x20]
push str.DoCopyInfDriverFilesToLocal_Start
mov dword [ebp - 0x126c], ecx
mov dword [ebp - 0x1270], edx
mov dword [ebp - 0x1274], eax
call fcn.10027780
xor edi, edi
add esp, 4
cmp ebx, edi
je 0x1001ba64
cmp dword [ebp - 0x1250], edi
je 0x1001ba64
cmp dword [ebp - 0x126c], edi
je 0x1001ba64
cmp dword [ebp - 0x1270], edi
je 0x1001ba64
test dword [ebp + 0x18], 0xfffffffc
jne 0x1001ba64
lea ecx, [ebp - 0x1244]
call fcn.10018500
mov eax, 7
xor ecx, ecx
mov dword [ebp - 4], edi
mov dword [ebp - 0xda8], eax
mov dword [ebp - 0xdac], edi
mov word [ebp - 0xdbc], cx
xor edx, edx
mov dword [ebp - 0xd8c], eax
mov dword [ebp - 0xd90], edi
mov word [ebp - 0xda0], dx
mov dword [ebp - 0x1290], edi
mov dword [ebp - 0x128c], edi
mov dword [ebp - 0x1288], edi
mov dword [ebp - 0x12d4], edi
mov dword [ebp - 0x12d0], edi
mov dword [ebp - 0x12cc], edi
mov dword [ebp - 0x12c4], edi
mov dword [ebp - 0x12c0], edi
mov dword [ebp - 0x12bc], edi
mov dword [ebp - 0xd70], eax
xor eax, eax
mov dword [ebp - 0x1268], edi
mov dword [ebp - 0xd74], edi
mov word [ebp - 0xd84], ax
mov dword [ebp - 0x12e4], edi
mov dword [ebp - 0x12e0], edi
mov dword [ebp - 0x12dc], edi
lea ecx, [ebp - 0x12b4]
mov byte [ebp - 4], 7
call fcn.100199e0
lea ecx, [ebp - 0x12b4]
push ecx
lea edx, [ebp - 0x12e4]
push edx
lea eax, [ebp - 0xda0]
push eax
lea ecx, [ebp - 0xdbc]
push ecx
lea edx, [ebp - 0xd84]
push edx
lea eax, [ebp - 0x12c4]
push eax
mov eax, dword [ebp + 0x30]
lea ecx, [ebp - 0x12d4]
push ecx
mov ecx, dword [ebp + 0x2c]
lea edx, [ebp - 0x1290]
push edx
mov edx, dword [ebp + 0x28]
push eax
mov eax, dword [ebp + 0x18]
push ecx
push edx
push eax
push ebx
push esi
lea ecx, [ebp - 0x1244]
mov byte [ebp - 4], 8
call fcn.10019b70
mov ebx, eax
mov dword [ebp - 0x1254], ebx
cmp ebx, edi
jne 0x1001b948
push 0x20
lea ecx, [ebp - 0x50]
push ecx
push 0x104
lea edx, [ebp - 0x8b0]
push edx
push 0x104
lea eax, [ebp - 0xab8]
push eax
push 0x20
lea ecx, [ebp - 0x90]
push ecx
push esi
mov dword [ebp - 0x1298], edi
mov dword [ebp - 0x1278], edi
mov dword [ebp - 0x127c], edi
call fcn.1002b72a
push edi
push edi
lea edx, [ebp - 0xab8]
push edx
lea eax, [ebp - 0x90]
push eax
lea ecx, [ebp - 0xcc0]
push 0x104
push ecx
call fcn.1002b9aa
mov edx, dword [ebp - 0x1250]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
add esp, 0x3c
push edx
lea eax, [ebp - 0x4a0]
push eax
call ebx
lea ecx, [ebp - 0x4a0]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea edx, [ebp - 0x4a0]
push edx
lea eax, [ebp - 0x298]
push eax
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea ecx, [ebp - 0x8b0]
push ecx
lea edx, [ebp - 0x298]
push edx
call ebx
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x298]
push ecx
call ebx
push edi
lea edx, [ebp - 0x298]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x1258], edi
cmp eax, 1
jne 0x1001b1ae
mov dword [ebp - 0x1258], str.Windows_4.0
jmp 0x1001b1e4
cmp eax, 2
je 0x1001b1da
cmp eax, 3
je 0x1001b1da
cmp eax, 4
jne 0x1001b1c9
mov dword [ebp - 0x1258], str.Windows_IA64
jmp 0x1001b1e4
cmp eax, 5
jne 0x1001b1e4
mov dword [ebp - 0x1258], str.Windows_x64
jmp 0x1001b1e4
mov dword [ebp - 0x1258], str.Windows_NT_x86
mov eax, dword [ebp - 0x1274]
mov ecx, dword [ebp - 0x128c]
mov esi, dword [ebp - 0x1290]
mov dword [eax], edi
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x410
push eax
mov ebx, 8
push ebx
mov dword [ebp - 0x125c], edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x12c4]
mov dword [ebp - 0x1264], eax
mov dword [ebp - 0x1260], ecx
mov dword [ebp - 0x1250], esi
cmp esi, dword [ebp - 0x128c]
je 0x1001b918
mov ecx, dword [ebp - 0x12e4]
mov dword [ebp - 0x1248], eax
add eax, 0x208
mov dword [ebp - 0x124c], eax
mov eax, dword [ebp - 0x12d4]
sub ecx, eax
sub eax, esi
mov dword [ebp - 0x12a0], ecx
mov dword [ebp - 0x12a4], eax
cmp dword [ebp - 0x1254], edi
jne 0x1001b918
mov esi, dword [ebp - 0x1250]
push esi
lea ecx, [ebp - 0xd14]
call fcn.10002ae0
add esi, dword [ebp - 0x12a4]
lea ecx, [ebp - 0xcdc]
push esi
mov byte [ebp - 4], 9
call fcn.10002ae0
add esi, dword [ebp - 0x12a0]
lea ecx, [ebp - 0xd4c]
push esi
mov byte [ebp - 4], 0xa
call fcn.10002ae0
xor ecx, ecx
mov dword [ebp - 0xce4], 7
mov dword [ebp - 0xce8], edi
mov word [ebp - 0xcf8], cx
mov edx, dword [ebp - 0x1260]
mov eax, dword [edx]
mov byte [ebp - 4], 0xc
cmp eax, 0xffffffff
je 0x1001b319
mov ecx, dword [ebp - 0x12c0]
cmp edx, ecx
je 0x1001b319
mov ecx, dword [ebp - 0x1258]
lea edx, [ebp - 0xcf8]
push edx
push ecx
push eax
call fcn.1001f580
mov ecx, eax
call fcn.1001f420
jmp 0x1001b329
push 0x10043394
lea ecx, [ebp - 0xcf8]
call fcn.10001990
mov ecx, dword [ebp - 0xd14]
cmp dword [ebp - 0xd00], ebx
jae 0x1001b33d
lea ecx, [ebp - 0xd14]
mov eax, dword [ebp - 0xd4c]
cmp dword [ebp - 0xd38], ebx
jae 0x1001b351
lea eax, [ebp - 0xd4c]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push ecx
push eax
lea edx, [ebp - 0xcc0]
push edx
lea eax, [ebp - 0x6a8]
push str._s_s_s
push eax
call esi
add esp, 0x14
cmp dword [ebp - 0xccc], edi
jne 0x1001b3a3
mov eax, dword [ebp - 0xd14]
cmp dword [ebp - 0xd00], ebx
jae 0x1001b38d
lea eax, [ebp - 0xd14]
push eax
lea ecx, [ebp - 0x4a0]
push ecx
push str._s_s
lea edx, [ebp - 0x298]
push edx
jmp 0x1001b3cb
mov eax, dword [ebp - 0xcdc]
cmp dword [ebp - 0xcc8], ebx
jae 0x1001b3b7
lea eax, [ebp - 0xcdc]
push eax
lea eax, [ebp - 0x4a0]
push eax
push str._s_s
lea ecx, [ebp - 0x298]
push ecx
call esi
add esp, 0x10
mov dword [ebp - 0xdcc], edi
mov dword [ebp - 0xdc8], edi
mov dword [ebp - 0xdc4], edi
mov ecx, dword [ebp - 0x12b0]
mov eax, dword [ecx]
mov byte [ebp - 4], 0xd
mov dword [ebp - 0x1280], eax
cmp eax, ecx
je 0x1001b603
lea esp, [esp]
push 0xffffffffffffffff
lea esi, [eax + 0xc]
push edi
xor edx, edx
push esi
lea ecx, [ebp - 0xd68]
mov dword [ebp - 0xd54], 7
mov dword [ebp - 0xd58], edi
mov word [ebp - 0xd68], dx
call fcn.10001600
push 0xffffffffffffffff
push edi
xor eax, eax
add esi, 0x1c
push esi
lea ecx, [ebp - 0xd30]
mov byte [ebp - 4], 0xe
mov dword [ebp - 0xd1c], 7
mov dword [ebp - 0xd20], edi
mov word [ebp - 0xd30], ax
call fcn.10001600
mov eax, dword [ebp - 0xd14]
mov byte [ebp - 4], 0xf
cmp dword [ebp - 0xd00], ebx
jae 0x1001b472
lea eax, [ebp - 0xd14]
mov ecx, dword [ebp - 0xd04]
mov edx, dword [ebp - 0xd58]
push ecx
push eax
push edx
push edi
lea ecx, [ebp - 0xd68]
call fcn.10002920
test eax, eax
jne 0x1001b59b
call fcn.100284d0
mov eax, dword [eax + 0x120]
shr eax, 0xa
test al, 1
je 0x1001b516
mov ecx, dword [ebp - 0xd68]
cmp dword [ebp - 0xd54], ebx
jae 0x1001b4bb
lea ecx, [ebp - 0xd68]
mov eax, dword [ebp - 0xd30]
cmp dword [ebp - 0xd1c], ebx
jae 0x1001b4cf
lea eax, [ebp - 0xd30]
push ecx
push eax
push str._s_s
push 0x104
lea ecx, [ebp - 0x6a8]
push 0x104
push ecx
call fcn.1002b989
lea edx, [ebp - 0x6a8]
push edx
push str.szSrcFile:__s
call fcn.10027780
lea eax, [ebp - 0x298]
push eax
push str.szDstFile:__s
call fcn.10027780
add esp, 0x28
jmp 0x1001b59b
push 0x218
lea ecx, [ebp - 0xfd4]
push edi
push ecx
call fcn.1002b6b0
add esp, 0xc
lea edx, [ebp - 0x4a0]
push edx
lea eax, [ebp - 0xfd4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ecx, dword [ebp - 0xdc8]
mov edx, dword [ebp - 0xdcc]
push ecx
push edx
lea eax, [ebp - 0x1294]
push eax
lea ecx, [ebp - 0xdcc]
call fcn.10002f70
lea ecx, [ebp - 0xd14]
push ecx
lea ecx, [ebp - 0xdcc]
call fcn.10003180
mov eax, dword [ebp - 0xd30]
cmp dword [ebp - 0xd1c], ebx
jae 0x1001b585
lea eax, [ebp - 0xd30]
lea edx, [ebp - 0xfd4]
push edx
push eax
call fcn.100020b0
add esp, 8
mov dword [ebp - 0x1254], eax
cmp dword [ebp - 0xd1c], ebx
jb 0x1001b5b2
mov eax, dword [ebp - 0xd30]
push eax
call fcn.1002a9de
add esp, 4
xor ecx, ecx
mov dword [ebp - 0xd1c], 7
mov dword [ebp - 0xd20], edi
mov word [ebp - 0xd30], cx
mov byte [ebp - 4], 0xd
cmp dword [ebp - 0xd54], ebx
jb 0x1001b5e6
mov edx, dword [ebp - 0xd68]
push edx
call fcn.1002a9de
add esp, 4
lea ecx, [ebp - 0x1280]
call fcn.10015830
mov eax, dword [ebp - 0x1280]
cmp eax, dword [ebp - 0x12b0]
jne 0x1001b400
lea eax, [ebp - 0x298]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x1001b751
cmp dword [ebp - 0x1264], edi
je 0x1001b68a
mov ecx, dword [ebp - 0x1248]
push 0x208
push edi
push ecx
call fcn.1002b6b0
mov edx, dword [ebp - 0x124c]
push 0x208
push edi
push edx
call fcn.1002b6b0
mov eax, dword [ebp - 0xcf8]
add esp, 0x18
cmp dword [ebp - 0xce4], ebx
jae 0x1001b65c
lea eax, [ebp - 0xcf8]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push eax
mov eax, dword [ebp - 0x1248]
push eax
call esi
mov eax, dword [ebp - 0xcdc]
cmp dword [ebp - 0xcc8], ebx
jae 0x1001b680
lea eax, [ebp - 0xcdc]
mov ecx, dword [ebp - 0x124c]
push eax
push ecx
call esi
inc dword [ebp - 0x125c]
mov eax, 0x410
add dword [ebp - 0x1248], eax
add dword [ebp - 0x124c], eax
lea ecx, [ebp - 0xfd4]
call fcn.10017c60
cmp dword [ebp - 0xce4], ebx
jb 0x1001b6c3
mov edx, dword [ebp - 0xcf8]
push edx
call fcn.1002a9de
add esp, 4
xor eax, eax
mov esi, 7
mov dword [ebp - 0xce4], esi
mov dword [ebp - 0xce8], edi
mov word [ebp - 0xcf8], ax
cmp dword [ebp - 0xd38], ebx
jb 0x1001b6f4
mov ecx, dword [ebp - 0xd4c]
push ecx
call fcn.1002a9de
add esp, 4
xor edx, edx
mov dword [ebp - 0xd38], esi
mov dword [ebp - 0xd3c], edi
mov word [ebp - 0xd4c], dx
cmp dword [ebp - 0xcc8], ebx
jb 0x1001b720
mov eax, dword [ebp - 0xcdc]
push eax
call fcn.1002a9de
add esp, 4
xor ecx, ecx
mov dword [ebp - 0xcc8], esi
mov dword [ebp - 0xccc], edi
mov word [ebp - 0xcdc], cx
mov byte [ebp - 4], 8
cmp dword [ebp - 0xd00], ebx
jb 0x1001b8f6
mov edx, dword [ebp - 0xd14]
push edx
jmp 0x1001b8ee
lea eax, [ebp - 0x127c]
push eax
lea ecx, [ebp - 0x1278]
push ecx
lea edx, [ebp - 0x1298]
push edx
lea eax, [ebp - 0x129c]
push eax
lea ecx, [ebp - 0x6a8]
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupGetFileCompressionInfoW]
cmp eax, edi
jne 0x1001b83b
mov ecx, dword [ebp - 0x129c]
lea edx, [ebp - 0x127c]
push edx
lea eax, [ebp - 0x298]
push eax
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDecompressOrCopyFileW]
cmp eax, edi
jne 0x1001b83b
mov edx, dword [ebp - 0x1278]
add dword [ebp - 0x1268], edx
cmp dword [ebp - 0x1264], edi
je 0x1001b822
mov eax, dword [ebp - 0x1248]
push 0x208
push edi
push eax
call fcn.1002b6b0
mov ecx, dword [ebp - 0x124c]
push 0x208
push edi
push ecx
call fcn.1002b6b0
mov eax, dword [ebp - 0xcf8]
add esp, 0x18
cmp dword [ebp - 0xce4], ebx
jae 0x1001b7f4
lea eax, [ebp - 0xcf8]
mov edx, dword [ebp - 0x1248]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push eax
push edx
call esi
mov eax, dword [ebp - 0xcdc]
cmp dword [ebp - 0xcc8], ebx
jae 0x1001b818
lea eax, [ebp - 0xcdc]
push eax
mov eax, dword [ebp - 0x124c]
push eax
call esi
inc dword [ebp - 0x125c]
mov eax, 0x410
add dword [ebp - 0x1248], eax
add dword [ebp - 0x124c], eax
jmp 0x1001b847
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1254], eax
lea ecx, [ebp - 0xfd4]
call fcn.10017c60
cmp dword [ebp - 0xce4], ebx
jb 0x1001b869
mov ecx, dword [ebp - 0xcf8]
push ecx
call fcn.1002a9de
add esp, 4
xor edx, edx
mov esi, 7
mov dword [ebp - 0xce4], esi
mov dword [ebp - 0xce8], edi
mov word [ebp - 0xcf8], dx
cmp dword [ebp - 0xd38], ebx
jb 0x1001b89a
mov eax, dword [ebp - 0xd4c]
push eax
call fcn.1002a9de
add esp, 4
xor ecx, ecx
mov dword [ebp - 0xd38], esi
mov dword [ebp - 0xd3c], edi
mov word [ebp - 0xd4c], cx
cmp dword [ebp - 0xcc8], ebx
jb 0x1001b8c6
mov edx, dword [ebp - 0xcdc]
push edx
call fcn.1002a9de
add esp, 4
xor eax, eax
mov dword [ebp - 0xcc8], esi
mov dword [ebp - 0xccc], edi
mov word [ebp - 0xcdc], ax
mov byte [ebp - 4], 8
cmp dword [ebp - 0xd00], ebx
jb 0x1001b8f6
mov ecx, dword [ebp - 0xd14]
push ecx
call fcn.1002a9de
add esp, 4
mov eax, dword [ebp - 0x1250]
add dword [ebp - 0x1260], 4
add eax, 0x1c
mov dword [ebp - 0x1250], eax
cmp eax, dword [ebp - 0x128c]
jne 0x1001b27e
mov edx, dword [ebp - 0x126c]
mov eax, dword [ebp - 0x1268]
mov ecx, dword [ebp - 0x1264]
mov ebx, dword [ebp - 0x1254]
mov dword [edx], eax
mov edx, dword [ebp - 0x1274]
mov eax, dword [ebp - 0x1270]
mov dword [edx], ecx
mov ecx, dword [ebp - 0x125c]
mov dword [eax], ecx
push ebx
push str.DoCopyInfDriverFilesToLocal_End__d_
mov esi, 8
call fcn.10027780
add esp, 8
mov eax, dword [ebp - 0x12b0]
mov ecx, dword [eax]
push eax
push ecx
lea edx, [ebp - 0x1294]
push edx
lea ecx, [ebp - 0x12b4]
mov byte [ebp - 4], 0x10
call fcn.100175f0
mov eax, dword [ebp - 0x12b0]
push eax
call fcn.1002a9de
add esp, 4
lea ecx, [ebp - 0x12e4]
call fcn.10002e90
cmp dword [ebp - 0xd70], esi
jb 0x1001b9ac
mov ecx, dword [ebp - 0xd84]
push ecx
call fcn.1002a9de
add esp, 4
mov eax, dword [ebp - 0x12c4]
xor edx, edx
mov dword [ebp - 0xd70], 7
mov dword [ebp - 0xd74], edi
mov word [ebp - 0xd84], dx
cmp eax, edi
je 0x1001b9d8
push eax
call fcn.1002a9de
add esp, 4
lea ecx, [ebp - 0x12d4]
call fcn.10002e90
lea ecx, [ebp - 0x1290]
call fcn.10002e90
cmp dword [ebp - 0xd8c], esi
jb 0x1001ba05
mov eax, dword [ebp - 0xda0]
push eax
call fcn.1002a9de
add esp, 4
xor ecx, ecx
mov dword [ebp - 0xd8c], 7
mov dword [ebp - 0xd90], edi
mov word [ebp - 0xda0], cx
cmp dword [ebp - 0xda8], esi
jb 0x1001ba35
mov edx, dword [ebp - 0xdbc]
push edx
call fcn.1002a9de
add esp, 4
xor eax, eax
lea ecx, [ebp - 0x1244]
mov dword [ebp - 0xda8], 7
mov dword [ebp - 0xdac], edi
mov word [ebp - 0xdbc], ax
mov dword [ebp - 4], 0xffffffff
call fcn.10013180
mov eax, ebx
jmp 0x1001ba69
mov eax, 0x57
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1002b571
mov esp, ebp
pop ebp
ret