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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x27c
mov eax, dword [esp + 0x290]
mov dword [esp + 4], 0x5c
mov edi, dword [esp + 0x294]
mov ebx, dword [esp + 0x29c]
mov dword [esp], eax
call sub.msvcrt.dll_wcsrchr
mov dword [esp + 4], 0x2f
mov esi, eax
mov eax, dword [esp + 0x290]
mov dword [esp], eax
call sub.msvcrt.dll_wcsrchr
cmp esi, eax
cmovae eax, esi
xor esi, esi
test eax, eax
je 0x6adc0611
sub eax, dword [esp + 0x290]
mov esi, eax
sar esi, 1
add esi, 1
mov edx, dword [esp + 0x298]
test edx, edx
je 0x6adc0639
mov dword [esp + 8], 0x28b
mov dword [esp + 4], str.src_win32_replacements.c
mov dword [esp], str.errfunc____void__0_
call dword [0x6ae0f298]
test edi, 1
je 0x6adc0820
and edi, 0xfffffffc
jne 0x6adc07f8
lea eax, [esp + 0x20]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x290]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
sub esp, 8
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
je 0x6adc0870
lea edx, [esi + 1]
mov dword [ebx], 0
lea ebp, [esi + esi]
xor eax, eax
mov dword [ebx + 4], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], edx
jmp 0x6adc0725
lea eax, [esp + 0x4c]
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
mov esi, eax
mov eax, dword [esp + 0x1c]
add eax, esi
add eax, eax
mov dword [esp], eax
call fcn.6adab3e0
mov edi, eax
test eax, eax
je 0x6adc0848
mov eax, dword [esp + 0x290]
mov dword [esp + 8], ebp
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
lea ecx, [esi + esi + 2]
lea edx, [esp + 0x4c]
lea eax, [edi + ebp]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
lea esi, [eax + 1]
mov dword [ebx], esi
mov dword [ecx + eax*4], edi
lea eax, [esp + 0x20]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
sub esp, 8
test eax, eax
je 0x6adc0760
mov eax, dword [ebx]
cmp dword [esp + 0x14], eax
jne 0x6adc06a0
mov eax, dword [esp + 0x14]
lea eax, [eax + eax + 1]
mov dword [esp + 0x14], eax
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call fcn.6adab420
test eax, eax
je 0x6adc0848
mov dword [ebx + 4], eax
jmp 0x6adc06a0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
cmp edi, 0x12
jne 0x6adc0790
add esp, 0x27c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, dword [sym.imp.msvcrt.dll__errno]
mov esi, 2
call ebp
mov ecx, eax
mov eax, edi
call fcn.6adbfb30
mov dword [ecx], eax
call ebp
xor edi, edi
mov eax, dword [eax]
mov dword [esp + 0x14], eax
mov eax, dword [ebx]
test eax, eax
je 0x6adc07d5
lea esi, [esi]
nop
mov eax, dword [ebx + 4]
mov eax, dword [eax + edi*4]
add edi, 1
mov dword [esp], eax
call fcn.6adab410
cmp edi, dword [ebx]
jb 0x6adc07c0
mov eax, dword [ebx + 4]
mov dword [esp], eax
call fcn.6adab410
call ebp
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
add esp, 0x27c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0x28d
mov dword [esp + 4], str.src_win32_replacements.c
mov dword [esp], str._flags___0x2__0x1____0
call dword [0x6ae0f298]
jmp 0x6adc064e
mov dword [esp + 8], 0x28c
mov dword [esp + 4], str.src_win32_replacements.c
mov dword [esp], str._flags__0x1___0x1
call dword [0x6ae0f298]
jmp 0x6adc0645
mov eax, dword [esp + 0x18]
mov esi, 1
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [sym.imp.msvcrt.dll__errno]
sub esp, 4
call ebp
mov dword [eax], 0xc
jmp 0x6adc07a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 2
je 0x6adc08a0
call dword [sym.imp.msvcrt.dll__errno]
mov esi, 2
mov ecx, eax
mov eax, ebx
call fcn.6adbfb30
mov dword [ecx], eax
add esp, 0x27c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.msvcrt.dll__errno]
mov esi, 3
mov dword [eax], 0
jmp 0x6adc077f