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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x504
mov eax, dword [0x42c17c]
push ebx
push esi
xor esi, esi
mov ebx, ecx
push edi
lea edi, [ebx + 0xf8]
mov dword [esp + 0x50c], eax
mov eax, edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x88], 7
mov dword [esp + 0x84], esi
mov word [esp + 0x74], si
mov dword [esp + 0x44], 0xf
mov dword [esp + 0x40], esi
mov byte [esp + 0x30], 0
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409a10
sub eax, edx
push eax
push edi
lea ecx, [esp + 0x34]
call fcn.00401d40
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.00406f30
mov eax, dword [esp + 0x4c]
add esp, 8
cmp eax, 0x10
jb 0x409a4c
mov edx, dword [esp + 0x30]
push edx
call fcn.0041599c
add esp, 4
cmp dword [esp + 0x88], 8
jb 0x409a60
mov eax, dword [esp + 0x74]
mov dword [esp + 0x10], eax
jmp 0x409a68
lea ecx, [esp + 0x74]
mov dword [esp + 0x10], ecx
xor eax, eax
mov word [esp + 0x300], si
mov ecx, 0x81
lea edi, [esp + 0x302]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp dword [ebx + 0xe4], 0xffffffff
jne 0x409aac
mov edx, dword [esp + 0x10]
push edx
push str._s.log
lea eax, [esp + 0x308]
push 0x104
push eax
call fcn.0041651d
add esp, 0x10
jmp 0x409ad8
mov ecx, ebx
call fcn.00403620
mov ecx, dword [esp + 0x10]
push eax
push str.TSLOG
push ecx
push str._s_s._s__..log
lea edx, [esp + 0x310]
push 0x104
push edx
call fcn.0041651d
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 + 0x8c]
mov dword [esp + 0x28], edi
call fcn.00406120
cmp edi, 0xffffffff
mov dword [esp + 0x6c], 7
mov dword [esp + 0x68], esi
mov word [esp + 0x58], si
je 0x409cbc
lea ebx, [ebx]
mov edi, dword [esp + 0x10]
push edi
call fcn.0041630e
add esp, 4
push eax
push edi
lea ecx, [esp + 0x5c]
call fcn.00406560
lea edx, [esp + 0xdc]
push edx
call fcn.0041630e
add esp, 4
push eax
lea eax, [esp + 0xe0]
push eax
lea ecx, [esp + 0x5c]
call fcn.00406440
cmp dword [ebx + 0xe4], 0xffffffff
mov eax, dword [esp + 0x6c]
jne 0x409b80
cmp eax, 8
mov eax, dword [esp + 0x58]
jae 0x409b74
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x409ca1
cmp eax, 8
mov eax, dword [esp + 0x58]
jae 0x409b8d
lea eax, [esp + 0x58]
push eax
mov ecx, ebx
call fcn.004039a0
mov edi, eax
cmp edi, esi
mov dword [esp + 0x14], edi
jl 0x409ca1
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov eax, esi
cmp eax, edx
je 0x409c37
cmp edi, dword [esi]
je 0x409bc2
add esi, 0x28
cmp esi, edx
jne 0x409bb5
jmp 0x409c37
mov eax, dword [esi + 0x24]
mov ecx, dword [esp + 0xc8]
cmp eax, ecx
lea edi, [esi + 4]
jbe 0x409bf9
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x5c]
push ecx
mov ecx, edi
call fcn.00406170
mov edx, dword [esp + 0xc4]
mov dword [edi + 0x1c], edx
mov eax, dword [esp + 0xc8]
mov dword [edi + 0x20], eax
jmp 0x409c2b
jne 0x409c2f
mov ecx, dword [edi + 0x1c]
cmp ecx, dword [esp + 0xc4]
jbe 0x409c2f
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x5c]
push edx
mov ecx, edi
call fcn.00406170
mov eax, dword [esp + 0xc4]
mov dword [edi + 0x1c], eax
mov ecx, dword [esp + 0xc8]
mov dword [edi + 0x20], ecx
mov edx, dword [esp + 0x20]
cmp esi, edx
jne 0x409c9f
mov edi, dword [esp + 0x14]
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x5c]
push edx
lea ecx, [esp + 0x98]
call fcn.00406170
mov ecx, dword [esp + 0xc8]
mov eax, dword [esp + 0xc4]
sub esp, 0x24
mov dword [esp + 0xd0], ecx
lea edx, [esp + 0xb0]
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
mov dword [esp + 0xd0], eax
call fcn.00406870
lea eax, [esp + 0x50]
push edi
push eax
call fcn.00407930
add esp, 0x2c
push eax
lea ecx, [esp + 0x1c]
call fcn.004097d0
lea ecx, [esp + 0x2c]
call fcn.00406140
xor esi, esi
mov edi, dword [esp + 0x28]
lea ecx, [esp + 0xb0]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x409b20
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x409ce2
mov ecx, dword [esp + 0x20]
sub ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
mov eax, dword [ebx + 0xe8]
xor ecx, ecx
cmp eax, 0xffffffff
sete cl
lea edx, [esp + 0x300]
push edx
push eax
mov eax, dword [ebx + 0xe4]
dec ecx
lea edi, [ecx + esi]
push edi
push eax
push str.DeleteLogFile__MaxCountOfHistroyProcess_:__d__CurrentHistroyProcess_:__d__CurrentLogFileHandle_:_0x_08x__PathWildcard_:__s
push ebx
mov dword [esp + 0x2c], ecx
call fcn.0040b480
mov eax, dword [ebx + 0xe4]
add esp, 0x18
cmp edi, eax
mov edi, dword [esp + 0x1c]
jle 0x409dae
mov ecx, dword [esp + 0x20]
sub ecx, edi
mov eax, 0x66666667
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
push 0x403a70
add ecx, edx
mov edx, dword [esp + 0x24]
push ecx
push edx
push edi
call fcn.00409860
mov eax, dword [esp + 0x24]
sub eax, dword [ebx + 0xe4]
add eax, esi
add esp, 0x10
test eax, eax
mov dword [esp + 0x10], 0
jle 0x409dae
lea esp, [esp]
mov eax, dword [edi]
push eax
push eax
push str.DeleteLogFiles__AllFilesOfPid_:__lu_0x_08x_
push ebx
call fcn.0040b480
mov ecx, dword [edi]
add esp, 0x10
push ecx
mov ecx, ebx
call fcn.00407490
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 0xe4]
mov eax, dword [esp + 0x10]
sub edx, ecx
inc eax
add edx, esi
add edi, 0x28
cmp eax, edx
mov dword [esp + 0x10], eax
jl 0x409d70
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x409dd7
mov ebx, dword [esp + 0x20]
cmp edi, ebx
mov esi, edi
je 0x409dce
lea esp, [esp]
mov ecx, esi
call fcn.00406140
add esi, 0x28
cmp esi, ebx
jne 0x409dc0
push edi
call fcn.0041599c
add esp, 4
mov eax, dword [esp + 0x6c]
mov esi, 8
cmp eax, esi
jb 0x409df1
mov eax, dword [esp + 0x58]
push eax
call fcn.0041599c
add esp, 4
xor eax, eax
lea ecx, [esp + 0x8c]
mov dword [esp + 0x6c], 7
mov dword [esp + 0x68], eax
mov word [esp + 0x58], ax
call fcn.00405ff0
cmp dword [esp + 0x88], esi
jb 0x409e26
mov ecx, dword [esp + 0x74]
push ecx
call fcn.0041599c
add esp, 4
mov ecx, dword [esp + 0x50c]
mov eax, 1
call fcn.0041575b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret