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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x270
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
and dword [ebp - 0x25c], 0
or dword [ebp - 0x268], 0xffffffff
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x264], eax
mov dword [ebp - 0x258], edi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x1009050
sub eax, ecx
sar eax, 1
lea ebx, [eax + 0x106]
lea eax, [ebx + ebx]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call esi
mov dword [ebp - 0x260], eax
test eax, eax
jne 0x1009094
mov dword [ebp - 0x25c], 8
xor esi, esi
jmp 0x1009547
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1009099
sub eax, edx
sar eax, 1
lea edi, [eax + 0x106]
lea eax, [edi + edi]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 0x26c], eax
test eax, eax
jne 0x10090d7
mov dword [ebp - 0x25c], 8
xor esi, esi
jmp 0x10094ff
push dword [ebp - 0x264]
mov esi, 0x1001ac8
push esi
push ebx
mov ebx, dword [ebp - 0x260]
push ebx
call fcn.01008c71
mov eax, ebx
add esp, 0x10
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x10090f8
push dword [ebp - 0x258]
sub eax, ecx
sar eax, 1
lea eax, [ebx + eax*2]
mov ebx, dword [ebp - 0x26c]
push esi
push edi
push ebx
mov dword [ebp - 0x264], eax
call fcn.01008c71
mov eax, ebx
add esp, 0x10
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x100912b
sub eax, ecx
push 0x1001ac4
sar eax, 1
push 0x105
push dword [ebp - 0x264]
lea eax, [ebx + eax*2]
mov dword [ebp - 0x270], eax
call fcn.01008c02
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x268], eax
cmp eax, 0xffffffff
je 0x10091a8
push dword [ebp - 0x258]
call fcn.0100c346
mov esi, eax
test esi, esi
jne 0x10091a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x1001a70
push 4
mov dword [ebp - 0x25c], eax
call fcn.0100a40e
add esp, 0x10
jmp 0x10094ff
cmp dword [ebp + 0x18], 0
je 0x10091ca
push 0x1001960
push 0
push dword [ebp - 0x258]
call fcn.0100b2d0
mov esi, eax
test esi, esi
je 0x10094f3
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x100921d
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push dword [ebp - 0x258]
call fcn.0100a1af
cmp edi, 2
je 0x1009206
push edi
push dword [ebp - 0x258]
push 0x10015c0
push 3
jmp 0x1009267
push dword [ebp - 0x258]
push 0x1001560
push 2
call fcn.0100a40e
add esp, 0xc
jmp 0x100926f
and eax, 0x3120
mov ecx, 0x80
or eax, ecx
cmp eax, ecx
je 0x1009232
and eax, 0xffffff7f
push eax
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov esi, eax
test esi, esi
jne 0x100927e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push dword [ebp - 0x258]
call fcn.0100a1af
push edi
push dword [ebp - 0x258]
push 0x1001500
push 4
call fcn.0100a40e
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x10094f3
lea eax, [ebp - 0x228]
push eax
mov esi, 0x105
push esi
push dword [ebp - 0x264]
call fcn.01008c02
lea eax, [ebp - 0x228]
push eax
push esi
push dword [ebp - 0x270]
call fcn.01008c02
test byte [ebp - 0x254], 0x10
je 0x1009368
mov ecx, 0x100195c
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10092e7
test dx, dx
je 0x10092e3
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10092e7
add eax, 4
add ecx, 4
test dx, dx
jne 0x10092c1
xor eax, eax
jmp 0x10092ec
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10094a0
mov ecx, 0x1001954
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1009325
test dx, dx
je 0x1009321
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1009325
add eax, 4
add ecx, 4
test dx, dx
jne 0x10092ff
xor eax, eax
jmp 0x100932a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10094a0
push ebx
push dword [ebp - 0x260]
push 0x1001914
push 2
call fcn.0100a40e
add esp, 0x10
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ebx
push dword [ebp - 0x260]
call fcn.01009015
jmp 0x100949a
cmp dword [ebp + 0x1c], 0
je 0x1009381
push dword [ebp - 0x264]
call fcn.01008a4c
test eax, eax
je 0x10094a0
cmp dword [ebp + 0x14], 0
je 0x10093a9
push 0x1001858
push 0
push ebx
call fcn.0100b2d0
mov esi, eax
test esi, esi
jne 0x10093a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x10094bd
cmp dword [ebp + 0x20], 0
jne 0x10093c2
push dword [ebp + 0x10]
push ebx
push dword [ebp - 0x260]
call fcn.01008cd0
test eax, eax
je 0x10093ec
call fcn.01009d02
push 1
mov edi, eax
call fcn.01009d39
push ebx
push dword [ebp - 0x260]
call fcn.0100895b
push edi
mov esi, eax
call fcn.01009d39
test esi, esi
je 0x10094c1
push ebx
call fcn.010089dd
test eax, eax
je 0x10094a0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1009439
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push ebx
call fcn.0100a1af
cmp edi, 2
je 0x1009427
push edi
push ebx
push 0x10015c0
push 3
jmp 0x1009474
push ebx
push 0x1001560
push 2
call fcn.0100a40e
add esp, 0xc
jmp 0x100947c
and eax, 0x3120
mov ecx, 0x80
or eax, ecx
cmp eax, ecx
je 0x100944e
and eax, 0xffffff7f
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov esi, eax
test esi, esi
jne 0x1009487
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push ebx
call fcn.0100a1af
push edi
push ebx
push 0x1001500
push 4
call fcn.0100a40e
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x10094c1
cmp dword [ebp + 0x14], 0
je 0x10094a0
push 0x1001858
push 1
push ebx
call fcn.0100b2d0
mov esi, eax
test esi, esi
je 0x10094c1
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, eax
test esi, esi
jne 0x100927e
test esi, esi
jne 0x10094d5
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x12
jne 0x1009566
xor esi, esi
inc esi
cmp dword [ebp + 0x18], 0
je 0x10094ff
push 0x1001960
push 1
push dword [ebp - 0x258]
call fcn.0100b2d0
mov esi, eax
test esi, esi
jne 0x10094ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x25c], eax
push dword [ebp - 0x260]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call ebx
cmp dword [ebp - 0x26c], 0
je 0x100952e
push dword [ebp - 0x26c]
push 0
call edi
push eax
call ebx
cmp dword [ebp - 0x268], 0xffffffff
je 0x1009543
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindClose]
test esi, esi
jne 0x1009553
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.010042c5
leave
ret 0x1c
call edi
jmp 0x10094f9