Questions tagged [float]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
52 views

Floating point number mangled in a proprietary file

I'm reverse engineering a proprietary file format that contains a set of points to construct a curve (FL Studio's .fnv format). What i have trouble with in particular is how the Y-coordinates are ...
user avatar
0 votes
1 answer
93 views

determine proprietary 16-bit floating-point format

Background / Introducion CAN message Mercedes-Benz, cannot determine 16-bit data type for temperature. 7E 00 32 01 37 00 According to @rnd-ash (who has reverse engineered ACTIA Basic XS Monitor ...
user avatar
  • 103
0 votes
1 answer
51 views

Encoding of 64-bit double

I'm in the process of reverse engineering a USB driver, and I'm having problems finding a way to decode the binary representation of double values. The values don't seem to be encoded in IEEE-754 ...
user avatar
  • 3
0 votes
1 answer
188 views

How this Float “4-bytes” is converted to Short_signed “2-bytes”?

Hi, please help me on this problem, I don't understand how this Float "4-bytes" or IEEE 754 floating point, is converted to short_signed "2-bytes". First, I convert the float "4-bytes" hexadecimal to ...
user avatar
  • 1
1 vote
1 answer
169 views

Encoding method of float

I'm reversing this game and got stuck. To make it simple, You have some amount of coins in the game (float or double) and you can spend it on some things. I started sniffing network traffic and ...
user avatar
  • 173
1 vote
1 answer
252 views

Weird IDA/Decompiler floating point output

I stumbled upon this (reduced for readability) function. It does weird things that I have never encountered before. // a2 is always 60.0 void some_function(struct_123 *this, float a1, float a2) { ...
user avatar
2 votes
1 answer
2k 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 ; ...
user avatar
  • 402
5 votes
1 answer
7k 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 ...
user avatar
4 votes
1 answer
472 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 ...
user avatar
  • 241
1 vote
1 answer
100 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 ...
user avatar
4 votes
2 answers
2k 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 ...
user avatar
  • 197
5 votes
1 answer
4k 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 ...
user avatar
  • 75
1 vote
1 answer
1k 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 ...
user avatar
  • 983
0 votes
2 answers
379 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 ...
user avatar
1 vote
1 answer
798 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 ) { ...
user avatar
  • 59
2 votes
3 answers
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 ...
user avatar
  • 59
1 vote
1 answer
379 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-...
user avatar
  • 638
2 votes
2 answers
702 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 ...
user avatar
1 vote
0 answers
78 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 ...
user avatar
1 vote
0 answers
86 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 ...
user avatar
  • 1,253