Function at 0x4065f0
Capabilities:
Delete file
Enumerate files on windows
Get common file path
Open clipboard
Write clipboard data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x984
mov eax, dword [0x479bf0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x97c], ebx
mov dword [ebp - 0x984], eax
mov dword [ebp - 0x980], 0
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edi, eax
test ebx, ebx
je 0x40693f
push esi
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x40693f
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov ecx, ebx
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406650
sub ecx, edx
lea eax, [ecx + 1]
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x4066a7
mov esi, dword [ebp - 0x97c]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, eax
sub ecx, esi
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x406680
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
mov dword [ebp - 0x980], 1
mov ecx, dword [ebp - 0x984]
mov eax, 0x46183c
test ecx, ecx
cmovne eax, ecx
cmp byte [eax], 0
je 0x406917
mov eax, dword [0x48d5dc]
cmp eax, edi
jae 0x406917
sub edi, eax
cmp edi, 0x1f4
jae 0x406917
push 0x104
lea eax, [ebp - 0x388]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x4b4]
push eax
push 0
push 0
push 0x1c
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
push str._s_sTempCopySetting
push 1
lea eax, [ebp - 0x388]
push eax
push 0
call fcn.0040a510
add esp, 0xc
push eax
lea eax, [ebp - 0x4b4]
push eax
push 0x2392
push str.D:MyProjectsProPilotLibMisc.c
push str._s_sTempCopySetting
lea eax, [ebp - 0x25c]
push 0x12c
push eax
call fcn.0040b550
lea eax, [ebp - 0x25c]
push eax
push 0
call fcn.00406ca0
add esp, 0x28
test eax, eax
je 0x406917
push 0x456058
lea eax, [ebp - 0x25c]
push eax
push 0x2396
push str.D:MyProjectsProPilotLibMisc.c
push 0x456058
lea eax, [ebp - 0x130]
push 0x12c
push eax
call fcn.0040b550
push 0
lea eax, [ebp - 0x130]
push eax
lea eax, [ebp - 0x838]
push eax
call fcn.00409e00
mov ecx, eax
lea edx, [ebp - 0x5e0]
add esp, 0x28
sub edx, ecx
nop dword [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4067b0
lea eax, [ebp - 0x978]
push eax
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40682d
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
test byte [ebp - 0x978], 0x10
jne 0x406818
lea eax, [ebp - 0x94c]
push eax
lea eax, [ebp - 0x5e0]
push eax
lea eax, [ebp - 0x70c]
push str._s_s
push eax
call fcn.00401030
add esp, 0x10
lea eax, [ebp - 0x70c]
push eax
call ebx
lea eax, [ebp - 0x978]
push eax
push esi
call edi
test eax, eax
jne 0x4067e4
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push str._s_s
push dword [ebp - 0x984]
lea eax, [ebp - 0x25c]
push eax
push 0x2399
push str.D:MyProjectsProPilotLibMisc.c
push str._s_s
lea eax, [ebp - 0x130]
push 0x12c
push eax
call fcn.0040b550
push 0
push 0
push 2
push 0
push 3
lea eax, [ebp - 0x130]
push 0x40000000
push eax
call fcn.00406f20
mov esi, eax
add esp, 0x3c
cmp esi, 0xffffffff
je 0x406917
mov ebx, dword [ebp - 0x97c]
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406893
push 0
push 0
sub ecx, edx
push ecx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 0x16
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x406917
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x4068fd
lea ecx, [ebp - 0x130]
mov dword [eax], 0x14
mov edx, ecx
sub eax, edx
lea edx, [eax + 0x14]
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4068f0
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
push 0xf
call dword [sym.imp.USER32.dll_SetClipboardData]
mov dword [ebp - 0x980], 1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [0x48d5dc], eax
call dword [sym.imp.USER32.dll_CloseClipboard]
mov eax, dword [ebp - 0x980]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004380f8
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004380f8
mov esp, ebp
pop ebp
ret