Function at 0x4490e0
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 0x4fd01e
push eax
mov eax, 0x1850
mov dword fs:[0], esp
call fcn.00445f30
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_4
call fcn.0044e650
add esp, 4
cmp eax, ebx
je 0x44917a
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_2
push eax
lea ecx, [esp + 0x1874]
mov byte [esp + 0x186c], 1
call sub.MFC42.DLL_CString::operator_1
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 0x4496f4
lea esi, [ebp + 4]
lea eax, [esp + 0x1870]
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::operator_1
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 0x593a04
push str.General
call edi
lea ecx, [esp + 0x60]
push ecx
lea ecx, [ebp + 0xc]
call sub.MFC42.DLL_CString::operator_2
mov edx, dword [esp + 0x1870]
push edx
push 0x1000
lea eax, [esp + 0x68]
push eax
push 0x5b2c3c
push 0x591e20
push str.General
call edi
lea ecx, [esp + 0x60]
lea ebx, [ebp + 8]
push ecx
mov ecx, ebx
call sub.MFC42.DLL_CString::operator_2
mov ebx, dword [ebx]
push 0x5b2c3c
push ebx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x4492f3
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x24]
mov eax, dword [esp + 0x1870]
push eax
push 0x79
push 0x591ea0
push str.General
call esi
lea ecx, [esp + 0x10]
push 0x5939e8
push ecx
mov word [ebp + 0x24], ax
call fcn.0040f640
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 0x591e68
push str.General
call esi
mov ecx, dword [esp + 0x1870]
mov word [ebp + 0x28], ax
push ecx
push 0
push 0x591e58
push str.General
call esi
mov edx, dword [esp + 0x1870]
mov word [ebp + 0x2a], ax
push edx
push 0x7b
push 0x591e84
push str.General
call esi
mov word [ebp + 0x2c], ax
mov eax, dword [esp + 0x1870]
push eax
push 0
push 0x591e74
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 str.AutoRun
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 0x5b2c3c
push 0x5939b0
push str.General
call edi
lea ecx, [esp + 0x60]
push ecx
lea ecx, [ebp + 0x48]
call sub.MFC42.DLL_CString::operator_2
mov edx, dword [esp + 0x1870]
lea eax, [esp + 0x60]
push edx
push 0x1000
push eax
push 0x5b2c3c
push str.SetupOCXFile
push str.Relative
call edi
lea ecx, [esp + 0x60]
push ecx
lea ecx, [ebp + 0x54]
call sub.MFC42.DLL_CString::operator_2
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 0x59399c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
xor eax, eax
mov cl, byte [esp + eax + 0x60]
test cl, cl
jne 0x4494ae
mov cl, byte [esp + eax + 0x61]
test cl, cl
je 0x4494ae
mov byte [esp + eax + 0x60], 0xa
inc eax
cmp eax, 0xfff
jb 0x449499
lea ecx, [esp + 0x60]
lea esi, [ebp + 0x10]
push ecx
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
push 0x591824
push 0x59197c
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 0x4494f3
cmp eax, 0xa
jge 0x4494f3
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 0x4496e3
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 0x4496e3
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 0x4496c0
cmp al, 0xa
je 0x4495c1
mov ecx, esi
sub ecx, ebx
cmp ecx, edi
jae 0x4495c1
mov al, byte [esi + 1]
inc esi
cmp al, 0xa
jne 0x4495b1
mov al, byte [esi + 1]
inc esi
cmp al, 0x20
je 0x4495cd
cmp al, 9
jne 0x4495d5
mov edx, esi
sub edx, ebx
cmp edx, edi
jb 0x4495c1
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 0x449625
cmp byte [esi], 0xa
je 0x449602
mov ecx, esi
sub ecx, ebx
cmp ecx, edi
jae 0x449602
mov al, byte [esi + 1]
inc esi
cmp al, 0xa
jne 0x4495f2
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.00448750
jmp 0x449696
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 0x44967e
cmp byte [esi], 0xa
je 0x449652
mov edx, esi
sub edx, ebx
cmp edx, edi
jae 0x449652
mov al, byte [esi + 1]
inc esi
cmp al, 0xa
jne 0x449642
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.00448750
push 0
mov ecx, ebp
call fcn.004481f0
jmp 0x449696
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 0x4496aa
mov eax, esi
sub eax, ebx
cmp eax, edi
jae 0x4496c0
mov al, byte [esi]
test al, al
jne 0x4495ad
jmp 0x4496c0
cmp byte [esi], 0xa
je 0x4496bf
mov ecx, esi
sub ecx, ebx
cmp ecx, edi
jae 0x4496bf
mov al, byte [esi + 1]
inc esi
cmp al, 0xa
jne 0x4496af
inc esi
sub edi, esi
add edi, ebx
mov ebx, edi
test ebx, ebx
jle 0x449765
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 0x449712
lea ecx, [esp + 0x18]
mov byte [esp + 0x1868], 0
call fcn.00445db6
lea ecx, [esp + 0x1870]
mov dword [esp + 0x1868], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x4497b9
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]
xor ecx, ecx
cmp byte [eax], 0
je 0x449762
cmp byte [eax + ecx], 0xd
jne 0x449750
cmp byte [eax + ecx + 1], 0xa
jne 0x449750
inc ecx
test ecx, ecx
je 0x449759
mov dl, byte [eax + ecx]
mov byte [eax], dl
mov dl, byte [eax + ecx + 1]
inc eax
test dl, dl
jne 0x449742
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.00445db6
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