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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x504
mov eax, dword [0x418110]
push ebx
push esi
xor ebx, ebx
mov esi, ecx
push edi
lea ecx, [esp + 0x94]
mov dword [esp + 0x50c], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.MSVCP71.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, [esp + 0x30]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea ecx, [esp + 0x94]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.00402e70
add esp, 8
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x94]
call dword [sym.imp.MSVCP71.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 edx, eax
xor eax, eax
mov word [esp + 0x300], bx
mov ecx, 0x81
lea edi, [esp + 0x302]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp dword [esi + 0xe4], 0xffffffff
mov dword [esp + 0xc], edx
jne 0x4048ac
push edx
push str._s.log
lea eax, [esp + 0x308]
push 0x104
push eax
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x10
jmp 0x4048d9
mov ecx, esi
call fcn.00401730
mov ecx, dword [esp + 0xc]
push eax
push str.TSLOG
push ecx
push str._s_s._s__..log
lea edx, [esp + 0x310]
push 0x104
push edx
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x18
lea eax, [esp + 0xb0]
push eax
lea ecx, [esp + 0x304]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
lea ecx, [esp + 0x70]
mov dword [esp + 0x24], edi
call fcn.00401ab0
lea ecx, [esp + 0x54]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
cmp edi, 0xffffffff
je 0x404a70
mov edx, dword [esp + 0xc]
push edx
lea ecx, [esp + 0x58]
call dword [sym.imp.MSVCP71.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, [esp + 0xdc]
push eax
lea ecx, [esp + 0x58]
call dword [0x410244]
cmp dword [esi + 0xe4], 0xffffffff
lea ecx, [esp + 0x54]
jne 0x404951
call dword [sym.imp.MSVCP71.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 0x404a55
call dword [sym.imp.MSVCP71.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.00401b10
test eax, eax
mov dword [esp + 0x10], eax
jl 0x404a55
mov ecx, dword [esp + 0x1c]
cmp ebx, ecx
mov edi, ebx
je 0x4049eb
cmp eax, dword [edi]
je 0x404982
add edi, 0x28
cmp edi, ecx
jne 0x404975
jmp 0x4049eb
mov eax, dword [edi + 0x24]
mov ecx, dword [esp + 0xc8]
cmp eax, ecx
lea ebx, [edi + 4]
jbe 0x4049b6
lea ecx, [esp + 0x54]
push ecx
mov ecx, ebx
call dword [sym.imp.MSVCP71.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 edx, dword [esp + 0xc4]
mov dword [ebx + 0x1c], edx
mov eax, dword [esp + 0xc8]
mov dword [ebx + 0x20], eax
jmp 0x4049e5
jne 0x4049e5
mov ecx, dword [ebx + 0x1c]
cmp ecx, dword [esp + 0xc4]
jbe 0x4049e5
lea edx, [esp + 0x54]
push edx
mov ecx, ebx
call dword [sym.imp.MSVCP71.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 [esp + 0xc4]
mov dword [ebx + 0x1c], eax
mov ecx, dword [esp + 0xc8]
mov dword [ebx + 0x20], ecx
cmp edi, dword [esp + 0x1c]
jne 0x404a51
lea edx, [esp + 0x54]
push edx
lea ecx, [esp + 0x74]
call dword [sym.imp.MSVCP71.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 ecx, dword [esp + 0xc8]
mov eax, dword [esp + 0xc4]
sub esp, 0x24
mov dword [esp + 0xb4], ecx
lea edx, [esp + 0x94]
mov ecx, esp
mov dword [esp + 0x4c], esp
push edx
mov dword [esp + 0xb4], eax
call fcn.00401ad0
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00402820
add esp, 0x2c
push eax
lea ecx, [esp + 0x18]
call fcn.00404760
lea ecx, [esp + 0x2c]
call fcn.00401b00
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
lea edx, [esp + 0xb0]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x404911
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
test ebx, ebx
jne 0x404a7f
xor edi, edi
jmp 0x404a96
mov ecx, dword [esp + 0x1c]
sub ecx, ebx
mov eax, 0x66666667
imul ecx
sar edx, 4
mov edi, edx
shr edi, 0x1f
add edi, edx
mov eax, dword [esi + 0xe8]
xor ecx, ecx
cmp eax, 0xffffffff
sete cl
lea edx, [esp + 0x300]
push edx
push eax
mov eax, dword [esi + 0xe4]
dec ecx
mov dword [esp + 0x14], ecx
add ecx, edi
push ecx
push eax
push str.DeleteLogFile__MaxCountOfHistroyProcess_:__d__CurrentHistroyProcess_:__d__CurrentLogFileHandle_:_0x_08x__PathWildcard_:__s
push esi
call fcn.00401be0
mov ecx, dword [esp + 0x24]
lea eax, [ecx + edi]
mov ecx, dword [esi + 0xe4]
add esp, 0x18
cmp eax, ecx
jle 0x404b60
mov ecx, dword [esp + 0x1c]
sub ecx, ebx
mov eax, 0x66666667
imul ecx
mov ecx, dword [esp + 0x1c]
sar edx, 4
mov eax, edx
shr eax, 0x1f
push 0x401c20
add eax, edx
push eax
push ecx
push ebx
call fcn.00404610
mov edx, dword [esp + 0x1c]
sub edx, dword [esi + 0xe4]
add edx, edi
add esp, 0x10
test edx, edx
mov dword [esp + 0x10], 0
jle 0x404b60
mov eax, dword [ebx]
push eax
push eax
push str.DeleteLogFiles__AllFilesOfPid_:__lu_0x_08x_
push esi
call fcn.00401be0
mov eax, dword [ebx]
add esp, 0x10
push eax
mov ecx, esi
call fcn.00403330
mov ecx, dword [esp + 0xc]
mov edx, dword [esi + 0xe4]
mov eax, dword [esp + 0x10]
sub ecx, edx
inc eax
add ecx, edi
add ebx, 0x28
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x404b22
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x404b87
mov edi, dword [esp + 0x1c]
cmp ebx, edi
mov esi, ebx
je 0x404b7e
mov edi, edi
mov ecx, esi
call fcn.00401b00
add esi, 0x28
cmp esi, edi
jne 0x404b70
push ebx
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
add esp, 4
lea ecx, [esp + 0x54]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x70]
call sub.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_
lea ecx, [esp + 0x94]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, dword [esp + 0x50c]
mov eax, 1
call fcn.0040e783
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret