Pasted as Plain Text [Remove this paste ]
Description: walk2
URL: http://rafb.ath.cx/pastes/CeEXLR75.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
unsigned __int64 __fastcall walk(int a1, int a2, int a3)
{
  int v3; // er8
  int v4; // ebp
  char *v5; // r13
  int v6; // er12
  unsigned __int64 result; // rax
  _DWORD *v8; // r14
  unsigned int v9; // ecx
  unsigned int v10; // er10
  __int64 v11; // rdx
  int v12; // edx
  _DWORD *v13; // r9
  int v14; // er14
  _DWORD *v15; // rbp
  unsigned int v16; // er12
  unsigned int v17; // ecx
  unsigned int v18; // edx
  __int64 v19; // r10
  int v20; // er10
  unsigned int v21; // er12
  int v22; // er14
  _DWORD *v23; // rbp
  _DWORD *v24; // r13
  unsigned int v25; // er9
  unsigned int v26; // edx
  __int64 v27; // rcx
  int v28; // ecx
  unsigned int v29; // er14
  _DWORD *v30; // rbp
  _DWORD *v31; // r12
  unsigned int v32; // ecx
  unsigned int v33; // er10
  __int64 v34; // r9
  int v35; // er9
  unsigned int v36; // er14
  int v37; // eax
  _DWORD *v38; // rbp
  _DWORD *v39; // r13
  unsigned int v40; // er8
  unsigned int v41; // er12
  __int64 v42; // rcx
  int v43; // ecx
  unsigned int v44; // er14
  int v45; // eax
  _DWORD *v46; // rbp
  _DWORD *v47; // r13
  unsigned int v48; // er8
  unsigned int v49; // er10
  __int64 v50; // rcx
  int v51; // ecx
  int v52; // er9
  _DWORD *v53; // r13
  _DWORD *v54; // r12
  unsigned int v55; // ebp
  unsigned int v56; // er10
  __int64 v57; // rax
  int v58; // eax
  _DWORD *v59; // rbx
  _DWORD *v60; // r9
  unsigned int v61; // ecx
  _DWORD *v62; // r12
  unsigned int v63; // ebp
  unsigned int v64; // er14
  __int64 v65; // rax
  __int64 v66; // rdx
  int v67; // edx
  __int64 v68; // rdi
  unsigned int v69; // er8
  __int64 v70; // rdx
  int v71; // edx
  __int64 v72; // rsi
  __int64 v73; // rdx
  int v74; // edx
  __int64 v75; // rsi
  __int64 v76; // rdi
  __int64 v77; // r13
  int v78; // eax
  __int64 v79; // rax
  int v80; // eax
  unsigned int v82; // [rsp+Ch] [rbp-11Ch]
  unsigned int v83; // [rsp+10h] [rbp-118h]
  int v84; // [rsp+14h] [rbp-114h]
  _DWORD *v85; // [rsp+18h] [rbp-110h]
  char *v86; // [rsp+20h] [rbp-108h]
  int v87; // [rsp+28h] [rbp-100h]
  int v88; // [rsp+2Ch] [rbp-FCh]
  int v89; // [rsp+30h] [rbp-F8h]
  int v90; // [rsp+34h] [rbp-F4h]
  unsigned int v91; // [rsp+38h] [rbp-F0h]
  int v92; // [rsp+3Ch] [rbp-ECh]
  _DWORD *v93; // [rsp+40h] [rbp-E8h]
  _DWORD *v94; // [rsp+48h] [rbp-E0h]
  int v95; // [rsp+50h] [rbp-D8h]
  unsigned int v96; // [rsp+54h] [rbp-D4h]
  _DWORD *v97; // [rsp+58h] [rbp-D0h]
  _DWORD *v98; // [rsp+60h] [rbp-C8h]
  int v99; // [rsp+68h] [rbp-C0h]
  int v100; // [rsp+6Ch] [rbp-BCh]
  unsigned int v101; // [rsp+70h] [rbp-B8h]
  unsigned int v102; // [rsp+74h] [rbp-B4h]
  _DWORD *v103; // [rsp+78h] [rbp-B0h]
  _DWORD *v104; // [rsp+80h] [rbp-A8h]
  int v105; // [rsp+88h] [rbp-A0h]
  unsigned int v106; // [rsp+8Ch] [rbp-9Ch]
  _DWORD *v107; // [rsp+90h] [rbp-98h]
  _DWORD *v108; // [rsp+98h] [rbp-90h]
  int v109; // [rsp+A0h] [rbp-88h]
  unsigned int v110; // [rsp+A4h] [rbp-84h]
  _DWORD *v111; // [rsp+A8h] [rbp-80h]
  _DWORD *v112; // [rsp+B0h] [rbp-78h]
  int v113; // [rsp+B8h] [rbp-70h]
  unsigned int v114; // [rsp+BCh] [rbp-6Ch]
  _DWORD *v115; // [rsp+C0h] [rbp-68h]
  int v116; // [rsp+C8h] [rbp-60h]
  unsigned int v117; // [rsp+CCh] [rbp-5Ch]
  unsigned int v118; // [rsp+CCh] [rbp-5Ch]
  unsigned int v119; // [rsp+CCh] [rbp-5Ch]
  __int64 v120; // [rsp+D0h] [rbp-58h]
  unsigned int v121; // [rsp+D0h] [rbp-58h]
  unsigned int v122; // [rsp+D0h] [rbp-58h]
  unsigned int v123; // [rsp+D8h] [rbp-50h]
  unsigned int v124; // [rsp+D8h] [rbp-50h]
  _DWORD *v125; // [rsp+D8h] [rbp-50h]
  unsigned int v126; // [rsp+D8h] [rbp-50h]
  unsigned int v127; // [rsp+E0h] [rbp-48h]
  unsigned int v128; // [rsp+E0h] [rbp-48h]
  _DWORD *v129; // [rsp+E0h] [rbp-48h]
  _DWORD *v130; // [rsp+E8h] [rbp-40h]
  _DWORD *v131; // [rsp+E8h] [rbp-40h]
 
  v3 = a1;
  v4 = a2;
  v5 = (char *)&_GNU_EH_FRAME_HDR - 16;
  v6 = a3 + 1;
  *((_DWORD *)&grid + 142 * a2 + 2 * a1 + 1) = a3;
  result = (unsigned __int64)&dy_0;
  v8 = &dy_0;
  do
  {
    v9 = v3 + *(_DWORD *)v5;
    if ( v9 <= 0x46 )
    {
      v10 = v4 + *v8;
      if ( v10 <= 0x46 )
      {
        v11 = (int)v9 + 71LL * (int)v10;
        if ( *((_BYTE *)&grid + 8 * v11) != 35 )
        {
          v12 = *((_DWORD *)&grid + 2 * v11 + 1);
          if ( v12 > v6 || !v12 )
          {
            v84 = v6;
            v85 = v8;
            v88 = v4;
            v13 = &dx_1;
            v14 = v4 + *v8;
            v86 = v5;
            v87 = v3;
            v15 = &dy_0;
            result = (unsigned int)(a3 + 2);
            *((_DWORD *)&grid + 142 * (int)v10 + 2 * (int)v9 + 1) = v6;
            v16 = v9;
            v82 = a3 + 2;
            while ( 1 )
            {
              while ( 1 )
              {
                v17 = v16 + *v13;
                if ( v17 <= 0x46 )
                {
                  v18 = v14 + *v15;
                  if ( v18 <= 0x46 )
                  {
                    v19 = (int)v17 + 71LL * (int)v18;
                    if ( *((_BYTE *)&grid + 8 * v19) != 35 )
                    {
                      v20 = *((_DWORD *)&grid + 2 * v19 + 1);
                      result = v82;
                      if ( v20 > (int)v82 || !v20 )
                        break;
                    }
                  }
                }
                ++v13;
                ++v15;
                if ( v13 == (_DWORD *)&_GNU_EH_FRAME_HDR )
                  goto LABEL_16;
              }
              v91 = v16;
              v92 = v14;
              v93 = v15;
              v21 = v16 + *v13;
              v22 = v14 + *v15;
              v94 = v13;
              v23 = &dy_0;
              v24 = &dx_1;
              *((_DWORD *)&grid + 142 * (int)v18 + 2 * (int)v17 + 1) = v82;
              result = (unsigned int)(a3 + 3);
              v83 = a3 + 3;
              do
              {
                while ( 1 )
                {
                  v25 = v21 + *v24;
                  if ( v25 <= 0x46 )
                  {
                    v26 = v22 + *v23;
                    if ( v26 <= 0x46 )
                    {
                      v27 = (int)v25 + 71LL * (int)v26;
                      if ( *((_BYTE *)&grid + 8 * v27) != 35 )
                      {
                        v28 = *((_DWORD *)&grid + 2 * v27 + 1);
                        result = v83;
                        if ( v28 > (int)v83 || !v28 )
                          break;
                      }
                    }
                  }
                  ++v24;
                  ++v23;
                  if ( v24 == (_DWORD *)&_GNU_EH_FRAME_HDR )
                    goto LABEL_24;
                }
                v96 = v21;
                v99 = v22;
                v97 = v23;
                v29 = v21 + *v24;
                v98 = v24;
                v30 = &dx_1;
                *((_DWORD *)&grid + 142 * (int)v26 + 2 * (int)v25 + 1) = v83;
                v31 = &dy_0;
                v89 = a3 + 4;
                result = v26;
                do
                {
                  v32 = v29 + *v30;
                  if ( v32 <= 0x46 )
                  {
                    v33 = result + *v31;
                    if ( v33 <= 0x46 )
                    {
                      v34 = (int)v32 + 71LL * (int)v33;
                      if ( *((_BYTE *)&grid + 8 * v34) != 35 )
                      {
                        v35 = *((_DWORD *)&grid + 2 * v34 + 1);
                        if ( !v35 || v35 > v89 )
                        {
                          v101 = v29;
                          v102 = result;
                          v104 = v30;
                          v36 = v29 + *v30;
                          v37 = result + *v31;
                          v103 = v31;
                          v38 = &dy_0;
                          v39 = &dx_1;
                          *((_DWORD *)&grid + 142 * (int)v33 + 2 * (int)v32 + 1) = v89;
                          v90 = a3 + 5;
                          while ( 1 )
                          {
                            v40 = v36 + *v39;
                            if ( v40 <= 0x46 )
                            {
                              v41 = v37 + *v38;
                              if ( v41 <= 0x46 )
                              {
                                v42 = (int)v40 + 71LL * (int)v41;
                                if ( *((_BYTE *)&grid + 8 * v42) != 35 )
                                {
                                  v43 = *((_DWORD *)&grid + 2 * v42 + 1);
                                  if ( v43 > v90 || !v43 )
                                    break;
                                }
                              }
                            }
LABEL_41:
                            ++v39;
                            ++v38;
                            if ( v39 == (_DWORD *)&_GNU_EH_FRAME_HDR )
                            {
                              v29 = v101;
                              result = v102;
                              v31 = v103;
                              v30 = v104;
                              goto LABEL_32;
                            }
                          }
                          v106 = v36;
                          v109 = v37;
                          v107 = v38;
                          v108 = v39;
                          v44 = v36 + *v39;
                          v45 = v37 + *v38;
                          v46 = &dx_1;
                          *((_DWORD *)&grid + 142 * (int)v41 + 2 * (int)v40 + 1) = v90;
                          v47 = &dy_0;
                          v95 = a3 + 6;
                          while ( 1 )
                          {
                            v48 = v44 + *v46;
                            if ( v48 <= 0x46 )
                            {
                              v49 = v45 + *v47;
                              if ( v49 <= 0x46 )
                              {
                                v50 = (int)v48 + 71LL * (int)v49;
                                if ( *((_BYTE *)&grid + 8 * v50) != 35 )
                                {
                                  v51 = *((_DWORD *)&grid + 2 * v50 + 1);
                                  if ( v51 > v95 || !v51 )
                                    break;
                                }
                              }
                            }
LABEL_49:
                            ++v46;
                            ++v47;
                            if ( v46 == (_DWORD *)&_GNU_EH_FRAME_HDR )
                            {
                              v36 = v106;
                              v37 = v109;
                              v38 = v107;
                              v39 = v108;
                              goto LABEL_41;
                            }
                          }
                          v111 = v47;
                          v110 = v44;
                          v113 = v45;
                          v52 = v45 + *v47;
                          v112 = v46;
                          v53 = &dy_0;
                          v54 = &dx_1;
                          *((_DWORD *)&grid + 142 * (int)v49 + 2 * (int)v48 + 1) = v95;
                          v100 = a3 + 7;
                          while ( 2 )
                          {
                            while ( 1 )
                            {
                              v55 = v48 + *v54;
                              if ( v55 <= 0x46 )
                              {
                                v56 = v52 + *v53;
                                if ( v56 <= 0x46 )
                                {
                                  v57 = (int)v55 + 71LL * (int)v56;
                                  if ( *((_BYTE *)&grid + 8 * v57) != 35 )
                                  {
                                    v58 = *((_DWORD *)&grid + 2 * v57 + 1);
                                    if ( v58 > v100 || !v58 )
                                      break;
                                  }
                                }
                              }
                              ++v54;
                              ++v53;
                              if ( v54 == (_DWORD *)&_GNU_EH_FRAME_HDR )
                                goto LABEL_58;
                            }
                            v116 = v52;
                            v59 = &dx_1;
                            v60 = v54;
                            v114 = v48;
                            v61 = v48 + *v54;
                            v115 = v53;
                            *((_DWORD *)&grid + 142 * (int)v56 + 2 * (int)v55 + 1) = v100;
                            v105 = a3 + 8;
                            v62 = &dy_0;
LABEL_60:
                            v63 = v61 + *v59;
                            if ( v63 > 0x46
                              || (v64 = v56 + *v62, v64 > 0x46)
                              || (v65 = (int)v63, v66 = (int)v63 + 71LL * (int)v64, *((_BYTE *)&grid + 8 * v66) == 35)
                              || (v67 = *((_DWORD *)&grid + 2 * v66 + 1), v67 <= v105) && v67 )
                            {
LABEL_65:
                              ++v59;
                              ++v62;
                              if ( &_GNU_EH_FRAME_HDR == (_UNKNOWN *)v59 )
                              {
                                v48 = v114;
                                v54 = v60 + 1;
                                v52 = v116;
                                v53 = v115 + 1;
                                if ( v54 == (_DWORD *)&_GNU_EH_FRAME_HDR )
                                {
LABEL_58:
                                  v44 = v110;
                                  v45 = v113;
                                  v47 = v111;
                                  v46 = v112;
                                  goto LABEL_49;
                                }
                                continue;
                              }
                              goto LABEL_60;
                            }
                            break;
                          }
                          *((_DWORD *)&grid + 142 * (int)v64 + 2 * (int)v63 + 1) = v105;
                          v68 = v63 + 1;
                          v69 = a3 + 9;
                          if ( v63 != 70 )
                          {
                            v70 = (int)v68 + 71LL * (int)v64;
                            if ( *((_BYTE *)&grid + 8 * v70) != 35 )
                            {
                              v71 = *((_DWORD *)&grid + 2 * v70 + 1);
                              if ( (int)v69 < v71 || !v71 )
                              {
                                v130 = v60;
                                v127 = v56;
                                v123 = v61;
                                walk(v68, v64, v69);
                                v60 = v130;
                                v56 = v127;
                                v61 = v123;
                                v65 = (int)v63;
                                v69 = a3 + 9;
                              }
                            }
                          }
                          v72 = v64 + 1;
                          if ( v64 == 70 )
                          {
                            v75 = 69LL;
                          }
                          else
                          {
                            v73 = v65 + 71LL * (int)v72;
                            if ( *((_BYTE *)&grid + 8 * v73) != 35 )
                            {
                              v74 = *((_DWORD *)&grid + 2 * v73 + 1);
                              if ( (int)v69 < v74 || !v74 )
                              {
                                v131 = v60;
                                v128 = v56;
                                v124 = v61;
                                v120 = v65;
                                v117 = v69;
                                walk(v63, v72, v69);
                                v60 = v131;
                                v56 = v128;
                                v61 = v124;
                                v65 = v120;
                                v69 = v117;
                              }
                            }
                            v75 = v64 - 1;
                            if ( (unsigned int)v75 > 0x46 )
                              goto LABEL_79;
                          }
                          v79 = 71LL * (int)v75 + v65;
                          if ( *((_BYTE *)&grid + 8 * v79) != 35 )
                          {
                            v80 = *((_DWORD *)&grid + 2 * v79 + 1);
                            if ( (int)v69 < v80 || !v80 )
                            {
                              v129 = v60;
                              v126 = v56;
                              v122 = v61;
                              v119 = v69;
                              walk(v63, v75, v69);
                              v60 = v129;
                              v56 = v126;
                              v61 = v122;
                              v69 = v119;
                            }
                          }
LABEL_79:
                          v76 = v63 - 1;
                          if ( (unsigned int)v76 <= 0x46 )
                          {
                            v77 = (int)v76 + 71LL * (int)v64;
                            if ( *((_BYTE *)&grid + 8 * v77) != 35 )
                            {
                              v78 = *((_DWORD *)&grid + 2 * v77 + 1);
                              if ( (int)v69 < v78 || !v78 )
                              {
                                v125 = v60;
                                v121 = v56;
                                v118 = v61;
                                walk(v76, v64, v69);
                                v60 = v125;
                                v56 = v121;
                                v61 = v118;
                              }
                            }
                          }
                          goto LABEL_65;
                        }
                      }
                    }
                  }
LABEL_32:
                  ++v30;
                  ++v31;
                }
                while ( v30 != (_DWORD *)&_GNU_EH_FRAME_HDR );
                v21 = v96;
                v22 = v99;
                v24 = v98 + 1;
                v23 = v97 + 1;
              }
              while ( v98 + 1 != (_DWORD *)&_GNU_EH_FRAME_HDR );
LABEL_24:
              v16 = v91;
              v14 = v92;
              v13 = v94 + 1;
              v15 = v93 + 1;
              if ( v94 + 1 == (_DWORD *)&_GNU_EH_FRAME_HDR )
              {
LABEL_16:
                v6 = v84;
                v8 = v85;
                v5 = v86;
                v3 = v87;
                v4 = v88;
                break;
              }
            }
          }
        }
      }
    }
    v5 += 4;
    ++v8;
  }
  while ( &_GNU_EH_FRAME_HDR != (_UNKNOWN *)v5 );
  return result;
}