Function at 0x469fb0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Read .ini file
Read file via mapping

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x546b8e
push eax
mov eax, 0x1850
mov dword fs:[0], esp
call fcn.00450700
push ebx
push ebp
push esi
push edi
mov ebp, ecx
push ecx
lea eax, [esp + 0x1874]
xor ebx, ebx
mov ecx, esp
mov dword [esp + 0x18], esp
push eax
mov dword [esp + 0x1870], ebx
call sub.MFC42.DLL_CString::CString_3
call fcn.0046fd00
add esp, 4
cmp eax, ebx
je 0x46a04a
lea ecx, [esp + 0x60]
push ecx
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edx, [esp + 0x1870]
lea eax, [esp + 0x60]
push edx
lea ecx, [esp + 0x14]
push eax
push ecx
call sub.MFC42.DLL_operator
push eax
lea ecx, [esp + 0x1874]
mov byte [esp + 0x186c], 1
call sub.MFC42.DLL_CString::operator_3
lea ecx, [esp + 0x10]
mov byte [esp + 0x1868], bl
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x1870]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x46a5c4
lea esi, [ebp + 4]
lea eax, [esp + 0x1870]
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::operator_3
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x1061]
mov byte [esp + 0x1060], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x1461]
mov byte [esp + 0x1460], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x1460]
lea edx, [esp + 0x1060]
stosb byte es:[edi], al
push ecx
lea eax, [esp + 0x64]
push edx
lea ecx, [esp + 0x68]
push eax
push ecx
push ebx
mov ecx, esi
call sub.MFC42.DLL_CString::GetBuffer
push eax
call dword [sym.imp.MSVCRT.dll__splitpath]
mov esi, dword [esi]
add esp, 0x14
lea edx, [esp + 0x3c]
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x40]
push edx
mov dword [esp + 0x40], ebx
push ebx
push esi
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
mov edx, dword [esp + 0x1870]
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push edx
push 1
push str.Enable
mov dword [ebp + 0x1c], eax
push str.General
mov dword [ebp + 0x20], ecx
call esi
mov dword [ebp + 0x30], eax
mov eax, dword [esp + 0x1870]
push eax
push 2
push str.SyntaxVersion
push str.General
call esi
mov ecx, dword [esp + 0x1870]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp + 0x18], eax
push ecx
lea edx, [esp + 0x64]
push 0x1000
lea eax, [esp + 0x1068]
push edx
push eax
push 0x5f1db4
push str.General
call edi
lea ecx, [esp + 0x60]
push ecx
lea ecx, [ebp + 0xc]
call fcn.0044fce0
mov edx, dword [esp + 0x1870]
push edx
push 0x1000
lea eax, [esp + 0x68]
push eax
push 0x617d8c
push str.MacroID
push str.General
call edi
lea ecx, [esp + 0x60]
lea ebx, [ebp + 8]
push ecx
mov ecx, ebx
call fcn.0044fce0
mov ebx, dword [ebx]
push 0x617d8c
push ebx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x46a1c3
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x24]
mov eax, dword [esp + 0x1870]
push eax
push 0x79
push 0x5efb28
push str.General
call esi
lea ecx, [esp + 0x10]
push 0x5efb08
push ecx
mov word [ebp + 0x24], ax
call fcn.004634a0
mov edx, dword [esp + 0x1878]
mov eax, dword [eax]
add esp, 8
push edx
push 0
push eax
push str.General
call esi
lea ecx, [esp + 0x10]
mov word [ebp + 0x26], ax
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x1870]
push eax
push 0
push 0x5efaf8
push str.General
call esi
mov ecx, dword [esp + 0x1870]
mov word [ebp + 0x28], ax
push ecx
push 0
push 0x5efae4
push str.General
call esi
mov edx, dword [esp + 0x1870]
mov word [ebp + 0x2a], ax
push edx
push 0x7b
push 0x5efad4
push str.General
call esi
mov word [ebp + 0x2c], ax
mov eax, dword [esp + 0x1870]
push eax
push 0
push 0x5efac4
push str.General
call esi
mov ecx, dword [esp + 0x1870]
mov word [ebp + 0x2e], ax
push ecx
push 0
push str.Type
push str.Repeat
call esi
mov edx, dword [esp + 0x1870]
mov word [ebp + 0x34], ax
push edx
push 1
push str.Number
push str.Repeat
call esi
mov dword [ebp + 0x38], eax
mov eax, dword [esp + 0x1870]
push eax
push 0
push 0x5f0f18
push str.General
call esi
mov ecx, dword [esp + 0x1870]
mov dword [ebp + 0x40], eax
push ecx
push 1
push str.RunOnce
push str.General
call esi
mov edx, dword [esp + 0x1870]
mov dword [ebp + 0x44], eax
push edx
push 0x1000
lea eax, [esp + 0x68]
push eax
push 0x617d8c
push str.EnableWindow
push str.General
call edi
lea ecx, [esp + 0x60]
push ecx
lea ecx, [ebp + 0x48]
call fcn.0044fce0
mov edx, dword [esp + 0x1870]
lea eax, [esp + 0x60]
push edx
push 0x1000
push eax
push 0x617d8c
push str.SetupOCXFile
push str.Relative
call edi
lea ecx, [esp + 0x60]
push ecx
lea ecx, [ebp + 0x54]
call fcn.0044fce0
mov edx, dword [esp + 0x1870]
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x60]
rep stosd dword es:[edi], eax
push edx
lea eax, [esp + 0x64]
push 0x1000
push eax
push 0x5f0ec8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
xor eax, eax
mov cl, byte [esp + eax + 0x60]
test cl, cl
jne 0x46a37e
mov cl, byte [esp + eax + 0x61]
test cl, cl
je 0x46a37e
mov byte [esp + eax + 0x60], 0xa
inc eax
cmp eax, 0xfff
jb 0x46a369
lea ecx, [esp + 0x60]
lea esi, [ebp + 0x10]
push ecx
mov ecx, esi
call fcn.0044fce0
push 0x5efe10
push 0x5f1244
mov ecx, esi
call sub.MFC42.DLL_CString::Replace
push 0x3d
mov ecx, esi
call sub.MFC42.DLL_CString::Find_3
test eax, eax
jle 0x46a3c3
cmp eax, 0xa
jge 0x46a3c3
inc eax
mov ecx, esi
push eax
push 0
call sub.MFC42.DLL_CString::Delete
lea ecx, [esp + 0x18]
mov dword [ebp + 0x14], 0
call sub.MFC42.DLL_CStdioFile::CStdioFile
mov edx, dword [esp + 0x1870]
push 0
push 0x8000
push edx
lea ecx, [esp + 0x24]
mov byte [esp + 0x1874], 2
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
je 0x46a5b3
mov eax, dword [esp + 0x1c]
push 0
push 0
push 0
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
push 0
push 0
push 0
push 4
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
mov ebx, esi
test esi, esi
mov dword [esp + 0x34], ebx
je 0x46a5b3
mov edi, str._Attachment_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str._RelativeFile_
mov dword [esp + 0x30], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str._Script_
mov dword [esp + 0x2c], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x38], ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CFile::GetLength
mov edi, eax
mov al, byte [esi]
test al, al
je 0x46a590
cmp al, 0xa
je 0x46a491
mov ecx, esi
sub ecx, ebx
cmp ecx, edi
jae 0x46a491
mov al, byte [esi + 1]
inc esi
cmp al, 0xa
jne 0x46a481
mov al, byte [esi + 1]
inc esi
cmp al, 0x20
je 0x46a49d
cmp al, 9
jne 0x46a4a5
mov edx, esi
sub edx, ebx
cmp edx, edi
jb 0x46a491
mov eax, dword [esp + 0x30]
push eax
push str._Attachment_
push esi
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x46a4f5
cmp byte [esi], 0xa
je 0x46a4d2
mov ecx, esi
sub ecx, ebx
cmp ecx, edi
jae 0x46a4d2
mov al, byte [esi + 1]
inc esi
cmp al, 0xa
jne 0x46a4c2
mov edx, esi
push 0
sub edx, ebx
lea ecx, [esp + 0x1c]
inc edx
push edx
call sub.MFC42.DLL_CStdioFile::Seek
push 1
lea eax, [esp + 0x1c]
push 1
push eax
mov ecx, ebp
call fcn.00469620
jmp 0x46a566
mov ecx, dword [esp + 0x2c]
push ecx
push str._RelativeFile_
push esi
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x46a54e
cmp byte [esi], 0xa
je 0x46a522
mov edx, esi
sub edx, ebx
cmp edx, edi
jae 0x46a522
mov al, byte [esi + 1]
inc esi
cmp al, 0xa
jne 0x46a512
mov eax, esi
push 0
sub eax, ebx
lea ecx, [esp + 0x1c]
inc eax
push eax
call sub.MFC42.DLL_CStdioFile::Seek
push 0
lea ecx, [esp + 0x1c]
push 1
push ecx
mov ecx, ebp
call fcn.00469620
push 0
mov ecx, ebp
call fcn.00469070
jmp 0x46a566
mov edx, dword [esp + 0x38]
push edx
push str._Script_
push esi
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0xc
test eax, eax
je 0x46a57a
mov eax, esi
sub eax, ebx
cmp eax, edi
jae 0x46a590
mov al, byte [esi]
test al, al
jne 0x46a47d
jmp 0x46a590
cmp byte [esi], 0xa
je 0x46a58f
mov ecx, esi
sub ecx, ebx
cmp ecx, edi
jae 0x46a58f
mov al, byte [esi + 1]
inc esi
cmp al, 0xa
jne 0x46a57f
inc esi
sub edi, esi
add edi, ebx
mov ebx, edi
test ebx, ebx
jle 0x46a63a
lea eax, [ebx + 0xa]
push eax
call sub.MFC42.DLL_operatornew
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebp + 0x74], edi
jne 0x46a5e2
lea ecx, [esp + 0x18]
mov byte [esp + 0x1868], 0
call fcn.004505e6
lea ecx, [esp + 0x1870]
mov dword [esp + 0x1868], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x46a68e
lea ecx, [ebx + 0xa]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [ebp + 0x74]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x74]
test eax, eax
je 0x46a63a
mov dl, byte [eax]
xor ecx, ecx
test dl, dl
je 0x46a637
cmp byte [eax + ecx], 0xd
jne 0x46a625
cmp byte [eax + ecx + 1], 0xa
jne 0x46a625
inc ecx
test ecx, ecx
je 0x46a62e
mov dl, byte [eax + ecx]
mov byte [eax], dl
mov dl, byte [eax + ecx + 1]
inc eax
test dl, dl
jne 0x46a617
mov byte [eax], 0
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CStdioFile::Close
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x38]
lea ecx, [esp + 0x18]
mov byte [esp + 0x1868], 0
call fcn.004505e6
lea ecx, [esp + 0x1870]
mov dword [esp + 0x1868], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [esp + 0x1860]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x185c
ret 4