Function at 0x412470
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x455b12
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x35c
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x368], 1
call fcn.00414c14
lea ecx, [esp + 8]
mov byte [esp + 0x368], 2
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [0x469298]
xor edi, edi
push edi
push 2
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x374], 3
mov dword [esp + 0x18], edi
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x412718
push ebx
push ebp
push esi
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CFile::GetLength
mov esi, eax
push esi
mov dword [esp + 0x20], esi
call sub.MFC42.DLL_operatornew
add esp, 4
mov ebx, eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x10], ebx
push esi
push ebx
call sub.MFC42.DLL_CFile::Read
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CFile::Close
xor eax, eax
test esi, esi
jle 0x412530
lea ecx, [esp + 0x1dc]
cmp byte [eax + ebx], 0x3e
jne 0x412527
mov dword [ecx], eax
inc edi
add ecx, 4
inc eax
cmp eax, esi
jl 0x41251b
mov dword [esp + 0x18], edi
mov ecx, dword [esp + 0x37c]
mov eax, dword [sym.imp.MSVCIRT.dll_int_const_filebuf::openprot]
push 1
or ebp, 0xffffffff
mov edx, dword [ecx - 8]
mov ecx, dword [eax]
mov dword [esp + 0x3c], edx
mov edx, dword [0x469298]
push ecx
push 2
push edx
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ofstream::constructor_char_const___int__int_]
test edi, edi
mov byte [esp + 0x374], 4
mov dword [esp + 0x24], 0
jle 0x4126a4
lea eax, [esp + 0x1dc]
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x20]
xor eax, eax
lea edi, [esp + 0x94]
mov ebx, dword [ecx]
mov ecx, 0x51
rep stosd dword es:[edi], eax
mov esi, ebx
sub esi, ebp
dec esi
stosw word es:[edi], ax
xor eax, eax
test esi, esi
jle 0x4125bb
mov edx, dword [esp + 0x10]
lea edi, [edx + ebp + 1]
mov cl, byte [edi + eax]
mov byte [esp + eax + 0x94], cl
inc eax
cmp eax, esi
jl 0x4125ac
lea edx, [esp + 0x94]
lea ecx, [esp + 0x14]
push edx
call fcn.004149ce
mov eax, dword [esp + 0x37c]
push 0
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Find
cmp eax, 0xffffffff
je 0x412601
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x380]
add eax, ecx
lea ecx, [esp + 0x14]
push eax
push edx
call sub.MFC42.DLL_CString::Find
cmp eax, 0xffffffff
jne 0x412625
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
inc eax
add edx, 4
cmp eax, ecx
mov ebp, ebx
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
jl 0x412581
jmp 0x4126a0
mov ebx, dword [esp + 0x1c]
lea edi, [ebp + 1]
sub ebx, esi
lea ebp, [edi + esi + 1]
mov dword [esp + 0x1c], ebx
lea eax, [ebx - 1]
push eax
call sub.MFC42.DLL_operatornew
add esp, 4
mov esi, eax
test edi, edi
jle 0x41265d
mov ecx, dword [esp + 0x10]
mov edx, edi
sub ecx, esi
mov bl, byte [ecx + eax]
mov byte [eax], bl
inc eax
dec edx
jne 0x412650
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov ecx, 1
sub ecx, ebp
xor eax, eax
mov edx, dword [esp + edx*4 + 0x1d8]
add ecx, edx
test ecx, ecx
jle 0x41268a
mov edx, dword [esp + 0x10]
add ebp, edx
add edi, esi
mov dl, byte [eax + ebp]
mov byte [edi + eax], dl
inc eax
cmp eax, ecx
jl 0x41267f
dec ebx
lea ecx, [esp + 0x3c]
push ebx
push esi
call dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::write_char_const___int_]
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ebx, dword [esp + 0x10]
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x3c]
call dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_ofstream::close_void_]
mov eax, dword [0x469298]
push 0
push 0
push eax
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CFile::Open
pop esi
pop ebp
test eax, eax
pop ebx
lea ecx, [esp + 0x1c]
je 0x4126f7
call sub.MFC42.DLL_CFile::GetLength
cmp eax, 3
jae 0x4126fc
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CFile::Close
mov ecx, dword [0x469298]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x4126fc
call sub.MFC42.DLL_CFile::Close
lea ecx, [esp + 0x38]
mov byte [esp + 0x368], 3
call dword [sym.imp.MSVCIRT.dll_public_virtual:_void___thiscall_ofstream::destructor_void_]
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCIRT.dll_public_virtual:_void___thiscall_ios::destructor_void_]
lea ecx, [esp + 8]
mov byte [esp + 0x368], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x368], 1
call sub.MFC42.DLL_CFile::CFile
lea ecx, [esp + 0x370]
mov byte [esp + 0x368], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x374]
mov dword [esp + 0x368], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x360]
pop edi
mov dword fs:[0], ecx
add esp, 0x368
ret