Function at 0x405130
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x417528
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push ebp
push esi
push str.ModifyTxtFile_Replace____
call fcn.00401180
mov ebp, dword [esp + 0x40]
add esp, 4
mov ecx, ebp
push 0x41f1d8
push str._r_n
call sub.MFC42.DLL_CString::Replace
mov ebx, dword [esp + 0x40]
push 0x41f1d8
push str._r_n
mov ecx, ebx
call sub.MFC42.DLL_CString::Replace
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CFile::CFile
mov esi, dword [esp + 0x38]
push 0
push 2
lea ecx, [esp + 0x20]
mov eax, dword [esi]
mov dword [esp + 0x38], 0
push eax
call sub.MFC42.DLL_CFile::Open
test eax, eax
jne 0x405223
push esi
lea eax, [esp + 0x44]
push str.ModifyTxtFile_Replace_____open_txt_file
push eax
call sub.MFC42.DLL_operator_2
push str._failed
lea ecx, [esp + 0x40]
mov bl, 1
push eax
push ecx
mov byte [esp + 0x3c], bl
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
mov byte [esp + 0x30], 2
push eax
call fcn.00401180
add esp, 4
lea ecx, [esp + 0x3c]
mov byte [esp + 0x30], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x40]
mov byte [esp + 0x30], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], 0xffffffff
call fcn.0041668a
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 0xc
push edi
push 0x100000
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
mov ecx, 0x40000
xor eax, eax
mov edi, esi
push 0xfffff
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x20]
push esi
lea ecx, [esp + 0x24]
call dword [edx + 0x3c]
push esi
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_3
push esi
mov byte [esp + 0x38], 3
call sub.MFC42.DLL_operatordelete
mov eax, dword [ebx]
mov ecx, dword [ebp]
add esp, 4
push eax
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Replace
test eax, eax
pop edi
jg 0x40532c
push 0x41f9e0
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_3
push ebp
push eax
lea eax, [esp + 0x18]
mov byte [esp + 0x38], 4
push eax
call sub.MFC42.DLL_operator
push str._not_found
lea ecx, [esp + 0x3c]
mov bl, 5
push eax
push ecx
mov byte [esp + 0x3c], bl
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
mov byte [esp + 0x30], 6
push eax
call fcn.00401180
add esp, 4
lea ecx, [esp + 0x38]
mov byte [esp + 0x30], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CFile::Close
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], 0xffffffff
call fcn.0041668a
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 0xc
mov edx, dword [esp + 0x18]
push 0
push 0
lea ecx, [esp + 0x20]
call dword [edx + 0x30]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 8]
push ecx
push eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x20]
call dword [eax + 0x40]
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CFile::Close
push 0x41f9b8
call fcn.00401180
add esp, 4
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], 0xffffffff
call fcn.0041668a
mov ecx, dword [esp + 0x28]
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x28
ret 0xc