disassembly

Optimizing ARM Cortex M3 code

余生颓废 提交于 2019-12-01 00:47:06
I have a C Function which tries to copy a framebuffer to FSMC RAM. The functions eats the frame rate of the game loop to 10FPS. I would like to know how to analyze the disassembled function, should I count each instruction cycle ? I want to know where the CPU spend its time, in which part. I'm sure that the algorithm is also a problem, because its O(N^2) The C Function is: void LCD_Flip() { u8 i,j; LCD_SetCursor(0x00, 0x0000); LCD_WriteRegister(0x0050,0x00);//GRAM horizontal start position LCD_WriteRegister(0x0051,239);//GRAM horizontal end position LCD_WriteRegister(0x0052,0);//Vertical GRAM

How might I convert Intel 80386 Machine Code to Assembly Language?

ε祈祈猫儿з 提交于 2019-12-01 00:44:52
I've been given the following task: Consider the following sequence of hexadecimal values: 55 89 E5 83 EC 08 83 E4 F0 31 C9 BA 01 00 00 00 B8 0D 00 00 00 01 D1 01 CA 48 79 F9 31 C0 C9 C3 This sequence of bytes represents a subroutine in Intel 80386 machine language in 32-bit mode. When the instructions in this subroutine are executed, they leave values in the registers %ecx and %edx. What are the values? What is the program in C that carries out the computation done by this subroutine, then prints the values computed by this program of %ecx and %edx as they would appear at the end of the

x86 find out operand size of instruction given only the hex machine code?

血红的双手。 提交于 2019-12-01 00:32:05
问题 For example, given a hex: 83 E4 F0 By looking at the intel developer's manual, I can figure out that 83 means and and FO means the -16 . Looking at E4 , I can decode that the source/destination register is either SP or ESP. Therefore, I can conclude that the hex means either and $-16, %ESP or and $-16, %SP . However, in the manual, both of those are listed as 83 /4 ib . How can I differentiate between those two? 回答1: As harold says, the default operand size is not encoded in the instruction

Getting signatures of private API methods for iOS

爱⌒轻易说出口 提交于 2019-12-01 00:21:06
I know that SpringboardService contains a lot of private API's (as example: SBGetApplicationState, SBDimScreen etc). I got the list of these methods using "nm" tool. I want to find a tool which will let me get signatures for these private API methods. As I understand SBGetApplicationState is a C call (vs Objective C method). So I am not sure whether it's possible to recover signatures without disassembling and additional manual actions. However, I hope that at least semi-automated process exist. Several notes: a) I have seen this link (iOS Runtime private headers): https://github.com/nst/iOS

IDA Pro disassembly shows ? instead of hex or plain ascii in .data?

旧时模样 提交于 2019-11-30 23:34:22
I am using IDA Pro to disassemble a Windows DLL file. At one point I have a line of code saying mov esi, dword_xxxxxxxx I need to know what the dword is, but double-clicking it brings me to the .data page and everything is in question marks . How do I get the plain text that is supposed to be there? If you see question marks in IDA, this means that there's no physical data at this location on the file (on your disk drive). Sections in PE files have a physical size (given by the SizeOfRawData field of the section header). This physical size (on disk) might be different from the size of the

x86 Assembly: How do Disassemblers know how to break up instructions?

独自空忆成欢 提交于 2019-11-30 22:10:10
How does a x86 disassembler know where to break up the instructions? I am looking at the 8088 instruction set. For example the move instruction has 7 variations that range from 2 to 4 bytes. The instructions themselves seem to follow no particular order. Another reason for Why is x86 ugly? . For example: 76543210 76543210 76543210 76543210 reg/mem to/from reg 100010dw ||regr/m imm to reg/mem 1100011w ||000r/m dat dat w=1 imm to reg 1011wreg data dat w=1 imm to accum 1010000w addr-low addrhigh accum to mem 1010001w addr-low addrhigh reg/mem to seg 10001100 ||0ssr/m seg to reg/mem 10001100 |

Decompiling EXE to ASM

心不动则不痛 提交于 2019-11-30 21:46:32
I want to make a basic antivirus for my free time. Basically I learned about the basic structure of the EXE(windows) file. How do I extract the ASM code from the file and the PE header? You can install Cygwin and use objdump to decompile an exe into asm. Be sure you select the binutils when installing cygwin. After installing cygwin, you can run the following from a bash shell: objdump -Slx yourpgm.exe You can use some free distrubuted disassembler.for example: ollydbg diassembler . note: there is only some MS-DOS stub executeable code in the PE header. 来源: https://stackoverflow.com/questions

decode ARM BL instruction

老子叫甜甜 提交于 2019-11-30 19:07:36
问题 I'm just getting started with the ARM architecture on my Nucleo STM32F303RE, and I'm trying to understand how the instructions are encoded. I have running a simple LED-blinking program, and the first few disassembled application instructions are: 08000188: push {lr} 0800018a: sub sp, #12 235 __initialize_hardware_early (); 0800018c: bl 0x80005b8 <__initialize_hardware_early> These instructions resolve to the following in the hex file (displayed weird in Eclipse -- each 32-bit word is in MSB

Getting signatures of private API methods for iOS

丶灬走出姿态 提交于 2019-11-30 18:11:18
问题 I know that SpringboardService contains a lot of private API's (as example: SBGetApplicationState, SBDimScreen etc). I got the list of these methods using "nm" tool. I want to find a tool which will let me get signatures for these private API methods. As I understand SBGetApplicationState is a C call (vs Objective C method). So I am not sure whether it's possible to recover signatures without disassembling and additional manual actions. However, I hope that at least semi-automated process

IDA Pro disassembly shows ? instead of hex or plain ascii in .data?

我与影子孤独终老i 提交于 2019-11-30 17:44:04
问题 I am using IDA Pro to disassemble a Windows DLL file. At one point I have a line of code saying mov esi, dword_xxxxxxxx I need to know what the dword is, but double-clicking it brings me to the .data page and everything is in question marks . How do I get the plain text that is supposed to be there? 回答1: If you see question marks in IDA, this means that there's no physical data at this location on the file (on your disk drive). Sections in PE files have a physical size (given by the