Posted May 1, 20169 yr Hello, I have a realy stupid question but i spent on it 3 hours and I surrender:( Im trying to write keygen to :"LaFarge CrackMe #2". So the code in asm is: (EAX=631698A, its when you enter "baruch" as name to this crackme,and the address(406549) at 401261 is empty area) After the loop,the address 406549 look like: Now,because i dont know how to code assembly DIV in c++ i did "inline assembly": //equivalent to address 406549 In visual studio i put break point to see what happend after that code: //table6 address And here my problem. Its not the same as in olly's dump! Instead of : 22 27 1f 23 20 etc should be: 34 39 31 35 etc. Please,how to fix it??
May 1, 20169 yr "add dl, 30" is the cause of the problem. Olly uses hexadecimal by default. Visual Studio by default uses decimal. Change it to "add dl, 30h" or "add dl, 0x30" and you shall be happy. Edited May 1, 20169 yr by kao
May 3, 20169 yr Hey.... 9 div 4 = 2 ( C/C++: 9 / 4 ) 9 mod 4 = 1 ( C/C++: 9 % 4 ) #include <iostream> using namespace std; using std::hex; int main() { int sum, sum2, sum3; int a; int b; a = 0x71; b = 0xA; std:: cout << "71h / Ah = B" << endl; sum = a / b; std::cout << std::hex << std::uppercase << "Sum = " << sum << endl; } eq Edited May 3, 20169 yr by e0qs
Create an account or sign in to comment