Function at 0x401000
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x402b7e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb4
push ebx
push esi
push edi
push 0xa
lea ecx, [esp + 0x7c]
call fcn.004028a0
push 0xa
lea ecx, [esp + 0xa0]
mov dword [esp + 0xcc], 0
call fcn.004028a0
lea ecx, [esp + 0xc]
mov dword [esp + 0xc8], 1
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x1c]
mov byte [esp + 0xc8], 2
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x18]
mov byte [esp + 0xc8], 3
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x4c]
mov byte [esp + 0xc8], 4
call sub.MFC42.DLL_CStdioFile::CStdioFile
lea ecx, [esp + 0x64]
mov byte [esp + 0xc8], 5
call sub.MFC42.DLL_CStdioFile::CStdioFile
lea ecx, [esp + 0x14]
mov byte [esp + 0xc8], 6
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x10]
mov byte [esp + 0xc8], 7
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x24]
mov byte [esp + 0xc8], 8
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x34]
mov byte [esp + 0xc8], 9
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x30]
mov byte [esp + 0xc8], 0xa
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x2c]
mov byte [esp + 0xc8], 0xb
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x38]
mov byte [esp + 0xc8], 0xc
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x3c]
mov byte [esp + 0xc8], 0xd
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [esp + 0xd0]
mov bl, 0xe
cmp eax, 2
mov byte [esp + 0xc8], bl
je 0x4011b3
lea eax, [esp + 0x20]
push eax
call fcn.004021d0
add esp, 4
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0xcc], 0xf
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x20]
mov byte [esp + 0xc8], bl
call sub.MFC42.DLL_CString::CString
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.Missing_parameter
call sub.MFC42.DLL_CString::CString_1
call fcn.004022e0
add esp, 4
lea ecx, [esp + 0xc]
push str.Syntax_:_Allrep_FileTorReplaceIn
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 4
lea edx, [esp + 0x10]
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
call fcn.00402876
call fcn.00402270
add esp, 4
push 1
call fcn.00402260
add esp, 4
mov eax, dword [esp + 0xd4]
mov ecx, dword [eax + 4]
push ecx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::operator
lea edx, [esp + 0x20]
push edx
call fcn.004021d0
add esp, 4
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0xcc], 0x10
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x20]
mov byte [esp + 0xc8], bl
call sub.MFC42.DLL_CString::CString
push str.___File:
lea ecx, [esp + 0x10]
call fcn.0040286a
lea eax, [esp + 0x18]
lea ecx, [esp + 0xc]
push eax
call fcn.00402864
push ecx
lea edx, [esp + 0x10]
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
call fcn.00402876
call fcn.004022e0
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.ALLREP.DES
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x7c]
call fcn.00401ad0
test al, al
jne 0x40124f
push 1
call fcn.00402260
add esp, 4
lea eax, [esp + 0x40]
push 0x404058
push eax
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::SpanExcluding
push str..BAK
lea ecx, [esp + 0x24]
push eax
push ecx
mov byte [esp + 0xd4], 0x11
call sub.MFC42.DLL_operator
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0xcc], 0x12
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x20]
mov byte [esp + 0xc8], 0x11
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x40]
mov byte [esp + 0xc8], bl
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x1c]
push 0
push 0
push edx
lea ecx, [esp + 0x58]
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
je 0x4012d6
lea ecx, [esp + 0x4c]
call sub.MFC42.DLL_CStdioFile::Close
mov eax, dword [esp + 0x1c]
push eax
call sub.MFC42.DLL_CFile::Remove
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push ecx
push edx
call sub.MFC42.DLL_CFile::Rename
mov eax, dword [esp + 0x1c]
push 0
push 0
push eax
lea ecx, [esp + 0x58]
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
jne 0x401334
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0xc]
push ecx
push str.Cant_Open_Read_file___s_
push edx
call sub.MFC42.DLL_CString::Format
add esp, 8
lea eax, [esp + 0x10]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
call fcn.00402876
call fcn.00402270
add esp, 4
push 1
call fcn.00402260
add esp, 4
mov ecx, dword [esp + 0x18]
push 0
push 0x1001
push ecx
lea ecx, [esp + 0x70]
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
jne 0x401390
mov edx, dword [esp + 0x18]
lea eax, [esp + 0xc]
push edx
push str.Cant_Open_Write__file___s_
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x4c]
call sub.MFC42.DLL_CStdioFile::Close
push ecx
lea edx, [esp + 0x10]
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
call fcn.00402876
call fcn.00402270
add esp, 4
push 1
call fcn.00402260
add esp, 4
lea eax, [esp + 0x10]
lea ecx, [esp + 0x4c]
push eax
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
je 0x401620
mov edi, dword [sym.imp.MSVCRT.dll__mbsicmp]
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_1
lea edx, [esp + 0x10]
lea ecx, [esp + 0x24]
push edx
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::MakeUpper
lea ecx, [esp + 0x78]
call fcn.00402090
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x34]
push eax
push ecx
lea ecx, [esp + 0x80]
call fcn.00402000
test al, al
je 0x401504
lea edx, [esp + 0x34]
lea ecx, [esp + 0x30]
push edx
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CString::MakeUpper
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x24]
push eax
call sub.MFC42.DLL_CString::Find
mov esi, eax
test esi, esi
jl 0x4014e6
lea ecx, [esp + 0x40]
push esi
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0xcc], 0x13
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x40]
mov byte [esp + 0xc8], bl
call sub.MFC42.DLL_CString::CString
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x14]
push edx
call fcn.00402864
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x20]
mov ecx, dword [eax - 8]
add ecx, esi
push ecx
push edx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Mid
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0xcc], 0x14
call fcn.00402864
lea ecx, [esp + 0x20]
mov byte [esp + 0xc8], bl
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::MakeUpper
lea ecx, [esp + 0x78]
call fcn.004020b0
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x24]
push edx
call sub.MFC42.DLL_CString::Find
mov esi, eax
test esi, esi
jge 0x401427
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x34]
push eax
push ecx
lea ecx, [esp + 0x80]
call fcn.00402000
test al, al
jne 0x4013f8
lea ecx, [esp + 0x78]
call fcn.004020a0
lea edx, [esp + 0x2c]
lea eax, [esp + 0x44]
push edx
lea ecx, [esp + 0x3c]
push eax
push ecx
lea ecx, [esp + 0x84]
call fcn.00402040
test al, al
je 0x4015d2
push ecx
mov ecx, esp
mov dword [esp + 0x64], esp
push 0x404014
call sub.MFC42.DLL_CString::CString_1
lea edx, [esp + 0x40]
push 1
push edx
push ecx
lea eax, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x58], esp
push eax
mov byte [esp + 0xdc], 0x15
call fcn.00402876
mov byte [esp + 0xd8], bl
call fcn.00402350
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
add esp, 0x10
push ecx
push edx
call edi
add esp, 8
test eax, eax
jne 0x4015af
push ecx
lea eax, [esp + 0x30]
mov ecx, esp
mov dword [esp + 0x4c], esp
push eax
call fcn.00402876
mov ecx, dword [esp + 0x48]
lea edx, [esp + 0x18]
push ecx
push edx
call fcn.00402520
add esp, 0xc
lea ecx, [esp + 0x78]
call fcn.004020c0
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x44]
push eax
lea edx, [esp + 0x3c]
push ecx
push edx
lea ecx, [esp + 0x84]
call fcn.00402040
test al, al
jne 0x401530
lea eax, [esp + 0x14]
push 0x404010
lea ecx, [esp + 0x2c]
push eax
push ecx
call sub.MFC42.DLL_operator
mov edx, dword [eax]
lea ecx, [esp + 0x64]
push edx
mov byte [esp + 0xcc], 0x16
call sub.MFC42.DLL_CStdioFile::WriteString
lea ecx, [esp + 0x28]
mov byte [esp + 0xc8], bl
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x10]
lea ecx, [esp + 0x4c]
push eax
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
jne 0x4013ac
lea ecx, [esp + 0x4c]
call sub.MFC42.DLL_CStdioFile::Close
lea ecx, [esp + 0x64]
call sub.MFC42.DLL_CStdioFile::Close
lea ecx, [esp + 0x78]
call fcn.004020d0
lea ecx, [esp + 0x78]
call fcn.00401760
push 0
call fcn.00402260
add esp, 4
lea ecx, [esp + 0x3c]
mov byte [esp + 0xc8], 0xd
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x38]
mov byte [esp + 0xc8], 0xc
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov byte [esp + 0xc8], 0xb
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x30]
mov byte [esp + 0xc8], 0xa
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x34]
mov byte [esp + 0xc8], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0xc8], 8
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0xc8], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0xc8], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x64]
mov byte [esp + 0xc8], 5
call fcn.00402816
lea ecx, [esp + 0x4c]
mov byte [esp + 0xc8], 4
call fcn.00402816
lea ecx, [esp + 0x18]
mov byte [esp + 0xc8], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0xc8], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0xc8], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x78]
mov dword [esp + 0xc8], 0xffffffff
call fcn.00401760
mov ecx, dword [esp + 0xc0]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0xc0
ret