Function at 0x513850
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov rax, qword [sym.imp.libssp_0.dll___stack_chk_guard]
mov r13, qword [rcx + 0x138]
mov r15, rcx
lea rcx, [rdx + 8]
mov rbx, r9
mov r12, rdx
mov rdi, qword [rax]
mov qword [rsp + 0x58], rdi
xor edi, edi
test byte [r15 + 0x8d], 1
mov rsi, r8
cmovne rcx, qword [0x005aafd0]
call fcn.00427370
mov dword [rbx], 0
mov rcx, qword [r15 + 0x6e8]
lea rdx, str.From__s_Mon_Sep_17_00:00:00_2001_n
mov r8, rax
call sub.libintl_8.dll_libintl_fprintf
mov rcx, qword [r15 + 0x528]
call fcn.00505b20
mov r8, qword [r15 + 0xe0]
test r8, r8
je 0x5138f0
mov rcx, qword [r15 + 0x6e8]
lea rdx, str.Message_Id:___s__n
call sub.libintl_8.dll_libintl_fprintf
mov rcx, qword [r15 + 0x528]
call fcn.00505b20
mov rax, qword [r15 + 0x128]
test rax, rax
je 0x513907
mov ebp, dword [rax + 8]
test ebp, ebp
jne 0x513a88
cmp qword [r15 + 0xc8], 0
je 0x51391c
mov ecx, dword [rsp + 0xd0]
test ecx, ecx
jne 0x513948
mov qword [rsi], r13
mov rax, qword [sym.imp.libssp_0.dll___stack_chk_guard]
mov rsi, qword [rsp + 0x58]
xor rsi, qword [rax]
jne 0x513b91
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rbp, qword [0x005ab200]
mov rax, qword [0x00577db0]
mov dword [rbx], 0xffffffff
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], rbp
mov qword [0x00577da8], 0
cmp rax, rbp
je 0x513b20
mov byte [rax], 0
mov rax, qword [0x00577d90]
mov qword [0x00577d88], 0
cmp rax, rbp
je 0x513b68
mov byte [rax], 0
mov rax, qword [r15 + 0xc8]
test r13, r13
mov r9, qword [str.____________]
lea r8, [0x0059c3a7]
cmovne r8, r13
lea rdx, str._sMIME_Version:_1.0_nContent_Type:_multipart_mixed__boundary__s_s__n_nThis_is_a_multi_part_message_in_MIME_format._n___s_s_nContent_Type:_text_plain__charsetUTF_8__formatfixed_nContent_Transfer_Encoding:_8bit_n_n
lea r14, [rsp + 0x40]
mov qword [rsp + 0x30], rax
lea rcx, [0x00577da0]
mov qword [rsp + 0x28], r9
mov qword [rsp + 0x20], rax
call fcn.004737e0
mov edx, dword [r15 + 0xd8]
mov r13, qword [0x00577db0]
test edx, edx
je 0x513b50
mov r8d, dword [r15 + 0xc0]
lea rdx, [0x0059c668]
mov rcx, r14
call fcn.004737e0
mov eax, dword [r15 + 0x150]
lea rcx, str.inline
mov rdx, qword [rsp + 0x50]
mov r9, qword [r15 + 0xc8]
mov r8, qword [str.____________]
test eax, eax
lea rax, str.attachment
mov qword [rsp + 0x30], rdx
cmove rax, rcx
mov qword [rsp + 0x20], rdx
lea rcx, [0x00577d80]
lea rdx, str._n___s_s_nContent_Type:_text_x_patch__name__s__nContent_Transfer_Encoding:_8bit_nContent_Disposition:__s__filename__s__n_n
mov qword [rsp + 0x28], rax
call fcn.004737e0
mov rax, qword [0x00577d90]
mov rcx, r14
mov qword [r15 + 0x688], rax
call fcn.004727a0
jmp 0x51391c
movsxd rdx, ebp
mov rcx, qword [r15 + 0x6e8]
shl rdx, 4
add rdx, qword [rax]
mov r8, qword [rdx - 0x10]
lea rdx, str.In_Reply_To:___s__n
call sub.libintl_8.dll_libintl_fprintf
test ebp, ebp
jle 0x513b0d
mov rax, qword [r15 + 0x128]
sub ebp, 1
mov edi, 0x10
lea r8, str.References:
add rbp, 1
lea r14, str._s__s__n
mov rax, qword [rax]
shl rbp, 4
mov r9, qword [rax]
jmp 0x513af9
mov rax, qword [r15 + 0x128]
lea r8, [0x0059c525]
mov rax, qword [rax]
mov r9, qword [rax + rdi]
add rdi, 0x10
mov rcx, qword [r15 + 0x6e8]
mov rdx, r14
call sub.libintl_8.dll_libintl_fprintf
cmp rbp, rdi
jne 0x513ae0
mov rcx, qword [r15 + 0x528]
call fcn.00505b20
jmp 0x513907
cmp byte [rbp], 0
je 0x51398a
mov r8d, 0xa8
lea rdx, [0x0059c4d3]
lea rcx, [0x0059c4dc]
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x51398a
mov r8, r15
mov rdx, r12
mov rcx, r14
call fcn.005136d0
jmp 0x513a17
cmp byte [rbp], 0
je 0x5139a8
mov r8d, 0xa8
lea rdx, [0x0059c4d3]
lea rcx, [0x0059c4dc]
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x5139a8
call sub.libssp_0.dll___stack_chk_fail
nop
nop word [rax + rax]