Function at 0x460160
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47616b
mov eax, dword fs:[0]
push eax
sub esp, 0x320
mov eax, dword [0x4922f8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 8]
call fcn.00401880
test eax, eax
jne 0x46019f
mov al, 1
jmp 0x460637
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401690
mov dword [ebp - 4], 0
mov dword [ebp - 0x3c], 0
jmp 0x4601c4
mov ecx, dword [ebp - 0x3c]
add ecx, 1
mov dword [ebp - 0x3c], ecx
lea ecx, [ebp - 0x2c]
call fcn.00401880
cmp dword [ebp - 0x3c], eax
jae 0x4601f6
mov edx, dword [ebp - 0x3c]
push edx
lea ecx, [ebp - 0x2c]
call fcn.0040a970
movsx eax, byte [eax]
cmp eax, 0x2f
jne 0x4601f4
mov ecx, dword [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0040a970
mov byte [eax], 0x5c
jmp 0x4601bb
push 0
lea ecx, [ebp - 0x38]
call fcn.00401bb0
mov byte [ebp - 4], 1
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x2c]
push eax
call fcn.0045f220
add esp, 8
lea ecx, [ebp - 0x38]
call fcn.00418f20
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x460259
mov byte [ebp - 0x2b1], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.00401bf0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004016d0
mov al, byte [ebp - 0x2b1]
jmp 0x460637
mov ecx, dword [ebp - 0x30]
and ecx, 0x10
je 0x4605ab
mov byte [ebp - 0x41], 1
mov byte [ebp - 0x42], 0
lea ecx, [ebp - 0x2c]
call fcn.00401880
sub eax, 1
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040a970
movsx edx, byte [eax]
cmp edx, 0x5c
je 0x460296
push 0x485408
lea ecx, [ebp - 0x2c]
call fcn.00403120
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x2c]
push ecx
call fcn.0045f220
add esp, 8
lea ecx, [ebp - 0x38]
call fcn.00401b20
add eax, 1
push eax
lea ecx, [ebp - 0x38]
call fcn.00402400
push 0x48540c
lea ecx, [ebp - 0x38]
call fcn.00418f20
push eax
call fcn.0044593b
add esp, 8
lea edx, [ebp - 0x294]
push edx
lea ecx, [ebp - 0x38]
call fcn.00418f20
push eax
call dword [sym.imp.KERNEL32.DLL_FindFirstFileW]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0xffffffff
jne 0x4602f4
jmp 0x4604af
push 0x485410
lea eax, [ebp - 0x268]
push eax
call fcn.00445988
add esp, 8
test eax, eax
je 0x460324
push 0x485414
lea ecx, [ebp - 0x268]
push ecx
call fcn.00445988
add esp, 8
test eax, eax
jne 0x460329
jmp 0x460496
mov edx, dword [ebp - 0x294]
and edx, 0x10
je 0x4603d7
lea eax, [ebp - 0x268]
push eax
lea ecx, [ebp - 0x2d0]
push ecx
call fcn.0045f720
add esp, 8
mov dword [ebp - 0x314], eax
mov edx, dword [ebp - 0x314]
mov dword [ebp - 0x318], edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x318]
push eax
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x2ec]
push edx
call fcn.00402df0
add esp, 0xc
mov dword [ebp - 0x31c], eax
mov eax, dword [ebp - 0x31c]
mov dword [ebp - 0x320], eax
mov byte [ebp - 4], 3
movzx ecx, byte [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x320]
push edx
call fcn.00460160
add esp, 8
movzx eax, al
movzx ecx, byte [ebp - 0x41]
and ecx, eax
mov byte [ebp - 0x41], cl
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2ec]
call fcn.004016d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2d0]
call fcn.004016d0
jmp 0x460496
movzx edx, byte [ebp + 0xc]
test edx, edx
je 0x460492
lea eax, [ebp - 0x268]
push eax
lea ecx, [ebp - 0x308]
push ecx
call fcn.0045f720
add esp, 8
mov dword [ebp - 0x324], eax
mov edx, dword [ebp - 0x324]
mov dword [ebp - 0x328], edx
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x328]
push eax
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x2b0]
push edx
call fcn.00402df0
add esp, 0xc
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x308]
call fcn.004016d0
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x2b0]
push ecx
call fcn.0045f220
add esp, 8
mov edx, dword [ebp - 0x294]
and edx, 1
je 0x46046a
push 0x80
lea ecx, [ebp - 0x38]
call fcn.00418f20
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
movzx esi, byte [ebp - 0x41]
lea ecx, [ebp - 0x38]
call fcn.00418f20
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
and esi, eax
setne al
mov byte [ebp - 0x41], al
lea ecx, [ebp - 0x2b0]
call fcn.004016d0
jmp 0x460496
mov byte [ebp - 0x42], 1
lea ecx, [ebp - 0x294]
push ecx
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.KERNEL32.DLL_FindNextFileW]
test eax, eax
jne 0x4602f4
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x12
je 0x4604e7
mov byte [ebp - 0x309], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.00401bf0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004016d0
mov al, byte [ebp - 0x309]
jmp 0x460637
cmp dword [ebp - 0x40], 0xffffffff
je 0x4604f7
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.DLL_FindClose]
movzx ecx, byte [ebp - 0x41]
test ecx, ecx
je 0x46057c
movzx edx, byte [ebp - 0x42]
test edx, edx
jne 0x46057c
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x2c]
push ecx
call fcn.0045f220
add esp, 8
movzx edx, byte [ebp - 0x41]
test edx, edx
je 0x46053e
lea ecx, [ebp - 0x38]
call fcn.00418f20
push eax
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryW]
test eax, eax
je 0x46053e
mov dword [ebp - 0x32c], 1
jmp 0x460548
mov dword [ebp - 0x32c], 0
mov al, byte [ebp - 0x32c]
mov byte [ebp - 0x30a], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.00401bf0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004016d0
mov al, byte [ebp - 0x30a]
jmp 0x460637
mov byte [ebp - 0x30b], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.00401bf0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004016d0
mov al, byte [ebp - 0x30b]
jmp 0x460637
movzx ecx, byte [ebp + 0xc]
test ecx, ecx
je 0x4605f2
lea ecx, [ebp - 0x38]
call fcn.00418f20
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
setne dl
mov byte [ebp - 0x30c], dl
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.00401bf0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004016d0
mov al, byte [ebp - 0x30c]
jmp 0x460637
mov byte [ebp - 0x30d], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.00401bf0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004016d0
mov al, byte [ebp - 0x30d]
jmp 0x460637
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00442777
mov esp, ebp
pop ebp
ret