Questions tagged [assembly]
A family of very low-level programming languages, just above machine code, where each statement corresponds to a single machine code instruction.
4
votes
0answers
79 views
Reconstructing Assembly Truth Map
So I recently read [1] which evaluates several disassemblers. The truth/test binaries are generated by the SPEC CPU 2006 Benchmark suite. The authors provide detailed build instructions for the ELF ...
22
votes
4answers
3k views
Knowledge about CPU hardware
Recently, I have taken the computer organization course that explains in the logic gate level how a CPU works and etc...
Up until now I have been treating the CPU as a black box that runs assembly ...
2
votes
1answer
489 views
APK Tools for Tinder 7.4.0 [closed]
I wanted to make some Tinder tools, and found some already made APIs.
I would like go through the process of discovering this private API by myself, since most of the articles are a bit out of date.
...
5
votes
1answer
420 views
How to Make .text Section in Assembly Writeable for Win7-64 EXE
I have a basic XOR decoder that functions perfectly in Linux, but when I try to move it over to an exe in windows, it fails. I am leaving this question open for historical reference since the issue ...
0
votes
2answers
569 views
Working Linux assembly XOR Encoder/Decoder Failing on Windows
Should I be able to extract shellcode from a basic (tested and working) Win7-64 message box app and place the extracted shellcode into a tested and working assembly language encoder/decoder and expect ...
1
vote
1answer
124 views
Unknown comparison
I'm trying to decompile some singleplayer code for a game (C++ on X86 architecture Linux). I do this with the help of some already available source code, a file (compiled on linux) with debug ...
0
votes
1answer
104 views
IDA: Two calls of a same function
I was reversing some executable and came across to this code:
As I found out later, it's using function pointer to call function sub_4011C0 and that could be the reason.
My question is why does ...
4
votes
2answers
394 views
ASM working as is, but not in a C program
I have this piece of ASM:
section .text
global _start
_start:
xor eax, eax
push eax ; 0 to finish the /bin//sh string
push 0x68732f2f ; //sh
push 0x6e69622f ; /bin
...
2
votes
2answers
160 views
PDP-11 pure executable - version 16
PDP-11 pure executable reverse engineering:
Dont have access to Ida pro. Ollydbg, Immunity doesnt open it.
radare2 with MIPS, a lots of errors.
file:
# file lightning-tp.b
lightning-tp.b: PDP-...
0
votes
0answers
65 views
What is the best way to determine what part of game code determines time step?
I'd like to alter the way time step works on a game (in order for it to work at a normal game speed at different FPS values (I know it may add bugs)). I have access to the PPC assembly of it or Cheat ...
5
votes
1answer
720 views
Reverse engineering the virtual machine based crackme
I am currently working on some crackme, that has implemented an obfuscation technique, virtualisation. The virtual machine inside this crackme is a huge switch-case block (over 130 cases in it). I ...
4
votes
1answer
543 views
ARM “add” instruction with shift
I'm trying to understand how ARM add with shift is implemented e.g.
sym.imp.__libc_start_main : ...
0
votes
1answer
132 views
Finding variable reference in cpp
Let's bring example
We have string
0000000000bd2906 db "CurrentKey", 0 ; DATA XREF=sub_555670+3390
And it's used here
00000000005563ae lea rsi, qword [0xbd2906] ; "CurrentKey"
Disassembler ...
1
vote
2answers
525 views
Understanding an if statement in assembly
I have written two simple C programs (one with an if and one without). Looking at the assembly differences there are a few lines that I can't manage to explain and was hoping to get some assistance. ...
-1
votes
0answers
162 views
Assembly loop to c++
I am trying to figure out the value stored in %edi throughout each loop iteration:
0x40106e movl $0x2b, 0xffffffdc(%ebp)
0x401075 movl $0x31, 0xffffffe4(%ebp)
0x40107c movl $0x74,...
1
vote
1answer
514 views
Reverse Packet Encryption with server side checks
My problem is the packets are encrypted. And, the server checks every packet sent from the client. If the packet that the server expect does not match from what the client sent, the server will ...
0
votes
2answers
131 views
Do .NET functions have function prologs?
If I'm looking at a binary compiled with VC++ in a hex editor and I want to identify the start of functions - I can look for the hex "55 8B" - which is a common function prolog.
Is there something ...
1
vote
2answers
125 views
Real-time changes of executable on IDE/Assembler
I'm new on this, sorry for bad usage of terms or overextending an explanation. I'm learning code languages and the way I found to bring it to my world so I can learn it better was coding for/with ...
0
votes
2answers
1k views
How can I export only the opcodes from objdump (or any other program)
I have multiple malware files, I want to do an analysis with the opcodes. Im able to export everything to text but I only need the middle column. Any idea on how can I solve this?
In other words of ...
0
votes
1answer
112 views
Information about packers
i was trying to search for some information about packers just to learn more about it, there is a lot of stuff out there but its hard to find something that really explain that good and clear,
I would ...
5
votes
2answers
280 views
Inverse And operation
I'm trying to write a keygen to a crack me that I'm learning from and I got stuck. What happens there is pretty simple:
Let's say that I entered the password: "12121212"
XOR DWORD PTR DS:[ECX+EAX],...
0
votes
1answer
192 views
Link between C and x86 asm
I wonder how to link theses instructions (down to register details) to the original C code. Where are the variables (whether they are local variables, global variables, static variables, or parameters ...
1
vote
1answer
92 views
68k: Adding 0x100 to 9-bit register and doing BEQ.s - how does it make sense?
During my current project I found such code:
move.w (0xFFFC0C).l, d0 | read SCSR
andi.w #0x100, d0 | add 256 to d0
beq.s location | branch if LSB = 0x00
I cannot get the idea of ...
1
vote
1answer
252 views
Basic assembly query [closed]
I wrote a program which will add two numbers in assembly.
When I do a system call for scanf(), the instruction looks like this:
mov rcx, num1
Note: I have defined num1 in the bss section as:
num1 ...
0
votes
0answers
189 views
Removing code signature from Mac binary executable using objective c
How to remove code signature from a mac binary executable using objective C.
I came across this question here. It shows a way to remove code signature of mac binary executable using terminal but I'm ...
1
vote
1answer
509 views
Creating a patcher for a mac app
I have a signed mac app and I don't have the source code of the app.
I know address locations of some assembly instructions which I need to change so as to make this app to work in certain way. So I'm ...
1
vote
3answers
2k views
Reading Physical Memory
I am trying to determine how to read physical memory. I understand that when the OS is in protected mode a process can only access the virtual memory assigned to it without resulting in a ...
1
vote
1answer
4k views
How calls work in x86
I am studying some X86 code and I often see calls:
call sym.imp.printf
call sym.imp.scanf
call sym.imp.strcmp
call sym.imp.__stack_chk_fail
Those examples are the most common calls.
But how do they ...
0
votes
1answer
668 views
IDA - call dword ptr [mana+0Ch] - Where is it pointing to?
Pseudo Code:
(*((void (__cdecl **)(_DWORD, _DWORD))cr->baseclass_0.Skills[1]->_vptr.TSkill + 3))(cr->baseclass_0.Skills[1], Mana);
IDA Assembly Code:
.text:0807EC41 call ...
1
vote
4answers
108 views
What is the need of the Rotation Operation?
I know that shl instruction is like the mul operation and the shr instruction is like the div operation and it's used for optimization.
For example, shl eax, n is a more efficient way to implement ...
2
votes
1answer
559 views
LEA assembly instruction
I am reading through the 'Practical Malware Analysis' book and got to page 74 which says:
lea ebx, [eax*4+4] is the functional equivalent of ebx = (eax+1)* 5
where eax is a number.
As of my ...
1
vote
3answers
339 views
How to locate dynamic instructions?
I am trying to make a game hack and there are a few instructions I need to get the addresses of to nop out. However, when looking at the instructions in Cheat Engine, they do not have a static offset ...
5
votes
1answer
944 views
getting function address by reading ADRP and ADD instruction values
Hello reverse engineers,
I'm analysing a fat Macho-O binary, and it has an ADRP and an ADD instruction in it.
I'm talking about these instructions:
__text:00000001002E050C ADRP ...
1
vote
0answers
174 views
X64 ASSEMBLY - Cannot run compiled and linked raw shellcode in Windows
After using metasploit's windows/x64/meterpreter/reverse_tcp shellcode on my windows 10 machine (with AVs turned off), I decided to try to create a hand-made polymorphic, null-free and custom-encoded ...
1
vote
1answer
263 views
Recursive Descent Disassembly
Suppose that eax contains a value only when the program is running.
How can a disassembler determine the address of expressions like:
call eax using static analysis and Recursive Descent disassembly?
5
votes
0answers
153 views
What is the pictured x86 technique/area called?
I've been reverse-engineering Windows PE files and I've discovered this pattern used quite often, making it a little more difficult to follow API calls. First, I'll go to the file's imports and then I ...
1
vote
1answer
602 views
SHL with 0 operand
in the snippet below of x86 assembly code that was produced by Visual Studio 2017, I see the instruction
shl eax,0
What is the purpose of this instruction, as It should act as NOP as I ...
0
votes
1answer
118 views
whats the purpose of this code snippet?
I'm using at&t ordering
I came across this a little while ago and while i understand why we want to push a stack frame when we call a new routine I don't see why it was done here: (for the ...
2
votes
1answer
12k views
What does the `TEST` instruction do
I'm having trouble understanding the TEST instruction and its use. I'm looking at the following code at the end of a loop
0040A3D1 A9 00010181 TEST EAX,81010100
0040A3D6 74 E8 ...
0
votes
3answers
697 views
Does x86 instruction SHL/SHR actually rotate the bits?
I was debugging a program. When the register di=0x01, cl=0x11,
The instruction "shl di,cl" will actually make di=0x1.
Shouldn't the bits that slide off the end disappear?
0
votes
2answers
734 views
How XOR works in my code?
I have this assembly code:
XOR DWORD PTR DS:[ECX+EAX],1234567
And what it does is just xoring the first 4 bytes of EAX with 1234567.
So if the first 4 bytes are :
31 32 31 32
After xor they become:...
0
votes
2answers
928 views
EBP + C what is that?
I have this assembly code:
MOV DL,BYTE PTR DS:[ECX+EAX] --> Move the first byte of EAX to DL
ADD BYTE PTR DS:[EAX+9],DL --> ADD the DL byte to the ninth byte at EAX
INC ECX --> Increase ...
0
votes
1answer
551 views
How to assemble back a disassembled ChunkSpy LUA?
Is it possible to assemble back the ChunkSpy's dissembled LUA files? Here's an example:
0B50 05000000 [001] getglobal 0 0 ; script
0B54 C63E0000 [002] gettable 0 0 ...
0
votes
1answer
494 views
Creating basic pseudocode from ARM ASM
I'm trying to revers this section of code, but I don't get it fully.
loc_2F2E0
VLDR D19, =210.0
MOVS R1, #0
VLDR D18, =190.0
MOVS R0, #0
VCMPE.F64 ...
0
votes
1answer
202 views
What does this extra argument for a VLDR instruction mean?
Working with ASM code, bit I don't understand what does is the difference between these lines?
VLDR S0, [R5]
VLDR S2, [R5,#4]
What is the meaning of #4?
2
votes
1answer
954 views
Finding hidden string location using radare2 on ELF binaries
I'm working through some reverse engineering sample programs (IOLI crackmes) crackme0x00 - crackme0x09 which are gcc compiled ELF format binaries. I was provided these by a colleague and can be ...
1
vote
1answer
110 views
3 questions on Assembly - meaning of code, Decompilation in Linux, Higher level perspective,
Following the question here (3 questions on assembly - syntax, meaning, and equivalent in high level code (eg C++)), I would like to know for the same x86 code in AT&T syntax:
xor $0x20, (%eax)
...
1
vote
2answers
267 views
3 questions on assembly - syntax, meaning, and equivalent in high level code (eg C++)
For the following example, using x86 code in AT&T format:
xor $0x20, (%eax)
and $0x20, %ah
or $0x20, %dh
dec (%edi)
dec %si
dec %sp
dec %bp
My understanding:
Line 1: takes value in %eax and ...
0
votes
2answers
199 views
Help to understand some assembly code
I am currently working on a old 90's video game to try to correct/modify unrealistic behaviors.
I managed to almost complete my list, but it remains my main objective...
It is a management game, ...