Questions tagged [float]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
84 views

Reverse engineer a blackbox function operating on single or double precision floats for emulation

I own and run a NEC VectorEngine 10C which is a PCIe accelerator running a proprietary ISA which has many fun instructions among them is VRSQRT which computes an approximation of the inverse ...
0 votes
1 answer
71 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 ...
0 votes
1 answer
118 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 ...
0 votes
1 answer
57 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 ...
0 votes
1 answer
356 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 ...
1 vote
1 answer
330 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) { ...
1 vote
1 answer
178 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 ...
2 votes
3 answers
3k 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 ...
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 ; ...
1 vote
1 answer
2k 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 ...
5 votes
1 answer
8k 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
2 answers
3k 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 ...
4 votes
1 answer
554 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
1 answer
148 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 ...
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 ...
0 votes
2 answers
412 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 ...
2 votes
2 answers
738 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
1 answer
845 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 ) { ...
1 vote
1 answer
404 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-...
1 vote
0 answers
90 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
0 answers
92 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 ...