-
-
Save hhc0null/28935e8f28df3fe0aa78 to your computer and use it in GitHub Desktop.
B-sides 2015 Own350 Glorious Modern memo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // checked | |
| void sub_400976(arg0) | |
| { | |
| // Local variables. | |
| rbp_28h; | |
| rbp_10h; | |
| rbp_08h; | |
| rbp_28h = arg0; | |
| rbp_10h = 0; | |
| rbp_08h = 0; | |
| rbp_14h = open("./flag.txt", O_RDONLY); | |
| if(rbp_14h == -1) { | |
| perror("open"); | |
| exit(EXIT_FAILURE); | |
| } | |
| do { | |
| rbp_08h += read(rbp_14h, &rbp_28h[rbp_10h], 0x40-rbp_10h); | |
| if(rbp_08h == -1) { | |
| perror("read"); | |
| exit(EXIT_FAILURE); | |
| } | |
| } while(rbp_08h <= 0x40 || rbp_10h); | |
| close(rbp_14h); | |
| } | |
| // checked | |
| void sub_400a20(char *arg0) | |
| { | |
| rbp_08h = arg0; | |
| puts(rbp_08h); | |
| fflush(NULL); | |
| } | |
| // checked | |
| void sub_400a44(arg0) | |
| { | |
| // Local variables. | |
| rbp_28h; | |
| char *rbp_08h; | |
| rbp_28h = arg0; | |
| for(rbp_08h = 0; rbp_08h < rbp_28h; rbp_08h++) { | |
| rbp_18h = malloc(0x6e); | |
| rbp_18h->offset_00h = 0; | |
| rbp_18h->offset_04h = NULL; | |
| if(bss_601f40h) { | |
| bss_601f40h = rbp_18h; | |
| } else { | |
| for(rbp_10h = bss_601f40h; rbp_10h->offset_04h != NULL; rbp_10h = rbp_10h->offset_04h) { | |
| rbp_10h = rbp_10h->offset_04h; | |
| // ->> | |
| } | |
| rbp_10h->offset_04h = rbp_18h; | |
| } | |
| // ->> | |
| } | |
| } | |
| // checked. | |
| sub_400ada(arg0, arg1) | |
| { | |
| // Local variables. | |
| rbp_30h; | |
| rbp_28h; | |
| rbp_18h; | |
| for(rbp_18h = 0; rbp_18h < rbp_30h; rbp_18h++) { | |
| read(fileno(stdin), &rbp_28h[rbp_18h], 1); | |
| if(rbp_28h[rbp_18h] == '\n') { | |
| rbp_28h[rbp_18h] = '\0'; | |
| break; | |
| } | |
| // ->> | |
| } | |
| rbp_28h[rbp_30h-1] = '\0'; | |
| } | |
| // checked | |
| int sub_400b69(arg0) | |
| { | |
| // Local variables. | |
| rbp_10h; | |
| read(fileno(stdin), &rbp_10h[0], 1); | |
| read(fileno(stdin), &rbp_10h[1], 1); | |
| read(fileno(stdin), &rbp_10h[2], 1); | |
| rbp_10h[2] = '\0'; | |
| return rbp_10h; | |
| } | |
| // checked | |
| sub_400bf1() | |
| { | |
| // Local variables. | |
| char *rbp_40h; | |
| memset(rbp_40h, '\0', 0x40); | |
| sub_400ada(rbp_40h, 0x40); | |
| return atol(rbp_40h); | |
| } | |
| // checked | |
| void sub_400c2e() | |
| { | |
| bss_601f38h = bss_601f38h? false: true; | |
| if(bss_601f38h) { | |
| sub_400a20("Bjorn Stoustrup mode activated"); | |
| } else { | |
| sub_400a20("Bjorn Stoustrup mode deactivated"); | |
| } | |
| } | |
| // checked | |
| sub_400c68(arg0, arg1, arg2) | |
| { | |
| // Local variables. | |
| rbp_18h; | |
| rbp_10h; | |
| rbp_08h; | |
| rbp_08h = arg0; | |
| rbp_10h = arg1; | |
| rbp_18h = arg2; | |
| if(bss_601f38h) { | |
| printf("%d / %s / ", rbp_10h->offset_66h, rbp_10h->offset_0ch); | |
| } | |
| printf(rbp_08h, rbp_18h[rbp_10h->offset_66h * 8]); | |
| } | |
| // checked | |
| void sub_400cd8(arg0) | |
| { | |
| // Local variables. | |
| rbp_38h; | |
| rbp_28h; | |
| rbp_38h = arg0; | |
| if(bss_601f38h) { | |
| sub_400a20("[d] Specify padding:"); | |
| sub_400b69(rbp_30h); | |
| if(!('0' < rbp_30h && rbp_30h <= '9') || !('0' < rbp_2fh && rbp_2fh <= '9')) { | |
| sub_400a20("[d] Invalid padding"); | |
| } else { | |
| rbp_1fh = (char)rbp_30h; | |
| rbp_1eh = (char)rbp_2fh; | |
| } | |
| } | |
| for(rbp_18h = bss_601f40h; rbp_18h != NULL; rbp_18h = rbp_18h->offset_04h) { | |
| printf("[ "); | |
| if(rbp_18h->offset_00h == NULL) { | |
| sub_400c68(rbp_18h->offset_08h, rbp_18h, rbp_38h); | |
| } else { | |
| printf("undefined"); | |
| } | |
| if(bss_601f38h) { | |
| sub_400a20(" ]") | |
| } else { | |
| printf(" ]"); | |
| } | |
| // ->> | |
| } | |
| sub_400a20("[d] Element at: %p\n"); | |
| } | |
| // checked. | |
| void sub_400dea(arg0) | |
| { | |
| // Local variables. | |
| rbp_18h; | |
| rbp_18h = arg0; | |
| for(rbp_08h = bss_601f40h; rbp_08h != NULL; rbp_08h = rbp_08h->offset_04h) { | |
| if(rbp_08h->offset_00h) { | |
| if(bss_601f38h) { | |
| printf("[d] Element at: %p\n", rbp_08h); | |
| printf("[d] value: %ld\n", rbp_18h[rbp_08h->offset_66h * 8]); | |
| rbp_10h += rbp_18h[rbp_08h->offset_66h * 8]; | |
| } | |
| if(bss_601f38h) { | |
| printf("[d] Current total: %ld\n", rbp_10h); | |
| } | |
| } | |
| // ->> | |
| } | |
| printf("Total: %ld\n", rbp_10h); | |
| sub_400a20("[d] Element at %p\n"); | |
| } | |
| // checked. | |
| int sub_400edf(arg0, arg1) | |
| { | |
| // Local variable. | |
| rbp_20h; | |
| rbp_18h; | |
| rbp_18h = arg0; | |
| rbp_20h = arg1; | |
| if(bss_601f38h) { | |
| printf("[d] \tsort a: %ld\n", rbp_08h->offset_00h); | |
| printf("[d] \tsort b: %ld\n", rbp_10h->offset_00h); | |
| fflush(NULL); | |
| } | |
| if(rbp_08h > rbp_10h) { | |
| return 1; | |
| } else | |
| if(rbp_08h < rbp_10h) { | |
| return -1; | |
| } else { | |
| return 0; | |
| } | |
| } | |
| // checked | |
| void sub_400f6e(arg0) | |
| { | |
| // Local variables. | |
| rbp_08h; | |
| if(bss_601f38h) { | |
| sub_400a20("[d] sorting array..."); | |
| } | |
| qsort(rbp_08h, 0x10, 8, sub_400edf); | |
| } | |
| // checked. | |
| void sub_400fab(arg0, arg1, arg2) | |
| { | |
| // Local variables. | |
| rbp_c8h; | |
| rbp_c0h; | |
| rbp_b8h; | |
| rbp_40h; | |
| rbp_b8h = arg0; | |
| rbp_c0h = arg1; | |
| rbp_c8h = arg2; | |
| rbp_14h = 0; | |
| rbp_40h = "%00s"; | |
| memset(rbp_b0h, '\0', 0x5a); | |
| rbp_24h = atoi(rbp_b0h->offset_08h + 4); | |
| if(rbp_c8h->offset_00h > 0x10) { | |
| sub_400a20("Red black tree list full!"); | |
| return; | |
| } | |
| if(!(0 <= rbp_24h && rbp_24h < 0x10)) { | |
| return; | |
| } | |
| for(rbp_20h = bss_601f40h; rbp_14h < rbp_24h; rbp_20h = rbp_20h->offset_04h) { | |
| rbp_14h++; | |
| } | |
| if(rbp_20h->offset_00h) { | |
| sub_400a20("Element already exists."); | |
| return; | |
| } | |
| sub_400a20("Value for the new element"); | |
| rbp_30h = sub_400bf1(); | |
| if(bss_601f38h) { | |
| sub_400a20(); | |
| *rbp_50h = sub_400b69(); | |
| if(!('0' <= rbp_50h && rbp_50h <= '9') && !('0' <= rbp_4fh && rbp_4fh <= '9')) { | |
| sub_400a20("[d] Invalid pading"); | |
| } else { | |
| rbp_3fh = rbp_50h; | |
| rbp_3eh = rbp_4fh; | |
| } | |
| sub_400a20("Optional note for the new element:"); | |
| sub_400ada(rbp_b0h, 0x5a); | |
| } | |
| if(bss_601f38h) { | |
| printf("[d] List head at: %p\n", bss_601f40h); | |
| fflush(NULL); | |
| } | |
| rbp_20h->offset_00h = 1; | |
| rbp_20h->offset_66h = (long)rbp_c8h->offset_00h; | |
| rbp_c0h[rbp_c8h->offset_00h * 8] = rbp_30h; | |
| sprintf(rbp_20h->offset_0ch, rbp_40h, rbp_b0h); | |
| if(bss_601f38h) { | |
| printf("[d] New Element at: %p\n", rbp-20h); | |
| fflush(NULL); | |
| } | |
| } | |
| void sub_4011f5(arg0, arg1, arg2) | |
| { | |
| sub_400a20("Sorry, the compiler didn't support this feature."); | |
| sub_400a20("Please wait until C++16 is standardized."); | |
| } | |
| sub_40121f(arg0, arg1); | |
| { | |
| // Local variables. | |
| char *rbp_60h; | |
| char *rbp_58h; | |
| int rbp_04h; | |
| rbp_58h = arg0; | |
| rbp_60h = arg1; | |
| rbp_04h = 0; | |
| memset(rbp_50h, '\0', 0x40); | |
| while(true) { | |
| printf("> "); | |
| fflush(NULL); | |
| sub_400ada(rbp_50h, 0x40); | |
| if(bss_601f38h) { | |
| printf("[d] Command: %s\n"); | |
| fflush(NULL); | |
| } | |
| if(strstr(rbp_50h, "debug")) { | |
| sub_400c2e(); | |
| } else | |
| if(strstr(rbp_50h, "print")) { | |
| sub_400cd8(rbp_58h); | |
| } else | |
| if(strstr(rbp_50h, "total")) { | |
| sub_400dea(rbp_58h); | |
| } else | |
| if(strstr(rbp_50h, "sort")) { | |
| sub_400f6e(rbp_58h); | |
| } else | |
| if(strstr(rbp_50h, "add")) { | |
| sub_400fab(rbp_50h, rbp_58h, rbp_60h); | |
| } else | |
| if(strstr(rbp_50h, "del")) { | |
| sub_4011f5(rbp_50h, rbp_58h, rbp_60h); | |
| } else | |
| if(strstr(rbp_50h, "quit")) { | |
| rbp_04h = 1; | |
| } | |
| if(!rbp_04h) { | |
| return; | |
| } | |
| } | |
| } | |
| void main() | |
| { | |
| // Local variables. | |
| int rbp_c4h; | |
| char rbp_c0h[]; | |
| rbp_c4h = 0; | |
| sub_400976(rbp_c0h); | |
| sub_400a44(0x10); | |
| memset(rbp_80h, '\0', 0x80); | |
| sub_400a20("Welcome to Glorious Modern C++ 15"); | |
| sub_400a20("\0"); | |
| sub_400a20("As part of the C++ 15 standard, we have overhauled arrays so they"); | |
| sub_400a20("provide a Network Interface Impl for remote usage. Sticking with"); | |
| sub_400a20("earlier C++ standards, we have added --omg-optimized and backed it"); | |
| sub_400a20("with a red black vector list tree for extra reduced complexity and"); | |
| sub_400a20("succinct error message."); | |
| sub_400a20("\0"); | |
| sub_40121f(rbp_80h, rbp_c4h); | |
| exit(0); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // readed | |
| void sub_400976(arg0) | |
| { | |
| 400976: 55 push %rbp | |
| 400977: 48 89 e5 mov %rsp,%rbp | |
| 40097a: 48 83 ec 30 sub $0x30,%rsp | |
| // Local variables. | |
| rbp_28h; | |
| rbp_10h; | |
| rbp_08h; | |
| 40097e: 48 89 7d d8 mov %rdi,-0x28(%rbp) | |
| rbp_28h = arg0; | |
| 400982: 48 c7 45 f0 00 00 00 movq $0x0,-0x10(%rbp) | |
| 400989: 00 | |
| rbp_10h = 0; | |
| 40098a: 48 c7 45 f8 00 00 00 movq $0x0,-0x8(%rbp) | |
| 400991: 00 | |
| rbp_08h = 0; | |
| 400992: be 00 00 00 00 mov $0x0,%esi | |
| 400997: bf 08 15 40 00 mov $0x401508,%edi | |
| 40099c: b8 00 00 00 00 mov $0x0,%eax | |
| 4009a1: e8 7a fe ff ff callq 400820 <open@plt> | |
| 4009a6: 89 45 ec mov %eax,-0x14(%rbp) | |
| rbp_14h = open("./flag.txt", O_RDONLY); | |
| 4009a9: 83 7d ec ff cmpl $0xffffffff,-0x14(%rbp) | |
| 4009ad: 75 14 jne 4009c3 <strstr@plt+0x153> | |
| if(rbp_14h == -1) { | |
| 4009af: bf 13 15 40 00 mov $0x401513,%edi | |
| 4009b4: e8 77 fe ff ff callq 400830 <perror@plt> | |
| perror("open"); | |
| 4009b9: bf 01 00 00 00 mov $0x1,%edi | |
| 4009be: e8 9d fe ff ff callq 400860 <exit@plt> | |
| exit(EXIT_FAILURE); | |
| } | |
| do { | |
| 4009c3: b8 40 00 00 00 mov $0x40,%eax | |
| 4009c8: 48 2b 45 f0 sub -0x10(%rbp),%rax | |
| 4009cc: 48 89 c2 mov %rax,%rdx | |
| 4009cf: 48 8b 4d d8 mov -0x28(%rbp),%rcx | |
| 4009d3: 48 8b 45 f0 mov -0x10(%rbp),%rax | |
| 4009d7: 48 01 c1 add %rax,%rcx | |
| 4009da: 8b 45 ec mov -0x14(%rbp),%eax | |
| 4009dd: 48 89 ce mov %rcx,%rsi | |
| 4009e0: 89 c7 mov %eax,%edi | |
| 4009e2: e8 c9 fd ff ff callq 4007b0 <read@plt> | |
| 4009e7: 48 01 45 f8 add %rax,-0x8(%rbp) | |
| rbp_08h += read(rbp_14h, &rbp_28h[rbp_10h], 0x40-rbp_10h); | |
| 4009eb: 48 83 7d f0 ff cmpq $0xffffffffffffffff,-0x10(%rbp) | |
| 4009f0: 75 14 jne 400a06 <strstr@plt+0x196> | |
| if(rbp_08h == -1) { | |
| 4009f2: bf 18 15 40 00 mov $0x401518,%edi | |
| 4009f7: e8 34 fe ff ff callq 400830 <perror@plt> | |
| perror("read"); | |
| 4009fc: bf 01 00 00 00 mov $0x1,%edi | |
| 400a01: e8 5a fe ff ff callq 400860 <exit@plt> | |
| exit(EXIT_FAILURE); | |
| } | |
| 400a06: 48 83 7d f8 3f cmpq $0x3f,-0x8(%rbp) | |
| 400a0b: 77 07 ja 400a14 <strstr@plt+0x1a4> | |
| 400a0d: 48 83 7d f0 00 cmpq $0x0,-0x10(%rbp) | |
| 400a12: 75 af jne 4009c3 <strstr@plt+0x153> | |
| } while(rbp_08h <= 0x40 || rbp_10h); | |
| 400a14: 8b 45 ec mov -0x14(%rbp),%eax | |
| 400a17: 89 c7 mov %eax,%edi | |
| 400a19: e8 82 fd ff ff callq 4007a0 <close@plt> | |
| close(rbp_14h); | |
| 400a1e: c9 leaveq | |
| 400a1f: c3 retq | |
| } | |
| // readed | |
| void sub_400a20(char *arg0) | |
| { | |
| 400a20: 55 push %rbp | |
| 400a21: 48 89 e5 mov %rsp,%rbp | |
| 400a24: 48 83 ec 10 sub $0x10,%rsp | |
| 400a28: 48 89 7d f8 mov %rdi,-0x8(%rbp) | |
| rbp_08h = arg0; | |
| 400a2c: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400a30: 48 89 c7 mov %rax,%rdi | |
| 400a33: e8 28 fd ff ff callq 400760 <puts@plt> | |
| puts(rbp_08h); | |
| 400a38: bf 00 00 00 00 mov $0x0,%edi | |
| 400a3d: e8 be fd ff ff callq 400800 <fflush@plt> | |
| fflush(NULL); | |
| 400a42: c9 leaveq | |
| 400a43: c3 retq | |
| } | |
| // readed | |
| void sub_400a44(arg0) | |
| { | |
| 400a44: 55 push %rbp | |
| 400a45: 48 89 e5 mov %rsp,%rbp | |
| 400a48: 48 83 ec 30 sub $0x30,%rsp | |
| // Local variables. | |
| rbp_28h; | |
| char *rbp_08h; | |
| 400a4c: 48 89 7d d8 mov %rdi,-0x28(%rbp) | |
| rbp_28h = arg0; | |
| 400a50: 48 c7 45 f8 00 00 00 movq $0x0,-0x8(%rbp) | |
| 400a57: 00 | |
| 400a58: eb 74 jmp 400ace <strstr@plt+0x25e> | |
| for(rbp_08h = 0; rbp_08h < rbp_28h; rbp_08h++) { | |
| 400a5a: bf 6e 00 00 00 mov $0x6e,%edi | |
| 400a5f: e8 8c fd ff ff callq 4007f0 <malloc@plt> | |
| 400a64: 48 89 45 e8 mov %rax,-0x18(%rbp) | |
| rbp_18h = malloc(0x6e); | |
| 400a68: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400a6c: c7 00 00 00 00 00 movl $0x0,(%rax) | |
| rbp_18h->offset_00h = 0; | |
| 400a72: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400a76: 48 c7 40 04 00 00 00 movq $0x0,0x4(%rax) | |
| rbp_18h->offset_04h = NULL; | |
| 400a7d: 00 | |
| 400a7e: 48 8b 05 bb 14 20 00 mov 0x2014bb(%rip),%rax # 601f40 <stdin+0x18> | |
| 400a85: 48 85 c0 test %rax,%rax | |
| 400a88: 75 0d jne 400a97 <strstr@plt+0x227> | |
| if(bss_601f40h) { | |
| 400a8a: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400a8e: 48 89 05 ab 14 20 00 mov %rax,0x2014ab(%rip) # 601f40 <stdin+0x18> | |
| bss_601f40h = rbp_18h; | |
| 400a95: eb 32 jmp 400ac9 <strstr@plt+0x259> | |
| } else { | |
| 400a97: 48 8b 05 a2 14 20 00 mov 0x2014a2(%rip),%rax # 601f40 <stdin+0x18> | |
| 400a9e: 48 89 45 f0 mov %rax,-0x10(%rbp) | |
| 400aa2: eb 0c jmp 400ab0 <strstr@plt+0x240> | |
| for(rbp_10h = bss_601f40h; rbp_10h->offset_04h != NULL; rbp_10h = rbp_10h->offset_04h) { | |
| 400aa4: 48 8b 45 f0 mov -0x10(%rbp),%rax | |
| 400aa8: 48 8b 40 04 mov 0x4(%rax),%rax | |
| 400aac: 48 89 45 f0 mov %rax,-0x10(%rbp) | |
| rbp_10h = rbp_10h->offset_04h; | |
| // ->> | |
| 400ab0: 48 8b 45 f0 mov -0x10(%rbp),%rax | |
| 400ab4: 48 8b 40 04 mov 0x4(%rax),%rax | |
| 400ab8: 48 85 c0 test %rax,%rax | |
| 400abb: 75 e7 jne 400aa4 <strstr@plt+0x234> | |
| } | |
| 400abd: 48 8b 45 f0 mov -0x10(%rbp),%rax | |
| 400ac1: 48 8b 55 e8 mov -0x18(%rbp),%rdx | |
| 400ac5: 48 89 50 04 mov %rdx,0x4(%rax) | |
| rbp_10h->offset_04h = rbp_18h; | |
| } | |
| 400ac9: 48 83 45 f8 01 addq $0x1,-0x8(%rbp) | |
| // ->> | |
| 400ace: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400ad2: 48 3b 45 d8 cmp -0x28(%rbp),%rax | |
| 400ad6: 72 82 jb 400a5a <strstr@plt+0x1ea> | |
| } | |
| 400ad8: c9 leaveq | |
| 400ad9: c3 retq | |
| } | |
| // readed. | |
| sub_400ada(arg0, arg1) | |
| { | |
| 400ada: 55 push %rbp | |
| 400adb: 48 89 e5 mov %rsp,%rbp | |
| 400ade: 53 push %rbx | |
| 400adf: 48 83 ec 28 sub $0x28,%rsp | |
| // Local variables. | |
| rbp_30h; | |
| rbp_28h; | |
| rbp_18h; | |
| 400ae3: 48 89 7d d8 mov %rdi,-0x28(%rbp) | |
| 400ae7: 48 89 75 d0 mov %rsi,-0x30(%rbp) | |
| 400aeb: 48 c7 45 e8 00 00 00 movq $0x0,-0x18(%rbp) | |
| 400af2: 00 | |
| 400af3: eb 51 jmp 400b46 <strstr@plt+0x2d6> | |
| for(rbp_18h = 0; rbp_18h < rbp_30h; rbp_18h++) { | |
| 400af5: 48 8b 55 d8 mov -0x28(%rbp),%rdx | |
| 400af9: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400afd: 48 8d 1c 02 lea (%rdx,%rax,1),%rbx | |
| 400b01: 48 8b 05 20 14 20 00 mov 0x201420(%rip),%rax # 601f28 <stdin> | |
| 400b08: 48 89 c7 mov %rax,%rdi | |
| 400b0b: e8 d0 fc ff ff callq 4007e0 <fileno@plt> | |
| 400b10: ba 01 00 00 00 mov $0x1,%edx | |
| 400b15: 48 89 de mov %rbx,%rsi | |
| 400b18: 89 c7 mov %eax,%edi | |
| 400b1a: e8 91 fc ff ff callq 4007b0 <read@plt> | |
| read(fileno(stdin), &rbp_28h[rbp_18h], 1); | |
| 400b1f: 48 8b 55 d8 mov -0x28(%rbp),%rdx | |
| 400b23: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400b27: 48 01 d0 add %rdx,%rax | |
| 400b2a: 0f b6 00 movzbl (%rax),%eax | |
| 400b2d: 3c 0a cmp $0xa,%al | |
| 400b2f: 75 10 jne 400b41 <strstr@plt+0x2d1> | |
| if(rbp_28h[rbp_18h] == '\n') { | |
| 400b31: 48 8b 55 d8 mov -0x28(%rbp),%rdx | |
| 400b35: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400b39: 48 01 d0 add %rdx,%rax | |
| 400b3c: c6 00 00 movb $0x0,(%rax) | |
| rbp_28h[rbp_18h] = '\0'; | |
| 400b3f: eb 0f jmp 400b50 <strstr@plt+0x2e0> | |
| break; | |
| } | |
| 400b41: 48 83 45 e8 01 addq $0x1,-0x18(%rbp) | |
| 400b46: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| // ->> | |
| 400b4a: 48 3b 45 d0 cmp -0x30(%rbp),%rax | |
| 400b4e: 72 a5 jb 400af5 <strstr@plt+0x285> | |
| } | |
| 400b50: 48 8b 45 d0 mov -0x30(%rbp),%rax | |
| 400b54: 48 8d 50 ff lea -0x1(%rax),%rdx | |
| 400b58: 48 8b 45 d8 mov -0x28(%rbp),%rax | |
| 400b5c: 48 01 d0 add %rdx,%rax | |
| 400b5f: c6 00 00 movb $0x0,(%rax) | |
| rbp_28h[rbp_30h-1] = '\0'; | |
| 400b62: 48 83 c4 28 add $0x28,%rsp | |
| 400b66: 5b pop %rbx | |
| 400b67: 5d pop %rbp | |
| 400b68: c3 retq | |
| } | |
| // readed | |
| int sub_400b69(arg0) | |
| { | |
| 400b69: 55 push %rbp | |
| 400b6a: 48 89 e5 mov %rsp,%rbp | |
| 400b6d: 48 83 ec 10 sub $0x10,%rsp | |
| // Local variables. | |
| rbp_10h; | |
| 400b71: 48 8b 05 b0 13 20 00 mov 0x2013b0(%rip),%rax # 601f28 <stdin> | |
| 400b78: 48 89 c7 mov %rax,%rdi | |
| 400b7b: e8 60 fc ff ff callq 4007e0 <fileno@plt> | |
| 400b80: 89 c1 mov %eax,%ecx | |
| 400b82: 48 8d 45 f0 lea -0x10(%rbp),%rax | |
| 400b86: ba 01 00 00 00 mov $0x1,%edx | |
| 400b8b: 48 89 c6 mov %rax,%rsi | |
| 400b8e: 89 cf mov %ecx,%edi | |
| 400b90: e8 1b fc ff ff callq 4007b0 <read@plt> | |
| read(fileno(stdin), &rbp_10h[0], 1); | |
| 400b95: 48 8b 05 8c 13 20 00 mov 0x20138c(%rip),%rax # 601f28 <stdin> | |
| 400b9c: 48 89 c7 mov %rax,%rdi | |
| 400b9f: e8 3c fc ff ff callq 4007e0 <fileno@plt> | |
| 400ba4: 89 c1 mov %eax,%ecx | |
| 400ba6: 48 8d 45 f0 lea -0x10(%rbp),%rax | |
| 400baa: 48 83 c0 01 add $0x1,%rax | |
| 400bae: ba 01 00 00 00 mov $0x1,%edx | |
| 400bb3: 48 89 c6 mov %rax,%rsi | |
| 400bb6: 89 cf mov %ecx,%edi | |
| 400bb8: e8 f3 fb ff ff callq 4007b0 <read@plt> | |
| read(fileno(stdin), &rbp_10h[1], 1); | |
| 400bbd: 48 8b 05 64 13 20 00 mov 0x201364(%rip),%rax # 601f28 <stdin> | |
| 400bc4: 48 89 c7 mov %rax,%rdi | |
| 400bc7: e8 14 fc ff ff callq 4007e0 <fileno@plt> | |
| 400bcc: 89 c1 mov %eax,%ecx | |
| 400bce: 48 8d 45 f0 lea -0x10(%rbp),%rax | |
| 400bd2: 48 83 c0 02 add $0x2,%rax | |
| 400bd6: ba 01 00 00 00 mov $0x1,%edx | |
| 400bdb: 48 89 c6 mov %rax,%rsi | |
| 400bde: 89 cf mov %ecx,%edi | |
| 400be0: e8 cb fb ff ff callq 4007b0 <read@plt> | |
| read(fileno(stdin), &rbp_10h[2], 1); | |
| 400be5: c6 45 f2 00 movb $0x0,-0xe(%rbp) | |
| rbp_10h[2] = '\0'; | |
| 400be9: 48 8d 45 f0 lea -0x10(%rbp),%rax | |
| 400bed: 8b 00 mov (%rax),%eax | |
| 400bef: c9 leaveq | |
| 400bf0: c3 retq | |
| return rbp_10h; | |
| } | |
| // readed | |
| sub_400bf1() | |
| { | |
| 400bf1: 55 push %rbp | |
| 400bf2: 48 89 e5 mov %rsp,%rbp | |
| 400bf5: 48 83 ec 40 sub $0x40,%rsp | |
| // Local variables. | |
| char *rbp_40h; | |
| 400bf9: 48 8d 45 c0 lea -0x40(%rbp),%rax | |
| 400bfd: ba 40 00 00 00 mov $0x40,%edx | |
| 400c02: be 00 00 00 00 mov $0x0,%esi | |
| 400c07: 48 89 c7 mov %rax,%rdi | |
| 400c0a: e8 81 fb ff ff callq 400790 <memset@plt> | |
| memset(rbp_40h, '\0', 0x40); | |
| 400c0f: 48 8d 45 c0 lea -0x40(%rbp),%rax | |
| 400c13: be 40 00 00 00 mov $0x40,%esi | |
| 400c18: 48 89 c7 mov %rax,%rdi | |
| 400c1b: e8 ba fe ff ff callq 400ada <strstr@plt+0x26a> | |
| sub_400ada(rbp_40h, 0x40); | |
| 400c20: 48 8d 45 c0 lea -0x40(%rbp),%rax | |
| 400c24: 48 89 c7 mov %rax,%rdi | |
| 400c27: e8 e4 fb ff ff callq 400810 <atol@plt> | |
| 400c2c: c9 leaveq | |
| 400c2d: c3 retq | |
| return atol(rbp_40h); | |
| } | |
| // readed | |
| void sub_400c2e() | |
| { | |
| 400c2e: 55 push %rbp | |
| 400c2f: 48 89 e5 mov %rsp,%rbp | |
| 400c32: 8b 05 00 13 20 00 mov 0x201300(%rip),%eax # 601f38 <stdin+0x10> | |
| 400c38: 85 c0 test %eax,%eax | |
| 400c3a: 0f 94 c0 sete %al | |
| 400c3d: 0f b6 c0 movzbl %al,%eax | |
| 400c40: 89 05 f2 12 20 00 mov %eax,0x2012f2(%rip) # 601f38 <stdin+0x10> | |
| bss_601f38h = bss_601f38h? false: true; | |
| 400c46: 8b 05 ec 12 20 00 mov 0x2012ec(%rip),%eax # 601f38 <stdin+0x10> | |
| 400c4c: 85 c0 test %eax,%eax | |
| 400c4e: 74 0c je 400c5c <strstr@plt+0x3ec> | |
| if(bss_601f38h) { | |
| 400c50: bf 20 15 40 00 mov $0x401520,%edi | |
| 400c55: e8 c6 fd ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("Bjorn Stoustrup mode activated"); | |
| } else { | |
| 400c5a: eb 0a jmp 400c66 <strstr@plt+0x3f6> | |
| 400c5c: bf 40 15 40 00 mov $0x401540,%edi | |
| 400c61: e8 ba fd ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("Bjorn Stoustrup mode deactivated"); | |
| } | |
| 400c66: 5d pop %rbp | |
| 400c67: c3 retq | |
| } | |
| // readed | |
| sub_400c68(arg0, arg1, arg2) | |
| { | |
| 400c68: 55 push %rbp | |
| 400c69: 48 89 e5 mov %rsp,%rbp | |
| 400c6c: 48 83 ec 20 sub $0x20,%rsp | |
| // Local variables. | |
| rbp_18h; | |
| rbp_10h; | |
| rbp_08h; | |
| 400c70: 48 89 7d f8 mov %rdi,-0x8(%rbp) | |
| rbp_08h = arg0; | |
| 400c74: 48 89 75 f0 mov %rsi,-0x10(%rbp) | |
| rbp_10h = arg1; | |
| 400c78: 48 89 55 e8 mov %rdx,-0x18(%rbp) | |
| rbp_18h = arg2; | |
| 400c7c: 8b 05 b6 12 20 00 mov 0x2012b6(%rip),%eax # 601f38 <stdin+0x10> | |
| 400c82: 85 c0 test %eax,%eax | |
| 400c84: 74 22 je 400ca8 <strstr@plt+0x438> | |
| if(bss_601f38h) { | |
| 400c86: 48 8b 45 f0 mov -0x10(%rbp),%rax | |
| 400c8a: 48 8d 50 0c lea 0xc(%rax),%rdx | |
| 400c8e: 48 8b 45 f0 mov -0x10(%rbp),%rax | |
| 400c92: 48 8b 40 66 mov 0x66(%rax),%rax | |
| 400c96: 48 89 c6 mov %rax,%rsi | |
| 400c99: bf 61 15 40 00 mov $0x401561,%edi | |
| 400c9e: b8 00 00 00 00 mov $0x0,%eax | |
| 400ca3: e8 d8 fa ff ff callq 400780 <printf@plt> | |
| printf("%d / %s / ", rbp_10h->offset_66h, rbp_10h->offset_0ch); | |
| } | |
| 400ca8: 48 8b 45 f0 mov -0x10(%rbp),%rax | |
| 400cac: 48 8b 40 66 mov 0x66(%rax),%rax | |
| 400cb0: 48 8d 14 c5 00 00 00 lea 0x0(,%rax,8),%rdx | |
| 400cb7: 00 | |
| 400cb8: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400cbc: 48 01 d0 add %rdx,%rax | |
| 400cbf: 48 8b 10 mov (%rax),%rdx | |
| 400cc2: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400cc6: 48 89 d6 mov %rdx,%rsi | |
| 400cc9: 48 89 c7 mov %rax,%rdi | |
| 400ccc: b8 00 00 00 00 mov $0x0,%eax | |
| 400cd1: e8 aa fa ff ff callq 400780 <printf@plt> | |
| printf(rbp_08h, rbp_18h[rbp_10h->offset_66h * 8]); | |
| 400cd6: c9 leaveq | |
| 400cd7: c3 retq | |
| } | |
| // readed | |
| void sub_400cd8(arg0) | |
| { | |
| 400cd8: 55 push %rbp | |
| 400cd9: 48 89 e5 mov %rsp,%rbp | |
| 400cdc: 53 push %rbx | |
| 400cdd: 48 83 ec 38 sub $0x38,%rsp | |
| // Local variables. | |
| rbp_38h; | |
| rbp_28h; | |
| 400ce1: 48 89 7d c8 mov %rdi,-0x38(%rbp) | |
| rbp_38h = arg0; | |
| 400ce5: 48 8d 45 e0 lea -0x20(%rbp),%rax | |
| 400ce9: c7 00 25 30 30 6c movl $0x6c303025,(%rax) | |
| 400cef: 66 c7 40 04 64 00 movw $0x64,0x4(%rax) | |
| 400cf5: 8b 05 3d 12 20 00 mov 0x20123d(%rip),%eax # 601f38 <stdin+0x10> | |
| 400cfb: 85 c0 test %eax,%eax | |
| 400cfd: 74 54 je 400d53 <strstr@plt+0x4e3> | |
| if(bss_601f38h) { | |
| 400cff: bf 6c 15 40 00 mov $0x40156c,%edi | |
| 400d04: e8 17 fd ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("[d] Specify padding:"); | |
| 400d09: 48 8d 5d d0 lea -0x30(%rbp),%rbx | |
| 400d0d: b8 00 00 00 00 mov $0x0,%eax | |
| 400d12: e8 52 fe ff ff callq 400b69 <strstr@plt+0x2f9> | |
| sub_400b69(rbp_30h); | |
| 400d17: 89 03 mov %eax,(%rbx) | |
| 400d19: 0f b6 45 d0 movzbl -0x30(%rbp),%eax | |
| 400d1d: 3c 2f cmp $0x2f,%al | |
| 400d1f: 7e 18 jle 400d39 <strstr@plt+0x4c9> | |
| 400d21: 0f b6 45 d0 movzbl -0x30(%rbp),%eax | |
| 400d25: 3c 39 cmp $0x39,%al | |
| 400d27: 7f 10 jg 400d39 <strstr@plt+0x4c9> | |
| 400d29: 0f b6 45 d1 movzbl -0x2f(%rbp),%eax | |
| 400d2d: 3c 2f cmp $0x2f,%al | |
| 400d2f: 7e 08 jle 400d39 <strstr@plt+0x4c9> | |
| 400d31: 0f b6 45 d1 movzbl -0x2f(%rbp),%eax | |
| 400d35: 3c 39 cmp $0x39,%al | |
| 400d37: 7e 0c jle 400d45 <strstr@plt+0x4d5> | |
| if(!('0' < rbp_30h && rbp_30h <= '9') || !('0' < rbp_2fh && rbp_2fh <= '9')) { | |
| 400d39: bf 81 15 40 00 mov $0x401581,%edi | |
| 400d3e: e8 dd fc ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("[d] Invalid padding"); | |
| 400d43: eb 0e jmp 400d53 <strstr@plt+0x4e3> | |
| } else { | |
| 400d45: 0f b6 45 d0 movzbl -0x30(%rbp),%eax | |
| 400d49: 88 45 e1 mov %al,-0x1f(%rbp) | |
| rbp_1fh = (char)rbp_30h; | |
| 400d4c: 0f b6 45 d1 movzbl -0x2f(%rbp),%eax | |
| 400d50: 88 45 e2 mov %al,-0x1e(%rbp) | |
| rbp_1eh = (char)rbp_2fh; | |
| } | |
| } | |
| 400d53: 48 8b 05 e6 11 20 00 mov 0x2011e6(%rip),%rax # 601f40 <stdin+0x18> | |
| 400d5a: 48 89 45 e8 mov %rax,-0x18(%rbp) | |
| 400d5e: eb 72 jmp 400dd2 <strstr@plt+0x562> | |
| for(rbp_18h = bss_601f40h; rbp_18h != NULL; rbp_18h = rbp_18h->offset_04h) { | |
| 400d60: bf 95 15 40 00 mov $0x401595,%edi | |
| 400d65: b8 00 00 00 00 mov $0x0,%eax | |
| 400d6a: e8 11 fa ff ff callq 400780 <printf@plt> | |
| printf("[ "); | |
| 400d6f: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400d73: 8b 00 mov (%rax),%eax | |
| 400d75: 85 c0 test %eax,%eax | |
| 400d77: 74 19 je 400d92 <strstr@plt+0x522> | |
| if(rbp_18h->offset_00h == NULL) { | |
| 400d79: 48 8b 55 c8 mov -0x38(%rbp),%rdx | |
| 400d7d: 48 8b 4d e8 mov -0x18(%rbp),%rcx | |
| 400d81: 48 8d 45 e0 lea -0x20(%rbp),%rax | |
| 400d85: 48 89 ce mov %rcx,%rsi | |
| 400d88: 48 89 c7 mov %rax,%rdi | |
| 400d8b: e8 d8 fe ff ff callq 400c68 <strstr@plt+0x3f8> | |
| sub_400c68(rbp_18h->offset_08h, rbp_18h, rbp_38h); | |
| 400d90: eb 0f jmp 400da1 <strstr@plt+0x531> | |
| } else { | |
| 400d92: bf 98 15 40 00 mov $0x401598,%edi | |
| 400d97: b8 00 00 00 00 mov $0x0,%eax | |
| 400d9c: e8 df f9 ff ff callq 400780 <printf@plt> | |
| printf("undefined"); | |
| } | |
| 400da1: 8b 05 91 11 20 00 mov 0x201191(%rip),%eax # 601f38 <stdin+0x10> | |
| 400da7: 85 c0 test %eax,%eax | |
| 400da9: 74 0c je 400db7 <strstr@plt+0x547> | |
| if(bss_601f38h) { | |
| 400dab: bf a2 15 40 00 mov $0x4015a2,%edi | |
| 400db0: e8 6b fc ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20(" ]") | |
| 400db5: eb 0f jmp 400dc6 <strstr@plt+0x556> | |
| } else { | |
| 400db7: bf a2 15 40 00 mov $0x4015a2,%edi | |
| 400dbc: b8 00 00 00 00 mov $0x0,%eax | |
| 400dc1: e8 ba f9 ff ff callq 400780 <printf@plt> | |
| printf(" ]"); | |
| } | |
| 400dc6: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400dca: 48 8b 40 04 mov 0x4(%rax),%rax | |
| 400dce: 48 89 45 e8 mov %rax,-0x18(%rbp) | |
| // ->> | |
| 400dd2: 48 83 7d e8 00 cmpq $0x0,-0x18(%rbp) | |
| 400dd7: 75 87 jne 400d60 <strstr@plt+0x4f0> | |
| } | |
| 400dd9: bf a5 15 40 00 mov $0x4015a5,%edi | |
| 400dde: e8 3d fc ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("[d] Element at: %p\n"); | |
| 400de3: 48 83 c4 38 add $0x38,%rsp | |
| 400de7: 5b pop %rbx | |
| 400de8: 5d pop %rbp | |
| 400de9: c3 retq | |
| } | |
| // readed. | |
| void sub_400dea(arg0) | |
| { | |
| 400dea: 55 push %rbp | |
| 400deb: 48 89 e5 mov %rsp,%rbp | |
| 400dee: 48 83 ec 20 sub $0x20,%rsp | |
| // Local variables. | |
| rbp_18h; | |
| 400df2: 48 89 7d e8 mov %rdi,-0x18(%rbp) | |
| rbp_18h = arg0; | |
| 400df6: 48 8b 05 43 11 20 00 mov 0x201143(%rip),%rax # 601f40 <stdin+0x18> | |
| 400dfd: 48 89 45 f8 mov %rax,-0x8(%rbp) | |
| 400e01: 48 c7 45 f0 00 00 00 movq $0x0,-0x10(%rbp) | |
| 400e08: 00 | |
| 400e09: e9 a4 00 00 00 jmpq 400eb2 <strstr@plt+0x642> | |
| for(rbp_08h = bss_601f40h; rbp_08h != NULL; rbp_08h = rbp_08h->offset_04h) { | |
| 400e0e: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400e12: 8b 00 mov (%rax),%eax | |
| 400e14: 85 c0 test %eax,%eax | |
| 400e16: 0f 84 8a 00 00 00 je 400ea6 <strstr@plt+0x636> | |
| if(rbp_08h->offset_00h) { | |
| 400e1c: 8b 05 16 11 20 00 mov 0x201116(%rip),%eax # 601f38 <stdin+0x10> | |
| 400e22: 85 c0 test %eax,%eax | |
| 400e24: 74 42 je 400e68 <strstr@plt+0x5f8> | |
| if(bss_601f38h) { | |
| 400e26: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400e2a: 48 89 c6 mov %rax,%rsi | |
| 400e2d: bf a6 15 40 00 mov $0x4015a6,%edi | |
| 400e32: b8 00 00 00 00 mov $0x0,%eax | |
| 400e37: e8 44 f9 ff ff callq 400780 <printf@plt> | |
| printf("[d] Element at: %p\n", rbp_08h); | |
| 400e3c: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400e40: 48 8b 40 66 mov 0x66(%rax),%rax | |
| 400e44: 48 8d 14 c5 00 00 00 lea 0x0(,%rax,8),%rdx | |
| 400e4b: 00 | |
| 400e4c: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400e50: 48 01 d0 add %rdx,%rax | |
| 400e53: 48 8b 00 mov (%rax),%rax | |
| 400e56: 48 89 c6 mov %rax,%rsi | |
| 400e59: bf ba 15 40 00 mov $0x4015ba,%edi | |
| 400e5e: b8 00 00 00 00 mov $0x0,%eax | |
| 400e63: e8 18 f9 ff ff callq 400780 <printf@plt> | |
| printf("[d] value: %ld\n", rbp_18h[rbp_08h->offset_66h * 8]); | |
| 400e68: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400e6c: 48 8b 40 66 mov 0x66(%rax),%rax | |
| 400e70: 48 8d 14 c5 00 00 00 lea 0x0(,%rax,8),%rdx | |
| 400e77: 00 | |
| 400e78: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400e7c: 48 01 d0 add %rdx,%rax | |
| 400e7f: 48 8b 00 mov (%rax),%rax | |
| 400e82: 48 01 45 f0 add %rax,-0x10(%rbp) | |
| rbp_10h += rbp_18h[rbp_08h->offset_66h * 8]; | |
| } | |
| 400e86: 8b 05 ac 10 20 00 mov 0x2010ac(%rip),%eax # 601f38 <stdin+0x10> | |
| 400e8c: 85 c0 test %eax,%eax | |
| 400e8e: 74 16 je 400ea6 <strstr@plt+0x636> | |
| if(bss_601f38h) { | |
| 400e90: 48 8b 45 f0 mov -0x10(%rbp),%rax | |
| 400e94: 48 89 c6 mov %rax,%rsi | |
| 400e97: bf ca 15 40 00 mov $0x4015ca,%edi | |
| 400e9c: b8 00 00 00 00 mov $0x0,%eax | |
| 400ea1: e8 da f8 ff ff callq 400780 <printf@plt> | |
| printf("[d] Current total: %ld\n", rbp_10h); | |
| } | |
| } | |
| 400ea6: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400eaa: 48 8b 40 04 mov 0x4(%rax),%rax | |
| 400eae: 48 89 45 f8 mov %rax,-0x8(%rbp) | |
| // ->> | |
| 400eb2: 48 83 7d f8 00 cmpq $0x0,-0x8(%rbp) | |
| 400eb7: 0f 85 51 ff ff ff jne 400e0e <strstr@plt+0x59e> | |
| } | |
| 400ebd: 48 8b 45 f0 mov -0x10(%rbp),%rax | |
| 400ec1: 48 89 c6 mov %rax,%rsi | |
| 400ec4: bf e2 15 40 00 mov $0x4015e2,%edi | |
| 400ec9: b8 00 00 00 00 mov $0x0,%eax | |
| 400ece: e8 ad f8 ff ff callq 400780 <printf@plt> | |
| printf("Total: %ld\n", rbp_10h); | |
| 400ed3: bf a5 15 40 00 mov $0x4015a5,%edi | |
| 400ed8: e8 43 fb ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("[d] Element at %p\n"); | |
| 400edd: c9 leaveq | |
| 400ede: c3 retq | |
| } | |
| // readed. | |
| int sub_400edf(arg0, arg1) | |
| { | |
| 400edf: 55 push %rbp | |
| 400ee0: 48 89 e5 mov %rsp,%rbp | |
| 400ee3: 48 83 ec 20 sub $0x20,%rsp | |
| // Local variable. | |
| rbp_20h; | |
| rbp_18h; | |
| 400ee7: 48 89 7d e8 mov %rdi,-0x18(%rbp) | |
| rbp_18h = arg0; | |
| 400eeb: 48 89 75 e0 mov %rsi,-0x20(%rbp) | |
| rbp_20h = arg1; | |
| 400eef: 48 8b 45 e8 mov -0x18(%rbp),%rax | |
| 400ef3: 48 89 45 f8 mov %rax,-0x8(%rbp) | |
| 400ef7: 48 8b 45 e0 mov -0x20(%rbp),%rax | |
| 400efb: 48 89 45 f0 mov %rax,-0x10(%rbp) | |
| 400eff: 8b 05 33 10 20 00 mov 0x201033(%rip),%eax # 601f38 <stdin+0x10> | |
| 400f05: 85 c0 test %eax,%eax | |
| 400f07: 74 3c je 400f45 <strstr@plt+0x6d5> | |
| if(bss_601f38h) { | |
| 400f09: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400f0d: 48 8b 00 mov (%rax),%rax | |
| 400f10: 48 89 c6 mov %rax,%rsi | |
| 400f13: bf ee 15 40 00 mov $0x4015ee,%edi | |
| 400f18: b8 00 00 00 00 mov $0x0,%eax | |
| 400f1d: e8 5e f8 ff ff callq 400780 <printf@plt> | |
| printf("[d] \tsort a: %ld\n", rbp_08h->offset_00h); | |
| 400f22: 48 8b 45 f0 mov -0x10(%rbp),%rax | |
| 400f26: 48 8b 00 mov (%rax),%rax | |
| 400f29: 48 89 c6 mov %rax,%rsi | |
| 400f2c: bf 00 16 40 00 mov $0x401600,%edi | |
| 400f31: b8 00 00 00 00 mov $0x0,%eax | |
| 400f36: e8 45 f8 ff ff callq 400780 <printf@plt> | |
| printf("[d] \tsort b: %ld\n", rbp_10h->offset_00h); | |
| 400f3b: bf 00 00 00 00 mov $0x0,%edi | |
| 400f40: e8 bb f8 ff ff callq 400800 <fflush@plt> | |
| fflush(NULL); | |
| } | |
| 400f45: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400f49: 48 3b 45 f0 cmp -0x10(%rbp),%rax | |
| 400f4d: 76 07 jbe 400f56 <strstr@plt+0x6e6> | |
| if(rbp_08h > rbp_10h) { | |
| 400f4f: b8 01 00 00 00 mov $0x1,%eax | |
| 400f54: eb 16 jmp 400f6c <strstr@plt+0x6fc> | |
| return 1; | |
| } else | |
| 400f56: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400f5a: 48 3b 45 f0 cmp -0x10(%rbp),%rax | |
| 400f5e: 73 07 jae 400f67 <strstr@plt+0x6f7> | |
| if(rbp_08h < rbp_10h) { | |
| 400f60: b8 ff ff ff ff mov $0xffffffff,%eax | |
| 400f65: eb 05 jmp 400f6c <strstr@plt+0x6fc> | |
| return -1; | |
| } else { | |
| 400f67: b8 00 00 00 00 mov $0x0,%eax | |
| 400f6c: c9 leaveq | |
| 400f6d: c3 retq | |
| return 0; | |
| } | |
| } | |
| // readed | |
| void sub_400f6e(arg0) | |
| { | |
| 400f6e: 55 push %rbp | |
| 400f6f: 48 89 e5 mov %rsp,%rbp | |
| 400f72: 48 83 ec 10 sub $0x10,%rsp | |
| // Local variables. | |
| rbp_08h; | |
| 400f76: 48 89 7d f8 mov %rdi,-0x8(%rbp) | |
| 400f7a: 8b 05 b8 0f 20 00 mov 0x200fb8(%rip),%eax # 601f38 <stdin+0x10> | |
| 400f80: 85 c0 test %eax,%eax | |
| 400f82: 74 0a je 400f8e <strstr@plt+0x71e> | |
| if(bss_601f38h) { | |
| 400f84: bf 12 16 40 00 mov $0x401612,%edi | |
| 400f89: e8 92 fa ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("[d] sorting array..."); | |
| } | |
| 400f8e: 48 8b 45 f8 mov -0x8(%rbp),%rax | |
| 400f92: b9 df 0e 40 00 mov $0x400edf,%ecx | |
| 400f97: ba 08 00 00 00 mov $0x8,%edx | |
| 400f9c: be 10 00 00 00 mov $0x10,%esi | |
| 400fa1: 48 89 c7 mov %rax,%rdi | |
| 400fa4: e8 c7 f7 ff ff callq 400770 <qsort@plt> | |
| qsort(rbp_08h, 0x10, 8, sub_400edf); | |
| 400fa9: c9 leaveq | |
| 400faa: c3 retq | |
| } | |
| // readed. | |
| void sub_400fab(arg0, arg1, arg2) | |
| { | |
| 400fab: 55 push %rbp | |
| 400fac: 48 89 e5 mov %rsp,%rbp | |
| 400faf: 53 push %rbx | |
| 400fb0: 48 81 ec c8 00 00 00 sub $0xc8,%rsp | |
| // Local variables. | |
| rbp_c8h; | |
| rbp_c0h; | |
| rbp_b8h; | |
| rbp_40h; | |
| 400fb7: 48 89 bd 48 ff ff ff mov %rdi,-0xb8(%rbp) | |
| rbp_b8h = arg0; | |
| 400fbe: 48 89 b5 40 ff ff ff mov %rsi,-0xc0(%rbp) | |
| rbp_c0h = arg1; | |
| 400fc5: 48 89 95 38 ff ff ff mov %rdx,-0xc8(%rbp) | |
| rbp_c8h = arg2; | |
| 400fcc: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%rbp) | |
| rbp_14h = 0; | |
| 400fd3: 48 8d 45 c0 lea -0x40(%rbp),%rax | |
| 400fd7: c7 00 25 30 30 73 movl $0x73303025,(%rax) | |
| 400fdd: c6 40 04 00 movb $0x0,0x4(%rax) | |
| rbp_40h = "%00s"; | |
| 400fe1: 48 8d 85 50 ff ff ff lea -0xb0(%rbp),%rax | |
| 400fe8: ba 5a 00 00 00 mov $0x5a,%edx | |
| 400fed: be 00 00 00 00 mov $0x0,%esi | |
| 400ff2: 48 89 c7 mov %rax,%rdi | |
| 400ff5: e8 96 f7 ff ff callq 400790 <memset@plt> | |
| memset(rbp_b0h, '\0', 0x5a); | |
| 400ffa: 48 8b 85 48 ff ff ff mov -0xb8(%rbp),%rax | |
| 401001: 48 83 c0 04 add $0x4,%rax | |
| 401005: 48 89 c7 mov %rax,%rdi | |
| 401008: e8 33 f8 ff ff callq 400840 <atoi@plt> | |
| 40100d: 89 45 dc mov %eax,-0x24(%rbp) | |
| rbp_24h = atoi(rbp_b0h->offset_08h + 4); | |
| 401010: 48 8b 85 38 ff ff ff mov -0xc8(%rbp),%rax | |
| 401017: 8b 00 mov (%rax),%eax | |
| 401019: 83 f8 0f cmp $0xf,%eax | |
| 40101c: 7e 0f jle 40102d <strstr@plt+0x7bd> | |
| if(rbp_c8h->offset_00h > 0x10) { | |
| 40101e: bf 28 16 40 00 mov $0x401628,%edi | |
| 401023: e8 f8 f9 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("Red black tree list full!"); | |
| 401028: e9 be 01 00 00 jmpq 4011eb <strstr@plt+0x97b> | |
| return; | |
| } | |
| 40102d: 83 7d dc 00 cmpl $0x0,-0x24(%rbp) | |
| 401031: 78 06 js 401039 <strstr@plt+0x7c9> | |
| 401033: 83 7d dc 0f cmpl $0xf,-0x24(%rbp) | |
| 401037: 7e 0f jle 401048 <strstr@plt+0x7d8> | |
| if(!(0 <= rbp_24h && rbp_24h < 0x10)) { | |
| 401039: bf 42 16 40 00 mov $0x401642,%edi | |
| 40103e: e8 dd f9 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| 401043: e9 a3 01 00 00 jmpq 4011eb <strstr@plt+0x97b> | |
| return; | |
| } | |
| 401048: 48 8b 05 f1 0e 20 00 mov 0x200ef1(%rip),%rax # 601f40 <stdin+0x18> | |
| 40104f: 48 89 45 e0 mov %rax,-0x20(%rbp) | |
| 401053: eb 10 jmp 401065 <strstr@plt+0x7f5> | |
| for(rbp_20h = bss_601f40h; rbp_14h < rbp_24h; rbp_20h = rbp_20h->offset_04h) { | |
| 401055: 48 8b 45 e0 mov -0x20(%rbp),%rax | |
| 401059: 48 8b 40 04 mov 0x4(%rax),%rax | |
| 40105d: 48 89 45 e0 mov %rax,-0x20(%rbp) | |
| 401061: 83 45 ec 01 addl $0x1,-0x14(%rbp) | |
| rbp_14h++; | |
| // ->> | |
| 401065: 8b 45 ec mov -0x14(%rbp),%eax | |
| 401068: 3b 45 dc cmp -0x24(%rbp),%eax | |
| 40106b: 7c e8 jl 401055 <strstr@plt+0x7e5> | |
| } | |
| 40106d: 48 8b 45 e0 mov -0x20(%rbp),%rax | |
| 401071: 8b 00 mov (%rax),%eax | |
| 401073: 85 c0 test %eax,%eax | |
| 401075: 74 0f je 401086 <strstr@plt+0x816> | |
| if(rbp_20h->offset_00h) { | |
| 401077: bf 5b 16 40 00 mov $0x40165b,%edi | |
| 40107c: e8 9f f9 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("Element already exists."); | |
| 401081: e9 65 01 00 00 jmpq 4011eb <strstr@plt+0x97b> | |
| return; | |
| } | |
| 401086: bf 73 16 40 00 mov $0x401673,%edi | |
| 40108b: e8 90 f9 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("Value for the new element"); | |
| 401090: b8 00 00 00 00 mov $0x0,%eax | |
| 401095: e8 57 fb ff ff callq 400bf1 <strstr@plt+0x381> | |
| 40109a: 48 89 45 d0 mov %rax,-0x30(%rbp) | |
| rbp_30h = sub_400bf1(); | |
| 40109e: 8b 05 94 0e 20 00 mov 0x200e94(%rip),%eax # 601f38 <stdin+0x10> | |
| 4010a4: 85 c0 test %eax,%eax | |
| 4010a6: 74 72 je 40111a <strstr@plt+0x8aa> | |
| if(bss_601f38h) { | |
| 4010a8: bf 6c 15 40 00 mov $0x40156c,%edi | |
| 4010ad: e8 6e f9 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20(); | |
| 4010b2: 48 8d 5d b0 lea -0x50(%rbp),%rbx | |
| 4010b6: b8 00 00 00 00 mov $0x0,%eax | |
| 4010bb: e8 a9 fa ff ff callq 400b69 <strstr@plt+0x2f9> | |
| 4010c0: 89 03 mov %eax,(%rbx) | |
| *rbp_50h = sub_400b69(); | |
| 4010c2: 0f b6 45 b0 movzbl -0x50(%rbp),%eax | |
| 4010c6: 3c 2f cmp $0x2f,%al | |
| 4010c8: 7e 18 jle 4010e2 <strstr@plt+0x872> | |
| 4010ca: 0f b6 45 b0 movzbl -0x50(%rbp),%eax | |
| 4010ce: 3c 39 cmp $0x39,%al | |
| 4010d0: 7f 10 jg 4010e2 <strstr@plt+0x872> | |
| 4010d2: 0f b6 45 b1 movzbl -0x4f(%rbp),%eax | |
| 4010d6: 3c 2f cmp $0x2f,%al | |
| 4010d8: 7e 08 jle 4010e2 <strstr@plt+0x872> | |
| 4010da: 0f b6 45 b1 movzbl -0x4f(%rbp),%eax | |
| 4010de: 3c 39 cmp $0x39,%al | |
| 4010e0: 7e 0c jle 4010ee <strstr@plt+0x87e> | |
| if(!('0' <= rbp_50h && rbp_50h <= '9') && !('0' <= rbp_4fh && rbp_4fh <= '9')) { | |
| 4010e2: bf 81 15 40 00 mov $0x401581,%edi | |
| 4010e7: e8 34 f9 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("[d] Invalid pading"); | |
| 4010ec: eb 0e jmp 4010fc <strstr@plt+0x88c> | |
| } else { | |
| 4010ee: 0f b6 45 b0 movzbl -0x50(%rbp),%eax | |
| 4010f2: 88 45 c1 mov %al,-0x3f(%rbp) | |
| rbp_3fh = rbp_50h; | |
| 4010f5: 0f b6 45 b1 movzbl -0x4f(%rbp),%eax | |
| 4010f9: 88 45 c2 mov %al,-0x3e(%rbp) | |
| rbp_3eh = rbp_4fh; | |
| } | |
| 4010fc: bf 90 16 40 00 mov $0x401690,%edi | |
| 401101: e8 1a f9 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("Optional note for the new element:"); | |
| 401106: 48 8d 85 50 ff ff ff lea -0xb0(%rbp),%rax | |
| 40110d: be 5a 00 00 00 mov $0x5a,%esi | |
| 401112: 48 89 c7 mov %rax,%rdi | |
| 401115: e8 c0 f9 ff ff callq 400ada <strstr@plt+0x26a> | |
| sub_400ada(rbp_b0h, 0x5a); | |
| } | |
| 40111a: 8b 05 18 0e 20 00 mov 0x200e18(%rip),%eax # 601f38 <stdin+0x10> | |
| 401120: 85 c0 test %eax,%eax | |
| 401122: 74 23 je 401147 <strstr@plt+0x8d7> | |
| if(bss_601f38h) { | |
| 401124: 48 8b 05 15 0e 20 00 mov 0x200e15(%rip),%rax # 601f40 <stdin+0x18> | |
| 40112b: 48 89 c6 mov %rax,%rsi | |
| 40112e: bf b3 16 40 00 mov $0x4016b3,%edi | |
| 401133: b8 00 00 00 00 mov $0x0,%eax | |
| 401138: e8 43 f6 ff ff callq 400780 <printf@plt> | |
| printf("[d] List head at: %p\n", bss_601f40h); | |
| 40113d: bf 00 00 00 00 mov $0x0,%edi | |
| 401142: e8 b9 f6 ff ff callq 400800 <fflush@plt> | |
| fflush(NULL); | |
| } | |
| 401147: 48 8b 45 e0 mov -0x20(%rbp),%rax | |
| 40114b: c7 00 01 00 00 00 movl $0x1,(%rax) | |
| rbp_20h->offset_00h = 1; | |
| 401151: 48 8b 85 38 ff ff ff mov -0xc8(%rbp),%rax | |
| 401158: 8b 00 mov (%rax),%eax | |
| 40115a: 48 63 d0 movslq %eax,%rdx | |
| 40115d: 48 8b 45 e0 mov -0x20(%rbp),%rax | |
| 401161: 48 89 50 66 mov %rdx,0x66(%rax) | |
| rbp_20h->offset_66h = (long)rbp_c8h->offset_00h; | |
| 401165: 48 8b 85 38 ff ff ff mov -0xc8(%rbp),%rax | |
| 40116c: 8b 00 mov (%rax),%eax | |
| 40116e: 48 98 cltq | |
| 401170: 48 8d 14 c5 00 00 00 lea 0x0(,%rax,8),%rdx | |
| 401177: 00 | |
| 401178: 48 8b 85 40 ff ff ff mov -0xc0(%rbp),%rax | |
| 40117f: 48 01 c2 add %rax,%rdx | |
| 401182: 48 8b 45 d0 mov -0x30(%rbp),%rax | |
| 401186: 48 89 02 mov %rax,(%rdx) | |
| rbp_c0h[rbp_c8h->offset_00h * 8] = rbp_30h; | |
| 401189: 48 8b 85 38 ff ff ff mov -0xc8(%rbp),%rax | |
| 401190: 8b 00 mov (%rax),%eax | |
| 401192: 8d 50 01 lea 0x1(%rax),%edx | |
| 401195: 48 8b 85 38 ff ff ff mov -0xc8(%rbp),%rax | |
| 40119c: 89 10 mov %edx,(%rax) | |
| 40119e: 48 8b 45 e0 mov -0x20(%rbp),%rax | |
| 4011a2: 48 8d 48 0c lea 0xc(%rax),%rcx | |
| 4011a6: 48 8d 95 50 ff ff ff lea -0xb0(%rbp),%rdx | |
| 4011ad: 48 8d 45 c0 lea -0x40(%rbp),%rax | |
| 4011b1: 48 89 c6 mov %rax,%rsi | |
| 4011b4: 48 89 cf mov %rcx,%rdi | |
| 4011b7: b8 00 00 00 00 mov $0x0,%eax | |
| 4011bc: e8 8f f6 ff ff callq 400850 <sprintf@plt> | |
| sprintf(rbp_20h->offset_0ch, rbp_40h, rbp_b0h); | |
| 4011c1: 8b 05 71 0d 20 00 mov 0x200d71(%rip),%eax # 601f38 <stdin+0x10> | |
| 4011c7: 85 c0 test %eax,%eax | |
| 4011c9: 74 20 je 4011eb <strstr@plt+0x97b> | |
| if(bss_601f38h) { | |
| 4011cb: 48 8b 45 e0 mov -0x20(%rbp),%rax | |
| 4011cf: 48 89 c6 mov %rax,%rsi | |
| 4011d2: bf c9 16 40 00 mov $0x4016c9,%edi | |
| 4011d7: b8 00 00 00 00 mov $0x0,%eax | |
| 4011dc: e8 9f f5 ff ff callq 400780 <printf@plt> | |
| printf("[d] New Element at: %p\n", rbp-20h); | |
| 4011e1: bf 00 00 00 00 mov $0x0,%edi | |
| 4011e6: e8 15 f6 ff ff callq 400800 <fflush@plt> | |
| fflush(NULL); | |
| } | |
| 4011eb: 48 81 c4 c8 00 00 00 add $0xc8,%rsp | |
| 4011f2: 5b pop %rbx | |
| 4011f3: 5d pop %rbp | |
| 4011f4: c3 retq | |
| } | |
| void sub_4011f5(arg0, arg1, arg2) | |
| { | |
| 4011f5: 55 push %rbp | |
| 4011f6: 48 89 e5 mov %rsp,%rbp | |
| 4011f9: 48 83 ec 20 sub $0x20,%rsp | |
| 4011fd: 48 89 7d f8 mov %rdi,-0x8(%rbp) | |
| 401201: 48 89 75 f0 mov %rsi,-0x10(%rbp) | |
| 401205: 48 89 55 e8 mov %rdx,-0x18(%rbp) | |
| 401209: bf e8 16 40 00 mov $0x4016e8,%edi | |
| 40120e: e8 0d f8 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("Sorry, the compiler didn't support this feature."); | |
| 401213: bf 20 17 40 00 mov $0x401720,%edi | |
| 401218: e8 03 f8 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("Please wait until C++16 is standardized."); | |
| 40121d: c9 leaveq | |
| 40121e: c3 retq | |
| } | |
| sub_40121f(arg0, arg1); | |
| { | |
| 40121f: 55 push %rbp | |
| 401220: 48 89 e5 mov %rsp,%rbp | |
| 401223: 48 83 ec 60 sub $0x60,%rsp | |
| // Local variables. | |
| char *rbp_60h; | |
| char *rbp_58h; | |
| int rbp_04h; | |
| 401227: 48 89 7d a8 mov %rdi,-0x58(%rbp) | |
| rbp_58h = arg0; | |
| 40122b: 48 89 75 a0 mov %rsi,-0x60(%rbp) | |
| rbp_60h = arg1; | |
| 40122f: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) | |
| rbp_04h = 0; | |
| 401236: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 40123a: ba 40 00 00 00 mov $0x40,%edx | |
| 40123f: be 00 00 00 00 mov $0x0,%esi | |
| 401244: 48 89 c7 mov %rax,%rdi | |
| 401247: e8 44 f5 ff ff callq 400790 <memset@plt> | |
| memset(rbp_50h, '\0', 0x40); | |
| while(true) { | |
| 40124c: bf 49 17 40 00 mov $0x401749,%edi | |
| 401251: b8 00 00 00 00 mov $0x0,%eax | |
| 401256: e8 25 f5 ff ff callq 400780 <printf@plt> | |
| printf("> "); | |
| 40125b: bf 00 00 00 00 mov $0x0,%edi | |
| 401260: e8 9b f5 ff ff callq 400800 <fflush@plt> | |
| fflush(NULL); | |
| 401265: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 401269: be 40 00 00 00 mov $0x40,%esi | |
| 40126e: 48 89 c7 mov %rax,%rdi | |
| 401271: e8 64 f8 ff ff callq 400ada <strstr@plt+0x26a> | |
| sub_400ada(rbp_50h, 0x40); | |
| 401276: 8b 05 bc 0c 20 00 mov 0x200cbc(%rip),%eax # 601f38 <stdin+0x10> | |
| 40127c: 85 c0 test %eax,%eax | |
| 40127e: 74 20 je 4012a0 <strstr@plt+0xa30> | |
| if(bss_601f38h) { | |
| 401280: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 401284: 48 89 c6 mov %rax,%rsi | |
| 401287: bf 4c 17 40 00 mov $0x40174c,%edi | |
| 40128c: b8 00 00 00 00 mov $0x0,%eax | |
| 401291: e8 ea f4 ff ff callq 400780 <printf@plt> | |
| printf("[d] Command: %s\n"); | |
| 401296: bf 00 00 00 00 mov $0x0,%edi | |
| 40129b: e8 60 f5 ff ff callq 400800 <fflush@plt> | |
| fflush(NULL); | |
| } | |
| 4012a0: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 4012a4: be 5d 17 40 00 mov $0x40175d,%esi | |
| 4012a9: 48 89 c7 mov %rax,%rdi | |
| 4012ac: e8 bf f5 ff ff callq 400870 <strstr@plt> | |
| 4012b1: 48 85 c0 test %rax,%rax | |
| 4012b4: 74 0f je 4012c5 <strstr@plt+0xa55> | |
| if(strstr(rbp_50h, "debug")) { | |
| 4012b6: b8 00 00 00 00 mov $0x0,%eax | |
| 4012bb: e8 6e f9 ff ff callq 400c2e <strstr@plt+0x3be> | |
| sub_400c2e(); | |
| 4012c0: e9 ed 00 00 00 jmpq 4013b2 <strstr@plt+0xb42> | |
| } else | |
| 4012c5: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 4012c9: be 63 17 40 00 mov $0x401763,%esi | |
| 4012ce: 48 89 c7 mov %rax,%rdi | |
| 4012d1: e8 9a f5 ff ff callq 400870 <strstr@plt> | |
| 4012d6: 48 85 c0 test %rax,%rax | |
| 4012d9: 74 11 je 4012ec <strstr@plt+0xa7c> | |
| if(strstr(rbp_50h, "print")) { | |
| 4012db: 48 8b 45 a8 mov -0x58(%rbp),%rax | |
| 4012df: 48 89 c7 mov %rax,%rdi | |
| 4012e2: e8 f1 f9 ff ff callq 400cd8 <strstr@plt+0x468> | |
| sub_400cd8(rbp_58h); | |
| 4012e7: e9 c6 00 00 00 jmpq 4013b2 <strstr@plt+0xb42> | |
| } else | |
| 4012ec: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 4012f0: be 69 17 40 00 mov $0x401769,%esi | |
| 4012f5: 48 89 c7 mov %rax,%rdi | |
| 4012f8: e8 73 f5 ff ff callq 400870 <strstr@plt> | |
| 4012fd: 48 85 c0 test %rax,%rax | |
| 401300: 74 11 je 401313 <strstr@plt+0xaa3> | |
| if(strstr(rbp_50h, "total")) { | |
| 401302: 48 8b 45 a8 mov -0x58(%rbp),%rax | |
| 401306: 48 89 c7 mov %rax,%rdi | |
| 401309: e8 dc fa ff ff callq 400dea <strstr@plt+0x57a> | |
| sub_400dea(rbp_58h); | |
| 40130e: e9 9f 00 00 00 jmpq 4013b2 <strstr@plt+0xb42> | |
| } else | |
| 401313: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 401317: be 6f 17 40 00 mov $0x40176f,%esi | |
| 40131c: 48 89 c7 mov %rax,%rdi | |
| 40131f: e8 4c f5 ff ff callq 400870 <strstr@plt> | |
| 401324: 48 85 c0 test %rax,%rax | |
| 401327: 74 0e je 401337 <strstr@plt+0xac7> | |
| if(strstr(rbp_50h, "sort")) { | |
| 401329: 48 8b 45 a8 mov -0x58(%rbp),%rax | |
| 40132d: 48 89 c7 mov %rax,%rdi | |
| 401330: e8 39 fc ff ff callq 400f6e <strstr@plt+0x6fe> | |
| sub_400f6e(rbp_58h); | |
| 401335: eb 7b jmp 4013b2 <strstr@plt+0xb42> | |
| } else | |
| 401337: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 40133b: be 74 17 40 00 mov $0x401774,%esi | |
| 401340: 48 89 c7 mov %rax,%rdi | |
| 401343: e8 28 f5 ff ff callq 400870 <strstr@plt> | |
| 401348: 48 85 c0 test %rax,%rax | |
| 40134b: 74 19 je 401366 <strstr@plt+0xaf6> | |
| if(strstr(rbp_50h, "add")) { | |
| 40134d: 48 8b 55 a0 mov -0x60(%rbp),%rdx | |
| 401351: 48 8b 4d a8 mov -0x58(%rbp),%rcx | |
| 401355: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 401359: 48 89 ce mov %rcx,%rsi | |
| 40135c: 48 89 c7 mov %rax,%rdi | |
| 40135f: e8 47 fc ff ff callq 400fab <strstr@plt+0x73b> | |
| sub_400fab(rbp_50h, rbp_58h, rbp_60h); | |
| 401364: eb 4c jmp 4013b2 <strstr@plt+0xb42> | |
| } else | |
| 401366: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 40136a: be 78 17 40 00 mov $0x401778,%esi | |
| 40136f: 48 89 c7 mov %rax,%rdi | |
| 401372: e8 f9 f4 ff ff callq 400870 <strstr@plt> | |
| 401377: 48 85 c0 test %rax,%rax | |
| 40137a: 74 19 je 401395 <strstr@plt+0xb25> | |
| if(strstr(rbp_50h, "del")) { | |
| 40137c: 48 8b 55 a0 mov -0x60(%rbp),%rdx | |
| 401380: 48 8b 4d a8 mov -0x58(%rbp),%rcx | |
| 401384: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 401388: 48 89 ce mov %rcx,%rsi | |
| 40138b: 48 89 c7 mov %rax,%rdi | |
| 40138e: e8 62 fe ff ff callq 4011f5 <strstr@plt+0x985> | |
| sub_4011f5(rbp_50h, rbp_58h, rbp_60h); | |
| 401393: eb 1d jmp 4013b2 <strstr@plt+0xb42> | |
| } else | |
| 401395: 48 8d 45 b0 lea -0x50(%rbp),%rax | |
| 401399: be 7c 17 40 00 mov $0x40177c,%esi | |
| 40139e: 48 89 c7 mov %rax,%rdi | |
| 4013a1: e8 ca f4 ff ff callq 400870 <strstr@plt> | |
| 4013a6: 48 85 c0 test %rax,%rax | |
| 4013a9: 74 07 je 4013b2 <strstr@plt+0xb42> | |
| if(strstr(rbp_50h, "quit")) { | |
| rbp_04h = 1; | |
| 4013ab: c7 45 fc 01 00 00 00 movl $0x1,-0x4(%rbp) | |
| } | |
| 4013b2: 83 7d fc 00 cmpl $0x0,-0x4(%rbp) | |
| 4013b6: 74 02 je 4013ba <strstr@plt+0xb4a> | |
| if(!rbp_04h) { | |
| 4013b8: eb 05 jmp 4013bf <strstr@plt+0xb4f> | |
| return; | |
| } | |
| 4013ba: e9 8d fe ff ff jmpq 40124c <strstr@plt+0x9dc> | |
| } | |
| 4013bf: c9 leaveq | |
| 4013c0: c3 retq | |
| } | |
| void main() | |
| { | |
| 4013c1: 55 push %rbp | |
| 4013c2: 48 89 e5 mov %rsp,%rbp | |
| 4013c5: 48 81 ec d0 00 00 00 sub $0xd0,%rsp | |
| // Local variables. | |
| int rbp_c4h; | |
| char rbp_c0h[]; | |
| 4013cc: c7 85 3c ff ff ff 00 movl $0x0,-0xc4(%rbp) | |
| 4013d3: 00 00 00 | |
| rbp_c4h = 0; | |
| 4013d6: 48 8d 85 40 ff ff ff lea -0xc0(%rbp),%rax | |
| 4013dd: 48 89 c7 mov %rax,%rdi | |
| 4013e0: e8 91 f5 ff ff callq 400976 <strstr@plt+0x106> | |
| sub_400976(rbp_c0h); | |
| 4013e5: bf 10 00 00 00 mov $0x10,%edi | |
| 4013ea: e8 55 f6 ff ff callq 400a44 <strstr@plt+0x1d4> | |
| sub_400a44(0x10); | |
| 4013ef: 48 8d 45 80 lea -0x80(%rbp),%rax | |
| 4013f3: ba 80 00 00 00 mov $0x80,%edx | |
| 4013f8: be 00 00 00 00 mov $0x0,%esi | |
| 4013fd: 48 89 c7 mov %rax,%rdi | |
| 401400: e8 8b f3 ff ff callq 400790 <memset@plt> | |
| memset(rbp_80h, '\0', 0x80); | |
| 401405: bf 88 17 40 00 mov $0x401788,%edi | |
| 40140a: e8 11 f6 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("Welcome to Glorious Modern C++ 15"); | |
| 40140f: bf a5 15 40 00 mov $0x4015a5,%edi | |
| 401414: e8 07 f6 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("\0"); | |
| 401419: bf b0 17 40 00 mov $0x4017b0,%edi | |
| 40141e: e8 fd f5 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("As part of the C++ 15 standard, we have overhauled arrays so they"); | |
| 401423: bf f8 17 40 00 mov $0x4017f8,%edi | |
| 401428: e8 f3 f5 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("provide a Network Interface Impl for remote usage. Sticking with"); | |
| 40142d: bf 40 18 40 00 mov $0x401840,%edi | |
| 401432: e8 e9 f5 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("earlier C++ standards, we have added --omg-optimized and backed it"); | |
| 401437: bf 88 18 40 00 mov $0x401888,%edi | |
| 40143c: e8 df f5 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("with a red black vector list tree for extra reduced complexity and"); | |
| 401441: bf cb 18 40 00 mov $0x4018cb,%edi | |
| 401446: e8 d5 f5 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("succinct error message."); | |
| 40144b: bf a5 15 40 00 mov $0x4015a5,%edi | |
| 401450: e8 cb f5 ff ff callq 400a20 <strstr@plt+0x1b0> | |
| sub_400a20("\0"); | |
| 401455: 48 8d 95 3c ff ff ff lea -0xc4(%rbp),%rdx | |
| 40145c: 48 8d 45 80 lea -0x80(%rbp),%rax | |
| 401460: 48 89 d6 mov %rdx,%rsi | |
| 401463: 48 89 c7 mov %rax,%rdi | |
| 401466: e8 b4 fd ff ff callq 40121f <strstr@plt+0x9af> | |
| sub_40121f(rbp_80h, rbp_c4h); | |
| 40146b: bf 00 00 00 00 mov $0x0,%edi | |
| 401470: e8 eb f3 ff ff callq 400860 <exit@plt> | |
| exit(0); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment