Function at 0x497720
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe50
mov eax, 0x5bfad8
call fcn.00568428
mov edx, dword [ebp + 0xc]
mov byte [edx], 0
mov ecx, dword [ebp + 0x14]
mov byte [ecx], 0
mov eax, dword [ebp + 8]
mov dl, byte [eax + 4]
test dl, dl
jne 0x49797a
mov ecx, dword [ebp + 8]
mov al, byte [ecx + 5]
test al, al
je 0x49776c
mov edx, dword [ebp + 8]
push dword [edx + 0x3f0]
call sub.KERNEL32.DLL_FindClose
mov ecx, dword [ebp + 8]
mov byte [ecx + 5], 0
mov eax, dword [ebp + 8]
mov dl, byte [eax + 7]
test dl, dl
jne 0x497787
xor eax, eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
jmp 0x497b52
mov ecx, dword [ebp + 8]
add ecx, 7
push ecx
call fcn.00495bc0
pop ecx
test al, al
je 0x4978a2
mov eax, dword [ebp + 0x18]
test eax, eax
jne 0x4977ac
lea edx, [ebp - 0x1b0]
mov dword [ebp + 0x18], edx
mov ecx, dword [ebp + 0x18]
mov eax, 0x12cf9510
mov dword [ecx + 0x20], eax
mov edx, dword [ebp + 0x18]
mov dword [edx + 0x28], eax
mov edx, dword [ebp + 0x18]
mov dword [edx + 0x24], eax
mov ecx, dword [ebp + 0x18]
mov word [ecx + 4], 0x4180
mov eax, dword [ebp + 0x18]
mov word [eax], 2
mov edx, dword [ebp + 0x18]
mov word [edx + 2], 0
mov ecx, dword [ebp + 0x18]
xor eax, eax
mov dword [ecx + 8], eax
mov edx, dword [ebp + 0x18]
xor ecx, ecx
mov dword [edx + 0xc], ecx
mov eax, dword [ebp + 0x18]
mov word [eax + 0x10], 2
mov edx, dword [ebp + 0x18]
mov word [edx + 6], 1
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 0x18], 0
mov dword [ecx + 0x1c], 0
mov eax, dword [ebp + 8]
add eax, 7
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x38]
cmp edx, 0xffffffff
je 0x49788c
mov ecx, dword [ebp - 0x38]
mov eax, dword [ebp + 0x18]
mov dword [eax + 0xc], ecx
test byte [ebp - 0x38], 1
je 0x49783f
mov edx, dword [ebp + 0x18]
and word [edx + 4], 0xff7f
test byte [ebp - 0x38], 2
je 0x497854
mov ecx, dword [ebp + 0x18]
and word [ecx + 4], 0xfe7f
mov eax, dword [ebp + 0x14]
mov byte [eax], 1
mov edx, dword [ebp + 8]
mov byte [edx + 4], 1
push dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, 7
push ecx
push dword [ebp + 0xc]
call fcn.0056828c
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov byte [eax + edx - 1], 0
mov al, 1
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
jmp 0x497b52
xor eax, eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
jmp 0x497b52
lea ecx, [ebp - 0x180]
push ecx
mov eax, dword [ebp + 8]
add eax, 7
push eax
call sub.KERNEL32.DLL_FindFirstFileA
mov edx, dword [ebp + 8]
mov dword [edx + 0x3f0], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3f0]
cmp eax, 0xffffffff
jne 0x49794b
mov edx, dword [ebp + 8]
mov cl, byte [edx + 6]
test cl, cl
je 0x49794b
mov word [ebp - 0x24], 8
lea eax, [ebp - 0x40]
push eax
call fcn.00414828
pop ecx
push eax
mov edx, dword [ebp + 8]
add edx, 7
push edx
lea ecx, [ebp - 0x10]
push ecx
call fcn.0055f038
add esp, 0xc
inc dword [ebp - 0x18]
mov word [ebp - 0x24], 0x14
push str..lnk
lea eax, [ebp - 0x10]
push eax
call fcn.00496240
add esp, 8
lea edx, [ebp - 0x180]
push edx
lea ecx, [ebp - 0x10]
push ecx
call fcn.0042e68c
pop ecx
push eax
call sub.KERNEL32.DLL_FindFirstFileA
mov edx, dword [ebp + 8]
mov dword [edx + 0x3f0], eax
dec dword [ebp - 0x18]
push 2
lea eax, [ebp - 0x10]
push eax
call fcn.004144d4
add esp, 8
mov word [ebp - 0x24], 0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3f0]
cmp eax, 0xffffffff
jne 0x49796a
xor eax, eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
jmp 0x497b52
mov ecx, dword [ebp + 8]
mov al, 1
mov byte [ecx + 5], al
mov edx, dword [ebp + 8]
mov byte [edx + 4], al
jmp 0x4979e2
mov ecx, dword [ebp + 8]
mov al, byte [ecx + 5]
test al, al
jne 0x49799c
mov edx, dword [ebp + 8]
mov byte [edx + 4], 0
xor eax, eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
jmp 0x497b52
lea ecx, [ebp - 0x180]
push ecx
mov eax, dword [ebp + 8]
push dword [eax + 0x3f0]
call sub.KERNEL32.DLL_FindNextFileA
test eax, eax
jne 0x4979e2
mov edx, dword [ebp + 8]
push dword [edx + 0x3f0]
call sub.KERNEL32.DLL_FindClose
mov ecx, dword [ebp + 8]
xor eax, eax
mov byte [ecx + 5], al
mov edx, dword [ebp + 8]
mov byte [edx + 4], al
xor eax, eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
jmp 0x497b52
push dword [ebp + 0x10]
lea ecx, [ebp - 0x154]
push ecx
push dword [ebp + 0xc]
call fcn.0056828c
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov byte [eax + edx - 1], 0
test byte [ebp - 0x180], 2
je 0x497a11
mov ecx, dword [ebp + 0x14]
mov byte [ecx], 1
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x497b46
mov edx, dword [ebp + 0x18]
mov word [edx], 2
mov ecx, dword [ebp + 0x18]
mov word [ecx + 2], 0
mov eax, dword [ebp + 0x18]
xor edx, edx
mov dword [eax + 8], edx
mov ecx, dword [ebp - 0x180]
mov eax, dword [ebp + 0x18]
mov dword [eax + 0xc], ecx
mov edx, dword [ebp + 0x18]
mov word [edx + 0x10], 2
mov ecx, dword [ebp + 0x18]
mov word [ecx + 6], 1
push 1
push 0
mov eax, dword [ebp - 0x164]
xor edx, edx
call fcn.0056f508
push edx
push eax
mov eax, dword [ebp - 0x160]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 0x18], eax
mov dword [ecx + 0x1c], edx
mov eax, dword [ebp + 0x18]
mov word [eax + 4], 0x180
test byte [ebp - 0x180], 0x10
je 0x497a9e
mov edx, dword [ebp + 0x18]
or word [edx + 4], 0x4000
jmp 0x497aa7
mov ecx, dword [ebp + 0x18]
or word [ecx + 4], 0x8000
test byte [ebp - 0x180], 1
je 0x497ab9
mov eax, dword [ebp + 0x18]
and word [eax + 4], 0xff7f
test byte [ebp - 0x180], 2
je 0x497acb
mov edx, dword [ebp + 0x18]
and word [edx + 4], 0xfe7f
mov ecx, dword [ebp - 0x168]
test ecx, ecx
je 0x497aea
lea eax, [ebp - 0x16c]
push eax
call fcn.00495c4c
pop ecx
mov edx, dword [ebp + 0x18]
mov dword [edx + 0x24], eax
jmp 0x497af4
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 0x24], 0x12cf9510
mov eax, dword [ebp - 0x178]
test eax, eax
je 0x497b13
lea edx, [ebp - 0x17c]
push edx
call fcn.00495c4c
pop ecx
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 0x28], eax
jmp 0x497b1d
mov eax, dword [ebp + 0x18]
mov dword [eax + 0x28], 0x12cf9510
mov edx, dword [ebp - 0x170]
test edx, edx
je 0x497b3c
lea ecx, [ebp - 0x174]
push ecx
call fcn.00495c4c
pop ecx
mov edx, dword [ebp + 0x18]
mov dword [edx + 0x20], eax
jmp 0x497b46
mov eax, dword [ebp + 0x18]
mov dword [eax + 0x20], 0x12cf9510
mov al, 1
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret