Function at 0x428c62
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get common file path
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x674
mov eax, dword [0x4746fc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
or dword [ebp - 0x66c], 0xffffffff
and eax, 1
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, 0x208
xor esi, esi
mov dword [ebp - 0x674], eax
and dword [ebp - 0x668], esi
lea eax, [ebp - 0x414]
push ebx
push esi
push eax
mov dword [ebp - 0x670], edi
call fcn.0042c6e0
push ebx
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0042c6e0
add esp, 0x18
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x428d06
call edi
mov esi, eax
cmp esi, 2
jne 0x428ce0
push 3
pop esi
test esi, esi
jle 0x428cef
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x428d06
push esi
push 0xc8
push str.c:_agent_work66_s_srclibsdutildirutil.cpp
call fcn.00428b02
jmp 0x42904c
test bl, 0x10
je 0x429035
test bl, 1
mov ebx, dword [ebp - 0x670]
je 0x428d4c
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x428d4c
call edi
mov esi, eax
test esi, esi
jle 0x428d3d
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x428d44
mov esi, 0x80004005
push esi
push 0xd1
jmp 0x428cf7
cmp dword [ebp - 0x674], 0
jne 0x428d5f
test byte [ebp + 0xc], 2
je 0x428fc6
test byte [ebp + 0xc], 4
je 0x428da0
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x428da0
call edi
mov esi, eax
test esi, esi
jle 0x428d8e
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x428d95
mov esi, 0x80004005
push esi
push 0xdc
jmp 0x428cf7
lea eax, [ebp - 0x668]
push eax
push 0x45ff00
push ebx
call fcn.0042999e
mov esi, eax
test esi, esi
js 0x42904c
lea eax, [ebp - 0x664]
push eax
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x66c], eax
cmp eax, 0xffffffff
jne 0x428dff
call edi
mov esi, eax
test esi, esi
jle 0x428ded
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x428df4
mov esi, 0x80004005
push esi
push 0xe7
jmp 0x428cf7
push 0x2e
pop edx
cmp dx, word [ebp - 0x638]
jne 0x428e30
xor ecx, ecx
cmp cx, word [ebp - 0x636]
je 0x428f2d
cmp dx, word [ebp - 0x636]
jne 0x428e30
cmp cx, word [ebp - 0x634]
je 0x428f2d
xor eax, eax
mov word [ebp - 0x432], ax
lea eax, [ebp - 0x668]
push eax
lea eax, [ebp - 0x638]
push eax
push ebx
call fcn.0042999e
mov esi, eax
test esi, esi
js 0x42903a
test byte [ebp + 0xc], 2
mov al, byte [ebp - 0x664]
je 0x428e90
test al, 0x10
je 0x428e90
lea eax, [ebp - 0x668]
push eax
call fcn.00429941
mov esi, eax
test esi, esi
js 0x42903a
push dword [ebp + 0xc]
push dword [ebp - 0x668]
call fcn.00428c62
jmp 0x428f27
cmp dword [ebp - 0x674], 0
je 0x428f27
test al, 7
je 0x428eba
push 0x80
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x428f4a
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x428f27
test byte [ebp + 0xc], 4
je 0x428f9b
lea eax, [ebp - 0x20c]
push eax
push 0
push 0x4600e4
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x428f79
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [ebp - 0x20c]
push 1
push eax
push dword [ebp - 0x668]
call esi
push 4
push 0
test eax, eax
je 0x428f1f
lea eax, [ebp - 0x20c]
push eax
jmp 0x428f25
push dword [ebp - 0x668]
call esi
mov eax, dword [ebp - 0x66c]
lea ecx, [ebp - 0x664]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x428fbd
mov eax, dword [ebp - 0x66c]
jmp 0x428dff
call edi
mov esi, eax
test esi, esi
jle 0x428f5d
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x428f64
mov esi, 0x80004005
push esi
push 0x10b
push str.c:_agent_work66_s_srclibsdutildirutil.cpp
call fcn.00428b02
jmp 0x42903a
call edi
mov esi, eax
test esi, esi
jle 0x428f8c
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x428f93
mov esi, 0x80004005
push esi
push 0x115
jmp 0x428f6a
call edi
mov esi, eax
test esi, esi
jle 0x428fae
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x428fb5
mov esi, 0x80004005
push esi
push 0x125
jmp 0x428f6a
call edi
cmp eax, 0x12
jne 0x429010
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x42903a
call edi
mov esi, eax
test esi, esi
jle 0x428fe2
movzx esi, si
or esi, 0x80070000
cmp esi, 0x80070020
jne 0x429001
test byte [ebp + 0xc], 4
je 0x429005
push 4
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x429005
xor esi, esi
test esi, esi
jns 0x42903a
push esi
push 0x141
jmp 0x428f6a
call edi
mov esi, eax
test esi, esi
jle 0x429023
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x42902a
mov esi, 0x80004005
push esi
push 0x132
jmp 0x428f6a
mov esi, 0x8000ffff
mov eax, dword [ebp - 0x66c]
cmp eax, 0xffffffff
je 0x42904c
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x668], 0
je 0x429060
push dword [ebp - 0x668]
call fcn.00429902
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042790e
leave
ret 8