For the .pyc binaries ("compiled" python) you should start trying to extract the originalpythoncode:
uncompyle6binary.pyc>decompiled.py
Be sure that the binary has the extension ".pyc" (if not, uncompyle6 is not going to work)
After extracting it, it will be more easy to analyze.
Analyzing python assembly
If you weren't able to extract the python "original" code following the previous steps, then you can try to extract the assembly (but it isn't very descriptive, so try to extract again the original code).
In here I found a very simple code to dissasemble the .pyc binary (good luck understanding the code flow). If the .pyc is from python2, use python2:
>>> importdis>>> importmarshal>>> importstruct>>> importimp>>>>>> withopen('hello.pyc','r') asf:# Read the binary file...magic=f.read(4)...timestamp=f.read(4)...code=f.read()...>>>>>> # Unpack the structure content and un-marshal the code>>> magic=struct.unpack('<H',magic[:2])>>> timestamp=struct.unpack('<I',timestamp)>>> code=marshal.loads(code)>>> magic,timestamp,code((62211,), (1425911959,),<code object <module> at 0x7fd54f90d5b0, file "hello.py", line 1>)>>>>>> # Verify if magic number corresponds with the current python version>>> struct.unpack('<H', imp.get_magic()[:2]) == magicTrue>>>>>> # Disassemble the code object>>> dis.disassemble(code)10LOAD_CONST0 (<code objecthello_worldat0x7f31b7240eb0,file"hello.py",line1>)3MAKE_FUNCTION06STORE_NAME0 (hello_world)9LOAD_CONST1 (None)12RETURN_VALUE>>>>>> # Also disassemble that const being loaded (our function)>>> dis.disassemble(code.co_consts[0])20LOAD_CONST1 ('Hello {0}')3LOAD_ATTR0 (format)6LOAD_FAST0 (name)9CALL_FUNCTION112PRINT_ITEM13PRINT_NEWLINE14LOAD_CONST0 (None)17RETURN_VALUE