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

Disassembly:
sub esp, 0x274
mov eax, dword [0x598b80]
xor eax, esp
mov dword [esp + 0x270], eax
mov eax, dword [esp + 0x27c]
xor ecx, ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x284]
xor ebp, ebp
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x28c]
push edi
mov edi, dword [esp + 0x298]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x294]
mov dword [esp + 0x2c], eax
mov byte [esp + 0x13], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], ecx
test edi, edi
je 0x4f3eab
cmp dword [esp + 0x29c], ecx
jle 0x4f3eab
mov byte [edi], cl
mov ebx, esi
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4f3eb0
sub ebx, ecx
lea eax, [ebx + 0xa]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, eax
add esp, 4
mov dword [esp + 0x18], edx
test edx, edx
jne 0x4f3f01
test edi, edi
je 0x4f3ef9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov ebx, dword [esp + 0x2a0]
push eax
push 0x56a850
push ebx
push edi
call fcn.004e0780
add esp, 0x14
or eax, 0xffffffff
jmp 0x4f4242
mov ecx, edx
sub ecx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x4f3f05
mov al, byte [edx]
mov esi, edx
test al, al
je 0x4f3f2f
nop word [eax + eax]
cmp al, 0x2f
jne 0x4f3f27
mov byte [esi], 0x5c
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4f3f20
test ebx, ebx
jne 0x4f3f3b
mov dword [edx], 0x2a5c2e
jmp 0x4f3fab
cmp ebx, 2
jne 0x4f3f64
cmp byte [edx + 1], 0x3a
jne 0x4f3f7f
movsx eax, byte [edx]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isalpha]
mov edx, dword [esp + 0x1c]
add esp, 4
test eax, eax
je 0x4f3f7f
mov byte [esi], 0x5c
inc esi
mov byte [esi], 0
jmp 0x4f3f7f
cmp ebx, 1
jne 0x4f3f7b
cmp byte [esi - 1], 0x2e
jne 0x4f3f7f
mov dword [edx], 0x2a5c2e
mov byte [esp + 0x13], bl
jmp 0x4f3f7f
test ebx, ebx
jle 0x4f3f91
cmp byte [esi - 1], 0x5c
jne 0x4f3f91
mov byte [esi], 0x2a
inc esi
mov byte [esp + 0x13], 1
mov byte [esi], 0
cmp ebx, 1
jle 0x4f3fab
cmp byte [esi - 1], 0x2e
jne 0x4f3fab
cmp byte [esi - 2], 0x5c
jne 0x4f3fab
mov byte [esi - 1], 0x2a
mov byte [esp + 0x13], 1
mov ecx, edx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f3fb0
push 0
sub ecx, edx
push 0
push ecx
push dword [esp + 0x24]
call fcn.004d4690
lea ebx, [eax + 1]
lea eax, [ebx*2 + 4]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, dword [esp + 0x2c]
add esp, 0x14
mov esi, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f3fe4
push ebx
sub ecx, edx
push esi
push ecx
push dword [esp + 0x24]
call fcn.004d4690
mov ebx, eax
add esp, 0x10
xor eax, eax
mov word [esi + ebx*2], ax
cmp byte [esp + 0x13], al
jne 0x4f4028
push esi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4f4028
test al, 0x10
je 0x4f4028
xor eax, eax
mov dword [esi + ebx*2], 0x2a005c
mov word [esi + ebx*2 + 4], ax
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.kernel32.dll_FindFirstFileW]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push esi
mov dword [esp + 0x24], eax
call ebx
add esp, 4
cmp dword [esp + 0x20], 0xffffffff
jne 0x4f4110
push dword [esp + 0x18]
call ebx
mov esi, dword [sym.imp.kernel32.dll_GetLastError]
add esp, 4
call esi
cmp eax, 0x12
je 0x4f40fc
mov dword [esp + 0x1c], 0xffffffff
call esi
mov dword [esp + 0x14], ebp
mov esi, eax
test edi, edi
je 0x4f40fc
mov ebx, dword [esp + 0x29c]
test ebx, ebx
jle 0x4f40fc
push 0
push 0
lea eax, [esp + 0x1c]
push eax
push 0x400
push esi
push 0
push 0x1300
call dword [sym.imp.kernel32.dll_FormatMessageW]
test eax, eax
jne 0x4f40c7
push esi
push str.Error__lu
push ebx
push edi
call fcn.004e0780
mov eax, dword [esp + 0x34]
add esp, 0x10
mov dword [eax], ebp
mov eax, dword [esp + 0x1c]
jmp 0x4f4242
push eax
push dword [esp + 0x18]
push ebx
push edi
call fcn.004d45e0
mov al, byte [edi]
add esp, 0x10
mov ecx, edi
test al, al
je 0x4f40ef
nop
cmp al, 0xd
je 0x4f40e7
mov byte [edi], al
inc edi
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x4f40e0
push dword [esp + 0x14]
mov byte [edi], 0
call dword [sym.imp.kernel32.dll_LocalFree]
mov eax, dword [esp + 0x24]
mov dword [eax], ebp
mov eax, dword [esp + 0x1c]
jmp 0x4f4242
lea edi, [esp + 0x5c]
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x4f4117
sub edi, ecx
sar edi, 1
lea esi, [edi*4 + 1]
add esi, edi
lea eax, [esi + 1]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
lea eax, [esp + 0x60]
push edi
push eax
push esi
push ebx
call fcn.004d45e0
add esp, 0x14
mov byte [eax + ebx], 0
test byte [esp + 0x30], 0x10
je 0x4f4173
lea edi, [ebx - 1]
nop dword [eax]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x4f4160
mov ax, word [0x56c7b8]
mov word [edi], ax
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4f4197
push ebx
call eax
add esp, 4
test eax, eax
jne 0x4f4197
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call ebx
mov edi, dword [esp + 0x20]
add esp, 4
jmp 0x4f41f6
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
cmp edi, eax
jne 0x4f41df
add eax, 0x21
push eax
push 4
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov ecx, dword [esp + 0x1c]
add esp, 8
mov esi, eax
test ecx, ecx
je 0x4f41ca
shl ecx, 2
push ecx
push ebp
push esi
call fcn.00517140
add esp, 0xc
test ebp, ebp
je 0x4f41d8
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
add dword [esp + 0x14], 0x20
mov ebp, esi
mov dword [ebp + edi*4], ebx
inc edi
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [esp + 0x1c], edi
mov dword [ebp + edi*4], 0
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.kernel32.dll_FindNextFileW]
test eax, eax
jne 0x4f4110
call dword [sym.imp.kernel32.dll_GetLastError]
push esi
call dword [sym.imp.kernel32.dll_FindClose]
push dword [esp + 0x18]
call ebx
mov eax, dword [esp + 0x30]
add esp, 4
test eax, eax
je 0x4f423a
push eax
push 4
push edi
push ebp
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
add esp, 0x10
mov eax, dword [esp + 0x24]
mov dword [eax], ebp
mov eax, edi
mov ecx, dword [esp + 0x280]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00515f8b
add esp, 0x274
ret