Function at 0x566750
Capabilities:
Copy file
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x57a1b2
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x5d52e0]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
xor esi, esi
cmp edi, esi
je 0x566bf1
cmp eax, esi
jne 0x566898
mov ecx, dword [edi + 4]
sub ecx, dword [edi]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x5667c8
mov eax, dword [ebp + 0xc]
xor edi, edi
call fcn.00403330
mov ebx, dword [ebp + 8]
push eax
mov ecx, ebx
call fcn.004015b0
mov edi, dword [ebp + 0xc]
jmp 0x5667cb
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x5667ed
push 0x104
mov ecx, ebx
call fcn.004019b0
mov eax, dword [ebx]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov eax, dword [ebx]
mov ecx, dword [eax - 8]
cmp eax, esi
jne 0x566803
xor eax, eax
jmp 0x566811
push ecx
push eax
call fcn.004ff818
add esp, 8
cmp eax, esi
jl 0x56688e
mov ecx, dword [ebx]
cmp eax, dword [ecx - 8]
jg 0x56688e
mov dword [ecx - 0xc], eax
mov ecx, dword [ebx]
xor edx, edx
mov word [ecx + eax*2], dx
mov eax, dword [ebx]
cmp dword [eax - 0xc], esi
jne 0x5669f6
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x56684e
push 0x104
mov ecx, ebx
call fcn.004019b0
mov eax, dword [ebx]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, dword [ebx]
mov ecx, dword [eax - 8]
cmp eax, esi
jne 0x566869
xor eax, eax
jmp 0x566877
push ecx
push eax
call fcn.004ff818
add esp, 8
cmp eax, esi
jl 0x56688e
mov ecx, dword [ebx]
cmp eax, dword [ecx - 8]
jg 0x56688e
mov dword [ecx - 0xc], eax
mov ecx, dword [ebx]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x5669f6
push 0x80070057
call fcn.004010a0
cmp eax, 1
jne 0x5669f3
mov ebx, dword [edi]
cmp ebx, dword [edi + 4]
je 0x5669f3
lea esp, [esp]
call fcn.0040c84f
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
je 0x566b0d
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x4c], esi
call fcn.004015b0
mov esi, dword [esp + 0x10]
mov eax, dword [esi - 8]
mov edi, dword [ebx]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x566911
push 0x104
lea ecx, [esp + 0x14]
call fcn.004019b0
mov esi, dword [esp + 0x10]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004ff818
add esp, 8
test eax, eax
js 0x56688e
cmp eax, dword [esi - 8]
jg 0x56688e
mov dword [esi - 0xc], eax
xor edx, edx
push ecx
mov word [esi + eax*2], dx
add esi, 0xfffffff0
mov dword [esp + 0x1c], esp
mov edi, esp
push esi
call fcn.00401a10
add eax, 0x10
mov dword [edi], eax
lea eax, [esp + 0x1c]
add esp, 4
push eax
call fcn.00531490
add esp, 8
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x4c], 1
call fcn.004015b0
mov byte [esp + 0x48], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5669a0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x10]
mov eax, dword [ebx]
push 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebx
call fcn.004015b0
lea eax, [esi - 0x10]
mov dword [esp + 0x48], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x5669e0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 0xc]
add ebx, 0x1c
xor esi, esi
cmp ebx, dword [ecx + 4]
jne 0x5668b0
mov edi, ecx
mov ebx, dword [ebp + 8]
mov ecx, dword [edi + 4]
sub ecx, dword [edi]
mov ebx, dword [ebx]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov edi, edx
shr edi, 0x1f
push ebx
add edi, edx
call dword [sym.imp.SHELL32.dll_ILCreateFromPathW]
lea edx, [esp + 0x10]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x10], esi
push edx
lea esi, [esp + 0x30]
mov dword [esp + 0x18], eax
call fcn.00407690
xor eax, eax
mov dword [esp + 0x48], 2
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
lea esi, [esp + 0x20]
call fcn.00407690
mov ecx, dword [ebp + 0xc]
mov byte [esp + 0x48], 3
mov ebx, dword [ecx]
mov edx, ecx
cmp ebx, dword [edx + 4]
je 0x566add
mov eax, dword [esp + 0x30]
sub eax, dword [esp + 0x2c]
sar eax, 2
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, ebx
sub ecx, eax
mov eax, 0x92492493
imul ecx
mov eax, dword [ebx]
add edx, ecx
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
cmp dword [esp + 0x10], esi
jbe 0x566b53
push eax
call dword [sym.imp.SHELL32.dll_ILCreateFromPathW]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x20]
mov dword [ecx + esi*4], eax
mov eax, dword [esp + 0x1c]
sub edx, eax
sar edx, 2
cmp edx, esi
jbe 0x566b53
mov ecx, dword [ecx + esi*4]
mov edx, dword [ebp + 0xc]
add ebx, 0x1c
mov dword [eax + esi*4], ecx
cmp ebx, dword [edx + 4]
jne 0x566a81
mov eax, dword [esp + 0x14]
mov ebx, dword [sym.imp.SHELL32.dll_SHChangeNotify]
push 0
push eax
push 0x3000
push 0x1000
call ebx
xor esi, esi
test edi, edi
jle 0x566b3a
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x1c]
sar eax, 2
mov dword [esp + 0x10], eax
jmp 0x566b1b
push 0x80004005
call fcn.004010a0
mov eax, dword [esp + 0x10]
cmp eax, esi
jbe 0x566b53
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + esi*4]
push 0
push edx
push 0x3000
push 0x2000
call ebx
inc esi
cmp esi, edi
jl 0x566b17
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
sub eax, esi
sar eax, 2
test eax, eax
jne 0x566b5d
push str.invalid_vector_T__subscript
call fcn.0051b845
push 0
push esi
push edi
mov edi, dword [esp + 0x20]
push edi
call dword [sym.imp.SHELL32.dll_SHOpenFolderAndSelectItems]
push edi
call dword [sym.imp.SHELL32.dll_ILFree]
mov eax, dword [ebp + 0xc]
mov edi, dword [eax]
mov ebx, dword [esp + 0x2c]
cmp edi, dword [eax + 4]
je 0x566bd7
mov ecx, dword [esp + 0x30]
sub ecx, ebx
sar ecx, 2
mov dword [esp + 0x10], ecx
jmp 0x566b92
mov eax, ecx
mov eax, dword [eax]
mov ecx, edi
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
cmp dword [esp + 0x10], esi
jbe 0x566b53
cmp dword [ebx + esi*4], 0
je 0x566bc1
mov eax, dword [ebx + esi*4]
push eax
call dword [sym.imp.SHELL32.dll_ILFree]
mov ecx, dword [ebp + 0xc]
add edi, 0x1c
mov dword [ebx + esi*4], 0
cmp edi, dword [ecx + 4]
jne 0x566b90
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x566be4
push esi
call fcn.0040c6ec
add esp, 4
test ebx, ebx
je 0x566bf1
push ebx
call fcn.0040c6ec
add esp, 4
mov eax, 0x20
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret