Function at 0x104f985
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
push 0x4e0
mov eax, 0x1059b93
call fcn.01021f2c
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
xor ebx, ebx
lea ecx, [ebp - 0x4c4]
mov dword [ebp - 0x4dc], esi
mov dword [ebp - 0x4d4], eax
mov dword [ebp - 0x4b4], ebx
call fcn.010151da
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x4b8]
call fcn.010151da
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4bc]
call fcn.010151da
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4c8]
call fcn.010151da
mov byte [ebp - 4], 3
mov dword [ebp - 0x4cc], 1
cmp esi, ebx
jne 0x104fa40
push 0x57
pop esi
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4c8]
call fcn.01015174
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4bc]
call fcn.01015174
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4b8]
call fcn.01015174
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x4c4]
call fcn.01015174
mov eax, esi
call fcn.01021fbe
ret 8
cmp dword [0x10659f0], ebx
jne 0x104fa5b
call fcn.0104f820
mov dword [ebp - 0x4b4], eax
cmp eax, ebx
je 0x104fa5b
mov esi, eax
jmp 0x104f9fa
push 0x10657e8
lea ecx, [ebp - 0x4c4]
call fcn.010158cd
push 0x100525c
lea eax, [ebp - 0x4c4]
push eax
lea eax, [ebp - 0x4c0]
push eax
call fcn.01015847
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x4b8]
call fcn.01015959
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4c0]
call fcn.01015174
mov edi, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 0x4b8]
call edi
mov dword [ebp - 0x4c0], eax
cmp eax, 0xffffffff
jne 0x104fad1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x104fa57
xor eax, eax
jmp 0x104fa57
mov esi, 0x1001678
test byte [ebp - 0x260], 0x10
je 0x104fc9f
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push 0x1005258
lea eax, [ebp - 0x234]
push eax
call ebx
test eax, eax
je 0x104fc9f
push 0x1005250
lea eax, [ebp - 0x234]
push eax
call ebx
test eax, eax
je 0x104fc9f
push esi
lea eax, [ebp - 0x4c4]
push eax
lea eax, [ebp - 0x4d0]
push eax
call fcn.01015847
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x234]
push ecx
push eax
lea eax, [ebp - 0x4e4]
push eax
call fcn.01015847
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x4bc]
call fcn.01015959
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x4e4]
call fcn.01015174
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4d0]
call fcn.01015174
push esi
lea eax, [ebp - 0x4bc]
push eax
lea eax, [ebp - 0x4d8]
push eax
call fcn.01015847
mov byte [ebp - 4], 7
push 0x1013688
push eax
lea eax, [ebp - 0x4ec]
push eax
call fcn.01015847
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x4b8]
call fcn.01015959
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x4ec]
call fcn.01015174
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4d8]
call fcn.01015174
lea eax, [ebp - 0x4b0]
push eax
push dword [ebp - 0x4b8]
call edi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x104fbfe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x4b4], eax
cmp eax, 2
jne 0x104fcc3
and dword [ebp - 0x4b4], 0
jmp 0x104fc9f
test byte [ebp - 0x4b0], 0x10
jne 0x104fc79
push esi
lea eax, [ebp - 0x4bc]
push eax
lea eax, [ebp - 0x4e0]
push eax
call fcn.01015847
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x484]
push ecx
push eax
lea eax, [ebp - 0x4e8]
push eax
call fcn.01015847
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x4c8]
call fcn.01015959
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x4e8]
call fcn.01015174
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4e0]
call fcn.01015174
push dword [ebp - 0x4d4]
push dword [ebp - 0x4c8]
call dword [ebp - 0x4dc]
mov dword [ebp - 0x4cc], eax
lea eax, [ebp - 0x4b0]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x104fc98
cmp dword [ebp - 0x4cc], 0
jne 0x104fbfe
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 0x4c0]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x104fcc3
cmp dword [ebp - 0x4cc], 0
jne 0x104fad6
push dword [ebp - 0x4c0]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp - 0x4b4]
jmp 0x104f9fa