Disassembly: 
  L1: 55 ?? push ebp
   8b ec ?? mov ebp, esp
   56 ?? push esi
   57 ?? push edi
   8b 7d 08 ?? mov edi, dword ss:[ebp + 8]
   8b f1 ?? mov esi, ecx
   83 ff fe ?? cmp edi, 0xfe<254,-2>
   76 0b ?? jbe basic block L3
  
  L2: 68 3c 8e 40 00 ?? push 0x00408e3c<"string too long">
   ff 15 58 b2 40 00 ?? call dword ds:[0x0040b258]
  
  L3: 8b 46 14 ?? mov eax, dword ds:[esi + 0x14<20>]
   3b c7 ?? cmp eax, edi
   73 17 ?? jae basic block L6
  
  L4: ff 76 10 ?? push dword ds:[esi + 0x10<16>]
   57 ?? push edi
   e8 43 f1 ff ff ?? call function 0x0040102d
  
  L5: 33 c0 ?? xor eax, eax
   3b c7 ?? cmp eax, edi
   1b c0 ?? sbb eax, eax
   5f ?? pop edi
   f7 d8 ?? neg eax
   5e ?? pop esi
   5d ?? pop ebp
   c2 08 00 ?? ret 8
  
  L6: 80 7d 0c 00 ?? cmp byte ss:[ebp + 12], 0
   74 50 ?? je basic block L15
  
  L7: 83 ff 10 ?? cmp edi, 0x10<16>
   73 4b ?? jae basic block L15
  
  L8: 53 ?? push ebx
   8b 5e 10 ?? mov ebx, dword ds:[esi + 0x10<16>]
   3b fb ?? cmp edi, ebx
   0f 42 df ?? cmovb ebx, edi
   83 f8 10 ?? cmp eax, 0x10<16>
   72 20 ?? jb basic block L14
  
  L9: 8b 06 ?? mov eax, dword ds:[esi]
   89 45 0c ?? mov dword ss:[ebp + 12], eax
   85 db ?? test ebx, ebx
   74 0e ?? je basic block L12
  
  L10: 53 ?? push ebx
   50 ?? push eax
   56 ?? push esi
   e8 6c 10 00 00 ?? call function 0x00402f8e
  
  L11: 8b 45 0c ?? mov eax, dword ss:[ebp + 12]
   83 c4 0c ?? add esp, 12
  
  L12: 50 ?? push eax
   e8 42 0f 00 00 ?? call function 0x00402e70
  
  L13: 83 c4 04 ?? add esp, 4
  
  L14: 89 5e 10 ?? mov dword ds:[esi + 0x10<16>], ebx
   33 c0 ?? xor eax, eax
   c7 46 14 0f 00 00 00 ?? mov dword ds:[esi + 0x14<20>], 15
   c6 04 33 00 ?? mov byte ds:[ebx + esi], 0
   3b c7 ?? cmp eax, edi
   5b ?? pop ebx
   1b c0 ?? sbb eax, eax
   5f ?? pop edi
   f7 d8 ?? neg eax
   5e ?? pop esi
   5d ?? pop ebp
   c2 08 00 ?? ret 8
  
  L15: 85 ff ?? test edi, edi
   75 0d ?? jne basic block L19
  
  L16: 89 7e 10 ?? mov dword ds:[esi + 0x10<16>], edi
   83 f8 10 ?? cmp eax, 0x10<16>
   72 02 ?? jb basic block L18
  
  L17: 8b 36 ?? mov esi, dword ds:[esi]
  
  L18: c6 06 00 ?? mov byte ds:[esi], 0
  
  L19: 33 c0 ?? xor eax, eax
   3b c7 ?? cmp eax, edi
   1b c0 ?? sbb eax, eax
   5f ?? pop edi
   f7 d8 ?? neg eax
   5e ?? pop esi
   5d ?? pop ebp
   c2 08 00 ?? ret 8
  
  