// File: /workspace/github_cpp_makefile_star2_O1/wangyufei95[P]watchdog_linux/./maile.h
// Function: CAutoMail::init_mail_info()
void CAutoMail::init_mail_info()
{
	wchar_t _buf[BUF_LEN] = {0};
	wifstream _ifs(STR_EMAIL_CONF_FILE);
	int _iPrefixLen = 4; // length of prefix per line, such as src=xxx@gmail.com, the prefix is "src="
	wstring _str_pre;
	
	while (!_ifs.eof()) 
	{
		memset(_buf, 0, sizeof(_buf));
		_ifs.getline(_buf, sizeof(_buf));
		_str_pre = _buf;
    	_str_pre = _str_pre.substr(0, _iPrefixLen); // get the prefix

		if (wcscmp(_str_pre.data(), L"src=") == 0) // get sender mail address
		{
			m_str_src_mail_p = _buf;
			m_str_src_mail_p = m_str_src_mail_p.substr(_iPrefixLen);
		}
		
		else if (wcscmp(_str_pre.data(), L"dst=") == 0) // get receiver mail address 
		{
			m_str_dst_mail_p = _buf;
			m_str_dst_mail_p = m_str_dst_mail_p.substr(_iPrefixLen);
		}
		else if (wcscmp(_str_pre.data(), L"svr=") == 0) // get the mail server, like "smtp.163.com"
		{
			m_str_email_server = _buf; 
			m_str_email_server = m_str_email_server.substr(_iPrefixLen);
		}
		else if (wcscmp(_str_pre.data(), L"prt=") == 0) // get the server port
		{
			char _buf_tmp[16] = {0};
			wstring _str(_buf);
			_str = _str.substr(_iPrefixLen);
			wcstombs(_buf_tmp, _str.data(), _iPrefixLen+1);
			m_ns_server_port = atoi(_buf_tmp);
		}
		else if (wcscmp(_str_pre.data(), L"psd=") == 0) // get sender email password
		{
			m_str_pwd_p = _buf;
			m_str_pwd_p = m_str_pwd_p.substr(_iPrefixLen);
		}
		else if (wcscmp(_str_pre.data(), L"dat=") == 0) // get the content of email
		{
			m_str_data = _buf;
			m_str_data = m_str_data.substr(_iPrefixLen);			
		}
		else if (wcscmp(_str_pre.data(), L"tit=") == 0) // get the title of email
		{
			m_str_title = _buf;
			m_str_title = m_str_title.substr(_iPrefixLen);
		}
		else // if content is multi-line，get all
		{
			m_str_data += L"\n";
			m_str_data += _buf;
		}
	}
	_ifs.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6b8, %rsp            # imm = 0x6B8
movq %rdi, -0x30(%rbp)
leaq -0x6e0(%rbp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x31d0
movq 0x75a6(%rip), %rsi      # 0xb3a8
leaq -0x2d8(%rbp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x32c0
leaq -0x88(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movl $0x0, (%rax)
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x2b8(%rbp,%rax)
jne 0x425d
movq -0x30(%rbp), %rax
leaq 0xe8(%rax), %rbx
leaq 0xc8(%rax), %rcx
movq %rcx, -0x58(%rbp)
leaq 0x88(%rax), %rcx
movq %rcx, -0x60(%rbp)
leaq 0x308(%rax), %rcx
movq %rcx, -0x68(%rbp)
leaq 0x48(%rax), %rcx
movq %rcx, -0x70(%rbp)
addq $0x8, %rax
movq %rax, -0x78(%rbp)
leaq -0x6e0(%rbp), %r14
leaq -0x50(%rbp), %r15
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x31d0
movl $0x400, %edx            # imm = 0x400
leaq -0x2d8(%rbp), %rdi
movq %r14, %rsi
callq 0x3360
movq %rbx, %r12
movq -0x90(%rbp), %rbx
movq %r14, %rdi
callq 0x3310
leaq -0x98(%rbp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x3660
movl $0x4, %ecx
movq %r15, %rdi
leaq -0x98(%rbp), %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3190
movq %rbx, %rdi
movq %r15, %rsi
callq 0x36b0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3f0d
callq 0x3370
movq -0x98(%rbp), %rbx
movq %rbx, %rdi
leaq 0x477e(%rip), %rsi      # 0x869c
callq 0x3470
testl %eax, %eax
je 0x3fd7
movq %rbx, %rdi
leaq 0x477b(%rip), %rsi      # 0x86b0
callq 0x3470
testl %eax, %eax
je 0x401e
movq %rbx, %rdi
leaq 0x4778(%rip), %rsi      # 0x86c4
callq 0x3470
testl %eax, %eax
je 0x4065
movq %rbx, %rdi
leaq 0x4775(%rip), %rsi      # 0x86d8
callq 0x3470
testl %eax, %eax
je 0x40af
movq %rbx, %rdi
leaq 0x4772(%rip), %rsi      # 0x86ec
callq 0x3470
testl %eax, %eax
je 0x4153
movq %rbx, %rdi
leaq 0x476f(%rip), %rsi      # 0x8700
callq 0x3470
testl %eax, %eax
je 0x419d
movq %rbx, %rdi
leaq 0x476c(%rip), %rsi      # 0x8714
callq 0x3470
testl %eax, %eax
je 0x41e2
movq %r12, %rbx
movq %r12, %rdi
leaq 0x4766(%rip), %rsi      # 0x8728
callq 0x3680
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3680
jmp 0x4244
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rbx
movq %r14, %rdi
callq 0x3310
movq -0x78(%rbp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x3660
movq %r12, %rbx
movl $0x4, %edx
movq %r15, %rdi
movq -0x78(%rbp), %r12
movq %r12, %rsi
movq $-0x1, %rcx
callq 0x3190
jmp 0x4227
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rbx
movq %r14, %rdi
callq 0x3310
movq -0x70(%rbp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x3660
movq %r12, %rbx
movl $0x4, %edx
movq %r15, %rdi
movq -0x70(%rbp), %r12
movq %r12, %rsi
movq $-0x1, %rcx
callq 0x3190
jmp 0x4227
movq -0x30(%rbp), %rax
movq 0x310(%rax), %rbx
movq %r14, %rdi
callq 0x3310
movq -0x68(%rbp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x3660
movq %r12, %rbx
movl $0x4, %edx
movq %r15, %rdi
movq -0x68(%rbp), %r12
movq %r12, %rsi
movq $-0x1, %rcx
callq 0x3190
jmp 0x4227
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %r14, %rdi
callq 0x3310
leaq -0x6e0(,%rax,4), %rdx
addq %rbp, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x6efa
movl $0x4, %edx
leaq -0xd0(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x3190
movq %r12, %rbx
movq %r15, %rdi
movq %r13, %rsi
callq 0x36b0
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x4123
callq 0x3370
movq -0x50(%rbp), %rsi
movl $0x5, %edx
leaq -0xb0(%rbp), %r12
movq %r12, %rdi
callq 0x3330
movq %r12, %rdi
callq 0x35a0
movq -0x30(%rbp), %rcx
movw %ax, 0x328(%rcx)
jmp 0x4232
movq -0x30(%rbp), %rax
movq 0x90(%rax), %rbx
movq %r14, %rdi
callq 0x3310
movq -0x60(%rbp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x3660
movq %r12, %rbx
movl $0x4, %edx
movq %r15, %rdi
movq -0x60(%rbp), %r12
movq %r12, %rsi
movq $-0x1, %rcx
callq 0x3190
jmp 0x4227
movq -0x30(%rbp), %rax
movq 0xf0(%rax), %rbx
movq %r14, %rdi
callq 0x3310
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r12, %rbx
movq %r14, %rcx
movq %rax, %r8
callq 0x3660
movl $0x4, %edx
movq %r15, %rdi
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x3190
movq %rbx, %rdi
jmp 0x422a
movq -0x30(%rbp), %rax
movq 0xd0(%rax), %rbx
movq %r14, %rdi
callq 0x3310
movq -0x58(%rbp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x3660
movq %r12, %rbx
movl $0x4, %edx
movq %r15, %rdi
movq -0x58(%rbp), %r12
movq %r12, %rsi
movq $-0x1, %rcx
callq 0x3190
movq %r12, %rdi
movq %r15, %rsi
callq 0x36b0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x4244
callq 0x3370
movq -0x2d8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x2b8(%rbp,%rax)
je 0x3e8b
leaq -0x2d8(%rbp), %rdi
callq 0x3060
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x4281
callq 0x3370
leaq -0x2d8(%rbp), %rdi
callq 0x3290
addq $0x6b8, %rsp            # imm = 0x6B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x42c8
jmp 0x42c8
jmp 0x42c8
jmp 0x42c8
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x42cb
callq 0x3370
jmp 0x42cb
jmp 0x42c8
jmp 0x42c8
jmp 0x42c8
jmp 0x42c8
jmp 0x42c8
movq %rax, %rbx
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x42e3
callq 0x3370
leaq -0x2d8(%rbp), %rdi
callq 0x3290
movq %rbx, %rdi
callq 0x3630
nop