Function at 0x40c77c
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, 0x280
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push 0x24c
mov dword [ebp - 0x264], eax
lea eax, [ebp - 0x258]
push ebx
push eax
mov dword [ebp - 0x274], ebx
mov dword [ebp - 0x25c], ebx
call sub.msvcrt.dll_memset
mov ecx, edi
add esp, 0xc
or dword [ebp - 0x26c], 0xffffffff
mov dword [ebp - 0x27c], ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40c7d5
sub ecx, edx
sar ecx, 1
lea ebx, [ecx + 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 - 0x268], eax
test eax, eax
jne 0x40c813
push 8
pop edi
mov ebx, eax
jmp 0x40ccee
mov ecx, dword [ebp - 0x264]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x274]
jne 0x40c81c
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 0x106]
mov dword [ebp - 0x270], eax
add eax, eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov esi, eax
mov dword [ebp - 0x260], esi
test esi, esi
jne 0x40c85f
push 8
pop edi
xor ebx, ebx
jmp 0x40cca9
push edi
push 0x4040ac
push ebx
mov ebx, dword [ebp - 0x268]
push ebx
call fcn.0040bd4e
mov ecx, ebx
add esp, 0x10
lea edx, [ecx + 2]
xor edi, edi
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x40c87c
mov edi, dword [ebp - 0x264]
push edi
sub ecx, edx
push 0x4040ac
push dword [ebp - 0x270]
sar ecx, 1
lea eax, [ebx + ecx*2]
push esi
mov dword [ebp - 0x278], eax
call fcn.0040bd4e
mov ecx, esi
add esp, 0x10
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x274]
jne 0x40c8b4
sub ecx, edx
sar ecx, 1
lea eax, [esi + ecx*2]
mov ecx, dword [ebp - 0x278]
mov dword [ebp - 0x270], eax
mov eax, 0x4040b4
mov edx, 0x105
call fcn.0040bce6
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x26c], eax
cmp eax, 0xffffffff
je 0x40c928
push edi
call fcn.0040f42a
mov ebx, eax
test ebx, ebx
jne 0x40c928
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push esi
push 0x4040b8
push 4
call fcn.0040d3c6
add esp, 0x10
jmp 0x40cca9
cmp dword [ebp + 0x18], 0
je 0x40c94f
push 0x403920
xor eax, eax
push eax
push edi
call fcn.0040d6b8
mov ebx, eax
test ebx, ebx
jne 0x40c94f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x40cca9
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, 0x80
cmp eax, 0xffffffff
jne 0x40c9b3
xor eax, eax
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebp - 0x264]
push edi
call fcn.0040b952
cmp edi, 2
je 0x40c995
push edi
push dword [ebp - 0x264]
push 0x404478
push 3
call fcn.0040d3c6
add esp, 0x10
jmp 0x40c9aa
push dword [ebp - 0x264]
push 0x4044d8
push 2
call fcn.0040d3c6
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40c9ff
and eax, 0x3120
or eax, ecx
cmp eax, ecx
je 0x40c9c3
and eax, 0xffffff7f
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, eax
test ebx, ebx
jne 0x40ca07
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
mov eax, edi
call fcn.0040b952
push esi
push edi
push 0x404538
push 4
call fcn.0040d3c6
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [ebp - 0x260]
test ebx, ebx
je 0x40c942
mov ebx, dword [ebp - 0x278]
lea eax, [ebp - 0x230]
mov edx, 0x105
mov ecx, ebx
call fcn.0040bce6
mov ecx, dword [ebp - 0x270]
lea eax, [ebp - 0x230]
mov edx, 0x105
call fcn.0040bce6
test byte [ebp - 0x25c], 0x10
je 0x40caf4
mov ecx, 0x40410c
lea eax, [ebp - 0x230]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40ca75
test dx, dx
je 0x40ca6f
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40ca75
add eax, 4
add ecx, 4
test dx, dx
jne 0x40ca4d
xor ebx, ebx
mov eax, ebx
jmp 0x40ca7c
sbb eax, eax
sbb eax, 0xffffffff
xor ebx, ebx
test eax, eax
je 0x40cc52
mov ecx, 0x404110
lea eax, [ebp - 0x230]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40cab5
test dx, dx
je 0x40cab1
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40cab5
add eax, 4
add ecx, 4
test dx, dx
jne 0x40ca8f
mov eax, ebx
jmp 0x40caba
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40cc52
mov ebx, dword [ebp - 0x268]
push esi
push ebx
push 0x404118
push 2
call fcn.0040d3c6
add esp, 0x10
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
push ebx
call fcn.0040c77c
jmp 0x40cc4c
cmp dword [ebp + 0x1c], 0
je 0x40cb09
mov edi, ebx
call fcn.0040d208
test eax, eax
je 0x40cc52
cmp dword [ebp + 0x14], 0
je 0x40cb32
push 0x4034d8
xor eax, eax
push eax
push esi
call fcn.0040d6b8
mov ebx, eax
test ebx, ebx
jne 0x40cb32
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40cc6f
cmp dword [ebp + 0x20], 0
jne 0x40cb4b
push dword [ebp + 0x10]
mov eax, dword [ebp - 0x268]
push esi
call fcn.0040cda2
test eax, eax
je 0x40cb83
call fcn.0040b3df
xor edi, edi
inc edi
mov esi, eax
call fcn.0040b979
mov edi, dword [ebp - 0x260]
push edi
push dword [ebp - 0x268]
call fcn.0040cd0d
mov edi, esi
mov ebx, eax
call fcn.0040b979
test ebx, ebx
je 0x40cc6f
mov esi, dword [ebp - 0x260]
push esi
call fcn.0040d191
test eax, eax
je 0x40cc52
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40cbe2
xor eax, eax
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
mov eax, esi
call fcn.0040b952
cmp edi, 2
je 0x40cbc9
push edi
push esi
push 0x404478
push 3
call fcn.0040d3c6
add esp, 0x10
jmp 0x40cbd9
push esi
push 0x4044d8
push 2
call fcn.0040d3c6
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40cc35
and eax, 0x3120
mov ecx, 0x80
or eax, ecx
cmp eax, ecx
je 0x40cbf7
and eax, 0xffffff7f
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, eax
test ebx, ebx
jne 0x40cc39
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0x260]
mov esi, eax
push esi
mov eax, edi
call fcn.0040b952
push esi
push edi
push 0x404538
push 4
call fcn.0040d3c6
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, edi
test ebx, ebx
je 0x40cc6f
cmp dword [ebp + 0x14], 0
je 0x40cc52
push 0x4034d8
push 1
push esi
call fcn.0040d6b8
mov ebx, eax
test ebx, ebx
je 0x40cc6f
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x26c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ebx, eax
test ebx, ebx
jne 0x40ca07
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x12
jne 0x40cc9c
xor ebx, ebx
inc ebx
cmp dword [ebp + 0x18], 0
je 0x40cca3
push 0x403920
push ebx
push dword [ebp - 0x264]
call fcn.0040d6b8
mov ebx, eax
test ebx, ebx
jne 0x40cca3
call esi
jmp 0x40c948
mov edi, dword [ebp - 0x27c]
push dword [ebp - 0x268]
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call esi
mov eax, dword [ebp - 0x260]
test eax, eax
je 0x40ccd8
push eax
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov eax, dword [ebp - 0x26c]
cmp eax, 0xffffffff
je 0x40ccea
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test ebx, ebx
jne 0x40ccf5
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 8]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0041b8aa
leave
ret 0x1c