Function at 0x407160
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a39f7
mov eax, dword fs:[0]
push eax
mov eax, 0x154
call fcn.00596bf0
mov eax, dword [0x616930]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x158]
mov dword [ebp - 0x15c], ecx
push eax
mov ecx, ebx
call fcn.00408e10
push 0x5addc4
lea ecx, [ebp - 0x158]
push ecx
mov ecx, 2
mov dword [ebp - 4], 0
call fcn.00401de0
mov edx, dword [ebp - 0x158]
push edx
push str.IterateAndKillProcess:_Target_file_dir_is__s_n
call fcn.00402b00
mov ecx, dword [ebp - 0x158]
add esp, 8
lea eax, [ebp - 0x150]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x160], eax
cmp eax, 0xffffffff
je 0x4074a7
test byte [ebp - 0x150], 0x10
je 0x40735c
lea ecx, [ebp - 0x124]
push 0x5addf8
push ecx
call fcn.0057b679
add esp, 8
test eax, eax
je 0x407480
lea edx, [ebp - 0x124]
push 0x5addfc
push edx
call fcn.0057b679
add esp, 8
test eax, eax
je 0x407480
lea eax, [ebp - 0x124]
push str.logs
push eax
call fcn.0057b679
add esp, 8
test eax, eax
je 0x407480
mov edx, dword [0x616414]
mov eax, dword [edx + 0xc]
mov ecx, 0x616414
call eax
add eax, 0x10
mov dword [ebp - 0x154], eax
mov byte [ebp - 4], 1
test ebx, ebx
jne 0x407283
xor eax, eax
jmp 0x407291
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407288
sub eax, edx
push ebx
mov edi, eax
lea ecx, [ebp - 0x154]
call fcn.00401cc0
push 0x5adcac
lea ecx, [ebp - 0x154]
push ecx
mov ecx, 1
call fcn.00401de0
lea eax, [ebp - 0x124]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4072c0
sub eax, edx
lea edx, [ebp - 0x124]
push edx
lea ecx, [ebp - 0x154]
push ecx
mov ecx, eax
call fcn.00401de0
mov esi, dword [ebp - 0x154]
cmp dword [esi - 4], 1
jle 0x407300
mov edx, dword [esi - 0xc]
push edx
lea eax, [ebp - 0x154]
push eax
call fcn.00401c40
mov esi, dword [ebp - 0x154]
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x15c]
push edi
push esi
call fcn.00407160
test edi, edi
jne 0x407460
cmp dword [esi - 4], 1
jle 0x407334
mov ecx, dword [esi - 0xc]
push ecx
lea edx, [ebp - 0x154]
push edx
call fcn.00401c40
mov esi, dword [ebp - 0x154]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x407460
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Remove_Directory_failed_with_error__ld__n
call fcn.00402b00
add esp, 8
jmp 0x407460
mov edx, dword [0x616414]
mov eax, dword [edx + 0xc]
mov ecx, 0x616414
call eax
add eax, 0x10
mov dword [ebp - 0x154], eax
mov byte [ebp - 4], 2
test ebx, ebx
jne 0x407381
xor eax, eax
jmp 0x40738f
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407386
sub eax, edx
push ebx
mov edi, eax
lea ecx, [ebp - 0x154]
call fcn.00401cc0
push 0x5adcac
lea ecx, [ebp - 0x154]
push ecx
mov ecx, 1
call fcn.00401de0
lea eax, [ebp - 0x124]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4073c0
sub eax, edx
lea edx, [ebp - 0x124]
push edx
lea ecx, [ebp - 0x154]
push ecx
mov ecx, eax
call fcn.00401de0
lea edx, [ebp - 0x124]
push str..exe
push edx
call fcn.0057c290
add esp, 8
test eax, eax
je 0x407431
lea eax, [ebp - 0x124]
push str.AgentCleanupTool.exe
push eax
call fcn.0057b679
add esp, 8
test eax, eax
je 0x407431
lea ecx, [ebp - 0x124]
push str.AgentUninstall.log
push ecx
call fcn.0057b679
add esp, 8
test eax, eax
je 0x407431
lea edi, [ebp - 0x124]
call fcn.00407cc0
cmp dword [ebp + 0xc], 0
mov esi, dword [ebp - 0x154]
jne 0x407460
cmp dword [esi - 4], 1
jle 0x407459
mov edx, dword [esi - 0xc]
push edx
lea eax, [ebp - 0x154]
push eax
call fcn.00401c40
mov esi, dword [ebp - 0x154]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407480
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x160]
lea ecx, [ebp - 0x150]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4071fd
test esi, esi
je 0x4074a7
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x158]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4074d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0057af8a
mov esp, ebp
pop ebp
ret 8