Skip to content

Instantly share code, notes, and snippets.

@math314
Created May 22, 2014 08:31
Show Gist options
  • Select an option

  • Save math314/6330bf7917cdbfcf0f06 to your computer and use it in GitHub Desktop.

Select an option

Save math314/6330bf7917cdbfcf0f06 to your computer and use it in GitHub Desktop.
Disassembly of section .text:
------------------------------
------------------------------
8048850: 31 ed xor ebp,ebp;
8048852: 5e pop esi;
8048853: 89 e1 mov ecx,esp;
8048855: 83 e4 f0 and esp,0xfffffff0;
8048858: 50 push eax;
8048859: 54 push esp;
804885a: 52 push edx;
804885b: 68 f0 9c 04 08 push 0x8049cf0;
8048860: 68 80 9c 04 08 push 0x8049c80;
8048865: 51 push ecx;
8048866: 56 push esi;
8048867: 68 2f 99 04 08 push 0x804992f;
804886c: e8 3f ff ff ff call 80487b0 <__libc_start_main@plt>;
8048871: f4 hlt ;
8048872: 90 nop ;
8048873: 90 nop ;
8048874: 90 nop ;
8048875: 90 nop ;
8048876: 90 nop ;
8048877: 90 nop ;
8048878: 90 nop ;
8048879: 90 nop ;
804887a: 90 nop ;
804887b: 90 nop ;
804887c: 90 nop ;
804887d: 90 nop ;
804887e: 90 nop ;
804887f: 90 nop ;
8048880: 55 push ebp;
8048881: 89 e5 mov ebp,esp;
8048883: 53 push ebx;
8048884: 83 ec 04 sub esp,0x4;
8048887: 80 3d 84 c0 04 08 00 cmp BYTE PTR ds:0x804c084,0x0;
804888e: 75 3f jne 80488cf <calloc@plt+0x8f>; ['if']
8048890: a1 88 c0 04 08 mov eax,ds:0x804c088;
8048895: bb 20 bf 04 08 mov ebx,0x804bf20;
804889a: 81 eb 1c bf 04 08 sub ebx,0x804bf1c;
80488a0: c1 fb 02 sar ebx,0x2;
80488a3: 83 eb 01 sub ebx,0x1;
80488a6: 39 d8 cmp eax,ebx;
80488a8: 73 1e jae 80488c8 <calloc@plt+0x88>; ['if']
80488aa: 8d b6 00 00 00 00 lea esi,[esi+0x0];
80488b0: 83 c0 01 add eax,0x1; ['while']
80488b3: a3 88 c0 04 08 mov ds:0x804c088,eax;
80488b8: ff 14 85 1c bf 04 08 call DWORD PTR [eax*4+0x804bf1c];
80488bf: a1 88 c0 04 08 mov eax,ds:0x804c088;
80488c4: 39 d8 cmp eax,ebx;
80488c6: 72 e8 jb 80488b0 <calloc@plt+0x70>; ['continue']
80488c8: c6 05 84 c0 04 08 01 mov BYTE PTR ds:0x804c084,0x1; ['end while', 'end if']
80488cf: 83 c4 04 add esp,0x4; ['end if']
80488d2: 5b pop ebx;
80488d3: 5d pop ebp;
80488d4: c3 ret ;
------------------------------
------------------------------
80488d5: 8d 74 26 00 lea esi,[esi+eiz*1+0x0];
80488d9: 8d bc 27 00 00 00 00 lea edi,[edi+eiz*1+0x0];
80488e0: 55 push ebp;
80488e1: 89 e5 mov ebp,esp;
80488e3: 83 ec 18 sub esp,0x18;
80488e6: a1 24 bf 04 08 mov eax,ds:0x804bf24;
80488eb: 85 c0 test eax,eax;
80488ed: 74 12 je 8048901 <calloc@plt+0xc1>; ['if']
80488ef: b8 00 00 00 00 mov eax,0x0;
80488f4: 85 c0 test eax,eax;
80488f6: 74 09 je 8048901 <calloc@plt+0xc1>; ['if']
80488f8: c7 04 24 24 bf 04 08 mov DWORD PTR [esp],0x804bf24;
80488ff: ff d0 call eax;
8048901: c9 leave ; ['end if', 'end if']
8048902: c3 ret ;
------------------------------
------------------------------
8048903: 90 nop ;
8048904: 55 push ebp;
8048905: 89 e5 mov ebp,esp;
8048907: 83 ec 38 sub esp,0x38;
804890a: 8b 45 10 mov eax,DWORD PTR [ebp+0x10];
804890d: 88 45 e4 mov BYTE PTR [ebp-0x1c],al;
8048910: c7 45 ec 00 00 00 00 mov DWORD PTR [ebp-0x14],0x0;
8048917: eb 43 jmp 804895c <calloc@plt+0x11c>;
8048919: c7 44 24 08 01 00 00 00 mov DWORD PTR [esp+0x8],0x1; ['while']
8048921: 8d 45 f7 lea eax,[ebp-0x9];
8048924: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
8048928: c7 04 24 00 00 00 00 mov DWORD PTR [esp],0x0;
804892f: e8 6c fd ff ff call 80486a0 <read@plt>;
8048934: 89 45 f0 mov DWORD PTR [ebp-0x10],eax;
8048937: 0f b6 45 f7 movzx eax,BYTE PTR [ebp-0x9];
804893b: 0f be d0 movsx edx,al;
804893e: 0f b6 45 e4 movzx eax,BYTE PTR [ebp-0x1c];
8048942: 39 c2 cmp edx,eax;
8048944: 74 1e je 8048964 <calloc@plt+0x124>; ['break']
8048946: 83 7d f0 00 cmp DWORD PTR [ebp-0x10],0x0;
804894a: 74 18 je 8048964 <calloc@plt+0x124>; ['break']
804894c: 8b 45 ec mov eax,DWORD PTR [ebp-0x14];
804894f: 03 45 08 add eax,DWORD PTR [ebp+0x8];
8048952: 0f b6 55 f7 movzx edx,BYTE PTR [ebp-0x9];
8048956: 88 10 mov BYTE PTR [eax],dl;
8048958: 83 45 ec 01 add DWORD PTR [ebp-0x14],0x1;
804895c: 8b 45 ec mov eax,DWORD PTR [ebp-0x14];
804895f: 3b 45 0c cmp eax,DWORD PTR [ebp+0xc];
8048962: 72 b5 jb 8048919 <calloc@plt+0xd9>; ['continue']
8048964: 8b 45 f0 mov eax,DWORD PTR [ebp-0x10]; ['end while']
8048967: c9 leave ;
8048968: c3 ret ;
------------------------------
------------------------------
8048969: 55 push ebp;
804896a: 89 e5 mov ebp,esp;
804896c: 57 push edi;
804896d: 83 ec 34 sub esp,0x34;
8048970: c7 45 f0 00 00 00 00 mov DWORD PTR [ebp-0x10],0x0;
8048977: 8b 45 08 mov eax,DWORD PTR [ebp+0x8];
804897a: c7 45 e4 ff ff ff ff mov DWORD PTR [ebp-0x1c],0xffffffff;
8048981: 89 c2 mov edx,eax;
8048983: b8 00 00 00 00 mov eax,0x0;
8048988: 8b 4d e4 mov ecx,DWORD PTR [ebp-0x1c];
804898b: 89 d7 mov edi,edx;
804898d: f2 ae repnz scas al,BYTE PTR es:[edi];
804898f: 89 c8 mov eax,ecx;
8048991: f7 d0 not eax;
8048993: 83 e8 01 sub eax,0x1;
8048996: 89 45 f4 mov DWORD PTR [ebp-0xc],eax;
8048999: eb 36 jmp 80489d1 <calloc@plt+0x191>;
804899b: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc]; ['while']
804899e: 89 44 24 08 mov DWORD PTR [esp+0x8],eax;
80489a2: 8b 45 08 mov eax,DWORD PTR [ebp+0x8];
80489a5: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
80489a9: c7 04 24 01 00 00 00 mov DWORD PTR [esp],0x1;
80489b0: e8 0b fe ff ff call 80487c0 <write@plt>;
80489b5: 89 45 ec mov DWORD PTR [ebp-0x14],eax;
80489b8: 8b 45 ec mov eax,DWORD PTR [ebp-0x14];
80489bb: 01 45 f0 add DWORD PTR [ebp-0x10],eax;
80489be: a1 80 c0 04 08 mov eax,ds:0x804c080;
80489c3: 89 04 24 mov DWORD PTR [esp],eax;
80489c6: e8 f5 fc ff ff call 80486c0 <fflush@plt>;
80489cb: 83 7d ec 00 cmp DWORD PTR [ebp-0x14],0x0;
80489cf: 74 0a je 80489db <calloc@plt+0x19b>;
80489d1: 8b 45 f0 mov eax,DWORD PTR [ebp-0x10];
80489d4: 3b 45 f4 cmp eax,DWORD PTR [ebp-0xc];
80489d7: 72 c2 jb 804899b <calloc@plt+0x15b>; ['continue']
80489d9: eb 01 jmp 80489dc <calloc@plt+0x19c>; ['end while']
80489db: 90 nop ;
80489dc: 8b 45 ec mov eax,DWORD PTR [ebp-0x14];
80489df: 83 c4 34 add esp,0x34;
80489e2: 5f pop edi;
80489e3: 5d pop ebp;
80489e4: c3 ret ;
------------------------------
------------------------------
80489e5: 55 push ebp;
80489e6: 89 e5 mov ebp,esp;
80489e8: 57 push edi;
80489e9: 56 push esi;
80489ea: 81 ec 30 01 00 00 sub esp,0x130;
80489f0: 8b 45 08 mov eax,DWORD PTR [ebp+0x8];
80489f3: 89 85 e4 fe ff ff mov DWORD PTR [ebp-0x11c],eax;
80489f9: 65 a1 14 00 00 00 mov eax,gs:0x14;
80489ff: 89 45 f4 mov DWORD PTR [ebp-0xc],eax;
8048a02: 31 c0 xor eax,eax;
8048a04: 8b 85 e4 fe ff ff mov eax,DWORD PTR [ebp-0x11c];
8048a0a: 89 c2 mov edx,eax;
8048a0c: b8 80 9d 04 08 mov eax,0x8049d80;
8048a11: b9 07 00 00 00 mov ecx,0x7;
8048a16: 89 d6 mov esi,edx;
8048a18: 89 c7 mov edi,eax;
8048a1a: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8048a1c: 0f 97 c2 seta dl;
8048a1f: 0f 92 c0 setb al;
8048a22: 89 d1 mov ecx,edx;
8048a24: 28 c1 sub cl,al;
8048a26: 89 c8 mov eax,ecx;
8048a28: 0f be c0 movsx eax,al;
8048a2b: 85 c0 test eax,eax;
8048a2d: 75 23 jne 8048a52 <calloc@plt+0x212>; ['if']
8048a2f: b8 88 9d 04 08 mov eax,0x8049d88;
8048a34: 8b 95 e4 fe ff ff mov edx,DWORD PTR [ebp-0x11c];
8048a3a: 89 54 24 08 mov DWORD PTR [esp+0x8],edx;
8048a3e: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
8048a42: 8d 85 f4 fe ff ff lea eax,[ebp-0x10c];
8048a48: 89 04 24 mov DWORD PTR [esp],eax;
8048a4b: e8 c0 fd ff ff call 8048810 <sprintf@plt>;
8048a50: eb 33 jmp 8048a85 <calloc@plt+0x245>;
8048a52: ba ac 9d 04 08 mov edx,0x8049dac; ['end if']
8048a57: 8d 85 f4 fe ff ff lea eax,[ebp-0x10c];
8048a5d: 8b 0a mov ecx,DWORD PTR [edx];
8048a5f: 89 08 mov DWORD PTR [eax],ecx;
8048a61: 8b 4a 04 mov ecx,DWORD PTR [edx+0x4];
8048a64: 89 48 04 mov DWORD PTR [eax+0x4],ecx;
8048a67: 8b 4a 08 mov ecx,DWORD PTR [edx+0x8];
8048a6a: 89 48 08 mov DWORD PTR [eax+0x8],ecx;
8048a6d: 8b 4a 0c mov ecx,DWORD PTR [edx+0xc];
8048a70: 89 48 0c mov DWORD PTR [eax+0xc],ecx;
8048a73: 8b 4a 10 mov ecx,DWORD PTR [edx+0x10];
8048a76: 89 48 10 mov DWORD PTR [eax+0x10],ecx;
8048a79: 8b 4a 14 mov ecx,DWORD PTR [edx+0x14];
8048a7c: 89 48 14 mov DWORD PTR [eax+0x14],ecx;
8048a7f: 8b 52 18 mov edx,DWORD PTR [edx+0x18];
8048a82: 89 50 18 mov DWORD PTR [eax+0x18],edx;
8048a85: 8d 85 f4 fe ff ff lea eax,[ebp-0x10c];
8048a8b: 89 04 24 mov DWORD PTR [esp],eax;
8048a8e: e8 d6 fe ff ff call 8048969 <calloc@plt+0x129>;
8048a93: 8b 75 f4 mov esi,DWORD PTR [ebp-0xc];
8048a96: 65 33 35 14 00 00 00 xor esi,DWORD PTR gs:0x14;
8048a9d: 74 05 je 8048aa4 <calloc@plt+0x264>; ['if']
8048a9f: e8 6c fc ff ff call 8048710 <__stack_chk_fail@plt>;
8048aa4: 81 c4 30 01 00 00 add esp,0x130; ['end if']
8048aaa: 5e pop esi;
8048aab: 5f pop edi;
8048aac: 5d pop ebp;
8048aad: c3 ret ;
------------------------------
------------------------------
8048aae: 55 push ebp;
8048aaf: 89 e5 mov ebp,esp;
8048ab1: 83 ec 18 sub esp,0x18;
8048ab4: c7 04 24 c8 9d 04 08 mov DWORD PTR [esp],0x8049dc8;
8048abb: e8 a9 fe ff ff call 8048969 <calloc@plt+0x129>;
8048ac0: c9 leave ;
8048ac1: c3 ret ;
------------------------------
------------------------------
8048ac2: 55 push ebp;
8048ac3: 89 e5 mov ebp,esp;
8048ac5: 57 push edi;
8048ac6: 56 push esi;
8048ac7: 53 push ebx;
8048ac8: 81 ec 7c 01 00 00 sub esp,0x17c;
8048ace: 8b 45 08 mov eax,DWORD PTR [ebp+0x8];
8048ad1: 89 85 94 fe ff ff mov DWORD PTR [ebp-0x16c],eax;
8048ad7: 65 a1 14 00 00 00 mov eax,gs:0x14;
8048add: 89 45 e4 mov DWORD PTR [ebp-0x1c],eax;
8048ae0: 31 c0 xor eax,eax;
8048ae2: 8d 45 a4 lea eax,[ebp-0x5c];
8048ae5: 89 c3 mov ebx,eax;
8048ae7: b8 00 00 00 00 mov eax,0x0;
8048aec: ba 10 00 00 00 mov edx,0x10;
8048af1: 89 df mov edi,ebx;
8048af3: 89 d1 mov ecx,edx;
8048af5: f3 ab rep stos DWORD PTR es:[edi],eax;
8048af7: 8b 95 94 fe ff ff mov edx,DWORD PTR [ebp-0x16c];
8048afd: 8d 45 a4 lea eax,[ebp-0x5c];
8048b00: bb 3f 00 00 00 mov ebx,0x3f;
8048b05: 89 c1 mov ecx,eax;
8048b07: 83 e1 01 and ecx,0x1;
8048b0a: 85 c9 test ecx,ecx;
8048b0c: 74 0e je 8048b1c <calloc@plt+0x2dc>; ['if']
8048b0e: 0f b6 0a movzx ecx,BYTE PTR [edx];
8048b11: 88 08 mov BYTE PTR [eax],cl;
8048b13: 83 c0 01 add eax,0x1;
8048b16: 83 c2 01 add edx,0x1;
8048b19: 83 eb 01 sub ebx,0x1;
8048b1c: 89 c1 mov ecx,eax; ['end if']
8048b1e: 83 e1 02 and ecx,0x2;
8048b21: 85 c9 test ecx,ecx;
8048b23: 74 0f je 8048b34 <calloc@plt+0x2f4>; ['if']
8048b25: 0f b7 0a movzx ecx,WORD PTR [edx];
8048b28: 66 89 08 mov WORD PTR [eax],cx;
8048b2b: 83 c0 02 add eax,0x2;
8048b2e: 83 c2 02 add edx,0x2;
8048b31: 83 eb 02 sub ebx,0x2;
8048b34: 89 d9 mov ecx,ebx; ['end if']
8048b36: c1 e9 02 shr ecx,0x2;
8048b39: 89 c7 mov edi,eax;
8048b3b: 89 d6 mov esi,edx;
8048b3d: f3 a5 rep movs DWORD PTR es:[edi],DWORD PTR ds:[esi];
8048b3f: 89 f2 mov edx,esi;
8048b41: 89 f8 mov eax,edi;
8048b43: b9 00 00 00 00 mov ecx,0x0;
8048b48: 89 de mov esi,ebx;
8048b4a: 83 e6 02 and esi,0x2;
8048b4d: 85 f6 test esi,esi;
8048b4f: 74 0b je 8048b5c <calloc@plt+0x31c>; ['if']
8048b51: 0f b7 34 0a movzx esi,WORD PTR [edx+ecx*1];
8048b55: 66 89 34 08 mov WORD PTR [eax+ecx*1],si;
8048b59: 83 c1 02 add ecx,0x2;
8048b5c: 83 e3 01 and ebx,0x1; ['end if']
8048b5f: 85 db test ebx,ebx;
8048b61: 74 07 je 8048b6a <calloc@plt+0x32a>; ['if']
8048b63: 0f b6 14 0a movzx edx,BYTE PTR [edx+ecx*1];
8048b67: 88 14 08 mov BYTE PTR [eax+ecx*1],dl;
8048b6a: 8b 85 94 fe ff ff mov eax,DWORD PTR [ebp-0x16c]; ['end if']
8048b70: 89 c2 mov edx,eax;
8048b72: b8 e6 9d 04 08 mov eax,0x8049de6;
8048b77: b9 0b 00 00 00 mov ecx,0xb;
8048b7c: 89 d6 mov esi,edx;
8048b7e: 89 c7 mov edi,eax;
8048b80: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8048b82: 0f 97 c2 seta dl;
8048b85: 0f 92 c0 setb al;
8048b88: 89 d1 mov ecx,edx;
8048b8a: 28 c1 sub cl,al;
8048b8c: 89 c8 mov eax,ecx;
8048b8e: 0f be c0 movsx eax,al;
8048b91: 85 c0 test eax,eax;
8048b93: 75 2b jne 8048bc0 <calloc@plt+0x380>; ['if']
8048b95: c6 05 8c c0 04 08 01 mov BYTE PTR ds:0x804c08c,0x1;
8048b9c: ba f1 9d 04 08 mov edx,0x8049df1;
8048ba1: 8d 85 a4 fe ff ff lea eax,[ebp-0x15c];
8048ba7: 8b 0a mov ecx,DWORD PTR [edx];
8048ba9: 89 08 mov DWORD PTR [eax],ecx;
8048bab: 8b 4a 04 mov ecx,DWORD PTR [edx+0x4];
8048bae: 89 48 04 mov DWORD PTR [eax+0x4],ecx;
8048bb1: 8b 4a 08 mov ecx,DWORD PTR [edx+0x8];
8048bb4: 89 48 08 mov DWORD PTR [eax+0x8],ecx;
8048bb7: 0f b6 52 0c movzx edx,BYTE PTR [edx+0xc];
8048bbb: 88 50 0c mov BYTE PTR [eax+0xc],dl;
8048bbe: eb 3c jmp 8048bfc <calloc@plt+0x3bc>;
8048bc0: ba fe 9d 04 08 mov edx,0x8049dfe; ['end if']
8048bc5: 8d 85 a4 fe ff ff lea eax,[ebp-0x15c];
8048bcb: 8b 0a mov ecx,DWORD PTR [edx];
8048bcd: 89 08 mov DWORD PTR [eax],ecx;
8048bcf: 8b 4a 04 mov ecx,DWORD PTR [edx+0x4];
8048bd2: 89 48 04 mov DWORD PTR [eax+0x4],ecx;
8048bd5: 8b 4a 08 mov ecx,DWORD PTR [edx+0x8];
8048bd8: 89 48 08 mov DWORD PTR [eax+0x8],ecx;
8048bdb: 8b 4a 0c mov ecx,DWORD PTR [edx+0xc];
8048bde: 89 48 0c mov DWORD PTR [eax+0xc],ecx;
8048be1: 8b 4a 10 mov ecx,DWORD PTR [edx+0x10];
8048be4: 89 48 10 mov DWORD PTR [eax+0x10],ecx;
8048be7: 8b 4a 14 mov ecx,DWORD PTR [edx+0x14];
8048bea: 89 48 14 mov DWORD PTR [eax+0x14],ecx;
8048bed: 0f b7 4a 18 movzx ecx,WORD PTR [edx+0x18];
8048bf1: 66 89 48 18 mov WORD PTR [eax+0x18],cx;
8048bf5: 0f b6 52 1a movzx edx,BYTE PTR [edx+0x1a];
8048bf9: 88 50 1a mov BYTE PTR [eax+0x1a],dl;
8048bfc: 8d 85 a4 fe ff ff lea eax,[ebp-0x15c];
8048c02: 89 04 24 mov DWORD PTR [esp],eax;
8048c05: e8 5f fd ff ff call 8048969 <calloc@plt+0x129>;
8048c0a: 8b 75 e4 mov esi,DWORD PTR [ebp-0x1c];
8048c0d: 65 33 35 14 00 00 00 xor esi,DWORD PTR gs:0x14;
8048c14: 74 05 je 8048c1b <calloc@plt+0x3db>; ['if']
8048c16: e8 f5 fa ff ff call 8048710 <__stack_chk_fail@plt>;
8048c1b: 81 c4 7c 01 00 00 add esp,0x17c; ['end if']
8048c21: 5b pop ebx;
8048c22: 5e pop esi;
8048c23: 5f pop edi;
8048c24: 5d pop ebp;
8048c25: c3 ret ;
------------------------------
------------------------------
8048c26: 55 push ebp;
8048c27: 89 e5 mov ebp,esp;
8048c29: 83 ec 18 sub esp,0x18;
8048c2c: c7 04 24 19 9e 04 08 mov DWORD PTR [esp],0x8049e19;
8048c33: e8 31 fd ff ff call 8048969 <calloc@plt+0x129>;
8048c38: c9 leave ;
8048c39: c3 ret ;
------------------------------
------------------------------
8048c3a: 55 push ebp;
8048c3b: 89 e5 mov ebp,esp;
8048c3d: 83 ec 28 sub esp,0x28;
8048c40: c7 44 24 04 01 00 00 00 mov DWORD PTR [esp+0x4],0x1;
8048c48: c7 04 24 0a 00 00 00 mov DWORD PTR [esp],0xa;
8048c4f: e8 ec fb ff ff call 8048840 <calloc@plt>;
8048c54: 89 45 f4 mov DWORD PTR [ebp-0xc],eax;
8048c57: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
8048c5a: c7 00 2d 2d 2d 2d mov DWORD PTR [eax],0x2d2d2d2d;
8048c60: c7 40 04 2d 2d 2d 2d mov DWORD PTR [eax+0x4],0x2d2d2d2d;
8048c67: c6 40 08 2d mov BYTE PTR [eax+0x8],0x2d;
8048c6b: 8b 45 08 mov eax,DWORD PTR [ebp+0x8];
8048c6e: 83 e0 40 and eax,0x40;
8048c71: 85 c0 test eax,eax;
8048c73: 74 09 je 8048c7e <calloc@plt+0x43e>; ['if']
8048c75: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
8048c78: 83 c0 02 add eax,0x2;
8048c7b: c6 00 78 mov BYTE PTR [eax],0x78;
8048c7e: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]; ['end if']
8048c81: 83 e0 08 and eax,0x8;
8048c84: 85 c0 test eax,eax;
8048c86: 74 09 je 8048c91 <calloc@plt+0x451>; ['if']
8048c88: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
8048c8b: 83 c0 05 add eax,0x5;
8048c8e: c6 00 78 mov BYTE PTR [eax],0x78;
8048c91: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]; ['end if']
8048c94: 83 e0 01 and eax,0x1;
8048c97: 84 c0 test al,al;
8048c99: 74 09 je 8048ca4 <calloc@plt+0x464>; ['if']
8048c9b: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
8048c9e: 83 c0 08 add eax,0x8;
8048ca1: c6 00 78 mov BYTE PTR [eax],0x78;
8048ca4: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]; ['end if']
8048ca7: 25 80 00 00 00 and eax,0x80;
8048cac: 85 c0 test eax,eax;
8048cae: 74 09 je 8048cb9 <calloc@plt+0x479>; ['if']
8048cb0: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
8048cb3: 83 c0 01 add eax,0x1;
8048cb6: c6 00 77 mov BYTE PTR [eax],0x77;
8048cb9: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]; ['end if']
8048cbc: 83 e0 10 and eax,0x10;
8048cbf: 85 c0 test eax,eax;
8048cc1: 74 09 je 8048ccc <calloc@plt+0x48c>; ['if']
8048cc3: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
8048cc6: 83 c0 04 add eax,0x4;
8048cc9: c6 00 77 mov BYTE PTR [eax],0x77;
8048ccc: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]; ['end if']
8048ccf: 83 e0 02 and eax,0x2;
8048cd2: 85 c0 test eax,eax;
8048cd4: 74 09 je 8048cdf <calloc@plt+0x49f>; ['if']
8048cd6: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
8048cd9: 83 c0 07 add eax,0x7;
8048cdc: c6 00 77 mov BYTE PTR [eax],0x77;
8048cdf: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]; ['end if']
8048ce2: 25 00 01 00 00 and eax,0x100;
8048ce7: 85 c0 test eax,eax;
8048ce9: 74 06 je 8048cf1 <calloc@plt+0x4b1>; ['if']
8048ceb: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
8048cee: c6 00 72 mov BYTE PTR [eax],0x72;
8048cf1: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]; ['end if']
8048cf4: 83 e0 20 and eax,0x20;
8048cf7: 85 c0 test eax,eax;
8048cf9: 74 09 je 8048d04 <calloc@plt+0x4c4>; ['if']
8048cfb: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
8048cfe: 83 c0 03 add eax,0x3;
8048d01: c6 00 72 mov BYTE PTR [eax],0x72;
8048d04: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]; ['end if']
8048d07: 83 e0 04 and eax,0x4;
8048d0a: 85 c0 test eax,eax;
8048d0c: 74 09 je 8048d17 <calloc@plt+0x4d7>; ['if']
8048d0e: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
8048d11: 83 c0 06 add eax,0x6;
8048d14: c6 00 72 mov BYTE PTR [eax],0x72;
8048d17: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc]; ['end if']
8048d1a: c9 leave ;
8048d1b: c3 ret ;
------------------------------
------------------------------
8048d1c: 55 push ebp;
8048d1d: 89 e5 mov ebp,esp;
8048d1f: 57 push edi;
8048d20: 53 push ebx;
8048d21: 81 ec a0 02 00 00 sub esp,0x2a0;
8048d27: 8b 45 08 mov eax,DWORD PTR [ebp+0x8];
8048d2a: 89 85 84 fd ff ff mov DWORD PTR [ebp-0x27c],eax;
8048d30: 65 a1 14 00 00 00 mov eax,gs:0x14;
8048d36: 89 45 f4 mov DWORD PTR [ebp-0xc],eax;
8048d39: 31 c0 xor eax,eax;
8048d3b: 8b 85 84 fd ff ff mov eax,DWORD PTR [ebp-0x27c];
8048d41: 83 c0 02 add eax,0x2;
8048d44: 85 c0 test eax,eax;
8048d46: 75 24 jne 8048d6c <calloc@plt+0x52c>; ['if']
8048d48: c7 44 24 04 00 01 00 00 mov DWORD PTR [esp+0x4],0x100;
8048d50: 8d 85 f4 fd ff ff lea eax,[ebp-0x20c];
8048d56: 89 04 24 mov DWORD PTR [esp],eax;
8048d59: e8 42 fa ff ff call 80487a0 <getcwd@plt>;
8048d5e: 8d 85 f4 fd ff ff lea eax,[ebp-0x20c];
8048d64: 89 85 e4 fd ff ff mov DWORD PTR [ebp-0x21c],eax;
8048d6a: eb 0f jmp 8048d7b <calloc@plt+0x53b>;
8048d6c: 8b 85 84 fd ff ff mov eax,DWORD PTR [ebp-0x27c]; ['end if']
8048d72: 83 c0 02 add eax,0x2;
8048d75: 89 85 e4 fd ff ff mov DWORD PTR [ebp-0x21c],eax;
8048d7b: 8b 85 e4 fd ff ff mov eax,DWORD PTR [ebp-0x21c];
8048d81: 89 04 24 mov DWORD PTR [esp],eax;
8048d84: e8 a7 fa ff ff call 8048830 <opendir@plt>;
8048d89: 89 85 e8 fd ff ff mov DWORD PTR [ebp-0x218],eax;
8048d8f: 83 bd e8 fd ff ff 00 cmp DWORD PTR [ebp-0x218],0x0;
8048d96: 75 11 jne 8048da9 <calloc@plt+0x569>; ['if']
8048d98: c7 04 24 2a 9e 04 08 mov DWORD PTR [esp],0x8049e2a;
8048d9f: e8 c5 fb ff ff call 8048969 <calloc@plt+0x129>;
8048da4: e9 c4 01 00 00 jmp 8048f6d <calloc@plt+0x72d>;
8048da9: 8b 85 84 fd ff ff mov eax,DWORD PTR [ebp-0x27c]; ['end if']
8048daf: 0f b6 10 movzx edx,BYTE PTR [eax];
8048db2: b8 3c 9e 04 08 mov eax,0x8049e3c;
8048db7: 0f b6 00 movzx eax,BYTE PTR [eax];
8048dba: 38 c2 cmp dl,al;
8048dbc: 75 6e jne 8048e2c <calloc@plt+0x5ec>; ['if']
8048dbe: eb 4a jmp 8048e0a <calloc@plt+0x5ca>;
8048dc0: 8d 85 f4 fd ff ff lea eax,[ebp-0x20c]; ['while']
8048dc6: 89 c3 mov ebx,eax;
8048dc8: b8 00 00 00 00 mov eax,0x0;
8048dcd: ba 40 00 00 00 mov edx,0x40;
8048dd2: 89 df mov edi,ebx;
8048dd4: 89 d1 mov ecx,edx;
8048dd6: f3 ab rep stos DWORD PTR es:[edi],eax;
8048dd8: 8b 85 ec fd ff ff mov eax,DWORD PTR [ebp-0x214];
8048dde: 8d 50 0b lea edx,[eax+0xb];
8048de1: b8 3e 9e 04 08 mov eax,0x8049e3e;
8048de6: 89 54 24 08 mov DWORD PTR [esp+0x8],edx;
8048dea: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
8048dee: 8d 85 f4 fd ff ff lea eax,[ebp-0x20c];
8048df4: 89 04 24 mov DWORD PTR [esp],eax;
8048df7: e8 14 fa ff ff call 8048810 <sprintf@plt>;
8048dfc: 8d 85 f4 fd ff ff lea eax,[ebp-0x20c];
8048e02: 89 04 24 mov DWORD PTR [esp],eax;
8048e05: e8 5f fb ff ff call 8048969 <calloc@plt+0x129>;
8048e0a: 8b 85 e8 fd ff ff mov eax,DWORD PTR [ebp-0x218];
8048e10: 89 04 24 mov DWORD PTR [esp],eax;
8048e13: e8 e8 f9 ff ff call 8048800 <readdir@plt>;
8048e18: 89 85 ec fd ff ff mov DWORD PTR [ebp-0x214],eax;
8048e1e: 83 bd ec fd ff ff 00 cmp DWORD PTR [ebp-0x214],0x0;
8048e25: 75 99 jne 8048dc0 <calloc@plt+0x580>; ['continue']
8048e27: e9 32 01 00 00 jmp 8048f5e <calloc@plt+0x71e>; ['end while']
8048e2c: 8b 85 84 fd ff ff mov eax,DWORD PTR [ebp-0x27c]; ['end if']
8048e32: 0f b6 10 movzx edx,BYTE PTR [eax];
8048e35: b8 43 9e 04 08 mov eax,0x8049e43;
8048e3a: 0f b6 00 movzx eax,BYTE PTR [eax];
8048e3d: 38 c2 cmp dl,al;
8048e3f: 0f 85 19 01 00 00 jne 8048f5e <calloc@plt+0x71e>; ['if']
8048e45: e9 f3 00 00 00 jmp 8048f3d <calloc@plt+0x6fd>;
8048e4a: 8b 85 ec fd ff ff mov eax,DWORD PTR [ebp-0x214]; ['while']
8048e50: 0f b6 40 0b movzx eax,BYTE PTR [eax+0xb];
8048e54: 3c 2e cmp al,0x2e;
8048e56: 0f 84 e0 00 00 00 je 8048f3c <calloc@plt+0x6fc>; ['if']
8048e5c: 8d 85 f4 fe ff ff lea eax,[ebp-0x10c];
8048e62: 89 c3 mov ebx,eax;
8048e64: b8 00 00 00 00 mov eax,0x0;
8048e69: ba 40 00 00 00 mov edx,0x40;
8048e6e: 89 df mov edi,ebx;
8048e70: 89 d1 mov ecx,edx;
8048e72: f3 ab rep stos DWORD PTR es:[edi],eax;
8048e74: 8d 85 f4 fd ff ff lea eax,[ebp-0x20c];
8048e7a: 89 c3 mov ebx,eax;
8048e7c: b8 00 00 00 00 mov eax,0x0;
8048e81: ba 40 00 00 00 mov edx,0x40;
8048e86: 89 df mov edi,ebx;
8048e88: 89 d1 mov ecx,edx;
8048e8a: f3 ab rep stos DWORD PTR es:[edi],eax;
8048e8c: 8b 85 ec fd ff ff mov eax,DWORD PTR [ebp-0x214];
8048e92: 8d 50 0b lea edx,[eax+0xb];
8048e95: b8 45 9e 04 08 mov eax,0x8049e45;
8048e9a: 89 54 24 0c mov DWORD PTR [esp+0xc],edx;
8048e9e: 8b 95 e4 fd ff ff mov edx,DWORD PTR [ebp-0x21c];
8048ea4: 89 54 24 08 mov DWORD PTR [esp+0x8],edx;
8048ea8: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
8048eac: 8d 85 f4 fe ff ff lea eax,[ebp-0x10c];
8048eb2: 89 04 24 mov DWORD PTR [esp],eax;
8048eb5: e8 56 f9 ff ff call 8048810 <sprintf@plt>;
8048eba: 8d 85 f4 fe ff ff lea eax,[ebp-0x10c];
8048ec0: 8d 95 8c fd ff ff lea edx,[ebp-0x274];
8048ec6: 89 54 24 04 mov DWORD PTR [esp+0x4],edx;
8048eca: 89 04 24 mov DWORD PTR [esp],eax;
8048ecd: e8 2e 0e 00 00 call 8049d00 <calloc@plt+0x14c0>;
8048ed2: 8b 85 9c fd ff ff mov eax,DWORD PTR [ebp-0x264];
8048ed8: 89 04 24 mov DWORD PTR [esp],eax;
8048edb: e8 5a fd ff ff call 8048c3a <calloc@plt+0x3fa>;
8048ee0: 89 85 f0 fd ff ff mov DWORD PTR [ebp-0x210],eax;
8048ee6: 8b 95 b8 fd ff ff mov edx,DWORD PTR [ebp-0x248];
8048eec: 8b 85 ec fd ff ff mov eax,DWORD PTR [ebp-0x214];
8048ef2: 8d 58 0b lea ebx,[eax+0xb];
8048ef5: b8 4b 9e 04 08 mov eax,0x8049e4b;
8048efa: 8b 8d f0 fd ff ff mov ecx,DWORD PTR [ebp-0x210];
8048f00: 89 4c 24 10 mov DWORD PTR [esp+0x10],ecx;
8048f04: 89 54 24 0c mov DWORD PTR [esp+0xc],edx;
8048f08: 89 5c 24 08 mov DWORD PTR [esp+0x8],ebx;
8048f0c: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
8048f10: 8d 85 f4 fd ff ff lea eax,[ebp-0x20c];
8048f16: 89 04 24 mov DWORD PTR [esp],eax;
8048f19: e8 f2 f8 ff ff call 8048810 <sprintf@plt>;
8048f1e: 8b 85 f0 fd ff ff mov eax,DWORD PTR [ebp-0x210];
8048f24: 89 04 24 mov DWORD PTR [esp],eax;
8048f27: e8 a4 f7 ff ff call 80486d0 <free@plt>;
8048f2c: 8d 85 f4 fd ff ff lea eax,[ebp-0x20c];
8048f32: 89 04 24 mov DWORD PTR [esp],eax;
8048f35: e8 2f fa ff ff call 8048969 <calloc@plt+0x129>;
8048f3a: eb 01 jmp 8048f3d <calloc@plt+0x6fd>;
8048f3c: 90 nop ; ['end if']
8048f3d: 8b 85 e8 fd ff ff mov eax,DWORD PTR [ebp-0x218];
8048f43: 89 04 24 mov DWORD PTR [esp],eax;
8048f46: e8 b5 f8 ff ff call 8048800 <readdir@plt>;
8048f4b: 89 85 ec fd ff ff mov DWORD PTR [ebp-0x214],eax;
8048f51: 83 bd ec fd ff ff 00 cmp DWORD PTR [ebp-0x214],0x0;
8048f58: 0f 85 ec fe ff ff jne 8048e4a <calloc@plt+0x60a>; ['continue']
8048f5e: 8b 85 e8 fd ff ff mov eax,DWORD PTR [ebp-0x218]; ['end while', 'end if']
8048f64: 89 04 24 mov DWORD PTR [esp],eax;
8048f67: e8 b4 f8 ff ff call 8048820 <closedir@plt>;
8048f6c: 90 nop ;
8048f6d: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
8048f70: 65 33 05 14 00 00 00 xor eax,DWORD PTR gs:0x14;
8048f77: 74 05 je 8048f7e <calloc@plt+0x73e>; ['if']
8048f79: e8 92 f7 ff ff call 8048710 <__stack_chk_fail@plt>;
8048f7e: 81 c4 a0 02 00 00 add esp,0x2a0; ['end if']
8048f84: 5b pop ebx;
8048f85: 5f pop edi;
8048f86: 5d pop ebp;
8048f87: c3 ret ;
------------------------------
------------------------------
8048f88: 55 push ebp;
8048f89: 89 e5 mov ebp,esp;
8048f8b: 83 ec 18 sub esp,0x18;
8048f8e: c7 04 24 59 9e 04 08 mov DWORD PTR [esp],0x8049e59;
8048f95: e8 cf f9 ff ff call 8048969 <calloc@plt+0x129>;
8048f9a: c9 leave ;
8048f9b: c3 ret ;
------------------------------
------------------------------
8048f9c: 55 push ebp;
8048f9d: 89 e5 mov ebp,esp;
8048f9f: 81 ec 38 01 00 00 sub esp,0x138;
8048fa5: 8b 45 08 mov eax,DWORD PTR [ebp+0x8];
8048fa8: 89 85 e4 fe ff ff mov DWORD PTR [ebp-0x11c],eax;
8048fae: 65 a1 14 00 00 00 mov eax,gs:0x14;
8048fb4: 89 45 f4 mov DWORD PTR [ebp-0xc],eax;
8048fb7: 31 c0 xor eax,eax;
8048fb9: 8b 85 e4 fe ff ff mov eax,DWORD PTR [ebp-0x11c];
8048fbf: 89 04 24 mov DWORD PTR [esp],eax;
8048fc2: e8 59 f7 ff ff call 8048720 <unlink@plt>;
8048fc7: 89 85 f0 fe ff ff mov DWORD PTR [ebp-0x110],eax;
8048fcd: 83 bd f0 fe ff ff 00 cmp DWORD PTR [ebp-0x110],0x0;
8048fd4: 74 3d je 8049013 <calloc@plt+0x7d3>; ['if']
8048fd6: ba 5f 9e 04 08 mov edx,0x8049e5f;
8048fdb: 8d 85 f4 fe ff ff lea eax,[ebp-0x10c];
8048fe1: 8b 0a mov ecx,DWORD PTR [edx];
8048fe3: 89 08 mov DWORD PTR [eax],ecx;
8048fe5: 8b 4a 04 mov ecx,DWORD PTR [edx+0x4];
8048fe8: 89 48 04 mov DWORD PTR [eax+0x4],ecx;
8048feb: 8b 4a 08 mov ecx,DWORD PTR [edx+0x8];
8048fee: 89 48 08 mov DWORD PTR [eax+0x8],ecx;
8048ff1: 8b 4a 0c mov ecx,DWORD PTR [edx+0xc];
8048ff4: 89 48 0c mov DWORD PTR [eax+0xc],ecx;
8048ff7: 8b 4a 10 mov ecx,DWORD PTR [edx+0x10];
8048ffa: 89 48 10 mov DWORD PTR [eax+0x10],ecx;
8048ffd: 8b 4a 14 mov ecx,DWORD PTR [edx+0x14];
8049000: 89 48 14 mov DWORD PTR [eax+0x14],ecx;
8049003: 8b 4a 18 mov ecx,DWORD PTR [edx+0x18];
8049006: 89 48 18 mov DWORD PTR [eax+0x18],ecx;
8049009: 0f b7 52 1c movzx edx,WORD PTR [edx+0x1c];
804900d: 66 89 50 1c mov WORD PTR [eax+0x1c],dx;
8049011: eb 29 jmp 804903c <calloc@plt+0x7fc>;
8049013: b8 7d 9e 04 08 mov eax,0x8049e7d; ['end if']
8049018: 8b 95 e4 fe ff ff mov edx,DWORD PTR [ebp-0x11c];
804901e: 89 54 24 0c mov DWORD PTR [esp+0xc],edx;
8049022: 89 44 24 08 mov DWORD PTR [esp+0x8],eax;
8049026: c7 44 24 04 00 01 00 00 mov DWORD PTR [esp+0x4],0x100;
804902e: 8d 85 f4 fe ff ff lea eax,[ebp-0x10c];
8049034: 89 04 24 mov DWORD PTR [esp],eax;
8049037: e8 a4 f7 ff ff call 80487e0 <snprintf@plt>;
804903c: 8d 85 f4 fe ff ff lea eax,[ebp-0x10c];
8049042: 89 04 24 mov DWORD PTR [esp],eax;
8049045: e8 1f f9 ff ff call 8048969 <calloc@plt+0x129>;
804904a: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc];
804904d: 65 33 05 14 00 00 00 xor eax,DWORD PTR gs:0x14;
8049054: 74 05 je 804905b <calloc@plt+0x81b>; ['if']
8049056: e8 b5 f6 ff ff call 8048710 <__stack_chk_fail@plt>;
804905b: c9 leave ; ['end if']
804905c: c3 ret ;
------------------------------
------------------------------
804905d: 55 push ebp;
804905e: 89 e5 mov ebp,esp;
8049060: 57 push edi;
8049061: 56 push esi;
8049062: 53 push ebx;
8049063: 81 ec 8c 06 00 00 sub esp,0x68c;
8049069: 8b 45 08 mov eax,DWORD PTR [ebp+0x8];
804906c: 89 85 84 f9 ff ff mov DWORD PTR [ebp-0x67c],eax;
8049072: 65 a1 14 00 00 00 mov eax,gs:0x14;
8049078: 89 45 e4 mov DWORD PTR [ebp-0x1c],eax;
804907b: 31 c0 xor eax,eax;
804907d: 8d 85 e4 fd ff ff lea eax,[ebp-0x21c];
8049083: 89 c3 mov ebx,eax;
8049085: b8 00 00 00 00 mov eax,0x0;
804908a: ba 40 00 00 00 mov edx,0x40;
804908f: 89 df mov edi,ebx;
8049091: 89 d1 mov ecx,edx;
8049093: f3 ab rep stos DWORD PTR es:[edi],eax;
8049095: 8d 85 e4 fe ff ff lea eax,[ebp-0x11c];
804909b: 89 c3 mov ebx,eax;
804909d: b8 00 00 00 00 mov eax,0x0;
80490a2: ba 40 00 00 00 mov edx,0x40;
80490a7: 89 df mov edi,ebx;
80490a9: 89 d1 mov ecx,edx;
80490ab: f3 ab rep stos DWORD PTR es:[edi],eax;
80490ad: 8b 85 84 f9 ff ff mov eax,DWORD PTR [ebp-0x67c];
80490b3: c7 85 80 f9 ff ff ff ff ff ff mov DWORD PTR [ebp-0x680],0xffffffff;
80490bd: 89 c2 mov edx,eax;
80490bf: b8 00 00 00 00 mov eax,0x0;
80490c4: 8b 8d 80 f9 ff ff mov ecx,DWORD PTR [ebp-0x680];
80490ca: 89 d7 mov edi,edx;
80490cc: f2 ae repnz scas al,BYTE PTR es:[edi];
80490ce: 89 c8 mov eax,ecx;
80490d0: f7 d0 not eax;
80490d2: 8d 48 ff lea ecx,[eax-0x1];
80490d5: 8b 95 84 f9 ff ff mov edx,DWORD PTR [ebp-0x67c];
80490db: 8d 85 e4 fd ff ff lea eax,[ebp-0x21c];
80490e1: 89 4c 24 08 mov DWORD PTR [esp+0x8],ecx;
80490e5: 89 54 24 04 mov DWORD PTR [esp+0x4],edx;
80490e9: 89 04 24 mov DWORD PTR [esp],eax;
80490ec: e8 ef f5 ff ff call 80486e0 <memcpy@plt>;
80490f1: 8d 85 e4 fd ff ff lea eax,[ebp-0x21c];
80490f7: 8d 95 88 f9 ff ff lea edx,[ebp-0x678];
80490fd: 89 54 24 04 mov DWORD PTR [esp+0x4],edx;
8049101: 89 04 24 mov DWORD PTR [esp],eax;
8049104: e8 f7 0b 00 00 call 8049d00 <calloc@plt+0x14c0>;
8049109: 85 c0 test eax,eax;
804910b: 0f 85 cc 00 00 00 jne 80491dd <calloc@plt+0x99d>; ['if']
8049111: c7 04 24 89 9e 04 08 mov DWORD PTR [esp],0x8049e89;
8049118: e8 4c f8 ff ff call 8048969 <calloc@plt+0x129>;
804911d: c7 44 24 08 0a 00 00 00 mov DWORD PTR [esp+0x8],0xa;
8049125: c7 44 24 04 ff 00 00 00 mov DWORD PTR [esp+0x4],0xff;
804912d: 8d 85 e4 fe ff ff lea eax,[ebp-0x11c];
8049133: 89 04 24 mov DWORD PTR [esp],eax;
8049136: e8 c9 f7 ff ff call 8048904 <calloc@plt+0xc4>;
804913b: 8d 85 e4 fe ff ff lea eax,[ebp-0x11c];
8049141: 89 c2 mov edx,eax;
8049143: b8 97 9e 04 08 mov eax,0x8049e97;
8049148: b9 04 00 00 00 mov ecx,0x4;
804914d: 89 d6 mov esi,edx;
804914f: 89 c7 mov edi,eax;
8049151: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049153: 0f 97 c2 seta dl;
8049156: 0f 92 c0 setb al;
8049159: 89 d1 mov ecx,edx;
804915b: 28 c1 sub cl,al;
804915d: 89 c8 mov eax,ecx;
804915f: 0f be c0 movsx eax,al;
8049162: 85 c0 test eax,eax;
8049164: 0f 85 94 00 00 00 jne 80491fe <calloc@plt+0x9be>; ['if']
804916a: 8d 85 e4 fe ff ff lea eax,[ebp-0x11c];
8049170: 83 c0 05 add eax,0x5;
8049173: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
8049177: 8d 85 e4 fd ff ff lea eax,[ebp-0x21c];
804917d: 89 04 24 mov DWORD PTR [esp],eax;
8049180: e8 fb f5 ff ff call 8048780 <rename@plt>;
8049185: 89 85 e0 f9 ff ff mov DWORD PTR [ebp-0x620],eax;
804918b: 83 bd e0 f9 ff ff ff cmp DWORD PTR [ebp-0x620],0xffffffff;
8049192: 75 0e jne 80491a2 <calloc@plt+0x962>; ['if']
8049194: c7 04 24 9c 9e 04 08 mov DWORD PTR [esp],0x8049e9c;
804919b: e8 c9 f7 ff ff call 8048969 <calloc@plt+0x129>;
80491a0: eb 5d jmp 80491ff <calloc@plt+0x9bf>;
80491a2: b8 d0 9e 04 08 mov eax,0x8049ed0; ['end if']
80491a7: 8d 95 e4 fe ff ff lea edx,[ebp-0x11c];
80491ad: 89 54 24 0c mov DWORD PTR [esp+0xc],edx;
80491b1: 8d 95 e4 fd ff ff lea edx,[ebp-0x21c];
80491b7: 89 54 24 08 mov DWORD PTR [esp+0x8],edx;
80491bb: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
80491bf: 8d 85 e4 f9 ff ff lea eax,[ebp-0x61c];
80491c5: 89 04 24 mov DWORD PTR [esp],eax;
80491c8: e8 43 f6 ff ff call 8048810 <sprintf@plt>;
80491cd: 8d 85 e4 f9 ff ff lea eax,[ebp-0x61c];
80491d3: 89 04 24 mov DWORD PTR [esp],eax;
80491d6: e8 8e f7 ff ff call 8048969 <calloc@plt+0x129>;
80491db: eb 21 jmp 80491fe <calloc@plt+0x9be>;
80491dd: b8 e5 9e 04 08 mov eax,0x8049ee5; ['end if']
80491e2: 8d 95 e4 fd ff ff lea edx,[ebp-0x21c];
80491e8: 89 54 24 08 mov DWORD PTR [esp+0x8],edx;
80491ec: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
80491f0: 8d 85 e4 f9 ff ff lea eax,[ebp-0x61c];
80491f6: 89 04 24 mov DWORD PTR [esp],eax;
80491f9: e8 12 f6 ff ff call 8048810 <sprintf@plt>;
80491fe: 90 nop ; ['end if']
80491ff: 8b 75 e4 mov esi,DWORD PTR [ebp-0x1c];
8049202: 65 33 35 14 00 00 00 xor esi,DWORD PTR gs:0x14;
8049209: 74 05 je 8049210 <calloc@plt+0x9d0>; ['if']
804920b: e8 00 f5 ff ff call 8048710 <__stack_chk_fail@plt>;
8049210: 81 c4 8c 06 00 00 add esp,0x68c; ['end if']
8049216: 5b pop ebx;
8049217: 5e pop esi;
8049218: 5f pop edi;
8049219: 5d pop ebp;
804921a: c3 ret ;
------------------------------
------------------------------
804921b: 55 push ebp;
804921c: 89 e5 mov ebp,esp;
804921e: 83 ec 18 sub esp,0x18;
8049221: c7 04 24 f4 9e 04 08 mov DWORD PTR [esp],0x8049ef4;
8049228: e8 3c f7 ff ff call 8048969 <calloc@plt+0x129>;
804922d: c7 04 24 00 00 00 00 mov DWORD PTR [esp],0x0;
8049234: e8 37 f5 ff ff call 8048770 <exit@plt>;
8049239: 55 push ebp;
804923a: 89 e5 mov ebp,esp;
804923c: 57 push edi;
804923d: 56 push esi;
804923e: 81 ec b0 03 00 00 sub esp,0x3b0;
8049244: 8b 45 08 mov eax,DWORD PTR [ebp+0x8];
8049247: 89 85 74 fc ff ff mov DWORD PTR [ebp-0x38c],eax;
804924d: 65 a1 14 00 00 00 mov eax,gs:0x14;
8049253: 89 45 f4 mov DWORD PTR [ebp-0xc],eax;
8049256: 31 c0 xor eax,eax;
8049258: c7 44 24 04 fe 9e 04 08 mov DWORD PTR [esp+0x4],0x8049efe;
8049260: 8b 85 74 fc ff ff mov eax,DWORD PTR [ebp-0x38c];
8049266: 89 04 24 mov DWORD PTR [esp],eax;
8049269: e8 22 f4 ff ff call 8048690 <strstr@plt>;
804926e: 85 c0 test eax,eax;
8049270: 74 25 je 8049297 <calloc@plt+0xa57>; ['if']
8049272: 8d 85 84 fc ff ff lea eax,[ebp-0x37c];
8049278: 83 c0 0c add eax,0xc;
804927b: c7 00 2d 4e 69 63 mov DWORD PTR [eax],0x63694e2d;
8049281: c7 40 04 65 20 74 72 mov DWORD PTR [eax+0x4],0x72742065;
8049288: 66 c7 40 08 79 2e mov WORD PTR [eax+0x8],0x2e79;
804928e: c6 40 0a 00 mov BYTE PTR [eax+0xa],0x0;
8049292: e9 84 02 00 00 jmp 804951b <calloc@plt+0xcdb>;
8049297: 8b 85 74 fc ff ff mov eax,DWORD PTR [ebp-0x38c]; ['end if']
804929d: 89 04 24 mov DWORD PTR [esp],eax;
80492a0: e8 4b f5 ff ff call 80487f0 <__xpg_basename@plt>;
80492a5: 89 45 f0 mov DWORD PTR [ebp-0x10],eax;
80492a8: 8b 55 f0 mov edx,DWORD PTR [ebp-0x10];
80492ab: b8 03 9f 04 08 mov eax,0x8049f03;
80492b0: 89 54 24 10 mov DWORD PTR [esp+0x10],edx;
80492b4: c7 44 24 0c 08 9f 04 08 mov DWORD PTR [esp+0xc],0x8049f08;
80492bc: 89 44 24 08 mov DWORD PTR [esp+0x8],eax;
80492c0: c7 44 24 04 00 01 00 00 mov DWORD PTR [esp+0x4],0x100;
80492c8: 8d 85 84 fc ff ff lea eax,[ebp-0x37c];
80492ce: 05 0c 02 00 00 add eax,0x20c;
80492d3: 89 04 24 mov DWORD PTR [esp],eax;
80492d6: e8 05 f5 ff ff call 80487e0 <snprintf@plt>;
80492db: 8b 45 f0 mov eax,DWORD PTR [ebp-0x10];
80492de: 0f b6 00 movzx eax,BYTE PTR [eax];
80492e1: 3c 2e cmp al,0x2e;
80492e3: 75 11 jne 80492f6 <calloc@plt+0xab6>; ['if']
80492e5: c7 04 24 20 9f 04 08 mov DWORD PTR [esp],0x8049f20;
80492ec: e8 78 f6 ff ff call 8048969 <calloc@plt+0x129>;
80492f1: e9 37 02 00 00 jmp 804952d <calloc@plt+0xced>;
80492f6: 8b 85 74 fc ff ff mov eax,DWORD PTR [ebp-0x38c]; ['end if']
80492fc: 8d 95 84 fc ff ff lea edx,[ebp-0x37c];
8049302: 81 c2 0c 03 00 00 add edx,0x30c;
8049308: 89 54 24 04 mov DWORD PTR [esp+0x4],edx;
804930c: 89 04 24 mov DWORD PTR [esp],eax;
804930f: e8 ec 09 00 00 call 8049d00 <calloc@plt+0x14c0>;
8049314: 89 45 e8 mov DWORD PTR [ebp-0x18],eax;
8049317: 8b 45 e8 mov eax,DWORD PTR [ebp-0x18];
804931a: 85 c0 test eax,eax;
804931c: 0f 85 cf 01 00 00 jne 80494f1 <calloc@plt+0xcb1>; ['if']
8049322: 8b 55 bc mov edx,DWORD PTR [ebp-0x44];
8049325: b8 4c 9f 04 08 mov eax,0x8049f4c;
804932a: 89 54 24 08 mov DWORD PTR [esp+0x8],edx;
804932e: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
8049332: 8d 85 84 fc ff ff lea eax,[ebp-0x37c];
8049338: 05 0c 01 00 00 add eax,0x10c;
804933d: 89 04 24 mov DWORD PTR [esp],eax;
8049340: e8 cb f4 ff ff call 8048810 <sprintf@plt>;
8049345: 8d 85 84 fc ff ff lea eax,[ebp-0x37c];
804934b: 05 0c 01 00 00 add eax,0x10c;
8049350: 89 04 24 mov DWORD PTR [esp],eax;
8049353: e8 11 f6 ff ff call 8048969 <calloc@plt+0x129>;
8049358: c7 44 24 08 0a 00 00 00 mov DWORD PTR [esp+0x8],0xa;
8049360: c7 44 24 04 00 01 00 00 mov DWORD PTR [esp+0x4],0x100;
8049368: 8d 85 84 fc ff ff lea eax,[ebp-0x37c];
804936e: 05 0c 01 00 00 add eax,0x10c;
8049373: 89 04 24 mov DWORD PTR [esp],eax;
8049376: e8 89 f5 ff ff call 8048904 <calloc@plt+0xc4>;
804937b: 8d 85 84 fc ff ff lea eax,[ebp-0x37c];
8049381: 05 0c 01 00 00 add eax,0x10c;
8049386: 89 c2 mov edx,eax;
8049388: b8 4f 9f 04 08 mov eax,0x8049f4f;
804938d: b9 04 00 00 00 mov ecx,0x4;
8049392: 89 d6 mov esi,edx;
8049394: 89 c7 mov edi,eax;
8049396: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049398: 0f 97 c2 seta dl;
804939b: 0f 92 c0 setb al;
804939e: 89 d1 mov ecx,edx;
80493a0: 28 c1 sub cl,al;
80493a2: 89 c8 mov eax,ecx;
80493a4: 0f be c0 movsx eax,al;
80493a7: 85 c0 test eax,eax;
80493a9: 0f 85 e4 00 00 00 jne 8049493 <calloc@plt+0xc53>; ['if']
80493af: 8b 45 bc mov eax,DWORD PTR [ebp-0x44];
80493b2: 8d 50 0f lea edx,[eax+0xf];
80493b5: b8 10 00 00 00 mov eax,0x10;
80493ba: 83 e8 01 sub eax,0x1;
80493bd: 01 d0 add eax,edx;
80493bf: c7 85 70 fc ff ff 10 00 00 00 mov DWORD PTR [ebp-0x390],0x10;
80493c9: ba 00 00 00 00 mov edx,0x0;
80493ce: f7 b5 70 fc ff ff div DWORD PTR [ebp-0x390];
80493d4: 6b c0 10 imul eax,eax,0x10;
80493d7: 29 c4 sub esp,eax;
80493d9: 8d 44 24 14 lea eax,[esp+0x14];
80493dd: 83 c0 0f add eax,0xf;
80493e0: c1 e8 04 shr eax,0x4;
80493e3: c1 e0 04 shl eax,0x4;
80493e6: 89 85 88 fc ff ff mov DWORD PTR [ebp-0x378],eax;
80493ec: ba 54 9f 04 08 mov edx,0x8049f54;
80493f1: 8b 85 74 fc ff ff mov eax,DWORD PTR [ebp-0x38c];
80493f7: 89 54 24 04 mov DWORD PTR [esp+0x4],edx;
80493fb: 89 04 24 mov DWORD PTR [esp],eax;
80493fe: e8 cd f3 ff ff call 80487d0 <fopen@plt>;
8049403: 89 85 8c fc ff ff mov DWORD PTR [ebp-0x374],eax;
8049409: c7 85 84 fc ff ff 00 00 00 00 mov DWORD PTR [ebp-0x37c],0x0;
8049413: eb 23 jmp 8049438 <calloc@plt+0xbf8>;
8049415: 8b 95 88 fc ff ff mov edx,DWORD PTR [ebp-0x378]; ['while']
804941b: 8b 85 84 fc ff ff mov eax,DWORD PTR [ebp-0x37c];
8049421: 01 c2 add edx,eax;
8049423: 0f b6 45 ec movzx eax,BYTE PTR [ebp-0x14];
8049427: 88 02 mov BYTE PTR [edx],al;
8049429: 8b 85 84 fc ff ff mov eax,DWORD PTR [ebp-0x37c];
804942f: 83 c0 01 add eax,0x1;
8049432: 89 85 84 fc ff ff mov DWORD PTR [ebp-0x37c],eax;
8049438: 8b 85 8c fc ff ff mov eax,DWORD PTR [ebp-0x374];
804943e: 8d 95 84 fc ff ff lea edx,[ebp-0x37c];
8049444: 81 c2 68 03 00 00 add edx,0x368;
804944a: 89 44 24 0c mov DWORD PTR [esp+0xc],eax;
804944e: c7 44 24 08 01 00 00 00 mov DWORD PTR [esp+0x8],0x1;
8049456: c7 44 24 04 01 00 00 00 mov DWORD PTR [esp+0x4],0x1;
804945e: 89 14 24 mov DWORD PTR [esp],edx;
8049461: e8 ea f2 ff ff call 8048750 <fread@plt>;
8049466: 85 c0 test eax,eax;
8049468: 75 ab jne 8049415 <calloc@plt+0xbd5>; ['continue']
804946a: 8b 85 84 fc ff ff mov eax,DWORD PTR [ebp-0x37c]; ['end while']
8049470: 89 c2 mov edx,eax;
8049472: 8b 85 88 fc ff ff mov eax,DWORD PTR [ebp-0x378];
8049478: 89 54 24 08 mov DWORD PTR [esp+0x8],edx;
804947c: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
8049480: c7 04 24 01 00 00 00 mov DWORD PTR [esp],0x1;
8049487: e8 34 f3 ff ff call 80487c0 <write@plt>;
804948c: 90 nop ;
804948d: 90 nop ;
804948e: e9 99 00 00 00 jmp 804952c <calloc@plt+0xcec>;
8049493: 8d 85 84 fc ff ff lea eax,[ebp-0x37c]; ['end if']
8049499: 05 0c 01 00 00 add eax,0x10c;
804949e: 89 c2 mov edx,eax;
80494a0: b8 56 9f 04 08 mov eax,0x8049f56;
80494a5: b9 04 00 00 00 mov ecx,0x4;
80494aa: 89 d6 mov esi,edx;
80494ac: 89 c7 mov edi,eax;
80494ae: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
80494b0: 0f 97 c2 seta dl;
80494b3: 0f 92 c0 setb al;
80494b6: 89 d1 mov ecx,edx;
80494b8: 28 c1 sub cl,al;
80494ba: 89 c8 mov eax,ecx;
80494bc: 0f be c0 movsx eax,al;
80494bf: 85 c0 test eax,eax;
80494c1: 75 58 jne 804951b <calloc@plt+0xcdb>; ['if']
80494c3: b8 5b 9f 04 08 mov eax,0x8049f5b;
80494c8: 8d 95 84 fc ff ff lea edx,[ebp-0x37c];
80494ce: 83 c2 0c add edx,0xc;
80494d1: 8b 08 mov ecx,DWORD PTR [eax];
80494d3: 89 0a mov DWORD PTR [edx],ecx;
80494d5: 8b 48 04 mov ecx,DWORD PTR [eax+0x4];
80494d8: 89 4a 04 mov DWORD PTR [edx+0x4],ecx;
80494db: 8b 48 08 mov ecx,DWORD PTR [eax+0x8];
80494de: 89 4a 08 mov DWORD PTR [edx+0x8],ecx;
80494e1: 8b 48 0c mov ecx,DWORD PTR [eax+0xc];
80494e4: 89 4a 0c mov DWORD PTR [edx+0xc],ecx;
80494e7: 0f b7 40 10 movzx eax,WORD PTR [eax+0x10];
80494eb: 66 89 42 10 mov WORD PTR [edx+0x10],ax;
80494ef: eb 2a jmp 804951b <calloc@plt+0xcdb>;
80494f1: b8 6d 9f 04 08 mov eax,0x8049f6d; ['end if']
80494f6: 8d 95 84 fc ff ff lea edx,[ebp-0x37c];
80494fc: 83 c2 0c add edx,0xc;
80494ff: 8b 08 mov ecx,DWORD PTR [eax];
8049501: 89 0a mov DWORD PTR [edx],ecx;
8049503: 8b 48 04 mov ecx,DWORD PTR [eax+0x4];
8049506: 89 4a 04 mov DWORD PTR [edx+0x4],ecx;
8049509: 8b 48 08 mov ecx,DWORD PTR [eax+0x8];
804950c: 89 4a 08 mov DWORD PTR [edx+0x8],ecx;
804950f: 8b 48 0c mov ecx,DWORD PTR [eax+0xc];
8049512: 89 4a 0c mov DWORD PTR [edx+0xc],ecx;
8049515: 8b 40 10 mov eax,DWORD PTR [eax+0x10];
8049518: 89 42 10 mov DWORD PTR [edx+0x10],eax;
804951b: 8d 85 84 fc ff ff lea eax,[ebp-0x37c]; ['end if']
8049521: 83 c0 0c add eax,0xc;
8049524: 89 04 24 mov DWORD PTR [esp],eax;
8049527: e8 3d f4 ff ff call 8048969 <calloc@plt+0x129>;
804952c: 90 nop ;
804952d: 8b 75 f4 mov esi,DWORD PTR [ebp-0xc];
8049530: 65 33 35 14 00 00 00 xor esi,DWORD PTR gs:0x14;
8049537: 74 05 je 804953e <calloc@plt+0xcfe>; ['if']
8049539: e8 d2 f1 ff ff call 8048710 <__stack_chk_fail@plt>;
804953e: 8d 65 f8 lea esp,[ebp-0x8]; ['end if']
8049541: 5e pop esi;
8049542: 5f pop edi;
8049543: 5d pop ebp;
8049544: c3 ret ;
------------------------------
------------------------------
8049545: 55 push ebp;
8049546: 89 e5 mov ebp,esp;
8049548: 57 push edi;
8049549: 56 push esi;
804954a: 53 push ebx;
804954b: 81 ec 5c 02 00 00 sub esp,0x25c;
8049551: 8b 45 08 mov eax,DWORD PTR [ebp+0x8];
8049554: 89 85 c4 fd ff ff mov DWORD PTR [ebp-0x23c],eax;
804955a: 65 a1 14 00 00 00 mov eax,gs:0x14;
8049560: 89 45 e4 mov DWORD PTR [ebp-0x1c],eax;
8049563: 31 c0 xor eax,eax;
8049565: 8d 85 e4 fe ff ff lea eax,[ebp-0x11c];
804956b: 89 c3 mov ebx,eax;
804956d: b8 00 00 00 00 mov eax,0x0;
8049572: ba 40 00 00 00 mov edx,0x40;
8049577: 89 df mov edi,ebx;
8049579: 89 d1 mov ecx,edx;
804957b: f3 ab rep stos DWORD PTR es:[edi],eax;
804957d: 8b 85 c4 fd ff ff mov eax,DWORD PTR [ebp-0x23c];
8049583: 89 c2 mov edx,eax;
8049585: b8 81 9f 04 08 mov eax,0x8049f81;
804958a: b9 03 00 00 00 mov ecx,0x3;
804958f: 89 d6 mov esi,edx;
8049591: 89 c7 mov edi,eax;
8049593: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049595: 0f 97 c2 seta dl;
8049598: 0f 92 c0 setb al;
804959b: 89 d1 mov ecx,edx;
804959d: 28 c1 sub cl,al;
804959f: 89 c8 mov eax,ecx;
80495a1: 0f be c0 movsx eax,al;
80495a4: 85 c0 test eax,eax;
80495a6: 75 13 jne 80495bb <calloc@plt+0xd7b>; ['if']
80495a8: c7 04 24 88 9f 04 08 mov DWORD PTR [esp],0x8049f88;
80495af: e8 b5 f3 ff ff call 8048969 <calloc@plt+0x129>;
80495b4: 90 nop ;
80495b5: 90 nop ;
80495b6: e9 57 03 00 00 jmp 8049912 <calloc@plt+0x10d2>;
80495bb: 8b 85 c4 fd ff ff mov eax,DWORD PTR [ebp-0x23c]; ['end if']
80495c1: 89 c2 mov edx,eax;
80495c3: b8 b0 9f 04 08 mov eax,0x8049fb0;
80495c8: b9 03 00 00 00 mov ecx,0x3;
80495cd: 89 d6 mov esi,edx;
80495cf: 89 c7 mov edi,eax;
80495d1: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
80495d3: 0f 97 c2 seta dl;
80495d6: 0f 92 c0 setb al;
80495d9: 89 d1 mov ecx,edx;
80495db: 28 c1 sub cl,al;
80495dd: 89 c8 mov eax,ecx;
80495df: 0f be c0 movsx eax,al;
80495e2: 85 c0 test eax,eax;
80495e4: 0f 85 dd 00 00 00 jne 80496c7 <calloc@plt+0xe87>; ['if']
80495ea: 8b 85 c4 fd ff ff mov eax,DWORD PTR [ebp-0x23c];
80495f0: 83 c0 04 add eax,0x4;
80495f3: 89 85 d4 fd ff ff mov DWORD PTR [ebp-0x22c],eax;
80495f9: 8b 85 d4 fd ff ff mov eax,DWORD PTR [ebp-0x22c];
80495ff: 89 04 24 mov DWORD PTR [esp],eax;
8049602: e8 e9 f1 ff ff call 80487f0 <__xpg_basename@plt>;
8049607: 89 85 d8 fd ff ff mov DWORD PTR [ebp-0x228],eax;
804960d: b8 03 9f 04 08 mov eax,0x8049f03;
8049612: 8b 95 d8 fd ff ff mov edx,DWORD PTR [ebp-0x228];
8049618: 89 54 24 10 mov DWORD PTR [esp+0x10],edx;
804961c: c7 44 24 0c 08 9f 04 08 mov DWORD PTR [esp+0xc],0x8049f08;
8049624: 89 44 24 08 mov DWORD PTR [esp+0x8],eax;
8049628: c7 44 24 04 00 01 00 00 mov DWORD PTR [esp+0x4],0x100;
8049630: 8d 85 e4 fe ff ff lea eax,[ebp-0x11c];
8049636: 89 04 24 mov DWORD PTR [esp],eax;
8049639: e8 a2 f1 ff ff call 80487e0 <snprintf@plt>;
804963e: 8b 85 d8 fd ff ff mov eax,DWORD PTR [ebp-0x228];
8049644: 0f b6 00 movzx eax,BYTE PTR [eax];
8049647: 3c 2e cmp al,0x2e;
8049649: 75 11 jne 804965c <calloc@plt+0xe1c>; ['if']
804964b: c7 04 24 20 9f 04 08 mov DWORD PTR [esp],0x8049f20;
8049652: e8 12 f3 ff ff call 8048969 <calloc@plt+0x129>;
8049657: e9 b7 02 00 00 jmp 8049913 <calloc@plt+0x10d3>;
804965c: ba b4 9f 04 08 mov edx,0x8049fb4; ['end if']
8049661: 8d 85 e4 fe ff ff lea eax,[ebp-0x11c];
8049667: 89 54 24 04 mov DWORD PTR [esp+0x4],edx;
804966b: 89 04 24 mov DWORD PTR [esp],eax;
804966e: e8 5d f1 ff ff call 80487d0 <fopen@plt>;
8049673: 89 85 cc fd ff ff mov DWORD PTR [ebp-0x234],eax;
8049679: 83 bd cc fd ff ff 00 cmp DWORD PTR [ebp-0x234],0x0;
8049680: 75 11 jne 8049693 <calloc@plt+0xe53>; ['if']
8049682: c7 04 24 b6 9f 04 08 mov DWORD PTR [esp],0x8049fb6;
8049689: e8 db f2 ff ff call 8048969 <calloc@plt+0x129>;
804968e: e9 80 02 00 00 jmp 8049913 <calloc@plt+0x10d3>;
8049693: ba c9 9f 04 08 mov edx,0x8049fc9; ['end if']
8049698: 8d 85 e4 fd ff ff lea eax,[ebp-0x21c];
804969e: 8b 0a mov ecx,DWORD PTR [edx];
80496a0: 89 08 mov DWORD PTR [eax],ecx;
80496a2: 8b 4a 04 mov ecx,DWORD PTR [edx+0x4];
80496a5: 89 48 04 mov DWORD PTR [eax+0x4],ecx;
80496a8: 8b 4a 08 mov ecx,DWORD PTR [edx+0x8];
80496ab: 89 48 08 mov DWORD PTR [eax+0x8],ecx;
80496ae: 8b 4a 0c mov ecx,DWORD PTR [edx+0xc];
80496b1: 89 48 0c mov DWORD PTR [eax+0xc],ecx;
80496b4: 8b 4a 10 mov ecx,DWORD PTR [edx+0x10];
80496b7: 89 48 10 mov DWORD PTR [eax+0x10],ecx;
80496ba: 0f b7 52 14 movzx edx,WORD PTR [edx+0x14];
80496be: 66 89 50 14 mov WORD PTR [eax+0x14],dx;
80496c2: e9 14 01 00 00 jmp 80497db <calloc@plt+0xf9b>;
80496c7: 8b 85 c4 fd ff ff mov eax,DWORD PTR [ebp-0x23c]; ['end if']
80496cd: 89 c2 mov edx,eax;
80496cf: b8 df 9f 04 08 mov eax,0x8049fdf;
80496d4: b9 03 00 00 00 mov ecx,0x3;
80496d9: 89 d6 mov esi,edx;
80496db: 89 c7 mov edi,eax;
80496dd: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
80496df: 0f 97 c2 seta dl;
80496e2: 0f 92 c0 setb al;
80496e5: 89 d1 mov ecx,edx;
80496e7: 28 c1 sub cl,al;
80496e9: 89 c8 mov eax,ecx;
80496eb: 0f be c0 movsx eax,al;
80496ee: 85 c0 test eax,eax;
80496f0: 0f 85 d4 00 00 00 jne 80497ca <calloc@plt+0xf8a>; ['if']
80496f6: 8b 85 c4 fd ff ff mov eax,DWORD PTR [ebp-0x23c];
80496fc: 83 c0 04 add eax,0x4;
80496ff: 89 85 d4 fd ff ff mov DWORD PTR [ebp-0x22c],eax;
8049705: 8b 85 d4 fd ff ff mov eax,DWORD PTR [ebp-0x22c];
804970b: 89 04 24 mov DWORD PTR [esp],eax;
804970e: e8 dd f0 ff ff call 80487f0 <__xpg_basename@plt>;
8049713: 89 85 d8 fd ff ff mov DWORD PTR [ebp-0x228],eax;
8049719: b8 03 9f 04 08 mov eax,0x8049f03;
804971e: 8b 95 d8 fd ff ff mov edx,DWORD PTR [ebp-0x228];
8049724: 89 54 24 10 mov DWORD PTR [esp+0x10],edx;
8049728: c7 44 24 0c 08 9f 04 08 mov DWORD PTR [esp+0xc],0x8049f08;
8049730: 89 44 24 08 mov DWORD PTR [esp+0x8],eax;
8049734: c7 44 24 04 00 01 00 00 mov DWORD PTR [esp+0x4],0x100;
804973c: 8d 85 e4 fe ff ff lea eax,[ebp-0x11c];
8049742: 89 04 24 mov DWORD PTR [esp],eax;
8049745: e8 96 f0 ff ff call 80487e0 <snprintf@plt>;
804974a: 8b 85 d8 fd ff ff mov eax,DWORD PTR [ebp-0x228];
8049750: 0f b6 00 movzx eax,BYTE PTR [eax];
8049753: 3c 2e cmp al,0x2e;
8049755: 75 11 jne 8049768 <calloc@plt+0xf28>; ['if']
8049757: c7 04 24 20 9f 04 08 mov DWORD PTR [esp],0x8049f20;
804975e: e8 06 f2 ff ff call 8048969 <calloc@plt+0x129>;
8049763: e9 ab 01 00 00 jmp 8049913 <calloc@plt+0x10d3>;
8049768: ba e3 9f 04 08 mov edx,0x8049fe3; ['end if']
804976d: 8d 85 e4 fe ff ff lea eax,[ebp-0x11c];
8049773: 89 54 24 04 mov DWORD PTR [esp+0x4],edx;
8049777: 89 04 24 mov DWORD PTR [esp],eax;
804977a: e8 51 f0 ff ff call 80487d0 <fopen@plt>;
804977f: 89 85 cc fd ff ff mov DWORD PTR [ebp-0x234],eax;
8049785: 83 bd cc fd ff ff 00 cmp DWORD PTR [ebp-0x234],0x0;
804978c: 75 11 jne 804979f <calloc@plt+0xf5f>; ['if']
804978e: c7 04 24 b6 9f 04 08 mov DWORD PTR [esp],0x8049fb6;
8049795: e8 cf f1 ff ff call 8048969 <calloc@plt+0x129>;
804979a: e9 74 01 00 00 jmp 8049913 <calloc@plt+0x10d3>;
804979f: b8 e5 9f 04 08 mov eax,0x8049fe5; ['end if']
80497a4: 8b 95 d4 fd ff ff mov edx,DWORD PTR [ebp-0x22c];
80497aa: 89 54 24 0c mov DWORD PTR [esp+0xc],edx;
80497ae: 89 44 24 08 mov DWORD PTR [esp+0x8],eax;
80497b2: c7 44 24 04 00 01 00 00 mov DWORD PTR [esp+0x4],0x100;
80497ba: 8d 85 e4 fd ff ff lea eax,[ebp-0x21c];
80497c0: 89 04 24 mov DWORD PTR [esp],eax;
80497c3: e8 18 f0 ff ff call 80487e0 <snprintf@plt>;
80497c8: eb 11 jmp 80497db <calloc@plt+0xf9b>;
80497ca: c7 04 24 f8 9f 04 08 mov DWORD PTR [esp],0x8049ff8; ['end if']
80497d1: e8 93 f1 ff ff call 8048969 <calloc@plt+0x129>;
80497d6: e9 38 01 00 00 jmp 8049913 <calloc@plt+0x10d3>;
80497db: 8d 85 e4 fd ff ff lea eax,[ebp-0x21c];
80497e1: 89 04 24 mov DWORD PTR [esp],eax;
80497e4: e8 80 f1 ff ff call 8048969 <calloc@plt+0x129>;
80497e9: c7 44 24 08 0a 00 00 00 mov DWORD PTR [esp+0x8],0xa;
80497f1: c7 44 24 04 00 01 00 00 mov DWORD PTR [esp+0x4],0x100;
80497f9: 8d 85 e4 fd ff ff lea eax,[ebp-0x21c];
80497ff: 89 04 24 mov DWORD PTR [esp],eax;
8049802: e8 fd f0 ff ff call 8048904 <calloc@plt+0xc4>;
8049807: 8d 85 e4 fd ff ff lea eax,[ebp-0x21c];
804980d: 89 c2 mov edx,eax;
804980f: b8 ff 9f 04 08 mov eax,0x8049fff;
8049814: b9 04 00 00 00 mov ecx,0x4;
8049819: 89 d6 mov esi,edx;
804981b: 89 c7 mov edi,eax;
804981d: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
804981f: 0f 97 c2 seta dl;
8049822: 0f 92 c0 setb al;
8049825: 89 d1 mov ecx,edx;
8049827: 28 c1 sub cl,al;
8049829: 89 c8 mov eax,ecx;
804982b: 0f be c0 movsx eax,al;
804982e: 85 c0 test eax,eax;
8049830: 0f 85 ce 00 00 00 jne 8049904 <calloc@plt+0x10c4>; ['if']
8049836: 8d 85 e4 fd ff ff lea eax,[ebp-0x21c];
804983c: 83 c0 05 add eax,0x5;
804983f: c7 44 24 08 0a 00 00 00 mov DWORD PTR [esp+0x8],0xa;
8049847: c7 44 24 04 00 00 00 00 mov DWORD PTR [esp+0x4],0x0;
804984f: 89 04 24 mov DWORD PTR [esp],eax;
8049852: e8 39 ef ff ff call 8048790 <strtoul@plt>;
8049857: 89 85 dc fd ff ff mov DWORD PTR [ebp-0x224],eax;
804985d: 81 bd dc fd ff ff 00 10 00 00 cmp DWORD PTR [ebp-0x224],0x1000;
8049867: 76 28 jbe 8049891 <calloc@plt+0x1051>; ['if']
8049869: b8 04 a0 04 08 mov eax,0x804a004;
804986e: 8b 95 dc fd ff ff mov edx,DWORD PTR [ebp-0x224];
8049874: 89 54 24 04 mov DWORD PTR [esp+0x4],edx;
8049878: 89 04 24 mov DWORD PTR [esp],eax;
804987b: e8 30 ee ff ff call 80486b0 <printf@plt>;
8049880: c7 04 24 10 a0 04 08 mov DWORD PTR [esp],0x804a010;
8049887: e8 dd f0 ff ff call 8048969 <calloc@plt+0x129>;
804988c: e9 82 00 00 00 jmp 8049913 <calloc@plt+0x10d3>;
8049891: c7 04 24 35 a0 04 08 mov DWORD PTR [esp],0x804a035; ['end if']
8049898: e8 cc f0 ff ff call 8048969 <calloc@plt+0x129>;
804989d: c7 85 d0 fd ff ff 00 00 00 00 mov DWORD PTR [ebp-0x230],0x0;
80498a7: eb 4d jmp 80498f6 <calloc@plt+0x10b6>;
80498a9: c7 44 24 08 01 00 00 00 mov DWORD PTR [esp+0x8],0x1; ['while']
80498b1: 8d 85 e3 fd ff ff lea eax,[ebp-0x21d];
80498b7: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
80498bb: c7 04 24 00 00 00 00 mov DWORD PTR [esp],0x0;
80498c2: e8 d9 ed ff ff call 80486a0 <read@plt>;
80498c7: 8d 85 e3 fd ff ff lea eax,[ebp-0x21d];
80498cd: 8b 95 cc fd ff ff mov edx,DWORD PTR [ebp-0x234];
80498d3: 89 54 24 0c mov DWORD PTR [esp+0xc],edx;
80498d7: c7 44 24 08 01 00 00 00 mov DWORD PTR [esp+0x8],0x1;
80498df: c7 44 24 04 01 00 00 00 mov DWORD PTR [esp+0x4],0x1;
80498e7: 89 04 24 mov DWORD PTR [esp],eax;
80498ea: e8 51 ee ff ff call 8048740 <fwrite@plt>;
80498ef: 83 85 d0 fd ff ff 01 add DWORD PTR [ebp-0x230],0x1;
80498f6: 8b 85 d0 fd ff ff mov eax,DWORD PTR [ebp-0x230];
80498fc: 3b 85 dc fd ff ff cmp eax,DWORD PTR [ebp-0x224];
8049902: 72 a5 jb 80498a9 <calloc@plt+0x1069>; ['continue']
8049904: 8b 85 cc fd ff ff mov eax,DWORD PTR [ebp-0x234]; ['end while', 'end if']
804990a: 89 04 24 mov DWORD PTR [esp],eax;
804990d: e8 de ed ff ff call 80486f0 <fclose@plt>;
8049912: 90 nop ;
8049913: 8b 75 e4 mov esi,DWORD PTR [ebp-0x1c];
8049916: 65 33 35 14 00 00 00 xor esi,DWORD PTR gs:0x14;
804991d: 74 05 je 8049924 <calloc@plt+0x10e4>; ['if']
804991f: e8 ec ed ff ff call 8048710 <__stack_chk_fail@plt>;
8049924: 81 c4 5c 02 00 00 add esp,0x25c; ['end if']
804992a: 5b pop ebx;
804992b: 5e pop esi;
804992c: 5f pop edi;
804992d: 5d pop ebp;
804992e: c3 ret ;
------------------------------
------------------------------
804992f: 55 push ebp;
8049930: 89 e5 mov ebp,esp;
8049932: 57 push edi;
8049933: 56 push esi;
8049934: 53 push ebx;
8049935: 83 e4 f0 and esp,0xfffffff0;
8049938: 81 ec 30 01 00 00 sub esp,0x130;
804993e: 8b 45 0c mov eax,DWORD PTR [ebp+0xc];
8049941: 89 44 24 1c mov DWORD PTR [esp+0x1c],eax;
8049945: 65 a1 14 00 00 00 mov eax,gs:0x14;
804994b: 89 84 24 2c 01 00 00 mov DWORD PTR [esp+0x12c],eax;
8049952: 31 c0 xor eax,eax;
8049954: c7 04 24 4c a0 04 08 mov DWORD PTR [esp],0x804a04c;
804995b: e8 09 f0 ff ff call 8048969 <calloc@plt+0x129>;
8049960: c7 04 24 76 a0 04 08 mov DWORD PTR [esp],0x804a076;
8049967: e8 94 ed ff ff call 8048700 <chdir@plt>;
804996c: eb 01 jmp 804996f <calloc@plt+0x112f>;
804996e: 90 nop ; ['while']
804996f: 8d 44 24 2c lea eax,[esp+0x2c];
8049973: 89 c3 mov ebx,eax;
8049975: b8 00 00 00 00 mov eax,0x0;
804997a: ba 40 00 00 00 mov edx,0x40;
804997f: 89 df mov edi,ebx;
8049981: 89 d1 mov ecx,edx;
8049983: f3 ab rep stos DWORD PTR es:[edi],eax;
8049985: c7 44 24 08 0a 00 00 00 mov DWORD PTR [esp+0x8],0xa;
804998d: c7 44 24 04 00 01 00 00 mov DWORD PTR [esp+0x4],0x100;
8049995: 8d 44 24 2c lea eax,[esp+0x2c];
8049999: 89 04 24 mov DWORD PTR [esp],eax;
804999c: e8 63 ef ff ff call 8048904 <calloc@plt+0xc4>;
80499a1: 89 44 24 28 mov DWORD PTR [esp+0x28],eax;
80499a5: 8d 44 24 2c lea eax,[esp+0x2c];
80499a9: 89 c2 mov edx,eax;
80499ab: b8 8a a0 04 08 mov eax,0x804a08a;
80499b0: b9 04 00 00 00 mov ecx,0x4;
80499b5: 89 d6 mov esi,edx;
80499b7: 89 c7 mov edi,eax;
80499b9: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
80499bb: 0f 97 c2 seta dl;
80499be: 0f 92 c0 setb al;
80499c1: 89 d1 mov ecx,edx;
80499c3: 28 c1 sub cl,al;
80499c5: 89 c8 mov eax,ecx;
80499c7: 0f be c0 movsx eax,al;
80499ca: 85 c0 test eax,eax;
80499cc: 75 14 jne 80499e2 <calloc@plt+0x11a2>; ['if']
80499ce: 8d 44 24 2c lea eax,[esp+0x2c];
80499d2: 83 c0 05 add eax,0x5;
80499d5: 89 04 24 mov DWORD PTR [esp],eax;
80499d8: e8 08 f0 ff ff call 80489e5 <calloc@plt+0x1a5>;
80499dd: e9 7e 02 00 00 jmp 8049c60 <calloc@plt+0x1420>;
80499e2: 8d 44 24 2c lea eax,[esp+0x2c]; ['end if']
80499e6: 89 c2 mov edx,eax;
80499e8: b8 8f a0 04 08 mov eax,0x804a08f;
80499ed: b9 04 00 00 00 mov ecx,0x4;
80499f2: 89 d6 mov esi,edx;
80499f4: 89 c7 mov edi,eax;
80499f6: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
80499f8: 0f 97 c2 seta dl;
80499fb: 0f 92 c0 setb al;
80499fe: 89 d1 mov ecx,edx;
8049a00: 28 c1 sub cl,al;
8049a02: 89 c8 mov eax,ecx;
8049a04: 0f be c0 movsx eax,al;
8049a07: 85 c0 test eax,eax;
8049a09: 75 14 jne 8049a1f <calloc@plt+0x11df>; ['if']
8049a0b: 8d 44 24 2c lea eax,[esp+0x2c];
8049a0f: 83 c0 05 add eax,0x5;
8049a12: 89 04 24 mov DWORD PTR [esp],eax;
8049a15: e8 94 f0 ff ff call 8048aae <calloc@plt+0x26e>;
8049a1a: e9 41 02 00 00 jmp 8049c60 <calloc@plt+0x1420>;
8049a1f: 8d 44 24 2c lea eax,[esp+0x2c]; ['end if']
8049a23: 89 c2 mov edx,eax;
8049a25: b8 94 a0 04 08 mov eax,0x804a094;
8049a2a: b9 04 00 00 00 mov ecx,0x4;
8049a2f: 89 d6 mov esi,edx;
8049a31: 89 c7 mov edi,eax;
8049a33: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049a35: 0f 97 c2 seta dl;
8049a38: 0f 92 c0 setb al;
8049a3b: 89 d1 mov ecx,edx;
8049a3d: 28 c1 sub cl,al;
8049a3f: 89 c8 mov eax,ecx;
8049a41: 0f be c0 movsx eax,al;
8049a44: 85 c0 test eax,eax;
8049a46: 75 14 jne 8049a5c <calloc@plt+0x121c>; ['if']
8049a48: 8d 44 24 2c lea eax,[esp+0x2c];
8049a4c: 83 c0 05 add eax,0x5;
8049a4f: 89 04 24 mov DWORD PTR [esp],eax;
8049a52: e8 6b f0 ff ff call 8048ac2 <calloc@plt+0x282>;
8049a57: e9 04 02 00 00 jmp 8049c60 <calloc@plt+0x1420>;
8049a5c: 8d 44 24 2c lea eax,[esp+0x2c]; ['end if']
8049a60: 89 c2 mov edx,eax;
8049a62: b8 99 a0 04 08 mov eax,0x804a099;
8049a67: b9 04 00 00 00 mov ecx,0x4;
8049a6c: 89 d6 mov esi,edx;
8049a6e: 89 c7 mov edi,eax;
8049a70: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049a72: 0f 97 c2 seta dl;
8049a75: 0f 92 c0 setb al;
8049a78: 89 d1 mov ecx,edx;
8049a7a: 28 c1 sub cl,al;
8049a7c: 89 c8 mov eax,ecx;
8049a7e: 0f be c0 movsx eax,al;
8049a81: 85 c0 test eax,eax;
8049a83: 75 14 jne 8049a99 <calloc@plt+0x1259>; ['if']
8049a85: 8d 44 24 2c lea eax,[esp+0x2c];
8049a89: 83 c0 05 add eax,0x5;
8049a8c: 89 04 24 mov DWORD PTR [esp],eax;
8049a8f: e8 87 f7 ff ff call 804921b <calloc@plt+0x9db>;
8049a94: e9 c7 01 00 00 jmp 8049c60 <calloc@plt+0x1420>;
8049a99: 0f b6 05 8c c0 04 08 movzx eax,BYTE PTR ds:0x804c08c; ['end if']
8049aa0: 3c 01 cmp al,0x1;
8049aa2: 0f 85 8a 01 00 00 jne 8049c32 <calloc@plt+0x13f2>; ['if']
8049aa8: 8d 44 24 2c lea eax,[esp+0x2c];
8049aac: 89 c2 mov edx,eax;
8049aae: b8 9e a0 04 08 mov eax,0x804a09e;
8049ab3: b9 04 00 00 00 mov ecx,0x4;
8049ab8: 89 d6 mov esi,edx;
8049aba: 89 c7 mov edi,eax;
8049abc: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049abe: 0f 97 c2 seta dl;
8049ac1: 0f 92 c0 setb al;
8049ac4: 89 d1 mov ecx,edx;
8049ac6: 28 c1 sub cl,al;
8049ac8: 89 c8 mov eax,ecx;
8049aca: 0f be c0 movsx eax,al;
8049acd: 85 c0 test eax,eax;
8049acf: 75 0f jne 8049ae0 <calloc@plt+0x12a0>; ['if']
8049ad1: 8d 44 24 2c lea eax,[esp+0x2c];
8049ad5: 83 c0 05 add eax,0x5;
8049ad8: 89 04 24 mov DWORD PTR [esp],eax;
8049adb: e8 46 f1 ff ff call 8048c26 <calloc@plt+0x3e6>;
8049ae0: 8d 44 24 2c lea eax,[esp+0x2c]; ['end if']
8049ae4: 89 c2 mov edx,eax;
8049ae6: b8 a3 a0 04 08 mov eax,0x804a0a3;
8049aeb: b9 04 00 00 00 mov ecx,0x4;
8049af0: 89 d6 mov esi,edx;
8049af2: 89 c7 mov edi,eax;
8049af4: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049af6: 0f 97 c2 seta dl;
8049af9: 0f 92 c0 setb al;
8049afc: 89 d1 mov ecx,edx;
8049afe: 28 c1 sub cl,al;
8049b00: 89 c8 mov eax,ecx;
8049b02: 0f be c0 movsx eax,al;
8049b05: 85 c0 test eax,eax;
8049b07: 75 0f jne 8049b18 <calloc@plt+0x12d8>; ['if']
8049b09: 8d 44 24 2c lea eax,[esp+0x2c];
8049b0d: 83 c0 05 add eax,0x5;
8049b10: 89 04 24 mov DWORD PTR [esp],eax;
8049b13: e8 04 f2 ff ff call 8048d1c <calloc@plt+0x4dc>;
8049b18: 8d 44 24 2c lea eax,[esp+0x2c]; ['end if']
8049b1c: 89 c2 mov edx,eax;
8049b1e: b8 a8 a0 04 08 mov eax,0x804a0a8;
8049b23: b9 04 00 00 00 mov ecx,0x4;
8049b28: 89 d6 mov esi,edx;
8049b2a: 89 c7 mov edi,eax;
8049b2c: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049b2e: 0f 97 c2 seta dl;
8049b31: 0f 92 c0 setb al;
8049b34: 89 d1 mov ecx,edx;
8049b36: 28 c1 sub cl,al;
8049b38: 89 c8 mov eax,ecx;
8049b3a: 0f be c0 movsx eax,al;
8049b3d: 85 c0 test eax,eax;
8049b3f: 75 0f jne 8049b50 <calloc@plt+0x1310>; ['if']
8049b41: 8d 44 24 2c lea eax,[esp+0x2c];
8049b45: 83 c0 05 add eax,0x5;
8049b48: 89 04 24 mov DWORD PTR [esp],eax;
8049b4b: e8 38 f4 ff ff call 8048f88 <calloc@plt+0x748>;
8049b50: 8d 44 24 2c lea eax,[esp+0x2c]; ['end if']
8049b54: 89 c2 mov edx,eax;
8049b56: b8 ad a0 04 08 mov eax,0x804a0ad;
8049b5b: b9 04 00 00 00 mov ecx,0x4;
8049b60: 89 d6 mov esi,edx;
8049b62: 89 c7 mov edi,eax;
8049b64: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049b66: 0f 97 c2 seta dl;
8049b69: 0f 92 c0 setb al;
8049b6c: 89 d1 mov ecx,edx;
8049b6e: 28 c1 sub cl,al;
8049b70: 89 c8 mov eax,ecx;
8049b72: 0f be c0 movsx eax,al;
8049b75: 85 c0 test eax,eax;
8049b77: 75 0f jne 8049b88 <calloc@plt+0x1348>; ['if']
8049b79: 8d 44 24 2c lea eax,[esp+0x2c];
8049b7d: 83 c0 05 add eax,0x5;
8049b80: 89 04 24 mov DWORD PTR [esp],eax;
8049b83: e8 14 f4 ff ff call 8048f9c <calloc@plt+0x75c>;
8049b88: 8d 44 24 2c lea eax,[esp+0x2c]; ['end if']
8049b8c: 89 c2 mov edx,eax;
8049b8e: b8 b2 a0 04 08 mov eax,0x804a0b2;
8049b93: b9 04 00 00 00 mov ecx,0x4;
8049b98: 89 d6 mov esi,edx;
8049b9a: 89 c7 mov edi,eax;
8049b9c: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049b9e: 0f 97 c2 seta dl;
8049ba1: 0f 92 c0 setb al;
8049ba4: 89 d1 mov ecx,edx;
8049ba6: 28 c1 sub cl,al;
8049ba8: 89 c8 mov eax,ecx;
8049baa: 0f be c0 movsx eax,al;
8049bad: 85 c0 test eax,eax;
8049baf: 75 0f jne 8049bc0 <calloc@plt+0x1380>; ['if']
8049bb1: 8d 44 24 2c lea eax,[esp+0x2c];
8049bb5: 83 c0 05 add eax,0x5;
8049bb8: 89 04 24 mov DWORD PTR [esp],eax;
8049bbb: e8 9d f4 ff ff call 804905d <calloc@plt+0x81d>;
8049bc0: 8d 44 24 2c lea eax,[esp+0x2c]; ['end if']
8049bc4: 89 c2 mov edx,eax;
8049bc6: b8 b7 a0 04 08 mov eax,0x804a0b7;
8049bcb: b9 04 00 00 00 mov ecx,0x4;
8049bd0: 89 d6 mov esi,edx;
8049bd2: 89 c7 mov edi,eax;
8049bd4: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049bd6: 0f 97 c2 seta dl;
8049bd9: 0f 92 c0 setb al;
8049bdc: 89 d1 mov ecx,edx;
8049bde: 28 c1 sub cl,al;
8049be0: 89 c8 mov eax,ecx;
8049be2: 0f be c0 movsx eax,al;
8049be5: 85 c0 test eax,eax;
8049be7: 75 0f jne 8049bf8 <calloc@plt+0x13b8>; ['if']
8049be9: 8d 44 24 2c lea eax,[esp+0x2c];
8049bed: 83 c0 05 add eax,0x5;
8049bf0: 89 04 24 mov DWORD PTR [esp],eax;
8049bf3: e8 41 f6 ff ff call 8049239 <calloc@plt+0x9f9>;
8049bf8: 8d 44 24 2c lea eax,[esp+0x2c]; ['end if']
8049bfc: 89 c2 mov edx,eax;
8049bfe: b8 bc a0 04 08 mov eax,0x804a0bc;
8049c03: b9 04 00 00 00 mov ecx,0x4;
8049c08: 89 d6 mov esi,edx;
8049c0a: 89 c7 mov edi,eax;
8049c0c: f3 a6 repz cmps BYTE PTR ds:[esi],BYTE PTR es:[edi];
8049c0e: 0f 97 c2 seta dl;
8049c11: 0f 92 c0 setb al;
8049c14: 89 d1 mov ecx,edx;
8049c16: 28 c1 sub cl,al;
8049c18: 89 c8 mov eax,ecx;
8049c1a: 0f be c0 movsx eax,al;
8049c1d: 85 c0 test eax,eax;
8049c1f: 75 1d jne 8049c3e <calloc@plt+0x13fe>; ['if']
8049c21: 8d 44 24 2c lea eax,[esp+0x2c];
8049c25: 83 c0 05 add eax,0x5;
8049c28: 89 04 24 mov DWORD PTR [esp],eax;
8049c2b: e8 15 f9 ff ff call 8049545 <calloc@plt+0xd05>;
8049c30: eb 0c jmp 8049c3e <calloc@plt+0x13fe>;
8049c32: c7 04 24 c1 a0 04 08 mov DWORD PTR [esp],0x804a0c1; ['end if']
8049c39: e8 2b ed ff ff call 8048969 <calloc@plt+0x129>;
8049c3e: 83 7c 24 28 00 cmp DWORD PTR [esp+0x28],0x0; ['end if']
8049c43: 0f 85 25 fd ff ff jne 804996e <calloc@plt+0x112e>; ['continue']
8049c49: b8 00 00 00 00 mov eax,0x0;
8049c4e: 8b b4 24 2c 01 00 00 mov esi,DWORD PTR [esp+0x12c];
8049c55: 65 33 35 14 00 00 00 xor esi,DWORD PTR gs:0x14;
8049c5c: 74 0c je 8049c6a <calloc@plt+0x142a>;
8049c5e: eb 05 jmp 8049c65 <calloc@plt+0x1425>; ['break']
8049c60: e9 09 fd ff ff jmp 804996e <calloc@plt+0x112e>; ['continue']
8049c65: e8 a6 ea ff ff call 8048710 <__stack_chk_fail@plt>; ['end while']
8049c6a: 8d 65 f4 lea esp,[ebp-0xc];
8049c6d: 5b pop ebx;
8049c6e: 5e pop esi;
8049c6f: 5f pop edi;
8049c70: 5d pop ebp;
8049c71: c3 ret ;
------------------------------
------------------------------
8049c72: 90 nop ;
8049c73: 90 nop ;
8049c74: 90 nop ;
8049c75: 90 nop ;
8049c76: 90 nop ;
8049c77: 90 nop ;
8049c78: 90 nop ;
8049c79: 90 nop ;
8049c7a: 90 nop ;
8049c7b: 90 nop ;
8049c7c: 90 nop ;
8049c7d: 90 nop ;
8049c7e: 90 nop ;
8049c7f: 90 nop ;
8049c80: 55 push ebp;
8049c81: 57 push edi;
8049c82: 56 push esi;
8049c83: 53 push ebx;
8049c84: e8 69 00 00 00 call 8049cf2 <calloc@plt+0x14b2>;
8049c89: 81 c3 6b 23 00 00 add ebx,0x236b;
8049c8f: 83 ec 1c sub esp,0x1c;
8049c92: 8b 6c 24 30 mov ebp,DWORD PTR [esp+0x30];
8049c96: 8d bb 20 ff ff ff lea edi,[ebx-0xe0];
8049c9c: e8 a3 e9 ff ff call 8048644 <strstr@plt-0x4c>;
8049ca1: 8d 83 20 ff ff ff lea eax,[ebx-0xe0];
8049ca7: 29 c7 sub edi,eax;
8049ca9: c1 ff 02 sar edi,0x2;
8049cac: 85 ff test edi,edi;
8049cae: 74 29 je 8049cd9 <calloc@plt+0x1499>; ['if']
8049cb0: 31 f6 xor esi,esi;
8049cb2: 8d b6 00 00 00 00 lea esi,[esi+0x0];
8049cb8: 8b 44 24 38 mov eax,DWORD PTR [esp+0x38]; ['while']
8049cbc: 89 2c 24 mov DWORD PTR [esp],ebp;
8049cbf: 89 44 24 08 mov DWORD PTR [esp+0x8],eax;
8049cc3: 8b 44 24 34 mov eax,DWORD PTR [esp+0x34];
8049cc7: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
8049ccb: ff 94 b3 20 ff ff ff call DWORD PTR [ebx+esi*4-0xe0];
8049cd2: 83 c6 01 add esi,0x1;
8049cd5: 39 fe cmp esi,edi;
8049cd7: 75 df jne 8049cb8 <calloc@plt+0x1478>; ['continue']
8049cd9: 83 c4 1c add esp,0x1c; ['end while', 'end if']
8049cdc: 5b pop ebx;
8049cdd: 5e pop esi;
8049cde: 5f pop edi;
8049cdf: 5d pop ebp;
8049ce0: c3 ret ;
------------------------------
------------------------------
8049ce1: eb 0d jmp 8049cf0 <calloc@plt+0x14b0>;
8049ce3: 90 nop ;
8049ce4: 90 nop ;
8049ce5: 90 nop ;
8049ce6: 90 nop ;
8049ce7: 90 nop ;
8049ce8: 90 nop ;
8049ce9: 90 nop ;
8049cea: 90 nop ;
8049ceb: 90 nop ;
8049cec: 90 nop ;
8049ced: 90 nop ;
8049cee: 90 nop ;
8049cef: 90 nop ;
8049cf0: f3 c3 repz ret ;
8049cf2: 8b 1c 24 mov ebx,DWORD PTR [esp];
8049cf5: c3 ret ;
------------------------------
------------------------------
8049cf6: 90 nop ;
8049cf7: 90 nop ;
8049cf8: 90 nop ;
8049cf9: 90 nop ;
8049cfa: 90 nop ;
8049cfb: 90 nop ;
8049cfc: 90 nop ;
8049cfd: 90 nop ;
8049cfe: 90 nop ;
8049cff: 90 nop ;
8049d00: 53 push ebx;
8049d01: 83 ec 18 sub esp,0x18;
8049d04: 8b 44 24 24 mov eax,DWORD PTR [esp+0x24];
8049d08: e8 e5 ff ff ff call 8049cf2 <calloc@plt+0x14b2>;
8049d0d: 81 c3 e7 22 00 00 add ebx,0x22e7;
8049d13: c7 04 24 03 00 00 00 mov DWORD PTR [esp],0x3;
8049d1a: 89 44 24 08 mov DWORD PTR [esp+0x8],eax;
8049d1e: 8b 44 24 20 mov eax,DWORD PTR [esp+0x20];
8049d22: 89 44 24 04 mov DWORD PTR [esp+0x4],eax;
8049d26: e8 05 ea ff ff call 8048730 <__xstat@plt>;
8049d2b: 83 c4 18 add esp,0x18;
8049d2e: 5b pop ebx;
8049d2f: c3 ret ;
------------------------------
------------------------------
8049d30: 55 push ebp;
8049d31: 89 e5 mov ebp,esp;
8049d33: 53 push ebx;
8049d34: 83 ec 04 sub esp,0x4;
8049d37: a1 14 bf 04 08 mov eax,ds:0x804bf14;
8049d3c: 83 f8 ff cmp eax,0xffffffff;
8049d3f: 74 13 je 8049d54 <calloc@plt+0x1514>; ['if']
8049d41: bb 14 bf 04 08 mov ebx,0x804bf14;
8049d46: 66 90 xchg ax,ax;
8049d48: 83 eb 04 sub ebx,0x4; ['while']
8049d4b: ff d0 call eax;
8049d4d: 8b 03 mov eax,DWORD PTR [ebx];
8049d4f: 83 f8 ff cmp eax,0xffffffff;
8049d52: 75 f4 jne 8049d48 <calloc@plt+0x1508>; ['continue']
8049d54: 83 c4 04 add esp,0x4; ['end while', 'end if']
8049d57: 5b pop ebx;
8049d58: 5d pop ebp;
8049d59: c3 ret ;
#coding=utf-8
import sys,os
import re
from collections import namedtuple
from itertools import *
class Asm(object):
def __init__(self,address,binary,opecode,operand):
self.address = address
self.binary = binary
self.opecode = opecode
self.operand = operand
self.indent = 0
self.comment = ''
self.attribute = []
def next_address(self):
return self.address + len(self.binary)
def __str__(self):
indent = ' ' * self.indent
address = "%x" % self.address
binary = ' '.join(['%02x' % i for i in self.binary])
opecode = self.opecode if self.opecode is not None else ''
operand = self.operand if self.operand is not None else ''
comment = self.comment if self.comment is not None else ''
attribute = str(self.attribute) if len(self.attribute) != 0 else ''
return "%s%s:\t%-22s\t%s\t%s; %s %s" % \
(indent,address,binary,opecode,operand,comment,attribute)
def load_assembler(file_name):
part = re.compile(r"\s(?P<address>\w+):\s+(?P<binary>(\w\w\s)+)\s+((?P<opecode>\w+)(\s+(?P<operand>.*))?)?$")
data = [i.strip('\n') for i in open(file_name)]
ret = []
i = 0
text_section = False
while i < len(data):
line = data[i]
if line == "Disassembly of section .text:":
print line
text_section = True
i += 3
continue
if text_section:
if line == "":
break
m = part.match(line)
address = int(m.group("address"),16)
binary = [int(j,16) for j in m.group("binary").split()]
opecode = m.group("opecode")
operand = m.group("operand")
asm = Asm(address,binary,opecode,operand)
ret.append(asm)
i += 1
return ret
def divide_to_function(asms):
next_instruction_address = asms[0].address
current_graph = []
for asm in asms:
if next_instruction_address < asm.address:
yield current_graph
current_graph = []
next_instruction_address = asm.address
current_graph.append(asm)
if asm.opecode == 'ret':
continue
elif asm.opecode == 'jmp':
jump_to = int(asm.operand.split()[0],16)
next_instruction_address = max(next_instruction_address,jump_to)
elif asm.opecode.startswith('j'):
jump_to = int(asm.operand.split()[0],16)
to = max(jump_to,asm.next_address())
next_instruction_address = max(next_instruction_address,to)
else:
next_instruction_address = max(next_instruction_address,asm.next_address())
def set_whileblock_indent(graph,while_loop_start_addresses,while_loop_end_addresses):
addresses = []
for start in while_loop_start_addresses:
addresses.append((start,1))
for end in while_loop_end_addresses:
addresses.append((end,-1))
addresses.sort()
i = 0
indent = 0
for asm in graph:
while i < len(addresses) and addresses[i][0] <= asm.address:
indent += addresses[i][1]
if addresses[i][1] > 0:
asm.attribute.append('while')
else:
asm.attribute.append('end while')
i += 1
asm.indent = indent
def set_continue_statement(graph,while_loop_start_addresses):
for asm in graph:
if asm.opecode.startswith('j'):
jump_to = int(asm.operand.split()[0],16)
if jump_to in while_loop_start_addresses:
asm.attribute.append('continue')
def set_if_indent(graph):
for asm in graph:
if asm.opecode != 'jmp' and asm.opecode.startswith('j'):
jump_to = int(asm.operand.split()[0],16)
if jump_to < asm.address: continue
to_asm = filter(lambda asm: asm.address == jump_to,graph)[0]
if to_asm.indent == asm.indent:
asm.attribute.append('if')
to_asm.attribute.append('end if')
additional_indent = 0
for asm in graph:
if 'if' in asm.attribute:
additional_indent += 1
elif 'end if' in asm.attribute:
additional_indent -= 1
asm.indent += additional_indent
def set_break_statement(graph,while_loop_end_addresses):
for asm in graph:
if asm.opecode.startswith('j'):
jump_to = int(asm.operand.split()[0],16)
if jump_to in while_loop_end_addresses:
to_asm = filter(lambda asm: asm.address == jump_to,graph)[0]
if asm.indent > to_asm.indent:
asm.attribute.append('break')
def analyze_graph(graph):
while_jump_asms = {}
for asm in graph:
if asm.opecode.startswith('j'):
jump_to = int(asm.operand.split()[0],16)
if jump_to <= asm.address:
while_jump_asms[jump_to] = asm # 最後に来た命令で更新する
while_jump_asms = list(sorted(while_jump_asms.items()))
while_loop_start_addresses = list(starmap(lambda to,asm : to,while_jump_asms))
while_loop_end_addresses = list(starmap(lambda to,asm :asm.next_address(),while_jump_asms))
set_whileblock_indent(graph,while_loop_start_addresses,while_loop_end_addresses)
set_continue_statement(graph,while_loop_start_addresses)
set_break_statement(graph,while_loop_end_addresses)
set_if_indent(graph)
def main():
asms = load_assembler(sys.argv[1])
for graph in divide_to_function(asms):
print "-" * 30
analyze_graph(graph)
print "-" * 30
for i in graph:
print i
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment