Function at 0x404541
Capabilities:
Get file attributes

Disassembly:
mov eax, 0x407825
call sub.MSVCRT.dll__EH_prolog
sub esp, 0xcc
push ebx
push esi
push edi
mov ebx, ecx
push dword [ebp + 8]
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x20], ebx
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [ebp + 0xc]
xor edi, edi
push 0x40c340
mov dword [ebp - 4], edi
call fcn.00406c04
mov eax, dword [ebp - 0x24]
cmp dword [eax - 8], edi
jne 0x40458a
lea eax, [ebx + 0x5c]
lea ecx, [ebp - 0x24]
push eax
call fcn.00406b92
lea ecx, [ebp - 0x18]
call sub.MFC42.DLL_CString::CString
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 1
push eax
push 6
push ecx
lea eax, [ebp - 0x24]
mov ecx, esp
mov dword [ebp - 0x2c], esp
push eax
call sub.MFC42.DLL_CString::CString_1
mov ecx, ebx
call fcn.00404c35
sub eax, 3
je 0x404a34
dec eax
dec eax
je 0x404a2a
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CFileFind::CFileFind
push dword [ebp - 0x18]
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
and eax, 0x10
cmp al, 0x10
jne 0x404693
lea eax, [ebp - 0x18]
lea ecx, [ebp + 8]
push eax
call sub.MFC42.DLL_CString::CString_1
lea eax, [ebp - 0x10]
push 1
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::Right
mov eax, dword [eax]
push 0x40c148
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
mov ebx, eax
pop ecx
neg ebx
pop ecx
sbb bl, bl
lea ecx, [ebp - 0x10]
inc bl
call fcn.00406b8c
test bl, bl
je 0x404652
lea eax, [ebp - 0x18]
push 0x40c1a4
push eax
lea eax, [ebp - 0x10]
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push edi
push eax
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CFileFind::FindFile
mov esi, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x10]
jmp 0x40467d
lea eax, [ebp - 0x18]
push str..
push eax
lea eax, [ebp - 0x10]
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push edi
push eax
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CFileFind::FindFile
mov esi, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x10]
call fcn.00406b8c
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.00406b8c
mov ebx, dword [ebp - 0x20]
jmp 0x4046a1
push edi
lea ecx, [ebp - 0x48]
push dword [ebp - 0x18]
call sub.MFC42.DLL_CFileFind::FindFile
mov esi, eax
cmp esi, edi
je 0x4047e4
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CFileFind::FindNextFileA
lea ecx, [ebp - 0x48]
mov esi, eax
call sub.MFC42.DLL_CFileFind::IsDots
test eax, eax
jne 0x4046a1
cmp dword [ebp + 0x10], edi
jne 0x4047ad
mov eax, dword [ebp - 0x48]
push 0x10
lea ecx, [ebp - 0x48]
call dword [eax + 0x40]
cmp eax, edi
je 0x4046de
push str.drwx______
jmp 0x4046e3
push str._rwx______
mov ecx, dword [ebp + 0xc]
call sub.MFC42.DLL_CString::operator_1
mov ecx, dword [ebp + 0xc]
push str._1_user_group
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CFileFind::GetLength
push eax
lea eax, [ebp + 8]
push 0x40c170
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [ebp - 0x14]
push str.
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
mov byte [ebp - 4], 7
mov eax, dword [eax - 8]
sub eax, dword [ecx - 8]
lea ecx, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
call sub.MFC42.DLL_CString::Left
mov ecx, dword [ebp + 0xc]
push eax
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 7
call fcn.00406b8c
mov ecx, dword [ebp + 0xc]
lea eax, [ebp + 8]
push eax
call sub.MFC42.DLL_CString::operator
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00406137
pop ecx
pop ecx
mov ecx, dword [ebp + 0xc]
push eax
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 7
call fcn.00406b8c
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
call fcn.00406b8c
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.00406b8c
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x48]
push eax
call sub.MFC42.DLL_CFileFind::GetFileName
mov ecx, dword [ebp + 0xc]
push eax
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00406b8c
mov ecx, dword [ebp + 0xc]
push 0x40ba34
call sub.MFC42.DLL_CString::operator_1
jmp 0x4046a1
cmp dword [ebx + 0x74], edi
mov dword [ebp + 8], edi
jle 0x404a19
lea edi, [ebx + 0x6c]
push dword [ebp + 8]
lea eax, [ebp - 0x6c]
mov ecx, edi
push eax
call fcn.00404f49
mov esi, dword [eax + 0x20]
lea ecx, [ebp - 0x6c]
call fcn.00406381
test esi, esi
jne 0x404823
inc dword [ebp + 8]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0x74]
jl 0x4047f3
jmp 0x404a19
push dword [ebp + 8]
lea eax, [ebp - 0x6c]
mov ecx, edi
push eax
call fcn.00404f49
add eax, 4
lea ecx, [ebp - 0x10]
push eax
mov byte [ebp - 4], 0xb
call sub.MFC42.DLL_CString::CString_1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 0xd
call fcn.00406381
push 0x5c
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::TrimRight
push dword [ebp - 0x10]
push dword [ebp - 0x18]
call dword [sym.imp.MSVCRT.dll__mbsicmp]
pop ecx
test eax, eax
pop ecx
jne 0x404a0d
mov eax, dword [ebp - 0x20]
xor esi, esi
cmp dword [eax + 0x74], esi
jle 0x404a0d
lea eax, [ebp - 0xb4]
push esi
push eax
mov ecx, edi
call fcn.00404f49
add eax, 8
lea ecx, [ebp - 0x14]
push eax
mov byte [ebp - 4], 0xe
call sub.MFC42.DLL_CString::CString_1
lea ecx, [ebp - 0xb4]
mov byte [ebp - 4], 0x10
call fcn.00406381
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::TrimLeft_1
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::TrimRight_2
cmp dword [ebp + 8], esi
je 0x4049f4
mov eax, dword [ebp - 0x14]
cmp dword [eax - 8], 0
je 0x4049f4
lea eax, [ebp - 0x90]
push esi
push eax
mov ecx, edi
call fcn.00404f49
add eax, 4
lea ecx, [ebp - 0x1c]
push eax
mov byte [ebp - 4], 0x11
call sub.MFC42.DLL_CString::CString_1
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 0x13
call fcn.00406381
lea eax, [ebp - 0x28]
push 1
push eax
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::Right
mov eax, dword [eax]
push 0x40c148
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
mov ebx, eax
pop ecx
neg ebx
pop ecx
sbb bl, bl
lea ecx, [ebp - 0x28]
inc bl
call fcn.00406b8c
test bl, bl
je 0x40493c
push 0x40c15c
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::operator_1
push 0
lea ecx, [ebp - 0x48]
push dword [ebp - 0x1c]
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
je 0x4049e8
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CFileFind::FindNextFileA
cmp dword [ebp + 0x10], 0
jne 0x4049ad
mov ebx, dword [ebp + 0xc]
push str.drwx______
mov ecx, ebx
call sub.MFC42.DLL_CString::operator_1
push str._1_user_group
mov ecx, ebx
call sub.MFC42.DLL_CString::operator_1
push str._____________0
mov ecx, ebx
call sub.MFC42.DLL_CString::operator_1
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00406137
pop ecx
pop ecx
push eax
mov ecx, ebx
mov byte [ebp - 4], 0x14
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0x13
call fcn.00406b8c
lea eax, [ebp - 0xd8]
push esi
push eax
mov ecx, edi
call fcn.00404f49
mov ecx, dword [ebp + 0xc]
add eax, 8
push eax
mov byte [ebp - 4], 0x15
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 0x13
call fcn.00406381
mov ecx, dword [ebp + 0xc]
push 0x40ba34
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0x10
call fcn.00406b8c
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xd
call fcn.00406b8c
mov eax, dword [ebp - 0x20]
inc esi
cmp esi, dword [eax + 0x74]
jl 0x40487b
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.00406b8c
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.00406e4a
push 1
pop esi
jmp 0x404a47
push dword [ebp + 8]
push str.550___s_:_Permission_denied.
jmp 0x404a3c
push dword [ebp + 8]
push str.550___s_:_Directory_not_found.
push ebx
call fcn.004030ef
add esp, 0xc
xor esi, esi
and byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.00406b8c
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00406b8c
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0xc