When mining security vulnerabilities in software, a structural intermediate representation of binary code should be obtained first. In this paper, we propose PANDA, a vulnerability-mining-oriented intermediate language and a series of algorithms for assembler understanding based on flow analysis. We implement a lightweight prototype system named BEST for assembler structural representation. The system uses control flow analysis and data flow analysis techniques to identify common control structures, analyze executive flow of a program, reconstruct expressions and functions, find data dependency, finally transform the assembler into a structured PANDA intermediate language program. Experiment results show that our system produces high quality intermediate language programs for further automatic security analysis.