Function at 0x101004b
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 0x1010086
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 0x10100ca
mov dword [ebp - 0x25c], 8
xor esi, esi
jmp 0x101057d
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10100cf
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 0x101010d
mov dword [ebp - 0x25c], 8
xor esi, esi
jmp 0x1010535
push dword [ebp - 0x264]
mov esi, 0x10031b0
push esi
push ebx
mov ebx, dword [ebp - 0x260]
push ebx
call fcn.0100fca7
mov eax, ebx
add esp, 0x10
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x101012e
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.0100fca7
mov eax, ebx
add esp, 0x10
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x1010161
sub eax, ecx
push 0x10031ac
sar eax, 1
push 0x105
push dword [ebp - 0x264]
lea eax, [ebx + eax*2]
mov dword [ebp - 0x270], eax
call fcn.0100fc38
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 0x10101de
push dword [ebp - 0x258]
call fcn.01013776
mov esi, eax
test esi, esi
jne 0x10101de
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x1003158
push 4
mov dword [ebp - 0x25c], eax
call fcn.01011772
add esp, 0x10
jmp 0x1010535
cmp dword [ebp + 0x18], 0
je 0x1010200
push 0x1003048
push 0
push dword [ebp - 0x258]
call fcn.0101268b
mov esi, eax
test esi, esi
je 0x1010529
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1010253
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push dword [ebp - 0x258]
call fcn.01011513
cmp edi, 2
je 0x101023c
push edi
push dword [ebp - 0x258]
push 0x1002ca8
push 3
jmp 0x101029d
push dword [ebp - 0x258]
push 0x1002c48
push 2
call fcn.01011772
add esp, 0xc
jmp 0x10102a5
and eax, 0x3120
mov ecx, 0x80
or eax, ecx
cmp eax, ecx
je 0x1010268
and eax, 0xffffff7f
push eax
push dword [ebp - 0x258]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov esi, eax
test esi, esi
jne 0x10102b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push dword [ebp - 0x258]
call fcn.01011513
push edi
push dword [ebp - 0x258]
push 0x1002be8
push 4
call fcn.01011772
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x1010529
lea eax, [ebp - 0x228]
push eax
mov esi, 0x105
push esi
push dword [ebp - 0x264]
call fcn.0100fc38
lea eax, [ebp - 0x228]
push eax
push esi
push dword [ebp - 0x270]
call fcn.0100fc38
test byte [ebp - 0x254], 0x10
je 0x101039e
mov ecx, 0x1003044
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x101031d
test dx, dx
je 0x1010319
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x101031d
add eax, 4
add ecx, 4
test dx, dx
jne 0x10102f7
xor eax, eax
jmp 0x1010322
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10104d6
mov ecx, 0x100303c
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x101035b
test dx, dx
je 0x1010357
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x101035b
add eax, 4
add ecx, 4
test dx, dx
jne 0x1010335
xor eax, eax
jmp 0x1010360
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10104d6
push ebx
push dword [ebp - 0x260]
push 0x1002ffc
push 2
call fcn.01011772
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.0101004b
jmp 0x10104d0
cmp dword [ebp + 0x1c], 0
je 0x10103b7
push dword [ebp - 0x264]
call fcn.0100fa82
test eax, eax
je 0x10104d6
cmp dword [ebp + 0x14], 0
je 0x10103df
push 0x1002f40
push 0
push ebx
call fcn.0101268b
mov esi, eax
test esi, esi
jne 0x10103df
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x10104f3
cmp dword [ebp + 0x20], 0
jne 0x10103f8
push dword [ebp + 0x10]
push ebx
push dword [ebp - 0x260]
call fcn.0100fd06
test eax, eax
je 0x1010422
call fcn.01010d98
push 1
mov edi, eax
call fcn.01010f2e
push ebx
push dword [ebp - 0x260]
call fcn.0100f991
push edi
mov esi, eax
call fcn.01010f2e
test esi, esi
je 0x10104f7
push ebx
call fcn.0100fa13
test eax, eax
je 0x10104d6
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x101046f
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push ebx
call fcn.01011513
cmp edi, 2
je 0x101045d
push edi
push ebx
push 0x1002ca8
push 3
jmp 0x10104aa
push ebx
push 0x1002c48
push 2
call fcn.01011772
add esp, 0xc
jmp 0x10104b2
and eax, 0x3120
mov ecx, 0x80
or eax, ecx
cmp eax, ecx
je 0x1010484
and eax, 0xffffff7f
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov esi, eax
test esi, esi
jne 0x10104bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push ebx
call fcn.01011513
push edi
push ebx
push 0x1002be8
push 4
call fcn.01011772
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x10104f7
cmp dword [ebp + 0x14], 0
je 0x10104d6
push 0x1002f40
push 1
push ebx
call fcn.0101268b
mov esi, eax
test esi, esi
je 0x10104f7
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, eax
test esi, esi
jne 0x10102b4
test esi, esi
jne 0x101050b
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x12
jne 0x101059c
xor esi, esi
inc esi
cmp dword [ebp + 0x18], 0
je 0x1010535
push 0x1003048
push 1
push dword [ebp - 0x258]
call fcn.0101268b
mov esi, eax
test esi, esi
jne 0x1010535
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 0x1010564
push dword [ebp - 0x26c]
push 0
call edi
push eax
call ebx
cmp dword [ebp - 0x268], 0xffffffff
je 0x1010579
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindClose]
test esi, esi
jne 0x1010589
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.010090b9
leave
ret 0x1c
call edi
jmp 0x101052f