Function at 0x4099a9
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
sub esp, 0x268
mov eax, dword [0x42a050]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
and dword [ebp - 0x264], 0
push ebx
push esi
push edi
push eax
lea esi, [ebp - 0x264]
call fcn.00409f12
mov esi, eax
mov edi, 0x80070000
test esi, esi
js 0x409c33
push dword [ebp - 0x264]
or dword [ebp - 0x268], 0xffffffff
and dword [ebp - 0x260], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x409a21
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x409a1b
and esi, 0xffff
or esi, edi
test esi, esi
js 0x409c83
test bl, 0x10
je 0x409c2e
test bl, 1
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
je 0x409a62
push 0x80
push dword [ebp - 0x264]
call ebx
test eax, eax
jne 0x409a62
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x409a5c
and esi, 0xffff
or esi, edi
test esi, esi
js 0x409c83
xor esi, esi
cmp dword [ebp + 0xc], esi
jne 0x409a72
cmp dword [ebp + 0x10], esi
je 0x409c60
push dword [ebp - 0x264]
xor eax, eax
lea ecx, [ebp - 0x260]
call fcn.00408f9b
mov esi, eax
test esi, esi
js 0x409c48
push 0
push 0x405330
lea eax, [ebp - 0x260]
call fcn.004091c7
mov esi, eax
test esi, esi
js 0x409c48
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x268], eax
cmp eax, 0xffffffff
jne 0x409ae5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x409adf
and esi, 0xffff
or esi, edi
test esi, esi
js 0x409c48
push 0x2e
pop eax
cmp ax, word [ebp - 0x230]
jne 0x409b1b
xor eax, eax
cmp ax, word [ebp - 0x22e]
je 0x409bf5
push 0x2e
pop eax
cmp ax, word [ebp - 0x22e]
jne 0x409b1b
xor eax, eax
cmp ax, word [ebp - 0x22c]
je 0x409bf5
push dword [ebp - 0x264]
xor eax, eax
lea ecx, [ebp - 0x260]
call fcn.00408f9b
mov esi, eax
test esi, esi
js 0x409c33
push 0
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x260]
call fcn.004091c7
mov esi, eax
xor eax, eax
cmp esi, eax
jl 0x409c33
cmp dword [ebp + 0x10], eax
je 0x409b96
test byte [ebp - 0x25c], 0x10
je 0x409b96
push eax
push 0x40533c
lea eax, [ebp - 0x260]
call fcn.004091c7
mov esi, eax
test esi, esi
js 0x409c33
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 0x260]
call fcn.004099a9
mov esi, eax
jmp 0x409bf1
cmp dword [ebp + 0xc], eax
je 0x409bf5
test byte [ebp - 0x25c], 7
je 0x409bcd
push 0x80
push dword [ebp - 0x260]
call ebx
test eax, eax
jne 0x409bcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x409bcb
and esi, 0xffff
or esi, edi
test esi, esi
js 0x409c33
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x409bf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x409bf3
and esi, 0xffff
or esi, edi
test esi, esi
js 0x409c33
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x409ae5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x409c1f
xor esi, esi
jmp 0x409c33
test eax, eax
jle 0x409c2a
and eax, 0xffff
or eax, edi
mov esi, eax
jmp 0x409c33
mov esi, 0x8000ffff
cmp dword [ebp - 0x268], 0xffffffff
je 0x409c48
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x260], 0
je 0x409c5c
push dword [ebp - 0x260]
call fcn.0040956f
test esi, esi
js 0x409c83
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x409c83
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x409c81
and eax, 0xffff
or eax, edi
mov esi, eax
cmp dword [ebp - 0x264], 0
je 0x409c97
push dword [ebp - 0x264]
call fcn.0040956f
mov ecx, dword [ebp - 8]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004195c9
leave
ret 0xc