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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5af055
mov eax, dword fs:[0]
push eax
mov eax, 0x1640
call fcn.0056e430
mov eax, dword [0x608554]
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 edi, edx
mov dword [ebp - 0x13d4], ecx
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x13ec], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x13f0], eax
mov eax, dword [ebp + 0x1c]
push str.DoCopyInfDriverFilesToLocal_Start
mov dword [ebp - 0x142c], esi
mov dword [ebp - 0x1428], eax
call fcn.0054c5b0
add esp, 4
test edi, edi
je 0x541b85
test ebx, ebx
je 0x541b85
test esi, esi
je 0x541b85
cmp dword [ebp - 0x13ec], 0
je 0x541b85
mov esi, dword [ebp + 0x10]
test esi, 0xfffffffc
jne 0x541b85
lea ecx, [ebp - 0x13b8]
call fcn.0053e610
push 0x5c6930
lea ecx, [ebp - 0x1190]
mov dword [ebp - 4], 0
call fcn.00402ed0
push 0x5c6930
lea ecx, [ebp - 0x11a8]
mov byte [ebp - 4], 1
call fcn.00402ed0
mov dword [ebp - 0x1400], 0
mov dword [ebp - 0x13fc], 0
mov dword [ebp - 0x13f8], 0
mov dword [ebp - 0x1438], 0
mov dword [ebp - 0x1434], 0
mov dword [ebp - 0x1430], 0
mov dword [ebp - 0x140c], 0
mov dword [ebp - 0x1408], 0
mov dword [ebp - 0x1404], 0
xor eax, eax
mov dword [ebp - 0x13e4], 0
mov dword [ebp - 0x1168], 0
mov dword [ebp - 0x1164], 7
mov word [ebp - 0x1178], ax
mov dword [ebp - 0x1418], eax
mov dword [ebp - 0x1414], eax
mov dword [ebp - 0x1410], eax
mov byte [ebp - 4], 7
mov dword [ebp - 0x13dc], eax
mov dword [ebp - 0x13d8], eax
call fcn.00403dd0
mov dword [ebp - 0x13dc], eax
push 0x410
lea eax, [ebp - 0x10d0]
mov byte [ebp - 4], 8
push 0
push eax
call fcn.00571c00
push edi
lea eax, [ebp - 0x10d0]
push 0x208
push eax
call fcn.005746e6
add esp, 0x18
mov edi, dword [ebp - 0x13d4]
lea eax, [ebp - 0x13dc]
push eax
lea eax, [ebp - 0x1418]
push eax
lea eax, [ebp - 0x11a8]
push eax
lea eax, [ebp - 0x1190]
push eax
lea eax, [ebp - 0x1178]
push eax
lea eax, [ebp - 0x140c]
push eax
lea eax, [ebp - 0x1438]
push eax
lea eax, [ebp - 0x1400]
push eax
push dword [ebp + 0x24]
lea eax, [ebp - 0x10d0]
push dword [ebp + 0x20]
push esi
push eax
push edi
call fcn.0053ece0
mov esi, eax
mov dword [ebp - 0x13cc], esi
test esi, esi
jne 0x541a23
push 0x208
push eax
lea eax, [ebp - 0xcc0]
push eax
call fcn.00571c00
push 0x208
lea eax, [ebp - 0x4a0]
push esi
push eax
call fcn.00571c00
push 0x208
lea eax, [ebp - 0x6a8]
push esi
push eax
call fcn.00571c00
push 0x208
lea eax, [ebp - 0x298]
push esi
push eax
call fcn.00571c00
push 0x40
lea eax, [ebp - 0x90]
push esi
push eax
call fcn.00571c00
push 0x208
lea eax, [ebp - 0x8b0]
push esi
push eax
call fcn.00571c00
add esp, 0x48
lea eax, [ebp - 0xab8]
push 0x208
push esi
push eax
call fcn.00571c00
push 0x40
lea eax, [ebp - 0x50]
push esi
push eax
call fcn.00571c00
push 0x20
lea eax, [ebp - 0x50]
mov dword [ebp - 0x1424], esi
push eax
push 0x104
lea eax, [ebp - 0xab8]
mov dword [ebp - 0x13d4], esi
push eax
push 0x104
lea eax, [ebp - 0x8b0]
mov dword [ebp - 0x13f4], esi
push eax
push 0x20
lea eax, [ebp - 0x90]
push eax
push edi
call fcn.00580f0a
push esi
push esi
lea eax, [ebp - 0x8b0]
push eax
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0xcc0]
push 0x104
push eax
call fcn.00580cd3
add esp, 0x54
lea eax, [ebp - 0x4a0]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push eax
call ebx
lea eax, [ebp - 0x4a0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x298]
push eax
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0xab8]
push eax
lea eax, [ebp - 0x298]
push eax
call esi
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x298]
push eax
call esi
push 0
lea eax, [ebp - 0x298]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov eax, dword [ebp - 0x13f0]
xor ebx, ebx
mov ecx, dword [ebp - 0x13fc]
mov edi, dword [ebp - 0x1400]
sub ecx, edi
mov dword [ebp - 0x13c4], ebx
mov dword [eax], 0
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x410
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov eax, dword [ebp - 0x1438]
mov esi, dword [ebp - 0x140c]
mov dword [ebp - 0x13e0], eax
mov eax, dword [ebp - 0x1418]
mov dword [ebp - 0x13c8], ecx
mov dword [ebp - 0x13e8], eax
cmp edi, dword [ebp - 0x13fc]
je 0x5419ff
lea eax, [ecx + 0x208]
mov dword [ebp - 0x13c0], ecx
mov dword [ebp - 0x13bc], eax
cmp dword [ebp - 0x13cc], 0
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
jne 0x5419f3
push edi
lea ecx, [ebp - 0x1118]
call fcn.00402f40
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x10e8]
push dword [ebp - 0x13e0]
call fcn.00402f40
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x1130]
push dword [ebp - 0x13e8]
call fcn.00402f40
xor eax, eax
mov dword [ebp - 0x10f0], 0
mov dword [ebp - 0x10ec], 7
mov word [ebp - 0x1100], ax
mov byte [ebp - 4], 0xc
mov eax, dword [esi]
mov dword [ebp - 0x13d0], eax
cmp eax, 0xffffffff
je 0x541458
cmp esi, dword [ebp - 0x1408]
je 0x541458
call fcn.0052ee40
push dword [ebp - 0x1428]
call fcn.00534e60
mov ebx, eax
call fcn.0054c7a0
lea ecx, [ebp - 0x1100]
push ecx
push ebx
mov eax, dword [eax]
push dword [ebp - 0x13d0]
mov eax, dword [eax*4 + 0x5c6770]
call eax
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x54146a
push 0
push 0x5c6930
lea ecx, [ebp - 0x1100]
call fcn.004035d0
cmp dword [ebp - 0x1104], 8
lea ecx, [ebp - 0x1118]
lea eax, [ebp - 0x1130]
cmovae ecx, dword [ebp - 0x1118]
cmp dword [ebp - 0x111c], 8
push ecx
cmovae eax, dword [ebp - 0x1130]
push eax
lea eax, [ebp - 0xcc0]
push eax
lea eax, [ebp - 0x6a8]
push 0x5d09a4
push eax
call ebx
add esp, 0x14
cmp dword [ebp - 0x10d8], 0
jne 0x5414cb
cmp dword [ebp - 0x1104], 8
lea eax, [ebp - 0x1118]
cmovae eax, dword [ebp - 0x1118]
jmp 0x5414df
cmp dword [ebp - 0x10d4], 8
lea eax, [ebp - 0x10e8]
cmovae eax, dword [ebp - 0x10e8]
push eax
lea eax, [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x298]
push 0x5c70f4
push eax
call ebx
add esp, 0x10
mov dword [ebp - 0x1444], 0
mov dword [ebp - 0x1440], 0
mov dword [ebp - 0x143c], 0
mov byte [ebp - 4], 0xd
mov ecx, dword [ebp - 0x13dc]
mov eax, dword [ecx]
mov dword [ebp - 0x13d0], eax
cmp eax, ecx
je 0x5416c7
lea ebx, [eax + 0x10]
push ebx
lea ecx, [ebp - 0x1148]
call fcn.00402f40
lea eax, [ebx + 0x18]
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0x1160]
call fcn.00402f40
cmp dword [ebp - 0x1104], 8
lea eax, [ebp - 0x1118]
push dword [ebp - 0x1108]
cmovae eax, dword [ebp - 0x1118]
lea ecx, [ebp - 0x1148]
cmp dword [ebp - 0x1134], 8
mov ebx, dword [ebp - 0x1148]
mov edx, dword [ebp - 0x1138]
cmovae ecx, ebx
push eax
call fcn.00404b20
add esp, 8
test eax, eax
jne 0x541601
cmp dword [ebp - 0x1134], 8
lea ecx, [ebp - 0x1148]
lea eax, [ebp - 0x1160]
cmovae ecx, ebx
cmp dword [ebp - 0x114c], 8
push ecx
cmovae eax, dword [ebp - 0x1160]
push eax
push 0x5c70f4
push 0x104
lea eax, [ebp - 0x6a8]
push 0x104
push eax
call fcn.00437f50
lea eax, [ebp - 0x6a8]
push eax
push str.szSrcFile:__s
call fcn.0054c5b0
lea eax, [ebp - 0x298]
push eax
push str.szDstFile:__s
call fcn.0054c5b0
mov ebx, dword [ebp - 0x1148]
add esp, 0x28
mov edx, dword [ebp - 0x114c]
cmp edx, 8
jb 0x541647
mov ecx, dword [ebp - 0x1160]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x541637
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x541ba6
push edx
push ecx
call fcn.0056deb6
mov ebx, dword [ebp - 0x1148]
add esp, 8
xor eax, eax
mov byte [ebp - 4], 0xd
mov word [ebp - 0x1160], ax
mov eax, dword [ebp - 0x1134]
mov dword [ebp - 0x1150], 0
mov dword [ebp - 0x114c], 7
cmp eax, 8
jb 0x5416a2
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x541698
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x541ba6
push ecx
push ebx
call fcn.0056deb6
add esp, 8
push ecx
lea eax, [ebp - 0x141c]
push eax
lea ecx, [ebp - 0x13d0]
call fcn.00402c90
mov eax, dword [ebp - 0x13d0]
cmp eax, dword [ebp - 0x13dc]
jne 0x541530
lea eax, [ebp - 0x298]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x541770
cmp dword [ebp - 0x13c8], 0
mov ebx, dword [ebp - 0x13c0]
je 0x541843
push 0x208
push 0
push ebx
call fcn.00571c00
push 0x208
push 0
push dword [ebp - 0x13bc]
call fcn.00571c00
add esp, 0x18
lea eax, [ebp - 0x1100]
cmp dword [ebp - 0x10ec], 8
cmovae eax, dword [ebp - 0x1100]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [ebp - 0x10d4], 8
lea eax, [ebp - 0x10e8]
cmovae eax, dword [ebp - 0x10e8]
push eax
push dword [ebp - 0x13bc]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
inc dword [ebp - 0x13c4]
add ebx, 0x410
add dword [ebp - 0x13bc], 0x410
mov dword [ebp - 0x13c0], ebx
jmp 0x54186d
lea eax, [ebp - 0x13f4]
push eax
lea eax, [ebp - 0x13d4]
push eax
lea eax, [ebp - 0x1424]
push eax
lea eax, [ebp - 0x1420]
push eax
lea eax, [ebp - 0x6a8]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetFileCompressionInfoW]
test eax, eax
jne 0x541861
lea eax, [ebp - 0x13f4]
push eax
lea eax, [ebp - 0x298]
push eax
push dword [ebp - 0x1420]
call dword [sym.imp.SETUPAPI.dll_SetupDecompressOrCopyFileW]
test eax, eax
jne 0x541861
mov eax, dword [ebp - 0x13e4]
add eax, dword [ebp - 0x13d4]
cmp dword [ebp - 0x13c8], 0
mov ebx, dword [ebp - 0x13c0]
mov dword [ebp - 0x13e4], eax
je 0x541843
push 0x208
push 0
push ebx
call fcn.00571c00
push 0x208
push 0
push dword [ebp - 0x13bc]
call fcn.00571c00
add esp, 0x18
lea eax, [ebp - 0x1100]
cmp dword [ebp - 0x10ec], 8
cmovae eax, dword [ebp - 0x1100]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [ebp - 0x10d4], 8
lea eax, [ebp - 0x10e8]
cmovae eax, dword [ebp - 0x10e8]
push eax
push dword [ebp - 0x13bc]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
inc dword [ebp - 0x13c4]
add ebx, 0x410
add dword [ebp - 0x13bc], 0x410
mov dword [ebp - 0x13c0], ebx
jmp 0x54186d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x13cc], eax
lea ecx, [ebp - 0x1444]
call fcn.00409b00
mov byte [ebp - 4], 0xb
mov edx, dword [ebp - 0x10ec]
cmp edx, 8
jb 0x5418bc
mov ecx, dword [ebp - 0x1100]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5418b2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x541ba6
push edx
push ecx
call fcn.0056deb6
add esp, 8
mov byte [ebp - 4], 0xa
xor eax, eax
mov edx, dword [ebp - 0x111c]
mov word [ebp - 0x1100], ax
mov dword [ebp - 0x10ec], 7
mov dword [ebp - 0x10f0], eax
cmp edx, 8
jb 0x541919
mov ecx, dword [ebp - 0x1130]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x54190f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x541ba6
push edx
push ecx
call fcn.0056deb6
add esp, 8
mov byte [ebp - 4], 9
xor eax, eax
mov edx, dword [ebp - 0x10d4]
mov word [ebp - 0x1130], ax
mov dword [ebp - 0x111c], 7
mov dword [ebp - 0x1120], eax
cmp edx, 8
jb 0x541976
mov ecx, dword [ebp - 0x10e8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x54196c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x541ba6
push edx
push ecx
call fcn.0056deb6
add esp, 8
mov byte [ebp - 4], 8
xor eax, eax
mov edx, dword [ebp - 0x1104]
mov word [ebp - 0x10e8], ax
mov dword [ebp - 0x10d4], 7
mov dword [ebp - 0x10d8], eax
cmp edx, 8
jb 0x5419d3
mov ecx, dword [ebp - 0x1118]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5419c9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x541ba6
push edx
push ecx
call fcn.0056deb6
add esp, 8
add dword [ebp - 0x13e0], 0x18
add edi, 0x18
add dword [ebp - 0x13e8], 0x18
add esi, 4
cmp edi, dword [ebp - 0x13fc]
jne 0x54139e
mov ecx, dword [ebp - 0x13c8]
mov ebx, dword [ebp - 0x13c4]
mov edx, dword [ebp - 0x142c]
mov eax, dword [ebp - 0x13e4]
mov esi, dword [ebp - 0x13cc]
mov dword [edx], eax
mov eax, dword [ebp - 0x13f0]
mov dword [eax], ecx
mov eax, dword [ebp - 0x13ec]
mov dword [eax], ebx
push esi
push str.DoCopyInfDriverFilesToLocal_End__d_
call fcn.0054c5b0
mov eax, dword [ebp - 0x13dc]
lea ecx, [ebp - 0x13dc]
add esp, 8
push eax
push dword [eax]
lea eax, [ebp - 0x141c]
push eax
call fcn.00403990
push 0x40
push dword [ebp - 0x13dc]
call fcn.0056deb6
add esp, 8
lea ecx, [ebp - 0x1418]
call fcn.00409b00
mov edx, dword [ebp - 0x1164]
cmp edx, 8
jb 0x541aa7
mov ecx, dword [ebp - 0x1178]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x541a9d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x541ba6
push edx
push ecx
call fcn.0056deb6
add esp, 8
mov edx, dword [ebp - 0x140c]
test edx, edx
je 0x541ae4
mov ecx, dword [ebp - 0x1404]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x541ada
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x541bab
push ecx
push edx
call fcn.0056deb6
add esp, 8
lea ecx, [ebp - 0x1438]
call fcn.00409b00
lea ecx, [ebp - 0x1400]
call fcn.00409b00
mov edx, dword [ebp - 0x1194]
cmp edx, 8
jb 0x541b3a
mov ecx, dword [ebp - 0x11a8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x541b30
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x541bb0
push edx
push ecx
call fcn.0056deb6
add esp, 8
mov edx, dword [ebp - 0x117c]
cmp edx, 8
jb 0x541b76
mov ecx, dword [ebp - 0x1190]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x541b6c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x541bb5
push edx
push ecx
call fcn.0056deb6
add esp, 8
lea ecx, [ebp - 0x13b8]
call fcn.0053e6f0
mov eax, esi
jmp 0x541b8a
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.0056d977
mov esp, ebp
pop ebp
ret
call fcn.00574908
call fcn.00574908
call fcn.00574908
call fcn.00574908
int3