Function at 0x402740
Capabilities:
Delete file
Enumerate files on windows
Get common file path

Disassembly:
sub esp, 0x664
mov eax, dword [0x41f00c]
xor eax, esp
mov dword [esp + 0x660], eax
mov eax, dword [esp + 0x668]
push ebx
push esi
mov dword [esp + 0x10], eax
xor ebx, ebx
lea eax, [esp + 0xc]
xor esi, esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
js 0x40298d
lea eax, [esp + 8]
push eax
push esi
push esi
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
js 0x4027aa
lea eax, [esp + 0x154]
push eax
push dword [esp + 0xc]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [esp + 8]
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [esp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
test esi, esi
je 0x40298d
lea esi, [esp + 0x154]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4027c6
sub esi, ecx
lea eax, [esp + 0x154]
push ebp
mov byte [esp + esi + 0x158], 0x5c
inc esi
push esi
push eax
lea eax, [esp + 0x264]
push eax
call fcn.00403b70
mov eax, dword [str..lnk]
add esp, 0xc
mov dword [esp + esi + 0x158], eax
mov ax, word [0x417480]
mov word [esp + esi + 0x15c], ax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x402973
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [esp + 0x44]
sub esi, eax
push edi
lea esi, [esp + esi + 0x260]
lea eax, [esp + 0x48]
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [esi + eax - 1], cl
test cl, cl
jne 0x402844
lea eax, [esp + 0x14]
push eax
push 0x417498
push 1
push 0
push 0x4174b8
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x402937
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edx
push 0x4174a8
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
js 0x402937
push 0x104
lea eax, [esp + 0x46c]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x26c]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x468]
push 0
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov edi, eax
test edi, edi
js 0x4028e5
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x364]
push 0
push 0
push 0x104
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0xc]
mov edi, eax
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
test edi, edi
js 0x402937
push dword [esp + 0x18]
lea eax, [esp + 0x368]
push eax
call fcn.0040915c
add esp, 8
test eax, eax
jne 0x402937
lea eax, [esp + 0x364]
push eax
lea eax, [esp + 0x264]
push eax
push str.path:_s_name:_s_n
call fcn.004029b0
add esp, 0xc
lea eax, [esp + 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
inc ebx
lea eax, [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x402840
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
call dword [sym.imp.ole32.dll_CoUninitialize]
pop edi
pop ebp
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x660]
xor ecx, esp
call fcn.00402c19
add esp, 0x664
ret
pop ebp
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x660]
xor ecx, esp
call fcn.00402c19
add esp, 0x664
ret
mov ecx, dword [esp + 0x668]
mov eax, ebx
pop esi
pop ebx
xor ecx, esp
call fcn.00402c19
add esp, 0x664
ret