[CAUTION] ์Šคํ„ฐ๋”” - 13

์ตœ๋Œ€ 1 ๋ถ„ ์†Œ์š”

๐Ÿ’ก Caution ์Šคํ„ฐ๋”” 13ํšŒ์ฐจ

๋ฆฌ๋ฒ„์‹ฑ

rev-basic-5

image

ida๋กœ Input ๋ฌธ์ž์—ด์˜ ์œ„์น˜๋ฅผ ์ฐพ๋Š”๋‹ค.

ํ•ด๋‹น ํ•จ์ˆ˜ ๊ทผ์ฒ˜๋ฅผ ๋ถ„์„ํ•ด ๋ณด๋ฉด ๋‹ค์Œ ๋ถ€๋ถ„์—์„œ ๋ฌธ์ž์—ด ๊ฒ€์ฆ์„ ํ•œ๋‹ค.

signed __int64 __fastcall sub_140001000(__int64 a1)
{
  int i; // [rsp+0h] [rbp-18h]

  for ( i = 0; (unsigned __int64)i < 0x18; ++i )
  {
    if ( *(unsigned __int8 *)(a1 + i + 1) + *(unsigned __int8 *)(a1 + i) != byte_140003000[i] )
      return 0i64;
  }
  return 1i64;
}

c์–ธ์–ด๋กœ ์กฐ๊ธˆ ๋” ์‰ฝ๊ฒŒ ์ •๋ฆฌํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

// a๋Š” ์‚ฌ์šฉ์ž input
for (int i = 0; i<24 ; i++){
  if(a[i+1] + a[i] != result[i]){
    return 0;
  }
}
return 1;

์œ„์˜ ๋กœ์ง์œผ๋กœ ์‚ฌ์šฉ์ž input์„ result์™€ ๊ฒ€์‚ฌํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, result๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

image

๋กœ์ง์ด ๊ฐ„๋‹จํ•˜๋ฏ€๋กœ ํŒŒ์ด์ฌ ์ฝ”๋“œ๋ฅผ ์ด์šฉํ•ด์„œ ํ•ด๊ฒฐํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

arr = [
    0xad,0xd8,0xcb,0xcb,
    0x9d,0x97,0xcb,0xc4,
    0x92,0xa1,0xd2,0xd7,
    0xd2,0xd6,0xa8,0xa5,
    0xdc,0xc7,0xad,0xa3,
    0xa1,0x98,0x4c,0x00
]


answer = []
answer.append(0x41)

for i in range(24):
    tmp = arr[i] - answer[i]
    answer.append(tmp)

print(answer)

for character in answer[:-1]:
    print(chr(character),end='')

image

ํƒœ๊ทธ: ,

์นดํ…Œ๊ณ ๋ฆฌ:

์—…๋ฐ์ดํŠธ:

๋Œ“๊ธ€๋‚จ๊ธฐ๊ธฐ