Function at 0x402080
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4070a2
mov eax, dword fs:[0]
push eax
sub esp, 0x174
mov eax, dword [0x40b008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x178]
mov esi, dword [ebp + 0xc]
push 0xb8
push 0
push eax
mov dword [ebp - 0x17c], 0
call sub.VCRUNTIME140.dll_memset
push esi
lea ecx, [ebp - 0x178]
call fcn.004042f0
mov dword [ebp - 4], 0
cmp dword [ebp - 0x11c], 0
jne 0x402129
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Error_opening_the_new_file:
call fcn.00404cf0
cmp dword [esi + 0x14], 0x10
mov ecx, dword [esi + 0x10]
jb 0x402108
mov esi, dword [esi]
push ecx
mov edx, esi
mov ecx, eax
call fcn.004052f0
add esp, 4
mov ecx, eax
push 0x404f10
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor bl, bl
jmp 0x402312
push 0xb0
lea eax, [ebp - 0xc0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ebx, edi
cmp dword [edi + 0x14], 0x10
jb 0x402149
mov ebx, dword [edi]
lea ecx, [ebp - 0x58]
mov dword [ebp - 0xc0], 0x4083f4
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0xbc]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0xc0]
mov dword [ebp - 0x17c], 1
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xc4], eax
lea ecx, [ebp - 0xbc]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
lea ecx, [ebp - 0xbc]
mov dword [ebp - 0xbc], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x74], 0
mov byte [ebp - 0x7f], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x40b6e4]
mov ecx, dword [0x40b6e8]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x84], 0
push ecx
push 0x32
push ebx
lea ecx, [ebp - 0xbc]
mov byte [ebp - 4], 3
call fcn.00404a70
test eax, eax
jne 0x40222b
mov eax, dword [ebp - 0xc0]
lea ecx, [ebp - 0xc0]
push 0
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xc4], eax
mov byte [ebp - 4], 4
cmp dword [ebp - 0x70], 0
jne 0x402295
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Error_opening_creating_the_file_to_replace:
call fcn.00404cf0
cmp dword [edi + 0x14], 0x10
mov ecx, dword [edi + 0x10]
jb 0x402277
mov edi, dword [edi]
push ecx
mov edx, edi
mov ecx, eax
call fcn.004052f0
add esp, 4
mov ecx, eax
push 0x404f10
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor bl, bl
jmp 0x402307
lea eax, [ebp - 0x168]
push eax
lea ecx, [ebp - 0xc0]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_streambuf_char__struct_std::char_traits_char____]
lea ecx, [ebp - 0x168]
call fcn.004048f0
test eax, eax
jne 0x4022cf
push eax
mov eax, dword [ebp - 0x178]
lea ecx, [ebp - 0x178]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
lea ecx, [ebp - 0xbc]
call fcn.004048f0
test eax, eax
jne 0x4022f6
push eax
mov eax, dword [ebp - 0xc0]
lea ecx, [ebp - 0xc0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
cmp dword [esi + 0x14], 0x10
jb 0x4022fe
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov bl, 1
lea ecx, [ebp - 0xc0]
call fcn.00402440
lea ecx, [ebp - 0x178]
call fcn.00402340
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00406129
mov esp, ebp
pop ebp
ret 8