Function at 0x404b70
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18c
push ebx
push esi
push edi
sub esp, 8
mov eax, ecx
push 0x20
push eax
lea ecx, [ebp - 0xc8]
mov edi, edx
mov dword [ebp - 8], eax
call fcn.00403480
mov edx, dword [ebp - 0xc8]
mov eax, dword [edx + 4]
test byte [ebp + eax - 0xbc], 6
je 0x404bae
xor bl, bl
jmp 0x404df9
push 2
sub esp, 8
lea ecx, [ebp - 0xc8]
call fcn.00402640
lea eax, [ebp - 0x188]
push eax
lea ecx, [ebp - 0xc8]
call fcn.00402700
mov esi, dword [eax + 8]
add esi, dword [eax]
push 0
sub esp, 8
lea ecx, [ebp - 0xc8]
mov dword [ebp - 4], esi
call fcn.00402640
push esi
call fcn.00409872
mov ebx, eax
mov eax, esi
cdq
mov ecx, eax
add esp, 4
mov eax, edx
push eax
push ecx
mov dword [ebp - 0xc], ecx
push ebx
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0x10], eax
call fcn.00402520
lea ecx, [ebp - 0xb8]
call fcn.00403a50
test eax, eax
jne 0x404c45
mov eax, dword [ebp - 0xc8]
lea ecx, [ebp - 0xc8]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x404c3d
or eax, 4
push 0
push eax
call fcn.00401720
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor esi, esi
cmp dword [ebp - 4], esi
jbe 0x404c7c
mov ecx, edi
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404c60
sub ecx, edx
mov eax, esi
xor edx, edx
div ecx
inc esi
mov al, byte [edx + edi]
xor byte [esi + ebx - 1], al
cmp esi, dword [ebp - 4]
jb 0x404c55
sub esp, 0xc
lea ecx, [ebp - 0x170]
push dword [ebp - 8]
call fcn.00402aa0
mov eax, dword [ebp - 0x170]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x164], 6
je 0x404cad
push ebx
call fcn.0040b0a4
add esp, 4
xor bl, bl
jmp 0x404d01
push dword [ebp - 0x10]
lea ecx, [ebp - 0x170]
push dword [ebp - 0xc]
push ebx
call fcn.00402340
lea ecx, [ebp - 0x16c]
call fcn.00403a50
test eax, eax
jne 0x404cf6
mov eax, dword [ebp - 0x170]
lea ecx, [ebp - 0x170]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x404cee
or eax, 4
push 0
push eax
call fcn.00401720
push ebx
call fcn.0040b0a4
add esp, 4
mov bl, 1
mov eax, dword [ebp - 0x170]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x170]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x60]
mov dword [ebp + ecx - 0x174], eax
cmp dword [ebp - 0x11c], 0
mov dword [ebp - method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
je 0x404d6b
mov edx, dword [ebp - 0x160]
lea eax, [ebp - 0x128]
cmp dword [edx], eax
jne 0x404d6b
mov eax, dword [ebp - 0x134]
mov ecx, dword [ebp - 0x130]
mov dword [edx], eax
mov eax, dword [ebp - 0x150]
mov dword [eax], ecx
mov eax, dword [ebp - 0x140]
sub ecx, ecx
mov dword [eax], ecx
cmp byte [ebp - 0x120], 0
je 0x404d7f
lea ecx, [ebp - 0x16c]
call fcn.00403a50
mov esi, dword [ebp - 0x138]
mov dword [ebp - method.std::basic_streambuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
test esi, esi
je 0x404db3
mov ecx, dword [esi]
test ecx, ecx
je 0x404daa
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x404daa
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
push esi
call fcn.0040b128
add esp, 4
mov eax, dword [ebp - 0x170]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x170]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x174], eax
lea eax, [ebp - 0x110]
push eax
mov dword [ebp - method.std::basic_ios_char__struct_std::char_traits_char__.virtual_0], vtable.std::ios_base.0
call fcn.0040952a
mov edx, dword [ebp - 0xc8]
add esp, 4
mov eax, dword [edx + 4]
mov dword [ebp + eax - 0xc8], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xc8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0xcc], eax
cmp dword [ebp - 0x68], 0
mov dword [ebp - 0xb8], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
je 0x404e51
mov edx, dword [ebp - 0xac]
lea eax, [ebp - 0x74]
cmp dword [edx], eax
jne 0x404e51
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x7c]
mov dword [edx], eax
mov eax, dword [ebp - 0x9c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x8c]
sub ecx, ecx
mov dword [eax], ecx
cmp byte [ebp - 0x6c], 0
je 0x404e62
lea ecx, [ebp - 0xb8]
call fcn.00403a50
mov esi, dword [ebp - 0x84]
mov dword [ebp - 0xb8], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
test esi, esi
je 0x404e96
mov ecx, dword [esi]
test ecx, ecx
je 0x404e8d
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x404e8d
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
push esi
call fcn.0040b128
add esp, 4
mov eax, dword [ebp - 0xc8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc8], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov ecx, dword [ebp - 0xc8]
lea eax, [ebp - 0x58]
mov edx, dword [ecx + 4]
push eax
lea ecx, [edx - 0x18]
mov dword [ebp + edx - 0xcc], ecx
mov dword [ebp - 0x58], vtable.std::ios_base.0
call fcn.0040952a
add esp, 4
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret