Disassembly: 
  L1: 55 ?? push ebp
   8b ec ?? mov ebp, esp
   53 ?? push ebx
   8b 5d 08 ?? mov ebx, dword ss:[ebp + 8]
   56 ?? push esi
   57 ?? push edi
   8b 7b 10 ?? mov edi, dword ds:[ebx + 0x10<16>]
   8b f1 ?? mov esi, ecx
   8b 4d 0c ?? mov ecx, dword ss:[ebp + 12]
   3b f9 ?? cmp edi, ecx
   73 0b ?? jae basic block L3
  
  L2: 68 6c 8c 40 00 ?? push 0x00408c6c<"invalid string position">
   ff 15 60 b2 40 00 ?? call dword ds:[0x0040b260]
  
  L3: 2b f9 ?? sub edi, ecx
   39 7d 10 ?? cmp dword ss:[ebp + 0x10<16>], edi
   0f 42 7d 10 ?? cmovb edi, dword ss:[ebp + 0x10<16>]
   3b f3 ?? cmp esi, ebx
   75 4e ?? jne basic block L11
  
  L4: 8d 04 0f ?? lea eax, ds:[edi + ecx]
   39 46 10 ?? cmp dword ds:[esi + 0x10<16>], eax
   73 0b ?? jae basic block L6
  
  L5: 68 6c 8c 40 00 ?? push 0x00408c6c<"invalid string position">
   ff 15 60 b2 40 00 ?? call dword ds:[0x0040b260]
  
  L6: 83 7e 14 10 ?? cmp dword ds:[esi + 0x14<20>], 0x10<16>
   89 46 10 ?? mov dword ds:[esi + 0x10<16>], eax
   72 19 ?? jb basic block L9
  
  L7: 8b 16 ?? mov edx, dword ds:[esi]
   51 ?? push ecx
   6a 00 ?? push 0
   8b ce ?? mov ecx, esi
   c6 04 10 00 ?? mov byte ds:[eax + edx], 0
   e8 9d f0 ff ff ?? call function 0x00401096
  
  L8: 5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  L9: 51 ?? push ecx
   8b d6 ?? mov edx, esi
   6a 00 ?? push 0
   8b ce ?? mov ecx, esi
   c6 04 10 00 ?? mov byte ds:[eax + edx], 0
   e8 84 f0 ff ff ?? call function 0x00401096
  
  L10: 5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  L11: 83 ff fe ?? cmp edi, 0xfe<254,-2>
   76 0b ?? jbe basic block L13
  
  L12: 68 88 8c 40 00 ?? push 0x00408c88<"string too long">
   ff 15 64 b2 40 00 ?? call dword ds:[0x0040b264]
  
  L13: 8b 46 14 ?? mov eax, dword ds:[esi + 0x14<20>]
   3b c7 ?? cmp eax, edi
   73 24 ?? jae basic block L20
  
  L14: ff 76 10 ?? push dword ds:[esi + 0x10<16>]
   8b ce ?? mov ecx, esi
   57 ?? push edi
   e8 f0 ef ff ff ?? call function 0x0040102d
  
  L15: 8b 4d 0c ?? mov ecx, dword ss:[ebp + 12]
   85 ff ?? test edi, edi
   74 6a ?? je basic block L31
  
  L16: 83 7b 14 10 ?? cmp dword ds:[ebx + 0x14<20>], 0x10<16>
   72 02 ?? jb basic block L18
  
  L17: 8b 1b ?? mov ebx, dword ds:[ebx]
  
  L18: 83 7e 14 10 ?? cmp dword ds:[esi + 0x14<20>], 0x10<16>
   72 2a ?? jb basic block L24
  
  L19: 8b 16 ?? mov edx, dword ds:[esi]
   eb 28 ?? jmp basic block L25
  
  L20: 85 ff ?? test edi, edi
   75 ea ?? jne basic block L16
  
  L21: 89 7e 10 ?? mov dword ds:[esi + 0x10<16>], edi
   83 f8 10 ?? cmp eax, 0x10<16>
   72 0e ?? jb basic block L23
  
  L22: 8b 06 ?? mov eax, dword ds:[esi]
   5f ?? pop edi
   c6 00 00 ?? mov byte ds:[eax], 0
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  L23: 5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   c6 00 00 ?? mov byte ds:[eax], 0
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  L24: 8b d6 ?? mov edx, esi
  
  L25: 85 ff ?? test edi, edi
   74 0e ?? je basic block L28
  
  L26: 57 ?? push edi
   8d 04 0b ?? lea eax, ds:[ebx + ecx]
   50 ?? push eax
   52 ?? push edx
   e8 69 0a 00 00 ?? call function 0x00402af6
  
  L27: 83 c4 0c ?? add esp, 12
  
  L28: 83 7e 14 10 ?? cmp dword ds:[esi + 0x14<20>], 0x10<16>
   89 7e 10 ?? mov dword ds:[esi + 0x10<16>], edi
   72 0f ?? jb basic block L30
  
  L29: 8b 06 ?? mov eax, dword ds:[esi]
   c6 04 38 00 ?? mov byte ds:[eax + edi], 0
   5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  L30: 8b c6 ?? mov eax, esi
   c6 04 38 00 ?? mov byte ds:[eax + edi], 0
  
  L31: 5f ?? pop edi
   8b c6 ?? mov eax, esi
   5e ?? pop esi
   5b ?? pop ebx
   5d ?? pop ebp
   c2 0c 00 ?? ret 12
  
  