assembly

disassembling, changing and assembling DLL file

眉间皱痕 提交于 2020-04-30 07:21:09
问题 I have a DLL which I have disassembled, and just to test that my project is going to work. I have tried assembling it again but without luck. I'm getting different kinds of errors. The disassembly I have done with IDA Pro freeware, and then exported the file as an .asm, to try to assemble it again I have tried to use A86 assembler and flat assembler. Maybe I'm disassembling the DLL the wrong or using the wrong assembler, but could somebody maybe point me to some tools and/or resources about

REPNZ SCAS Assembly Instruction Specifics

孤街醉人 提交于 2020-04-29 06:13:50
问题 I am trying to reverse engineer a binary and the following instruction is confusing me, can anyone clarify what exactly this does? =>0x804854e: repnz scas al,BYTE PTR es:[edi] 0x8048550: not ecx Where: EAX: 0x0 ECX: 0xffffffff EDI: 0xbffff3dc ("aaaaaa\n") ZF: 1 I see that it is somehow decrementing ECX by 1 each iteration, and that EDI is incrementing along the length of the string. I know it calculates the length of the string, but as far as exactly HOW it's happening, and why "al" is

Need help understanding Binary Bomb Phase_5 [duplicate]

旧街凉风 提交于 2020-04-19 05:51:40
问题 This question already has answers here : Binary Bomb Phase 5 (1 answer) Decoding Assembly Language (Bomb Lab Phase 5) (1 answer) Closed 20 days ago . So I have been working through this binary bomb lab, and phase_5 is the only part I do not really understand. I have solved it, but there are a few lines that I hope someone can help me with. 0x08048db1 <+0>: push %ebp 0x08048db2 <+1>: mov %esp,%ebp 0x08048db4 <+3>: push %ebx => 0x08048db5 <+4>: sub $0x14,%esp 0x08048db8 <+7>: mov 0x8(%ebp),%ebx

Need help understanding Binary Bomb Phase_5 [duplicate]

三世轮回 提交于 2020-04-19 05:49:37
问题 This question already has answers here : Binary Bomb Phase 5 (1 answer) Decoding Assembly Language (Bomb Lab Phase 5) (1 answer) Closed 20 days ago . So I have been working through this binary bomb lab, and phase_5 is the only part I do not really understand. I have solved it, but there are a few lines that I hope someone can help me with. 0x08048db1 <+0>: push %ebp 0x08048db2 <+1>: mov %esp,%ebp 0x08048db4 <+3>: push %ebx => 0x08048db5 <+4>: sub $0x14,%esp 0x08048db8 <+7>: mov 0x8(%ebp),%ebx

Need help understanding Binary Bomb Phase_5 [duplicate]

怎甘沉沦 提交于 2020-04-19 05:49:09
问题 This question already has answers here : Binary Bomb Phase 5 (1 answer) Decoding Assembly Language (Bomb Lab Phase 5) (1 answer) Closed 20 days ago . So I have been working through this binary bomb lab, and phase_5 is the only part I do not really understand. I have solved it, but there are a few lines that I hope someone can help me with. 0x08048db1 <+0>: push %ebp 0x08048db2 <+1>: mov %esp,%ebp 0x08048db4 <+3>: push %ebx => 0x08048db5 <+4>: sub $0x14,%esp 0x08048db8 <+7>: mov 0x8(%ebp),%ebx

Bomb Lab Phase 4 [duplicate]

北战南征 提交于 2020-04-18 07:34:20
问题 This question already has answers here : Binary Bomb - Phase 4 (1 answer) having trouble with bomb lab phase 4 [closed] (1 answer) Closed 2 years ago . I'm having a bit of trouble understanding the following assembly code for the bomb lab. Running through it so far, I've figured out that the answer is supposed to be two decimal values. If not it will explode the bomb. Then, function 4 is making sure that the first value inputted is between 0 and 30. (0x1e) Then it jumps to func4 where it does

Writing an Assembly Program to add from 1 to 100

↘锁芯ラ 提交于 2020-04-18 06:13:08
问题 So im trying to add 1+2+3... and so on...without using brute force. Y=∑_1^100▒X_i, the numbers Xi are stored in consecutive memory locations starting at location 100. I am using the IAS instruction set: I just cant seem to get this done. I dont even know where to begin, no real loops or if statements 回答1: You have 4 different possible approaches, that I will write in x86 since my knowledge of IAS is very limited, but you can apply the same logic 1/ Brute force xor eax, eax mov ecx, 100

Writing an Assembly Program to add from 1 to 100

冷暖自知 提交于 2020-04-18 06:12:45
问题 So im trying to add 1+2+3... and so on...without using brute force. Y=∑_1^100▒X_i, the numbers Xi are stored in consecutive memory locations starting at location 100. I am using the IAS instruction set: I just cant seem to get this done. I dont even know where to begin, no real loops or if statements 回答1: You have 4 different possible approaches, that I will write in x86 since my knowledge of IAS is very limited, but you can apply the same logic 1/ Brute force xor eax, eax mov ecx, 100

Reversing bits in a byte with AVR

冷暖自知 提交于 2020-04-18 05:47:25
问题 I am currently working on a problem that wants me to build a subroutine that will reverse the bits in R16. 00000011 => 11000000 or 10101000 => 00010101 For the class we are using the AVR subset and the subroutine needs to work in norfair. This is what I have so far, any help would be appreciated! ldi r16,3 ;00000011 回答1: The naive solution is to loop through the bits with the shift operator and check. But be aware that AVR doesn't have a barrel shifter so it can only shift by 1, any other

Replace specific character of string using mips

六月ゝ 毕业季﹏ 提交于 2020-04-17 19:28:27
问题 I was trying to replace specific character of string using mips. The program is like the user needs to enter the string which is limited to 40 characters and the program needs to ask the user if they want to replace any character of the string or not. In my code I was able to print only one character, here is my code: .data prompt0: .asciiz " Please Enter any String :" prompt:.asciiz "\n Your current string is: " prompt1:.asciiz "\n Do you want to make any changes to the string? (y/n): "