Function at 0x40ad90
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x410c27
push eax
mov eax, 0x1074
mov dword fs:[0], esp
call fcn.0040f530
push ebx
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
push ebp
push esi
mov ebp, ecx
push edi
push 0
push 0
mov eax, dword [ebp + 0x108]
push 0x402
push eax
call ebx
call sub.MFC42.DLL_AfxGetModuleState
mov esi, dword [eax + 4]
lea ecx, [ebp + 0xd8]
push ecx
lea ecx, [esp + 0x14]
call fcn.0040f000
push 0x416464
lea ecx, [esp + 0x14]
mov dword [esp + 0x1090], 0
call fcn.0040f078
lea edx, [esp + 0x14]
push edx
push 0x416460
push 0x89
call fcn.00401810
add esp, 0xc
mov edi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40ae37
mov ecx, dword [esp + 0x10]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edx, dword [esp + 0x10]
push 0x1001
push edx
lea ecx, [esp + 0x5c]
call sub.MFC42.DLL_CFile::CFile_1
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x54]
push eax
push edi
mov byte [esp + 0x1094], 1
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 0x54]
call sub.MFC42.DLL_CFile::Close
mov ecx, dword [ebp + 0x108]
xor edi, edi
push edi
push 0x14
push 0x402
push ecx
call ebx
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40ae9d
mov eax, dword [esp + 0x10]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CFile::CFile
mov ecx, dword [esp + 0x10]
push edi
push 1
push ecx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1098], 2
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x40b22a
mov edx, dword [esp + 0x30]
push 2
push edi
lea ecx, [esp + 0x38]
call dword [edx + 0x30]
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CFile::GetPosition
mov dword [esp + 0x14], eax
mov ecx, dword [esi + 0x3de0]
cmp ecx, edi
mov dword [esp + 0x18], ecx
jle 0x40af2e
mov ecx, dword [esi + 0x3de4]
mov eax, dword [esi + 0x4524]
lea edx, [esp + 0x18]
push ecx
push edx
push eax
call fcn.00401730
mov ecx, dword [esp + 0x24]
add esp, 0xc
push ecx
push eax
lea ecx, [esp + 0x38]
call sub.MFC42.DLL_CFile::Write
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
add eax, ecx
mov dword [esp + 0x14], eax
jmp 0x40af36
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], eax
mov edx, dword [ebp + 0x108]
push edi
push 0x3c
push 0x402
push edx
call ebx
mov eax, dword [esi + 0x3de8]
cmp eax, edi
mov dword [esp + 0x28], eax
jle 0x40af93
mov ecx, dword [esi + 0x3dec]
mov eax, dword [esi + 0x4524]
lea edx, [esp + 0x28]
push ecx
push edx
push eax
call fcn.00401730
mov ecx, dword [esp + 0x34]
add esp, 0xc
push ecx
push eax
lea ecx, [esp + 0x38]
call sub.MFC42.DLL_CFile::Write
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x2c], eax
add eax, ecx
mov dword [esp + 0x14], eax
jmp 0x40af97
mov dword [esp + 0x28], edi
mov edx, dword [ebp + 0x108]
push edi
push 0x50
push 0x402
push edx
call ebx
lea ecx, [esp + 0x64]
call fcn.004035b0
lea eax, [esi + 0x3ce0]
lea ecx, [esp + 0x64]
push eax
mov byte [esp + 0x1090], 3
mov dword [esp + 0x1074], 0x18
call fcn.00403660
mov ecx, dword [esp + 0x18]
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
push ecx
lea edx, [esp + 0x44]
push 0x4160c4
push edx
call edi
add esp, 0xc
lea eax, [esp + 0x40]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x40]
push ecx
push 0x4160c4
push edx
call edi
add esp, 0xc
lea eax, [esp + 0x40]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x40]
push ecx
push 0x4160c4
push edx
call edi
add esp, 0xc
lea eax, [esp + 0x40]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x40]
push ecx
push 0x4160c4
push edx
call edi
add esp, 0xc
lea eax, [esp + 0x40]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov eax, dword [esi + 0x420c]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov eax, dword [esi + 0x4210]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov eax, dword [esi + 0x4214]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov eax, dword [esi + 0x4218]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov eax, dword [esi + 0x4200]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov eax, dword [esi + 0x44d8]
push str.TRUE
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x40b0d2
push str.TRUE
jmp 0x40b0d7
push str.FALSE
lea ecx, [esp + 0x68]
call fcn.00403660
mov eax, dword [esi + 0x44ec]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov eax, dword [esi + 0x44f0]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov eax, dword [esi + 0x44f4]
lea ecx, [esp + 0x64]
push eax
call fcn.00403660
mov esi, dword [esi + 0x451c]
lea ecx, [esp + 0x64]
push esi
call fcn.00403660
mov esi, 9
push str.NULL
lea ecx, [esp + 0x68]
call fcn.00403660
dec esi
jne 0x40b125
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x68]
call fcn.00403960
mov edx, dword [esp + 0x20]
mov esi, eax
push str.star.exe
push edx
push esi
call fcn.00403390
mov eax, dword [esp + 0x2c]
add esp, 0xc
lea ecx, [esp + 0x30]
push eax
push esi
call sub.MFC42.DLL_CFile::Write
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
push ecx
push edx
lea eax, [esp + 0x2c]
push str.LEN:_d_SEEK:_d.
push eax
mov byte [esp + 0x109c], 4
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x34]
add esp, 0x10
mov ecx, dword [eax - 8]
push ecx
push eax
lea ecx, [esp + 0x38]
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CFile::Close
mov ecx, dword [ebp + 0x108]
push 0
push 0x64
push 0x402
push ecx
call ebx
lea ecx, [esp + 0x24]
mov byte [esp + 0x108c], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x64]
mov byte [esp + 0x108c], 2
call fcn.00403650
lea ecx, [esp + 0x30]
mov byte [esp + 0x108c], 1
call fcn.0040f024
lea ecx, [esp + 0x54]
mov byte [esp + 0x108c], 0
call fcn.0040f024
lea ecx, [esp + 0x10]
mov dword [esp + 0x108c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
jmp 0x40b262
lea ecx, [esp + 0x30]
mov byte [esp + 0x108c], 1
call fcn.0040f024
lea ecx, [esp + 0x54]
mov byte [esp + 0x108c], 0
call fcn.0040f024
lea ecx, [esp + 0x10]
mov dword [esp + 0x108c], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x1084]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1080
ret