Function at 0x404c70
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x420a36
mov eax, dword fs:[0]
push eax
sub esp, 0x18c
push ebx
push esi
push edi
mov eax, dword [0x42c6dc]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov eax, ecx
mov dword [ebp - 0x14], eax
sub esp, 0xc
lea ecx, [ebp - 0xd8]
push eax
call fcn.004029e0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0xd8]
mov eax, dword [ecx + 4]
test byte [ebp + eax - 0xcc], 6
je 0x404cd2
xor bl, bl
jmp 0x404f33
push 2
sub esp, 8
lea ecx, [ebp - 0xd8]
call fcn.00401e00
lea eax, [ebp - 0x198]
push eax
lea ecx, [ebp - 0xd8]
call fcn.00401f20
mov esi, dword [eax + 8]
add esi, dword [eax]
push 0
sub esp, 8
lea ecx, [ebp - 0xd8]
mov dword [ebp - 0x10], esi
call fcn.00401e00
push esi
call fcn.0040845b
mov ebx, eax
mov eax, esi
cdq
mov ecx, eax
add esp, 4
mov eax, edx
push eax
push ecx
mov dword [ebp - 0x18], ecx
push ebx
lea ecx, [ebp - 0xd8]
mov dword [ebp - 0x1c], eax
call fcn.00401cc0
lea ecx, [ebp - 0xc8]
call fcn.00402e30
test eax, eax
jne 0x404d73
mov eax, dword [ebp - 0xd8]
lea ecx, [ebp - 0xd8]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x404d61
or eax, 4
and eax, 0x17
mov dword [ecx + 0xc], eax
test dword [ecx + 0x10], eax
je 0x404d73
push 0
call fcn.004049b0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor esi, esi
cmp dword [ebp - 0x10], esi
jbe 0x404da4
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404d88
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 - 0x10]
jb 0x404d83
sub esp, 0xc
lea ecx, [ebp - 0x180]
push dword [ebp - 0x14]
call fcn.00401ff0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x180]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x174], 6
je 0x404dd9
push ebx
call fcn.00409b60
add esp, 4
xor bl, bl
jmp 0x404e37
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x180]
push dword [ebp - 0x18]
push ebx
call fcn.00401b60
lea ecx, [ebp - 0x17c]
call fcn.00402e30
test eax, eax
jne 0x404e2c
mov eax, dword [ebp - 0x180]
lea ecx, [ebp - 0x180]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x404e1a
or eax, 4
and eax, 0x17
mov dword [ecx + 0xc], eax
test dword [ecx + 0x10], eax
je 0x404e2c
push 0
call fcn.004049b0
push ebx
call fcn.00409b60
add esp, 4
mov bl, 1
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x180]
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 - 0x180]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x60]
mov dword [ebp + ecx - 0x184], eax
cmp dword [ebp - 0x12c], 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 0x404ea5
mov edx, dword [ebp - 0x170]
lea eax, [ebp - 0x138]
cmp dword [edx], eax
jne 0x404ea5
mov eax, dword [ebp - 0x144]
mov ecx, dword [ebp - 0x140]
mov dword [edx], eax
mov eax, dword [ebp - 0x160]
mov dword [eax], ecx
mov eax, dword [ebp - 0x150]
sub ecx, ecx
mov dword [eax], ecx
cmp byte [ebp - 0x130], 0
je 0x404eb9
lea ecx, [ebp - 0x17c]
call fcn.00402e30
mov esi, dword [ebp - 0x148]
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 0x404eed
mov ecx, dword [esi]
test ecx, ecx
je 0x404ee4
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x404ee4
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
push esi
call fcn.00409325
add esp, 4
mov eax, dword [ebp - 0x180]
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 - 0x180]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x184], eax
lea eax, [ebp - 0x120]
push eax
mov dword [ebp - method.std::basic_ios_char__struct_std::char_traits_char__.virtual_0], vtable.std::ios_base.0
call fcn.00408489
mov ecx, dword [ebp - 0xd8]
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ecx + 4]
mov dword [ebp + eax - 0xd8], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xd8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0xdc], eax
cmp dword [ebp - 0x78], 0
mov dword [ebp - 0xc8], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
je 0x404f9b
mov edx, dword [ebp - 0xbc]
lea eax, [ebp - 0x84]
cmp dword [edx], eax
jne 0x404f9b
mov eax, dword [ebp - 0x90]
mov ecx, dword [ebp - 0x8c]
mov dword [edx], eax
mov eax, dword [ebp - 0xac]
mov dword [eax], ecx
mov eax, dword [ebp - 0x9c]
sub ecx, ecx
mov dword [eax], ecx
cmp byte [ebp - 0x7c], 0
je 0x404fac
lea ecx, [ebp - 0xc8]
call fcn.00402e30
mov esi, dword [ebp - 0x94]
mov dword [ebp - 0xc8], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
test esi, esi
je 0x404fe0
mov ecx, dword [esi]
test ecx, ecx
je 0x404fd7
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x404fd7
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
push esi
call fcn.00409325
add esp, 4
mov eax, dword [ebp - 0xd8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xd8], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov ecx, dword [ebp - 0xd8]
lea eax, [ebp - 0x68]
mov edx, dword [ecx + 4]
push eax
lea ecx, [edx - 0x18]
mov dword [ebp + edx - 0xdc], ecx
mov dword [ebp - 0x68], vtable.std::ios_base.0
call fcn.00408489
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret