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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x49c
mov edi, dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [ebp - 0x478], ecx
mov dword [esp], edx
mov dword [ebp - 0x488], eax
call edi
mov dword [esp], 0x4231e0
mov dword [ebp - 0x46c], edi
mov ebx, eax
call edi
lea ebx, [ebx + eax + 0x20a]
add ebx, ebx
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp + 4], esi
mov edi, eax
mov dword [esp], eax
mov dword [ebp - 0x47c], eax
call dword [sym.imp.ucrtbase.dll_wcscpy]
mov dword [esp + 4], 0x41828a
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcscat]
mov ecx, 0x5c
mov eax, dword [ebp - 0x46c]
mov word [edi + 2], cx
mov dword [esp], edi
call eax
mov dword [esp], edi
lea esi, [eax + eax - 2]
lea eax, [edi + esi]
mov dword [ebp - 0x480], eax
lea eax, [ebp - 0x268]
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindFirstFileW]
mov dword [ebp - 0x474], eax
sub esp, 8
cmp eax, 0xffffffff
je 0x40ccea
sub ebx, esi
lea edi, [ebp - 0x23c]
sar ebx, 1
mov dword [ebp - 0x484], ebx
lea esi, [esi]
mov dword [esp], edi
mov eax, dword [ebp - 0x46c]
call eax
mov ebx, eax
cmp eax, 0x100
ja 0x40ccb8
mov edx, dword [ebp - 0x478]
test edx, edx
je 0x40cd08
mov dword [esp + 4], 0x418290
mov ebx, dword [sym.imp.ucrtbase.dll_wcscmp]
mov dword [esp], edi
call ebx
test eax, eax
je 0x40ccb8
mov dword [esp + 4], 0x418294
mov dword [esp], edi
call ebx
test eax, eax
je 0x40ccb8
mov eax, edi
call sym._show_dll_in_list
test eax, eax
jne 0x40ce00
lea esi, [esi]
lea eax, [ebp - 0x268]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x474]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindNextFileW]
sub esp, 8
test eax, eax
jne 0x40cc58
mov eax, dword [ebp - 0x474]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
mov eax, dword [ebp - 0x47c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, str..dll
mov eax, 0x2e
mov dword [ebp - 0x470], ebx
xor esi, esi
mov ebx, edx
test ax, ax
je 0x40cd34
mov dword [esp], ebx
mov eax, dword [ebp - 0x46c]
call eax
cmp eax, dword [ebp - 0x470]
jb 0x40cd50
inc esi
cmp esi, 4
je 0x40ccb8
mov ebx, dword [esi*4 + 0x42310c]
movzx eax, word [ebx]
test ax, ax
je 0x40cd34
jmp 0x40cd21
mov dword [esp], ebx
mov eax, dword [ebp - 0x46c]
call eax
mov dword [esp + 4], ebx
mov ecx, eax
mov eax, dword [ebp - 0x470]
sub eax, ecx
lea eax, [edi + eax*2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x40cd34
mov dword [esp], ebx
mov eax, dword [ebp - 0x46c]
call eax
sub dword [ebp - 0x470], eax
mov ebx, dword [ebp - 0x470]
mov dword [esp + 4], edi
lea eax, [ebx + ebx]
mov dword [esp + 8], eax
lea eax, [ebp - 0x468]
mov dword [esp], eax
call sym._memcpy
xor eax, eax
mov word [ebp + ebx*2 - 0x468], ax
lea eax, [ebp - 0x468]
call sym._show_dll_in_list
test eax, eax
je 0x40cd34
lea eax, [ebp - 0x468]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x488]
mov dword [esp + 8], 0x143
mov dword [esp + 4], 0x1f44
mov dword [esp], eax
call dword [sym.imp.user32.dll_SendDlgItemMessageW]
sub esp, 0x14
jmp 0x40cd34
mov ebx, str..dll
xor esi, esi
mov eax, 0x2e
mov edx, ebx
mov ebx, esi
mov esi, edx
test ax, ax
je 0x40ce88
cmp ebx, 1
jbe 0x40cea6
mov eax, dword [ebp - 0x484]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], edi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x480]
mov dword [esp + 0x10], 0x418166
mov dword [esp + 0xc], edi
mov dword [esp + 8], str._s_s_s_s
mov dword [esp], eax
call sym._swprintf_1
mov eax, dword [ebp - 0x47c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
jne 0x40cef4
inc ebx
cmp ebx, 4
je 0x40ccb8
mov esi, dword [ebx*4 + 0x42310c]
movzx eax, word [esi]
test ax, ax
jne 0x40ce17
mov dword [esp + 4], 0x2e
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcschr]
test eax, eax
je 0x40ce6f
cmp ebx, 1
ja 0x40ce20
mov eax, dword [ebp - 0x484]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], edi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x480]
mov dword [esp + 0x10], 0x4231e0
mov dword [esp + 0xc], edi
mov dword [esp + 8], str._s_s_s_s
mov dword [esp], eax
call sym._swprintf_1
mov eax, dword [ebp - 0x47c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
jne 0x40cef4
inc ebx
jmp 0x40ce79
mov eax, dword [ebp - 0x488]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x143
mov dword [esp + 4], 0x1f44
mov dword [esp], eax
call dword [sym.imp.user32.dll_SendDlgItemMessageW]
sub esp, 0x14
jmp 0x40ccb8