Function at 0x40fa60
Capabilities:
Set file attributes

Disassembly:
mov eax, 0x419c34
call fcn.004180f0
sub esp, 0x80
push ebx
push esi
xor esi, esi
mov ebx, ecx
cmp dword [ebp + 0x20], esi
push edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10], esi
jne 0x40fa8e
cmp dword [ebp + 0xc], esi
jne 0x40fa8e
xor al, al
jmp 0x40fcea
lea ecx, [ebp - 0x8c]
call fcn.00410250
push dword [ebp + 8]
lea eax, [ebp - 0x8c]
mov ecx, ebx
mov dword [ebp - 4], esi
push eax
call fcn.0040f0a6
push dword [ebp + 0xc]
lea ecx, [ebp - 0x14]
call fcn.004048f8
mov eax, dword [ebp + 0x14]
mov byte [ebp - 4], 1
cmp eax, esi
jne 0x40fadf
lea eax, [ebp + 0xc]
lea ecx, [ebp - 0x8c]
push eax
call fcn.004108df
mov dword [ebp - 0x10], 1
mov eax, dword [eax]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x18]
call fcn.004048f8
test byte [ebp - 0x10], 1
push 4
pop edi
mov dword [ebp - 4], edi
je 0x40fb00
and dword [ebp - 0x10], 0xfffffffe
lea ecx, [ebp + 0xc]
call sub.MFC42.DLL_CString::CString
mov esi, 0x422a90
lea ecx, [ebp - 0x14]
push esi
call sub.MFC42.DLL_CString::TrimRight
cmp byte [ebp + 0x10], 0
push dword [ebp - 0x18]
je 0x40fb2c
lea eax, [ebp - 0x20]
push eax
call fcn.0040f752
or dword [ebp - 0x10], 2
pop ecx
pop ecx
mov byte [ebp - 4], 5
jmp 0x40fb41
lea eax, [ebp + 0x14]
push eax
call fcn.0040f7fe
or dword [ebp - 0x10], edi
pop ecx
pop ecx
mov dword [ebp - 4], 6
push eax
lea eax, [ebp + 0x10]
push esi
push eax
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 7
call fcn.00404922
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
test byte [ebp - 0x10], 4
mov dword [ebp - 4], 5
je 0x40fb81
and dword [ebp - 0x10], 0xfffffffb
lea ecx, [ebp + 0x14]
call sub.MFC42.DLL_CString::CString
test byte [ebp - 0x10], 2
mov dword [ebp - 4], edi
je 0x40fb92
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString
push dword [ebp + 8]
mov ecx, ebx
call fcn.0040fa1f
test al, al
je 0x40fbe3
push dword [ebp - 0x14]
call fcn.0040f890
pop ecx
push dword [ebp - 0x68]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c]
call fcn.004102ce
mov al, 1
jmp 0x40fcea
push dword [ebp + 8]
mov ecx, ebx
call fcn.0040f1ba
test al, al
jne 0x40fbf8
xor bl, bl
jmp 0x40fcc1
push dword [ebp - 0x14]
lea eax, [ebp + 0x10]
push eax
call fcn.0040f68e
push dword [eax]
mov byte [ebp - 4], 8
call fcn.0040f890
add esp, 0xc
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
push 0x1021
lea ecx, [ebp - 0x3c]
push dword [ebp - 0x14]
call sub.MFC42.DLL_CFile::CFile_1
xor ebx, ebx
mov byte [ebp - 4], 9
cmp dword [ebp + 0x18], ebx
je 0x40fc46
lea ecx, [ebp - 0x8c]
call fcn.004108bb
mov ebx, eax
xor edi, edi
lea ecx, [ebp - 0x2c]
push edi
push dword [ebp + 0x20]
call fcn.00411533
mov byte [ebp - 4], 0xa
push dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
push dword [ebp - 0x28]
call fcn.0040f340
mov esi, eax
test esi, esi
je 0x40fc8f
push esi
lea ecx, [ebp - 0x3c]
push dword [ebp - 0x28]
call sub.MFC42.DLL_CFile::Write
add edi, esi
cmp dword [ebp + 0x18], 0
je 0x40fc8f
push dword [ebp + 0x1c]
push edi
push ebx
call dword [ebp + 0x18]
add esp, 0xc
test al, al
je 0x40fc94
cmp esi, dword [ebp - 0x24]
je 0x40fc58
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x3c]
push eax
call fcn.0040f520
mov ebx, eax
lea ecx, [ebp - 0x2c]
dec ebx
mov byte [ebp - 4], 9
neg ebx
sbb bl, bl
inc bl
call fcn.00411557
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 4
call fcn.00417f32
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c]
call fcn.004102ce
mov al, bl
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x1c