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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x264
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x260], eax
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push 0x208
push 8
mov dword [esp + 0x18], 0
call esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call edi
mov dword [0x10011968], eax
test eax, eax
jne 0x100016ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
push ecx
call fcn.10001500
add esp, 4
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x260]
xor ecx, esp
call fcn.10002ef7
mov esp, ebp
pop ebp
ret
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x100016fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
call fcn.10001500
mov eax, dword [0x10011968]
add esp, 4
push eax
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x260]
xor ecx, esp
call fcn.10002ef7
mov esp, ebp
pop ebp
ret
push 0x208
push 8
call esi
push eax
call edi
mov ebx, eax
test ebx, ebx
jne 0x10001748
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
call fcn.10001500
mov ecx, dword [0x10011968]
add esp, 4
push ecx
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x260]
xor ecx, esp
call fcn.10002ef7
mov esp, ebp
pop ebp
ret
movzx edi, word [ebp + 8]
push edi
push str._c:
mov ecx, 0x104
call fcn.10001550
add esp, 8
push 0
push 0
push 1
lea edx, [esp + 0x24]
push edx
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x100017c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
call fcn.10001500
mov eax, dword [0x10011968]
add esp, 4
push eax
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x260]
xor ecx, esp
call fcn.10002ef7
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x44]
push ecx
push edi
push str._c:_s
mov ecx, 0x104
call fcn.10001550
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
cmp ecx, 0xffffffff
jne 0x100017f6
lea edx, [esp + 0x44]
push edx
call fcn.10001500
add esp, 4
jmp 0x1000181f
test cl, 0x10
je 0x1000181f
push ebx
call fcn.10001500
add esp, 4
mov eax, ecx
mov esi, ebx
call fcn.100018b0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x1000181f
inc dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x1000183c
cmp dword [esp + 0xc], 0x12
jne 0x100017c1
jmp 0x10001856
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0xc], eax
cmp eax, 0x12
je 0x10001856
mov edx, eax
push edx
call fcn.10001500
add esp, 4
push edi
call fcn.10001500
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call fcn.10002cf0
mov ecx, dword [esp + 0x18]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edx, dword [0x10011968]
push edx
push 0
call esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
push ebx
push 0
call esi
push eax
call edi
mov ecx, dword [esp + 0x26c]
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10002ef7
mov esp, ebp
pop ebp
ret