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

Disassembly:
push ebp
sub esp, 0x4b4
lea ebp, [esp - 4]
mov eax, dword [0x4313f4]
xor eax, ebp
mov dword [ebp + 0x4b4], eax
push 0x6c
mov eax, 0x41b2f7
call fcn.004127a4
mov esi, ecx
lea ecx, [ebp - 0x44]
call fcn.004047d6
and dword [ebp - 4], 0
lea ecx, [ebp + 0x250]
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_]
mov byte [ebp - 4], 1
lea eax, [esi + 0xf8]
push eax
lea ecx, [ebp - 0x6c]
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__]
mov byte [ebp - 4], 2
lea eax, [ebp + 0x250]
push eax
lea eax, [ebp - 0x6c]
push eax
call fcn.004070aa
pop ecx
pop ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x6c]
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 + 0x250]
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 - 0x14], eax
xor eax, eax
push 0x206
push eax
mov word [ebp + 0x2ac], ax
lea eax, [ebp + 0x2ae]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
cmp dword [esi + 0xe4], 0xffffffff
jne 0x405b2f
push dword [ebp - 0x14]
lea eax, [ebp + 0x2ac]
push str._s.log
push 0x104
push eax
call dword [sym.imp.MSVCR90.dll__snwprintf]
add esp, 0x10
jmp 0x405b59
mov ecx, esi
call fcn.004019f7
push eax
push str.TSLOG
push dword [ebp - 0x14]
lea eax, [ebp + 0x2ac]
push str._s_s._s__..log
push 0x104
push eax
call dword [sym.imp.MSVCR90.dll__snwprintf]
add esp, 0x18
lea eax, [ebp]
push eax
lea eax, [ebp + 0x2ac]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea ecx, [ebp + 0x26c]
mov dword [ebp - 0x10], eax
call fcn.00401f11
mov byte [ebp - 4], 3
lea ecx, [ebp + 0x290]
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_]
mov byte [ebp - 4], 4
cmp dword [ebp - 0x10], 0xffffffff
je 0x405d12
push dword [ebp - 0x14]
lea ecx, [ebp + 0x290]
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__]
lea eax, [ebp + 0x2c]
push eax
lea ecx, [ebp + 0x290]
call dword [0x41e318]
cmp dword [esi + 0xe4], 0xffffffff
lea ecx, [ebp + 0x290]
jne 0x405bd6
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 0x405cfd
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.00402158
mov ebx, eax
test ebx, ebx
jl 0x405cfd
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x38]
lea ecx, [ebp - 0x24]
call fcn.004034df
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
jmp 0x405c1f
lea ecx, [ebp - 0x1c]
call fcn.004023a3
lea ecx, [ebp - 0x1c]
cmp ebx, dword [eax]
je 0x405c40
call fcn.004023d1
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x34]
lea ecx, [ebp - 0x2c]
call fcn.004034df
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004022a9
test al, al
je 0x405c0b
jmp 0x405c77
call fcn.004023a3
mov edi, eax
mov eax, dword [edi + 0x24]
add edi, 4
cmp eax, dword [ebp + 0x18]
ja 0x405c5c
jne 0x405c77
mov eax, dword [edi + 0x1c]
cmp eax, dword [ebp + 0x14]
jbe 0x405c77
lea eax, [ebp + 0x290]
push eax
mov ecx, edi
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov eax, dword [ebp + 0x14]
mov dword [edi + 0x1c], eax
mov eax, dword [ebp + 0x18]
mov dword [edi + 0x20], eax
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x34]
lea ecx, [ebp - 0x4c]
call fcn.004034df
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004022a9
test al, al
je 0x405cfd
lea eax, [ebp + 0x290]
push eax
lea ecx, [ebp + 0x26c]
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov eax, dword [ebp + 0x14]
mov dword [ebp + 0x288], eax
mov eax, dword [ebp + 0x18]
sub esp, 0x24
mov dword [ebp + 0x28c], eax
lea eax, [ebp + 0x26c]
mov ecx, esp
mov dword [ebp - 0x50], esp
push eax
call fcn.00401f52
mov byte [ebp - 4], 5
push ebx
lea eax, [ebp - 0x78]
push eax
mov byte [ebp - 4], 4
call fcn.00403574
add esp, 0x2c
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x44]
call fcn.004058ff
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x78]
call fcn.00401f8b
lea eax, [ebp]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405b96
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x38]
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 + 0x2ac]
push ecx
push eax
mov dword [ebp - 0x10], 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.00406d37
add esp, 0x18
cmp edi, dword [esi + 0xe4]
jle 0x405e19
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x34]
lea ecx, [ebp - 0x24]
call fcn.004034df
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x38]
lea ecx, [ebp - 0x2c]
call fcn.004034df
mov eax, dword [ebp - 0x24]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x18], edi
call fcn.00402402
push 0x4021f5
push eax
push edi
push dword [ebp - 0x28]
call fcn.0040575d
mov eax, dword [ebp - 0x10]
sub eax, dword [esi + 0xe4]
add esp, 0x10
add eax, ebx
xor edi, edi
test eax, eax
jle 0x405e19
push edi
lea ecx, [ebp - 0x44]
call fcn.00402280
push edi
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x14], eax
call fcn.00402280
mov ecx, dword [ebp - 0x14]
push dword [ecx]
push dword [eax]
push str.DeleteLogFiles__AllFilesOfPid_:__lu_0x_08x_
push esi
call fcn.00406d37
add esp, 0x10
push edi
lea ecx, [ebp - 0x44]
call fcn.00402280
push dword [eax]
mov ecx, esi
call fcn.00401fac
mov eax, dword [ebp - 0x10]
sub eax, dword [esi + 0xe4]
inc edi
add eax, ebx
cmp edi, eax
jl 0x405dcd
lea ecx, [ebp - 0x44]
call fcn.004054b9
mov byte [ebp - 4], 3
lea ecx, [ebp + 0x290]
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_]
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x26c]
call fcn.00401f33
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x250]
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_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.0040548f
xor eax, eax
inc eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x4b4]
xor ecx, ebp
call fcn.0041276a
add ebp, 0x4b8
leave
ret