Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7606779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:29:42+00:00 2026-05-31T00:29:42+00:00

I am working with the Adobe Flash ocx by loading it into my C++

  • 0

I am working with the Adobe Flash ocx by loading it into my C++ program. The ocx is supposed to be 64 bit but for some reason it has issues when I compile with the x64 platform. I have read up on this and found that it is likely that some function receives DWORD userData instead of void* userData through some structure and then casts it to an object pointer. This works ok in a 32-bit environment, but crashes in 64-bit.

The disassembly of the function calls inside the ocx that cause the crash are the following lines:

mov         ecx,r8d 

The first operation copies only low 32-bits from R8D to ECX (ECX is 32-bit).

cmp         dword ptr [rcx+11BCh],0 

The second operation accesses 64-bit register, where low 32-bits contains correct address and high 32-bits contains some junk. Leading to a crash, of course.

Solution

I have read that one possible solution is to do the following:

  1. Create an asm file containing the following code:

    nop 
    nop 
    nop 
    
    mov ecx,r8d 
    cmp dword ptr [rcx+11BCh],0 
    
    nop 
    nop 
    nop 
    
    mov rcx,r8d   // I've replaced ecx with rcx here 
    cmp dword ptr [rcx+11BCh],0 
    
  2. Build an obj file using this asm file and MASM.exe

  3. Open the obj file with a hex editor and locate the 90’s that represent the nop
  4. In the Flash ocx locate the first string of bytes between the nops and replace it with the new string of bytes that comes after the nops. This will change it from 32 bit to 64 bit function calls.

Problem

I have attempted this by making the following asm file and building it with ml64.exe (I do not have masm.exe but I think that ml.exe is the new 32 bit version of it, and this code would only build with the ml64.exe, probably because of the 64-bit only operators?):

TITLE: Print String Assembly Program (test.asm)

.Code
main Proc
nop 
nop 
nop 

mov ecx,r8d 
cmp dword ptr [rcx+11BCh],0 

nop 
nop 
nop 

mov rcx,r8   
cmp dword ptr [rcx+11BCh],0 

main ENDP
END

I had trouble getting it to build (I kept getting errors about instruction length matching) until I changed r8d to r8 in the second section.

I got this obj to build, and opened it with a hex editor and was able to locate the two byte strings. But where my problem comes is that when I search for the first byte string that should be in the flash ocx, I cannot find it. It is not there, so I cannot replace it with the second one.

What am I doing wrong?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T00:29:43+00:00Added an answer on May 31, 2026 at 12:29 am
    1. Create an asm file containing the following code:

      nop 
      nop 
      nop 
      
      mov ecx,r8d 
      cmp dword ptr [rcx+11BCh],0 
      
      nop 
      nop 
      nop 
      
      mov rcx,r8d   // I've replaced ecx with rcx here 
      cmp dword ptr [rcx+11BCh],0 
      
    2. Build an obj file using this asm file and MASM.exe

    3. Open the obj file with a hex editor and locate the 90’s that represent the nop
    4. In the Flash ocx locate the first string of bytes between the nops and replace it with the new string of bytes that comes after the nops. This will change it from 32 bit to 64 bit function calls.

    I made the following asm file and built it with ml64.exe

    TITLE: Print String Assembly Program (test.asm)
    
    .Code
    main Proc
    nop 
    nop 
    nop 
    
    mov ecx,r8d 
    cmp dword ptr [rcx+11BCh],0 
    
    nop 
    nop 
    nop 
    
    mov rcx,r8   
    cmp dword ptr [rcx+11BCh],0 
    
    main ENDP
    END
    

    I got this obj to build, and opened it with a hex editor and was able to locate the two byte strings. I found the first byte string in the Flash OCX and changed it to the second one. (The only actual change was a 41 to a 49 in the strings)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Messing about a bit, i have a working Adobe After Effects plugin with a
All, I'm working on a Flash application that's supposed to send XML data to
My flash is working fine in all browser except ie6. During loading of page
I am working with Flash Builder 4.5 using Adobe Air, Flex and Actionscript 3,
This is just the first time I'm working on Adobe Flash CS5. I have
How to choose the webcam/camera manually in Adobe Air? In Flash it's working through
So, I'm working with a video source that I'm feeding into my Adobe AIR
I'm currently working on a Flash application that has a sibling AIR equivalent. From
I am working on an Adobe Flex app, which needs to parse a relativley
Working on an irc client in Adobe AIR in JavaScript, and thinking about logging.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.