Function at 0x40ff47
Capabilities:
Delete file
Enumerate files on windows

Disassembly:
push ebp
lea ebp, [esp - 0x4a4]
sub esp, 0x524
mov eax, dword [0x4490e8]
xor eax, ebp
mov dword [ebp + 0x4a0], eax
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x4c]
call fcn.0040f61e
lea ecx, [ebp + 0x23c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
lea eax, [esi + 0xf8]
push eax
lea ecx, [ebp - 0x74]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea eax, [ebp + 0x23c]
push eax
lea eax, [ebp - 0x74]
push eax
call fcn.0040d90a
pop ecx
pop ecx
lea ecx, [ebp - 0x74]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp + 0x23c]
call dword [sym.imp.MSVCP90.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
mov dword [ebp - 0x1c], eax
xor eax, eax
push 0x206
push eax
mov word [ebp + 0x298], ax
lea eax, [ebp + 0x29a]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
cmp dword [esi + 0xe4], 0xffffffff
jne 0x40fffb
push dword [ebp - 0x1c]
lea eax, [ebp + 0x298]
push str._s.log
push 0x104
push eax
call dword [sym.imp.MSVCR90.dll__snwprintf]
add esp, 0x10
jmp 0x410025
mov ecx, esi
call fcn.0040dcad
push eax
push str.TSLOG
push dword [ebp - 0x1c]
lea eax, [ebp + 0x298]
push str._s_s._s__..log
push 0x104
push eax
call dword [sym.imp.MSVCR90.dll__snwprintf]
add esp, 0x18
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0x298]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea ecx, [ebp + 0x258]
mov dword [ebp - 0x18], eax
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
lea ecx, [ebp + 0x27c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
cmp dword [ebp - 0x18], 0xffffffff
je 0x4101c8
push dword [ebp - 0x1c]
lea ecx, [ebp + 0x27c]
call dword [0x434304]
lea eax, [ebp + 0x18]
push eax
lea ecx, [ebp + 0x27c]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
cmp dword [esi + 0xe4], 0xffffffff
lea ecx, [ebp + 0x27c]
jne 0x41009b
call dword [sym.imp.MSVCP90.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4101b3
call dword [sym.imp.MSVCP90.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
mov ecx, esi
call fcn.0040e3b1
mov ebx, eax
test ebx, ebx
jl 0x4101b3
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x40]
lea ecx, [ebp - 0x2c]
call fcn.0040eeae
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x20], eax
jmp 0x4100e4
lea ecx, [ebp - 0x24]
call fcn.0040e551
lea ecx, [ebp - 0x24]
cmp ebx, dword [eax]
je 0x410105
call fcn.0040e57f
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x34]
call fcn.0040eeae
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x24]
call fcn.0040e4a3
test al, al
je 0x4100d0
jmp 0x41013c
call fcn.0040e551
mov edi, eax
mov eax, dword [edi + 0x24]
add edi, 4
cmp eax, dword [ebp + 4]
ja 0x410121
jne 0x41013c
mov eax, dword [edi + 0x1c]
cmp eax, dword [ebp]
jbe 0x41013c
lea eax, [ebp + 0x27c]
push eax
mov ecx, edi
call dword [0x43431c]
mov eax, dword [ebp]
mov dword [edi + 0x1c], eax
mov eax, dword [ebp + 4]
mov dword [edi + 0x20], eax
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x54]
call fcn.0040eeae
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x24]
call fcn.0040e4a3
test al, al
je 0x4101b3
lea eax, [ebp + 0x27c]
push eax
lea ecx, [ebp + 0x258]
call dword [0x43431c]
mov eax, dword [ebp]
mov dword [ebp + 0x274], eax
mov eax, dword [ebp + 4]
sub esp, 0x24
mov dword [ebp + 0x278], eax
lea eax, [ebp + 0x258]
mov ecx, esp
mov dword [ebp - 0x58], esp
push eax
call fcn.0040e1da
lea eax, [ebp - 0x80]
push ebx
push eax
call fcn.0040eef3
add esp, 0x2c
push eax
lea ecx, [ebp - 0x4c]
call fcn.0040feed
lea ecx, [ebp - 0x7c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x41005b
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x40]
push 0x28
pop ecx
cdq
idiv ecx
xor ecx, ecx
mov ebx, eax
mov eax, dword [esi + 0xe8]
cmp eax, 0xffffffff
sete cl
dec ecx
mov edi, ecx
lea ecx, [ebp + 0x298]
push ecx
push eax
mov dword [ebp - 0x18], edi
add edi, ebx
push edi
push dword [esi + 0xe4]
push str.DeleteLogFile__MaxCountOfHistroyProcess_:__d__CurrentHistroyProcess_:__d__CurrentLogFileHandle_:_0x_08x__PathWildcard_:__s
push esi
call fcn.0041164c
add esp, 0x18
cmp edi, dword [esi + 0xe4]
jle 0x4102cf
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x2c]
call fcn.0040eeae
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x40]
lea ecx, [ebp - 0x34]
call fcn.0040eeae
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x20], edi
call fcn.0040e5b0
push 0x40e44e
push eax
push edi
push dword [ebp - 0x30]
call fcn.0040fd92
mov eax, dword [ebp - 0x18]
sub eax, dword [esi + 0xe4]
add esp, 0x10
add eax, ebx
xor edi, edi
test eax, eax
jle 0x4102cf
push edi
lea ecx, [ebp - 0x4c]
call fcn.0040e47a
push edi
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x1c], eax
call fcn.0040e47a
mov ecx, dword [ebp - 0x1c]
push dword [ecx]
push dword [eax]
push str.DeleteLogFiles__AllFilesOfPid_:__lu_0x_08x_
push esi
call fcn.0041164c
add esp, 0x10
push edi
lea ecx, [ebp - 0x4c]
call fcn.0040e47a
push dword [eax]
mov ecx, esi
call fcn.0040e205
mov eax, dword [ebp - 0x18]
sub eax, dword [esi + 0xe4]
inc edi
add eax, ebx
cmp edi, eax
jl 0x410283
lea ecx, [ebp - 0x4c]
call fcn.0040fae7
lea ecx, [ebp + 0x27c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [ebp + 0x258]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [ebp + 0x23c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [ebp - 0x4c]
call fcn.0040fabf
mov ecx, dword [ebp + 0x4a0]
pop edi
xor eax, eax
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.00425cba
add ebp, 0x4a4
leave
ret