Function at 0x40f840
Capabilities:
Delete file
Enumerate files on windows
Set file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4265e4
push eax
mov dword fs:[0], esp
sub esp, 0x284
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2a0]
test esi, esi
push edi
je 0x40f8fd
cmp word [esi], 0
je 0x40f8fd
mov al, byte [esp + 0x23]
push 0
lea ecx, [esp + 0x14]
mov byte [esp + 0x14], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push esi
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
lea ecx, [esp + 0x10]
push eax
push esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x29c], 0
test eax, eax
je 0x40f8df
lea ecx, [esp + 0x10]
push ecx
call fcn.004028b0
mov edx, dword [esp + 0x1c]
add esp, 4
lea ecx, [eax + edx*2]
cmp eax, ecx
je 0x40f8df
cmp word [eax], 0x5c
jne 0x40f8d8
mov word [eax], 0x2f
add eax, 2
cmp eax, ecx
jne 0x40f8cd
cmp dword [esp + 0x18], 3
ja 0x40f918
push 1
lea ecx, [esp + 0x14]
mov dword [esp + 0x2a0], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
xor al, al
mov ecx, dword [esp + 0x294]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x290
ret
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40f925
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push eax
call fcn.0040f270
add esp, 4
test al, al
je 0x40f8e6
mov ecx, dword [esp + 0x18]
lea esi, [ecx - 1]
cmp ecx, esi
jb 0x40f95c
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40f95c
lea ecx, [esp + 0x10]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Freeze_void_]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
lea eax, [eax + esi*2]
jmp 0x40f961
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
cmp word [eax], 0x2f
je 0x40f9b7
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov eax, dword [edx]
sub eax, ecx
cmp eax, 1
ja 0x40f980
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [esp + 0x18]
lea esi, [ecx + 1]
push 0
push esi
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x40f9b7
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push 1
push 0x2f
lea eax, [edx + ecx*2]
push eax
call fcn.00406b90
add esp, 0xc
lea ecx, [esp + 0x10]
push esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Eos_unsigned_int_]
lea eax, [esp + 0x10]
push 0x4308d8
lea ecx, [esp + 0x38]
push eax
push ecx
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
add esp, 0xc
mov eax, dword [esp + 0x38]
mov byte [esp + 0x29c], 1
test eax, eax
jne 0x40f9e3
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
lea edx, [esp + 0x44]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40fa0f
push 1
lea ecx, [esp + 0x38]
mov byte [esp + 0x2a0], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
jmp 0x40f8e6
mov bl, byte [esp + 0x2a8]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp word [esp + 0x70], 0x2e
je 0x40fae4
lea eax, [esp + 0x70]
lea ecx, [esp + 0x10]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
add esp, 0xc
mov al, byte [esp + 0x44]
mov byte [esp + 0x29c], 2
test al, 0x10
je 0x40fa79
test bl, bl
je 0x40fa79
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x40fa66
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push eax
call fcn.0040f4c0
add esp, 4
test al, al
je 0x40fb2a
jmp 0x40faa6
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x40fa86
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push 0x80
push eax
call edi
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x40fa9b
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push eax
call ebp
test eax, eax
je 0x40fb5e
mov ecx, dword [esp + 0x28]
xor edx, edx
cmp ecx, edx
mov byte [esp + 0x29c], 1
je 0x40fad8
mov al, byte [ecx - 1]
test al, al
je 0x40faca
cmp al, 0xff
je 0x40faca
dec al
mov byte [ecx - 1], al
jmp 0x40fad8
add ecx, 0xfffffffe
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
xor edx, edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
lea eax, [esp + 0x44]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40fa22
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x38]
xor esi, esi
cmp ecx, esi
je 0x40fbcb
mov al, byte [ecx - 1]
test al, al
je 0x40fbbf
cmp al, 0xff
je 0x40fbbf
dec al
mov byte [ecx - 1], al
jmp 0x40fbcb
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 1
lea ecx, [esp + 0x28]
mov byte [esp + 0x2a0], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x38]
mov byte [esp + 0x2a0], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
jmp 0x40f8e6
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 1
lea ecx, [esp + 0x28]
mov byte [esp + 0x2a0], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x38]
mov byte [esp + 0x2a0], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x40f8fd
mov al, byte [ecx - 1]
test al, al
je 0x40fbae
cmp al, 0xff
je 0x40fbae
dec al
mov byte [ecx - 1], al
jmp 0x40f8fd
add ecx, 0xfffffffe
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
jmp 0x40f8fd
add ecx, 0xfffffffe
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x38], esi
cmp ecx, esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
je 0x40fc02
mov al, byte [ecx - 1]
test al, al
je 0x40fbf6
cmp al, 0xff
je 0x40fbf6
dec al
mov byte [ecx - 1], al
mov al, 1
jmp 0x40f8ff
add ecx, 0xfffffffe
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov al, 1
jmp 0x40f8ff