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

Disassembly:
mov eax, 0x422aab
call fcn.00414798
sub esp, 0x500
mov eax, dword [0x431d24]
push ebx
push esi
push edi
xor edi, edi
xor eax, ebp
mov dword [ebp - 0x10], eax
mov esi, ecx
mov dword [ebp - 0x4d8], edi
mov dword [ebp - 0x4d4], edi
mov dword [ebp - 0x4d0], edi
mov dword [ebp - 4], edi
push 7
pop ebx
push edi
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x238], ebx
call fcn.0040352e
mov byte [ebp - 4], 1
lea eax, [esi + 0xf8]
push eax
lea ecx, [ebp - 0x500]
call fcn.00405ab0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x500]
push eax
call fcn.004067f5
pop ecx
pop ecx
mov byte [ebp - 4], 1
push edi
push 1
lea ecx, [ebp - 0x500]
call fcn.004042af
cmp dword [ebp - 0x238], 8
mov eax, dword [ebp - 0x24c]
jae 0x409a08
lea eax, [ebp - 0x24c]
mov word [ebp - 0x218], di
mov dword [ebp - 0x4c8], eax
xor eax, eax
cmp dword [esi + 0xe4], 0xffffffff
mov ecx, 0x81
lea edi, [ebp - 0x216]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
jne 0x409a50
push dword [ebp - 0x4c8]
lea eax, [ebp - 0x218]
push str._s.log
push 0x104
push eax
call fcn.00413b3d
add esp, 0x10
jmp 0x409a7c
mov ecx, esi
call fcn.0040160e
push eax
push str.TSLOG
push dword [ebp - 0x4c8]
lea eax, [ebp - 0x218]
push str._s_s._s__..log
push 0x104
push eax
call fcn.00413b3d
add esp, 0x18
lea eax, [ebp - 0x4c4]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea ecx, [ebp - 0x274]
mov dword [ebp - 0x4cc], eax
call fcn.00404874
mov byte [ebp - 4], 3
push 0
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x21c], ebx
call fcn.0040352e
mov byte [ebp - 4], 4
cmp dword [ebp - 0x4cc], 0xffffffff
je 0x409c41
push dword [ebp - 0x4c8]
lea ecx, [ebp - 0x234]
call fcn.0040587c
lea eax, [ebp - 0x498]
push eax
lea ecx, [ebp - 0x234]
call fcn.0040585f
cmp dword [esi + 0xe4], 0xffffffff
mov eax, dword [ebp - 0x230]
jne 0x409b16
cmp dword [ebp - 0x21c], 8
jae 0x409b0a
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x409c26
cmp dword [ebp - 0x21c], 8
jae 0x409b25
lea eax, [ebp - 0x230]
push eax
mov ecx, esi
call fcn.004018fb
test eax, eax
mov dword [ebp - 0x4e0], eax
jl 0x409c26
mov ebx, dword [ebp - 0x4d8]
cmp ebx, dword [ebp - 0x4d4]
je 0x409ba5
cmp eax, dword [ebx]
je 0x409b5a
add ebx, 0x28
cmp ebx, dword [ebp - 0x4d4]
jne 0x409b49
jmp 0x409b99
lea edi, [ebx + 4]
mov eax, dword [edi + 0x20]
cmp eax, dword [ebp - 0x4ac]
ja 0x409b75
jne 0x409b99
mov eax, dword [edi + 0x1c]
cmp eax, dword [ebp - 0x4b0]
jbe 0x409b99
push 0xffffffffffffffff
lea eax, [ebp - 0x234]
push 0
mov ecx, edi
push eax
call fcn.00405182
mov eax, dword [ebp - 0x4b0]
mov dword [edi + 0x1c], eax
mov eax, dword [ebp - 0x4ac]
mov dword [edi + 0x20], eax
cmp ebx, dword [ebp - 0x4d4]
jne 0x409c26
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x274]
call fcn.00405182
mov eax, dword [ebp - 0x4b0]
mov dword [ebp - 0x258], eax
mov eax, dword [ebp - 0x4ac]
sub esp, 0x24
mov dword [ebp - 0x254], eax
lea eax, [ebp - 0x274]
mov ecx, esp
mov dword [ebp - 0x4e4], esp
push eax
call fcn.00405a6f
mov byte [ebp - 4], 5
push dword [ebp - 0x4e0]
lea eax, [ebp - 0x50c]
push eax
mov byte [ebp - 4], 4
call fcn.00407d1e
add esp, 0x2c
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x4dc]
call fcn.00409836
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x50c]
call fcn.004048c1
lea eax, [ebp - 0x4c4]
push eax
push dword [ebp - 0x4cc]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x409ac9
push dword [ebp - 0x4cc]
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [ebp - 0x4dc]
call fcn.00403383
mov ebx, eax
mov eax, dword [esi + 0xe8]
xor ecx, ecx
cmp eax, 0xffffffff
sete cl
dec ecx
mov edi, ecx
lea ecx, [ebp - 0x218]
push ecx
push eax
mov dword [ebp - 0x4c8], 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.0040b177
add esp, 0x18
cmp edi, dword [esi + 0xe4]
jle 0x409d05
mov edi, dword [ebp - 0x4d8]
push 0x401991
push dword [ebp - 0x4d4]
push edi
call fcn.00409944
mov eax, dword [ebp - 0x4c8]
sub eax, dword [esi + 0xe4]
and dword [ebp - 0x4cc], 0
add eax, ebx
add esp, 0xc
test eax, eax
jle 0x409d05
mov eax, dword [edi]
push eax
push eax
push str.DeleteLogFiles__AllFilesOfPid_:__lu_0x_08x_
push esi
call fcn.0040b177
add esp, 0x10
push dword [edi]
mov ecx, esi
call fcn.00406ca8
mov eax, dword [ebp - 0x4c8]
sub eax, dword [esi + 0xe4]
inc dword [ebp - 0x4cc]
add eax, ebx
add edi, 0x28
cmp dword [ebp - 0x4cc], eax
jl 0x409ccb
lea ecx, [ebp - 0x4dc]
call fcn.00408cba
mov byte [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0x234]
call fcn.00403c42
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x274]
call fcn.0040489a
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x250]
call fcn.00403c42
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x4dc]
call fcn.00408cba
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop edi
xor eax, eax
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.00413d8f
leave
ret