Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [float]

The tag has no usage guidance.

2
votes
1answer
355 views

XMM register instructions and their c equivalents

I'm trying to convert some x86 assembly back into C++, and I cannot figure out how this set of instructions was originally written. movd xmm0,eax ; byte read from device '0x04' cvtdq2pd xmm0,xmm0 ; ...
3
votes
1answer
1k views

Moving integer to xmm register

I was looking at a game code, and I saw the following: 0x171 mov [rbp-30],r12w .... 0x210 movups xmm0,[rbp-30] I am pretty sure that r12 is an integer here (equals 5). So, is it moving an ...
4
votes
1answer
246 views

What does adding 4.294967296e9 to a double do?

I'm reverse engineering an application which commonly adds 4.294967296e9 to a double if the number is negative. Part of the disassembly: mov eax, label_to_memory fild label_to_memory test ...
1
vote
1answer
53 views

Viewing 32-bit floats in Internal Call disassembly from .NET 2.0 DLL in x64dbg

I'm new to using x32/64dbg and I have an EXE with PDB symbols and want to disassemble and debug an unmanaged function call. It's from an x86 .NET 2.0 DLL where the unmanaged code sits compiled inside ...
4
votes
2answers
1k views

what is COERCE_FLOAT in ida Hex-Rays' C++ pseudocode?

I was reversing and then i've found a definition as COERCE_FLOAT: float v28; float v29; v29 = COERCE_FLOAT(&v30); v28 = COERCE_FLOAT(&v31); // what is this? I've searched and found that it ...
3
votes
1answer
2k views

(bad) opcodes of objdump

I'm trying to write my own disassembler for PE,PE+ and ELF executables but I'm stuck with a big problem on PE and PE+ executables. I'm checking my work by comparing my output with objdump, and I ...
1
vote
1answer
676 views

How to multiply an SSE float with a hardcoded value using MULSS?

I have the following line of code in a game: movss xmm0,[eax+000000F0] It basically loads the float speed of the current speed category into the XMM0 register. I already made a jump to an empty code ...
0
votes
2answers
241 views

Understanding FCOMP instruction and extracted value from address operand

I'm trying to reverse engineer an application made in vb6. At a certain point it compares an input number to a constant number, my goal here is to extract that number, now i found where the comparison ...
1
vote
1answer
558 views

Pointer arithmetic in C generated by ida / hexrays decompiler

Please help me understand the following function lines. The loop body does some floating point arithmetic, but why does it cast float pointers to char *, and back? if ( CG.blockLength >= 4 ) { ...
2
votes
3answers
2k views

IDA decompiler macro

What is the purpose of COERCE_FLOAT and COERCE_UNSIGNED_INT macros in the Hex Rays decompiled code below? double __cdecl sub_401580(float a1) { unsigned int v1; // eax@1 double v2; // st7@1 ...
1
vote
1answer
299 views

Analyse a piece of code using FloatingPoint instructions and calculations

i'm reversing this function doing this floating point calculations which eventually leads to a crucial compare. I need to understand what exactly are the calculations that are made and i want to re-...
2
votes
2answers
540 views

Reverse Engineer Float and Double Types in C++

I would like to get to the code that makes floats and doubles work. The reason why I'm trying is that I need to introduce a new floating point type defined by the military that is not supported ...
1
vote
0answers
71 views

Work out packet structure from usb capture

Im hoping to understand the way a auto diagnostics tool is reporting data over usb. I've made a usb capture to look for changes according to known changes to the input it measures. The measurement is ...
1
vote
0answers
77 views

What are these blue indexes in the disasm output? [closed]

I'm working on a binary that has a lot of FPU operations, and even though IDA (Hex rays) decompiles properly most of them, there's cases like this: Which "decompile" to: Is there any way I can fix ...