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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003b74f
mov eax, dword fs:[0]
push eax
mov eax, 0x12e0
call fcn.100333f0
mov eax, dword [0x1004f450]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1258], eax
mov eax, dword [ebp + 0x18]
push str.DoCopyInfDriverFilesToLocal_Start
mov dword [ebp - 0x1268], esi
mov dword [ebp - 0x1278], ecx
mov dword [ebp - 0x128c], edx
mov dword [ebp - 0x1284], eax
call fcn.100269c0
xor ebx, ebx
add esp, 4
cmp esi, ebx
je 0x10016eaf
cmp dword [ebp - 0x1258], ebx
je 0x10016eaf
cmp dword [ebp - 0x1278], ebx
je 0x10016eaf
cmp dword [ebp - 0x128c], ebx
je 0x10016eaf
test dword [ebp + 0x14], 0xfffffffc
jne 0x10016eaf
lea ecx, [ebp - 0x124c]
push ecx
call fcn.10011f50
mov dword [ebp - 4], ebx
mov eax, 7
xor edx, edx
mov dword [ebp - 0xdac], eax
mov dword [ebp - 0xdb0], ebx
mov word [ebp - 0xdc0], dx
xor ecx, ecx
mov dword [ebp - 0xd90], eax
mov dword [ebp - 0xd94], ebx
mov word [ebp - 0xda4], cx
mov dword [ebp - 0x129c], ebx
mov dword [ebp - 0x1298], ebx
mov dword [ebp - 0x1294], ebx
mov dword [ebp - 0x12d8], ebx
mov dword [ebp - 0x12d4], ebx
mov dword [ebp - 0x12d0], ebx
mov dword [ebp - 0x12e8], ebx
mov dword [ebp - 0x12e4], ebx
mov dword [ebp - 0x12e0], ebx
mov dword [ebp - 0x1270], ebx
mov dword [ebp - 0xd74], eax
mov dword [ebp - 0xd78], ebx
mov word [ebp - 0xd88], dx
mov dword [ebp - 0x12b4], ebx
mov dword [ebp - 0x12b0], ebx
mov dword [ebp - 0x12ac], ebx
lea esi, [ebp - 0x12c8]
mov byte [ebp - 4], al
call fcn.1001bcb0
mov eax, esi
push eax
lea ecx, [ebp - 0x12b4]
push ecx
lea edx, [ebp - 0xda4]
push edx
lea eax, [ebp - 0xdc0]
push eax
mov eax, dword [ebp + 0x28]
lea ecx, [ebp - 0xd88]
push ecx
mov ecx, dword [ebp + 0x24]
lea edx, [ebp - 0x12e8]
push edx
mov edx, dword [ebp + 0x20]
push eax
mov eax, dword [ebp + 0x14]
push ecx
push edx
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x1268]
push eax
push ecx
push edi
lea edx, [ebp - 0x12d8]
lea ecx, [ebp - 0x129c]
call fcn.10013030
mov esi, dword [ebp - 0x129c]
mov dword [ebp - 0x125c], eax
cmp eax, ebx
jne 0x10016d48
push 0x20
lea edx, [ebp - 0x54]
push edx
push 0x104
lea eax, [ebp - 0x8b4]
push eax
push 0x104
lea ecx, [ebp - 0xcc4]
push ecx
push 0x20
lea edx, [ebp - 0x94]
push edx
push edi
mov dword [ebp - 0x12a0], ebx
mov dword [ebp - 0x1268], ebx
mov dword [ebp - 0x127c], ebx
call fcn.10029441
add esp, 0x24
push ebx
push ebx
lea eax, [ebp - 0xcc4]
push eax
lea ecx, [ebp - 0x94]
push ecx
lea edx, [ebp - 0xabc]
push 0x104
push edx
call fcn.100297d1
mov eax, dword [ebp - 0x1258]
add esp, 0x18
push eax
lea ecx, [ebp - 0x4a4]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea edx, [ebp - 0x4a4]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x4a4]
push eax
lea ecx, [ebp - 0x29c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea edx, [ebp - 0x8b4]
push edx
lea eax, [ebp - 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp - 0x29c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebx
lea eax, [ebp - 0x29c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x1264], ebx
cmp eax, 1
jne 0x10016581
mov dword [ebp - 0x1264], str.Windows_4.0
jmp 0x100165b7
cmp eax, 2
je 0x100165ad
cmp eax, 3
je 0x100165ad
cmp eax, 4
jne 0x1001659c
mov dword [ebp - 0x1264], str.Windows_IA64
jmp 0x100165b7
cmp eax, 5
jne 0x100165b7
mov dword [ebp - 0x1264], str.Windows_x64
jmp 0x100165b7
mov dword [ebp - 0x1264], str.Windows_NT_x86
mov ecx, dword [ebp - 0x1284]
mov dword [ecx], ebx
mov ecx, dword [ebp - 0x1298]
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
push 8
mov dword [ebp - 0x1260], ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, dword [ebp - 0x12e8]
mov edi, esi
mov dword [ebp - 0x1258], eax
mov dword [ebp - 0x126c], edx
mov dword [ebp - 0x1274], edi
cmp esi, dword [ebp - 0x1298]
je 0x10016d1e
mov ecx, dword [ebp - 0x12d8]
mov dword [ebp - 0x1250], eax
add eax, 0x208
mov dword [ebp - 0x1254], eax
mov eax, dword [ebp - 0x12b4]
sub eax, ecx
mov dword [ebp - 0x12b8], eax
mov eax, ecx
sub eax, esi
mov dword [ebp - 0x12a4], eax
jmp 0x10016656
mov edi, dword [ebp - 0x1274]
cmp dword [ebp - 0x125c], ebx
jne 0x10016d1e
mov ecx, edi
lea esi, [ebp - 0xce0]
call fcn.10002e20
add edi, dword [ebp - 0x12a4]
lea esi, [ebp - 0xd18]
mov ecx, edi
mov byte [ebp - 4], 9
call fcn.10002e20
mov ecx, dword [ebp - 0x12b8]
add ecx, edi
lea esi, [ebp - 0xd50]
mov byte [ebp - 4], 0xa
call fcn.10002e20
xor edx, edx
mov dword [ebp - 0xce8], 7
mov dword [ebp - 0xcec], ebx
mov word [ebp - 0xcfc], dx
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x126c]
mov esi, dword [eax]
cmp esi, 0xffffffff
je 0x100166f5
mov ecx, eax
cmp ecx, dword [ebp - 0x12e4]
je 0x100166f5
call fcn.1001dd40
mov edx, dword [eax]
mov ecx, dword [ebp - 0x1264]
mov edx, dword [edx*4 + 0x10042730]
lea eax, [ebp - 0xcfc]
push eax
push ecx
push esi
call edx
add esp, 0xc
jmp 0x10016706
lea eax, [ebp - 0xcfc]
push eax
mov eax, 0x1003e860
call fcn.10001720
mov ecx, dword [ebp - 0xce0]
mov edi, 8
cmp dword [ebp - 0xccc], edi
jae 0x1001671f
lea ecx, [ebp - 0xce0]
mov eax, dword [ebp - 0xd50]
cmp dword [ebp - 0xd3c], edi
jae 0x10016733
lea eax, [ebp - 0xd50]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push ecx
push eax
lea ecx, [ebp - 0xabc]
push ecx
lea edx, [ebp - 0x6ac]
push str._s_s_s
push edx
call esi
add esp, 0x14
cmp dword [ebp - 0xd08], ebx
jne 0x10016785
mov eax, dword [ebp - 0xce0]
cmp dword [ebp - 0xccc], edi
jae 0x1001676f
lea eax, [ebp - 0xce0]
push eax
lea eax, [ebp - 0x4a4]
push eax
push str._s_s
lea ecx, [ebp - 0x29c]
push ecx
jmp 0x100167ad
mov eax, dword [ebp - 0xd18]
cmp dword [ebp - 0xd04], edi
jae 0x10016799
lea eax, [ebp - 0xd18]
push eax
lea edx, [ebp - 0x4a4]
push edx
push str._s_s
lea eax, [ebp - 0x29c]
push eax
call esi
add esp, 0x10
mov dword [ebp - 0xdd4], ebx
mov dword [ebp - 0xdd0], ebx
mov dword [ebp - 0xdcc], ebx
mov byte [ebp - 4], 0xd
mov ecx, dword [ebp - 0x12c4]
mov eax, dword [ecx]
mov dword [ebp - 0x1288], eax
cmp eax, ecx
je 0x100169df
mov edi, edi
xor ecx, ecx
lea esi, [eax + 0xc]
push ebx
mov word [ebp - 0xd6c], cx
mov edi, 7
push esi
or eax, 0xffffffff
lea ecx, [ebp - 0xd6c]
mov dword [ebp - 0xd58], edi
mov dword [ebp - 0xd5c], ebx
call fcn.10001820
mov byte [ebp - 4], 0xe
push ebx
xor edx, edx
add esi, 0x1c
push esi
or eax, 0xffffffff
lea ecx, [ebp - 0xd34]
mov dword [ebp - 0xd20], edi
mov dword [ebp - 0xd24], ebx
mov word [ebp - 0xd34], dx
call fcn.10001820
mov byte [ebp - 4], 0xf
cmp dword [ebp - 0xccc], 8
mov eax, dword [ebp - 0xce0]
jae 0x10016852
lea eax, [ebp - 0xce0]
mov edi, dword [ebp - 0xcd0]
push eax
mov eax, dword [ebp - 0xd5c]
lea ecx, [ebp - 0xd6c]
call fcn.10003570
test eax, eax
jne 0x1001695c
call fcn.10027fe0
mov eax, dword [eax + 0x120]
shr eax, 0xa
test al, 1
je 0x100168f5
mov ecx, dword [ebp - 0xd6c]
mov edi, 8
cmp dword [ebp - 0xd58], edi
jae 0x1001689d
lea ecx, [ebp - 0xd6c]
mov eax, dword [ebp - 0xd34]
cmp dword [ebp - 0xd20], edi
jae 0x100168b1
lea eax, [ebp - 0xd34]
push ecx
push eax
push str._s_s
push 0x104
lea ecx, [ebp - 0x6ac]
push 0x104
push ecx
call fcn.100297b0
lea edx, [ebp - 0x6ac]
push edx
push str.szSrcFile:__s
call fcn.100269c0
lea eax, [ebp - 0x29c]
push eax
push str.szDstFile:__s
call fcn.100269c0
add esp, 0x28
jmp 0x10016961
push 0x218
lea ecx, [ebp - 0xfdc]
push ebx
push ecx
call fcn.1002f900
add esp, 0xc
lea edx, [ebp - 0x4a4]
push edx
lea eax, [ebp - 0xfdc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea esi, [ebp - 0xdd4]
call fcn.10002f60
lea ecx, [ebp - 0xce0]
mov edi, esi
call fcn.10002e80
cmp dword [ebp - 0xd20], 8
mov eax, dword [ebp - 0xd34]
jae 0x1001694b
lea eax, [ebp - 0xd34]
lea ecx, [ebp - 0xfdc]
call fcn.100016b0
mov dword [ebp - 0x125c], eax
mov edi, 8
cmp dword [ebp - 0xd20], edi
jb 0x10016978
mov ecx, dword [ebp - 0xd34]
push ecx
call fcn.10029653
add esp, 4
xor edx, edx
mov esi, 7
mov byte [ebp - 4], 0xd
mov dword [ebp - 0xd20], esi
mov dword [ebp - 0xd24], ebx
mov word [ebp - 0xd34], dx
cmp dword [ebp - 0xd58], edi
jb 0x100169ad
mov eax, dword [ebp - 0xd6c]
push eax
call fcn.10029653
add esp, 4
xor ecx, ecx
lea eax, [ebp - 0x1288]
mov dword [ebp - 0xd58], esi
mov dword [ebp - 0xd5c], ebx
mov word [ebp - 0xd6c], cx
call fcn.1001c360
mov eax, dword [ebp - 0x1288]
cmp eax, dword [ebp - 0x12c4]
jne 0x100167e0
lea edx, [ebp - 0x29c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x10016b35
cmp dword [ebp - 0x1258], ebx
je 0x10016a5f
mov esi, dword [ebp - 0x1250]
push 0x208
push ebx
push esi
call fcn.1002f900
mov edi, dword [ebp - 0x1254]
add esp, 0xc
push 0x208
push ebx
push edi
call fcn.1002f900
mov eax, dword [ebp - 0xcfc]
add esp, 0xc
cmp dword [ebp - 0xce8], 8
jae 0x10016a3c
lea eax, [ebp - 0xcfc]
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
call esi
cmp dword [ebp - 0xd04], 8
mov eax, dword [ebp - 0xd18]
jae 0x10016a5b
lea eax, [ebp - 0xd18]
push eax
push edi
call esi
inc dword [ebp - 0x1260]
mov eax, 0x410
add dword [ebp - 0x1250], eax
add dword [ebp - 0x1254], eax
lea esi, [ebp - 0xfdc]
call fcn.10016ed0
mov esi, 8
cmp dword [ebp - 0xce8], esi
jb 0x10016a9d
mov eax, dword [ebp - 0xcfc]
push eax
call fcn.10029653
add esp, 4
xor ecx, ecx
mov edi, 7
mov dword [ebp - 0xce8], edi
mov dword [ebp - 0xcec], ebx
mov word [ebp - 0xcfc], cx
cmp dword [ebp - 0xd3c], esi
jb 0x10016ace
mov edx, dword [ebp - 0xd50]
push edx
call fcn.10029653
add esp, 4
xor eax, eax
mov dword [ebp - 0xd3c], edi
mov dword [ebp - 0xd40], ebx
mov word [ebp - 0xd50], ax
cmp dword [ebp - 0xd04], esi
jb 0x10016afa
mov ecx, dword [ebp - 0xd18]
push ecx
call fcn.10029653
add esp, 4
xor edx, edx
mov byte [ebp - 4], 8
mov dword [ebp - 0xd04], edi
mov dword [ebp - 0xd08], ebx
mov word [ebp - 0xd18], dx
cmp dword [ebp - 0xccc], esi
jb 0x10016b2a
mov eax, dword [ebp - 0xce0]
push eax
call fcn.10029653
add esp, 4
mov dword [ebp - 0xccc], edi
jmp 0x10016ced
lea edx, [ebp - 0x127c]
push edx
lea eax, [ebp - 0x1268]
push eax
lea ecx, [ebp - 0x12a0]
push ecx
lea edx, [ebp - 0x1280]
push edx
lea eax, [ebp - 0x6ac]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetFileCompressionInfoW]
cmp eax, ebx
jne 0x10016c27
mov eax, dword [ebp - 0x1280]
lea ecx, [ebp - 0x127c]
push ecx
lea edx, [ebp - 0x29c]
push edx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDecompressOrCopyFileW]
cmp eax, ebx
jne 0x10016c27
mov ecx, dword [ebp - 0x1268]
add dword [ebp - 0x1270], ecx
cmp dword [ebp - 0x1258], ebx
je 0x10016c0e
mov edx, dword [ebp - 0x1250]
push 0x208
push ebx
push edx
call fcn.1002f900
mov eax, dword [ebp - 0x1254]
add esp, 0xc
push 0x208
push ebx
push eax
call fcn.1002f900
mov eax, dword [ebp - 0xcfc]
mov edi, 8
add esp, 0xc
cmp dword [ebp - 0xce8], edi
jae 0x10016be0
lea eax, [ebp - 0xcfc]
mov ecx, dword [ebp - 0x1250]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push eax
push ecx
call esi
mov eax, dword [ebp - 0xd18]
cmp dword [ebp - 0xd04], edi
jae 0x10016c04
lea eax, [ebp - 0xd18]
mov edx, dword [ebp - 0x1254]
push eax
push edx
call esi
inc dword [ebp - 0x1260]
mov eax, 0x410
add dword [ebp - 0x1250], eax
add dword [ebp - 0x1254], eax
jmp 0x10016c33
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x125c], eax
lea esi, [ebp - 0xfdc]
call fcn.10016ed0
mov edi, 8
cmp dword [ebp - 0xce8], edi
jb 0x10016c5a
mov eax, dword [ebp - 0xcfc]
push eax
call fcn.10029653
add esp, 4
xor ecx, ecx
mov esi, 7
mov dword [ebp - 0xce8], esi
mov dword [ebp - 0xcec], ebx
mov word [ebp - 0xcfc], cx
cmp dword [ebp - 0xd3c], edi
jb 0x10016c8b
mov edx, dword [ebp - 0xd50]
push edx
call fcn.10029653
add esp, 4
xor eax, eax
mov dword [ebp - 0xd3c], esi
mov dword [ebp - 0xd40], ebx
mov word [ebp - 0xd50], ax
cmp dword [ebp - 0xd04], edi
jb 0x10016cb7
mov ecx, dword [ebp - 0xd18]
push ecx
call fcn.10029653
add esp, 4
xor edx, edx
mov byte [ebp - 4], 8
mov dword [ebp - 0xd04], esi
mov dword [ebp - 0xd08], ebx
mov word [ebp - 0xd18], dx
cmp dword [ebp - 0xccc], edi
jb 0x10016ce7
mov eax, dword [ebp - 0xce0]
push eax
call fcn.10029653
add esp, 4
mov dword [ebp - 0xccc], esi
mov eax, dword [ebp - 0x1274]
add dword [ebp - 0x126c], 4
add eax, 0x1c
xor ecx, ecx
mov word [ebp - 0xce0], cx
mov dword [ebp - 0xcd0], ebx
mov dword [ebp - 0x1274], eax
cmp eax, dword [ebp - 0x1298]
jne 0x10016650
mov edx, dword [ebp - 0x1270]
mov eax, dword [ebp - 0x1278]
mov ecx, dword [ebp - 0x1284]
mov dword [eax], edx
mov edx, dword [ebp - 0x1258]
mov eax, dword [ebp - 0x128c]
mov dword [ecx], edx
mov ecx, dword [ebp - 0x1260]
mov dword [eax], ecx
mov edx, dword [ebp - 0x125c]
push edx
push str.DoCopyInfDriverFilesToLocal_End__d_
call fcn.100269c0
add esp, 8
mov byte [ebp - 4], 0x10
mov eax, dword [ebp - 0x12c4]
mov ecx, dword [eax]
push eax
push ecx
lea edi, [ebp - 0x1280]
lea esi, [ebp - 0x12c8]
call fcn.1001c1f0
mov eax, dword [ebp - 0x12c4]
push eax
call fcn.10029653
add esp, 4
cmp dword [ebp - 0x12b4], ebx
je 0x10016dae
mov esi, dword [ebp - 0x12b4]
mov edi, dword [ebp - 0x12b0]
mov eax, esi
call fcn.10003140
push esi
call fcn.10029653
add esp, 4
cmp dword [ebp - 0xd74], 8
jb 0x10016dc6
mov ecx, dword [ebp - 0xd88]
push ecx
call fcn.10029653
add esp, 4
mov eax, dword [ebp - 0x12e8]
xor edx, edx
mov dword [ebp - 0xd74], 7
mov dword [ebp - 0xd78], ebx
mov word [ebp - 0xd88], dx
cmp eax, ebx
je 0x10016df2
push eax
call fcn.10029653
add esp, 4
mov esi, dword [ebp - 0x12d8]
cmp esi, ebx
je 0x10016e12
mov edi, dword [ebp - 0x12d4]
mov eax, esi
call fcn.10003140
push esi
call fcn.10029653
add esp, 4
mov esi, dword [ebp - 0x129c]
cmp esi, ebx
je 0x10016e32
mov edi, dword [ebp - 0x1298]
mov eax, esi
call fcn.10003140
push esi
call fcn.10029653
add esp, 4
mov edi, 8
cmp dword [ebp - 0xd90], edi
jb 0x10016e4e
mov eax, dword [ebp - 0xda4]
push eax
call fcn.10029653
add esp, 4
xor ecx, ecx
mov esi, 7
mov dword [ebp - 0xd90], esi
mov dword [ebp - 0xd94], ebx
mov word [ebp - 0xda4], cx
cmp dword [ebp - 0xdac], edi
jb 0x10016e7f
mov edx, dword [ebp - 0xdc0]
push edx
call fcn.10029653
add esp, 4
lea ecx, [ebp - 0x124c]
xor eax, eax
push ecx
mov dword [ebp - 0xdac], esi
mov dword [ebp - 0xdb0], ebx
mov word [ebp - 0xdc0], ax
mov dword [ebp - 4], 0xffffffff
call fcn.10010c70
mov eax, dword [ebp - 0x125c]
jmp 0x10016eb4
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 - 0x14]
xor ecx, ebp
call fcn.10028eba
mov esp, ebp
pop ebp
ret