Solved

what input will diffuse bomb?

Posted on 2009-05-15
1
339 Views
Last Modified: 2012-05-07
this is decompiled assembly.

it looks like this accepts two numbers as input.

from what i can tell Vfffffffc   must be between 0-4 and eax must be equal to Vfffffff8 or function explode_bomb is called.

the value of Vfffffffc    determines which case of the switch statement is executed.... then the code jumps to the value of "goto"... then the rest of the statements are excuted.

is that accurate?
/*	Procedure: 0x08048EC1 - 0x08048F80
 *	Argument size: -76
 *	Local size: 40
 *	Save regs size: 0
 *	Called by:
 *		main()
 */
 
phase_3(A8)
/* unknown */ void  A8;
{
	/* unknown */ void  V0;
	/* unknown */ void  V4;
	/* unknown */ void  V8;
	/* unknown */ void  Vfffffff8;
	/* unknown */ void  Vfffffffc;
 
    V8 = & Vfffffff8;
    V4 = & Vfffffffc;
    V0 = "%d %d";
    *esp = A8;
    if(L080489D4() <= 1) {
        explode_bomb();
    }
    if(Vfffffffc <= 7) {
        switch(Vfffffffc) {
            case 0:
                eax = 0x304;
                goto L08048f3e;
            case 1:
                eax = 0;
                goto L08048f3e;
            case 2:
                eax = 0;
                asm("o16 nop");
                goto L08048f43;
            case 3:
                eax = 0;
                goto L08048f48;
            case 4:
                eax = 0;
                asm("o16 nop");
                goto L08048f4b;
            case 5:
                eax = 0;
                goto L08048f50;
            case 6:
                eax = 0;
                asm("o16 nop");
                goto L08048f55;
            case 7:
L08048f02:
                eax = 0;
                goto L08048f5a;
        }
        goto L08048f02;
L08048f3e:
        eax = eax - 0x3ba;
L08048f43:
        eax = eax + 0x134;
L08048f48:
        eax = eax - 0x74;
L08048f4b:
        eax = eax + 0x118;
L08048f50:
        eax = eax - 0x308;
L08048f55:
        eax = eax + 0x308;
L08048f5a:
        eax = eax - 0xa4;
    } else {
        explode_bomb();
        eax = 0;
    }
    if(Vfffffffc > 5 || eax != Vfffffff8) {
        eax = explode_bomb();
    }
}

Open in new window

0
Comment
Question by:braker15
1 Comment
 
LVL 1

Accepted Solution

by:
braker15 earned 0 total points
ID: 24401197
nevermind i figured it out
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question