Function at 0x4066c0
Capabilities:
Access peb ldr_data
Delete file
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x415e09
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x508
mov eax, dword [0x4251a4]
push ebx
xor ebx, ebx
push esi
xor eax, ebp
mov dword [esp + 0x14], ebx
mov dword [esp + 0x508], eax
push edi
mov esi, ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x51c], ebx
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__::constructor_void_]
mov byte [esp + 0x51c], 1
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__]
mov byte [esp + 0x51c], 2
lea ecx, [esp + 0x94]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.00403e70
add esp, 8
mov byte [esp + 0x51c], 1
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 0x4067b2
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 0x4067df
mov ecx, esi
call fcn.00401e20
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 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_]
mov byte [esp + 0x51c], 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__::constructor_void_]
mov byte [esp + 0x51c], 5
cmp edi, 0xffffffff
je 0x4069c2
jmp 0x406830
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 [0x4182f0]
cmp dword [esi + 0xe4], 0xffffffff
lea ecx, [esp + 0x54]
jne 0x406870
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 0x4069a7
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.004022e0
test eax, eax
mov dword [esp + 0x10], eax
jl 0x4069a7
mov ecx, dword [esp + 0x1c]
cmp ebx, ecx
mov edi, ebx
je 0x40690e
cmp eax, dword [edi]
je 0x4068a1
add edi, 0x28
cmp edi, ecx
jne 0x406894
jmp 0x40690e
mov eax, dword [edi + 0x24]
mov ecx, dword [esp + 0xc8]
cmp eax, ecx
lea ebx, [edi + 4]
jbe 0x4068d5
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 0x406904
jne 0x406904
mov ecx, dword [ebx + 0x1c]
cmp ecx, dword [esp + 0xc4]
jbe 0x406904
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 0x4069a3
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.00402240
mov byte [esp + 0x540], 6
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x54]
push ecx
mov byte [esp + 0x548], 5
call fcn.00403790
add esp, 0x2c
mov byte [esp + 0x51c], 7
push eax
lea ecx, [esp + 0x18]
call fcn.00406520
mov byte [esp + 0x51c], 5
lea edx, [esp + 0x30]
mov dword [esp + 0x28], edx
mov byte [esp + 0x51c], 5
mov ecx, edx
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 ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
lea eax, [esp + 0xb0]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x406830
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
test ebx, ebx
jne 0x4069d1
xor edi, edi
jmp 0x4069e8
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.004023c0
mov ecx, dword [esp + 0x24]
lea eax, [ecx + edi]
mov ecx, dword [esi + 0xe4]
add esp, 0x18
cmp eax, ecx
jle 0x406ab2
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 0x402400
add eax, edx
push eax
push ecx
push ebx
call fcn.004063c0
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 0x406ab2
mov eax, dword [ebx]
push eax
push eax
push str.DeleteLogFiles__AllFilesOfPid_:__lu_0x_08x_
push esi
call fcn.004023c0
mov eax, dword [ebx]
add esp, 0x10
push eax
mov ecx, esi
call fcn.00404350
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 0x406a74
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x406b01
mov edi, dword [esp + 0x1c]
cmp ebx, edi
mov esi, ebx
mov dword [esp + 0x24], esi
je 0x406af8
jmp 0x406ad0
mov byte [esp + 0x51c], 5
lea ecx, [esi + 4]
mov dword [esp + 0x28], ecx
mov byte [esp + 0x51c], 5
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_]
add esi, 0x28
cmp esi, edi
mov dword [esp + 0x24], esi
jne 0x406ad0
push ebx
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov byte [esp + 0x51c], 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_]
mov byte [esp + 0x51c], 1
lea ecx, [esp + 0x70]
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 byte [esp + 0x51c], 0
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 dword [esp + 0x51c], 0xffffffff
mov ecx, dword [esp + 0x514]
xor eax, eax
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x50c]
pop edi
pop esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.00414f09
mov esp, ebp
pop ebp
ret