40f3c5:	33 c0                	xor    %eax,%eax
40f3c7:	88 84 05 fc fe ff ff 	mov    %al,-0x104(%ebp,%eax,1)
40f3ce:	40                   	inc    %eax
40f3cf:	3b c7                	cmp    %edi,%eax
40f3d1:	72 f4                	jb     0x40f3c7
40f3d3:	8a 85 ee fa ff ff    	mov    -0x512(%ebp),%al
40f3d9:	c6 85 fc fe ff ff 20 	movb   $0x20,-0x104(%ebp)
40f3e0:	84 c0                	test   %al,%al
40f3e2:	74 2e                	je     0x40f412
40f3e4:	8d 9d ef fa ff ff    	lea    -0x511(%ebp),%ebx
40f3ea:	0f b6 c8             	movzbl %al,%ecx
40f3ed:	0f b6 03             	movzbl (%ebx),%eax
40f3f0:	3b c8                	cmp    %eax,%ecx
40f3f2:	77 16                	ja     0x40f40a
40f3f4:	2b c1                	sub    %ecx,%eax
40f3f6:	40                   	inc    %eax
40f3f7:	50                   	push   %eax
40f3f8:	8d 94 0d fc fe ff ff 	lea    -0x104(%ebp,%ecx,1),%edx
40f3ff:	6a 20                	push   $0x20
40f401:	52                   	push   %edx
40f402:	e8 f9 b2 ff ff       	call   0x40a700
40f407:	83 c4 0c             	add    $0xc,%esp
40f40a:	43                   	inc    %ebx
40f40b:	8a 03                	mov    (%ebx),%al
40f40d:	43                   	inc    %ebx
40f40e:	84 c0                	test   %al,%al
40f410:	75 d8                	jne    0x40f3ea
40f412:	6a 00                	push   $0x0
40f414:	ff 76 0c             	push   0xc(%esi)
40f417:	8d 85 fc fa ff ff    	lea    -0x504(%ebp),%eax
40f41d:	ff 76 04             	push   0x4(%esi)
40f420:	50                   	push   %eax
40f421:	57                   	push   %edi
40f422:	8d 85 fc fe ff ff    	lea    -0x104(%ebp),%eax
40f428:	50                   	push   %eax
40f429:	6a 01                	push   $0x1
40f42b:	6a 00                	push   $0x0
40f42d:	e8 1b e0 ff ff       	call   0x40d44d
40f432:	33 db                	xor    %ebx,%ebx
40f434:	53                   	push   %ebx
40f435:	ff 76 04             	push   0x4(%esi)
40f438:	8d 85 fc fd ff ff    	lea    -0x204(%ebp),%eax
40f43e:	57                   	push   %edi
40f43f:	50                   	push   %eax
40f440:	57                   	push   %edi
40f441:	8d 85 fc fe ff ff    	lea    -0x104(%ebp),%eax
40f447:	50                   	push   %eax
40f448:	57                   	push   %edi
40f449:	ff 76 0c             	push   0xc(%esi)
40f44c:	53                   	push   %ebx
40f44d:	e8 db 8b ff ff       	call   0x40802d
40f452:	83 c4 44             	add    $0x44,%esp
40f455:	53                   	push   %ebx
40f456:	ff 76 04             	push   0x4(%esi)
40f459:	8d 85 fc fc ff ff    	lea    -0x304(%ebp),%eax
40f45f:	57                   	push   %edi
40f460:	50                   	push   %eax
40f461:	57                   	push   %edi
40f462:	8d 85 fc fe ff ff    	lea    -0x104(%ebp),%eax
40f468:	50                   	push   %eax
40f469:	68 00 02 00 00       	push   $0x200
40f46e:	ff 76 0c             	push   0xc(%esi)
40f471:	53                   	push   %ebx
40f472:	e8 b6 8b ff ff       	call   0x40802d
40f477:	83 c4 24             	add    $0x24,%esp
40f47a:	33 c0                	xor    %eax,%eax
40f47c:	0f b7 8c 45 fc fa ff 	movzwl -0x504(%ebp,%eax,2),%ecx
40f483:	ff
40f484:	f6 c1 01             	test   $0x1,%cl
40f487:	74 0e                	je     0x40f497
40f489:	80 4c 06 1d 10       	orb    $0x10,0x1d(%esi,%eax,1)
40f48e:	8a 8c 05 fc fd ff ff 	mov    -0x204(%ebp,%eax,1),%cl
40f495:	eb 11                	jmp    0x40f4a8
40f497:	f6 c1 02             	test   $0x2,%cl
40f49a:	74 15                	je     0x40f4b1
40f49c:	80 4c 06 1d 20       	orb    $0x20,0x1d(%esi,%eax,1)
40f4a1:	8a 8c 05 fc fc ff ff 	mov    -0x304(%ebp,%eax,1),%cl
40f4a8:	88 8c 06 1d 01 00 00 	mov    %cl,0x11d(%esi,%eax,1)
40f4af:	eb 08                	jmp    0x40f4b9
40f4b1:	c6 84 06 1d 01 00 00 	movb   $0x0,0x11d(%esi,%eax,1)
40f4b8:	00
40f4b9:	40                   	inc    %eax
40f4ba:	3b c7                	cmp    %edi,%eax
40f4bc:	72 be                	jb     0x40f47c
40f4be:	eb 56                	jmp    0x40f516
40f4c0:	8d 86 1d 01 00 00    	lea    0x11d(%esi),%eax
40f4c6:	c7 85 e4 fa ff ff 9f 	movl   $0xffffff9f,-0x51c(%ebp)
40f4cd:	ff ff ff
40f4d0:	33 c9                	xor    %ecx,%ecx
40f4d2:	29 85 e4 fa ff ff    	sub    %eax,-0x51c(%ebp)
40f4d8:	8b 95 e4 fa ff ff    	mov    -0x51c(%ebp),%edx
40f4de:	8d 84 0e 1d 01 00 00 	lea    0x11d(%esi,%ecx,1),%eax
40f4e5:	03 d0                	add    %eax,%edx
40f4e7:	8d 5a 20             	lea    0x20(%edx),%ebx
40f4ea:	83 fb 19             	cmp    $0x19,%ebx
40f4ed:	77 0c                	ja     0x40f4fb
40f4ef:	80 4c 0e 1d 10       	orb    $0x10,0x1d(%esi,%ecx,1)
40f4f4:	8a d1                	mov    %cl,%dl
40f4f6:	80 c2 20             	add    $0x20,%dl
40f4f9:	eb 0f                	jmp    0x40f50a
40f4fb:	83 fa 19             	cmp    $0x19,%edx
40f4fe:	77 0e                	ja     0x40f50e
40f500:	80 4c 0e 1d 20       	orb    $0x20,0x1d(%esi,%ecx,1)
40f505:	8a d1                	mov    %cl,%dl
40f507:	80 ea 20             	sub    $0x20,%dl
40f50a:	88 10                	mov    %dl,(%eax)
40f50c:	eb 03                	jmp    0x40f511
40f50e:	c6 00 00             	movb   $0x0,(%eax)
40f511:	41                   	inc    %ecx
40f512:	3b cf                	cmp    %edi,%ecx
40f514:	72 c2                	jb     0x40f4d8
40f516:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40f519:	5f                   	pop    %edi
40f51a:	33 cd                	xor    %ebp,%ecx
40f51c:	5b                   	pop    %ebx
40f51d:	e8 04 71 ff ff       	call   0x406626
40f522:	c9                   	leave
40f523:	c3                   	ret
40f524:	6a 0c                	push   $0xc
40f526:	68 90 99 42 00       	push   $0x429990
40f52b:	e8 ac ae ff ff       	call   0x40a3dc
40f530:	e8 0c b5 ff ff       	call   0x40aa41
40f535:	8b f8                	mov    %eax,%edi
40f537:	a1 a0 b7 42 00       	mov    0x42b7a0,%eax
40f53c:	85 47 70             	test   %eax,0x70(%edi)
40f53f:	74 1d                	je     0x40f55e
40f541:	83 7f 6c 00          	cmpl   $0x0,0x6c(%edi)
40f545:	74 17                	je     0x40f55e
40f547:	8b 77 68             	mov    0x68(%edi),%esi
40f54a:	85 f6                	test   %esi,%esi
40f54c:	75 08                	jne    0x40f556
40f54e:	6a 20                	push   $0x20
40f550:	e8 47 d1 ff ff       	call   0x40c69c
40f555:	59                   	pop    %ecx
40f556:	8b c6                	mov    %esi,%eax
40f558:	e8 c4 ae ff ff       	call   0x40a421
40f55d:	c3                   	ret
40f55e:	6a 0d                	push   $0xd
40f560:	e8 7f a3 ff ff       	call   0x4098e4
40f565:	59                   	pop    %ecx
40f566:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
40f56a:	8b 77 68             	mov    0x68(%edi),%esi
40f56d:	89 75 e4             	mov    %esi,-0x1c(%ebp)
40f570:	3b 35 e8 bd 42 00    	cmp    0x42bde8,%esi
40f576:	74 36                	je     0x40f5ae
40f578:	85 f6                	test   %esi,%esi
40f57a:	74 1a                	je     0x40f596
40f57c:	56                   	push   %esi
40f57d:	ff 15 78 a0 41 00    	call   *0x41a078
40f583:	85 c0                	test   %eax,%eax
40f585:	75 0f                	jne    0x40f596
40f587:	81 fe c0 b9 42 00    	cmp    $0x42b9c0,%esi
40f58d:	74 07                	je     0x40f596
40f58f:	56                   	push   %esi
40f590:	e8 8b 5a ff ff       	call   0x405020
40f595:	59                   	pop    %ecx
40f596:	a1 e8 bd 42 00       	mov    0x42bde8,%eax
40f59b:	89 47 68             	mov    %eax,0x68(%edi)
40f59e:	8b 35 e8 bd 42 00    	mov    0x42bde8,%esi
40f5a4:	89 75 e4             	mov    %esi,-0x1c(%ebp)
40f5a7:	56                   	push   %esi
40f5a8:	ff 15 74 a0 41 00    	call   *0x41a074
40f5ae:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
40f5b5:	e8 05 00 00 00       	call   0x40f5bf
40f5ba:	eb 8e                	jmp    0x40f54a
40f5bc:	8b 75 e4             	mov    -0x1c(%ebp),%esi
40f5bf:	6a 0d                	push   $0xd
40f5c1:	e8 44 a2 ff ff       	call   0x40980a
40f5c6:	59                   	pop    %ecx
40f5c7:	c3                   	ret
40f5c8:	8b ff                	mov    %edi,%edi
40f5ca:	55                   	push   %ebp
40f5cb:	8b ec                	mov    %esp,%ebp
40f5cd:	83 ec 10             	sub    $0x10,%esp
40f5d0:	53                   	push   %ebx
40f5d1:	33 db                	xor    %ebx,%ebx
40f5d3:	53                   	push   %ebx
40f5d4:	8d 4d f0             	lea    -0x10(%ebp),%ecx
40f5d7:	e8 88 82 ff ff       	call   0x407864
40f5dc:	89 1d 58 11 43 00    	mov    %ebx,0x431158
40f5e2:	83 fe fe             	cmp    $0xfffffffe,%esi
40f5e5:	75 1e                	jne    0x40f605
40f5e7:	c7 05 58 11 43 00 01 	movl   $0x1,0x431158
40f5ee:	00 00 00
40f5f1:	ff 15 44 a1 41 00    	call   *0x41a144
40f5f7:	38 5d fc             	cmp    %bl,-0x4(%ebp)
40f5fa:	74 45                	je     0x40f641
40f5fc:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40f5ff:	83 61 70 fd          	andl   $0xfffffffd,0x70(%ecx)
40f603:	eb 3c                	jmp    0x40f641
40f605:	83 fe fd             	cmp    $0xfffffffd,%esi
40f608:	75 12                	jne    0x40f61c
40f60a:	c7 05 58 11 43 00 01 	movl   $0x1,0x431158
40f611:	00 00 00
40f614:	ff 15 3c a0 41 00    	call   *0x41a03c
40f61a:	eb db                	jmp    0x40f5f7
40f61c:	83 fe fc             	cmp    $0xfffffffc,%esi
40f61f:	75 12                	jne    0x40f633
40f621:	8b 45 f0             	mov    -0x10(%ebp),%eax
40f624:	8b 40 04             	mov    0x4(%eax),%eax
40f627:	c7 05 58 11 43 00 01 	movl   $0x1,0x431158
40f62e:	00 00 00
40f631:	eb c4                	jmp    0x40f5f7
40f633:	38 5d fc             	cmp    %bl,-0x4(%ebp)
40f636:	74 07                	je     0x40f63f
40f638:	8b 45 f8             	mov    -0x8(%ebp),%eax
40f63b:	83 60 70 fd          	andl   $0xfffffffd,0x70(%eax)
40f63f:	8b c6                	mov    %esi,%eax
40f641:	5b                   	pop    %ebx
40f642:	c9                   	leave
40f643:	c3                   	ret
40f644:	8b ff                	mov    %edi,%edi
40f646:	55                   	push   %ebp
40f647:	8b ec                	mov    %esp,%ebp
40f649:	83 ec 20             	sub    $0x20,%esp
40f64c:	a1 68 b2 42 00       	mov    0x42b268,%eax
40f651:	33 c5                	xor    %ebp,%eax
40f653:	89 45 fc             	mov    %eax,-0x4(%ebp)
40f656:	53                   	push   %ebx
40f657:	8b 5d 0c             	mov    0xc(%ebp),%ebx
40f65a:	56                   	push   %esi
40f65b:	8b 75 08             	mov    0x8(%ebp),%esi
40f65e:	57                   	push   %edi
40f65f:	e8 64 ff ff ff       	call   0x40f5c8
40f664:	8b f8                	mov    %eax,%edi
40f666:	33 f6                	xor    %esi,%esi
40f668:	89 7d 08             	mov    %edi,0x8(%ebp)
40f66b:	3b fe                	cmp    %esi,%edi
40f66d:	75 0e                	jne    0x40f67d
40f66f:	8b c3                	mov    %ebx,%eax
40f671:	e8 b7 fc ff ff       	call   0x40f32d
40f676:	33 c0                	xor    %eax,%eax
40f678:	e9 9d 01 00 00       	jmp    0x40f81a
40f67d:	89 75 e4             	mov    %esi,-0x1c(%ebp)
40f680:	33 c0                	xor    %eax,%eax
40f682:	39 b8 f0 bd 42 00    	cmp    %edi,0x42bdf0(%eax)
40f688:	0f 84 91 00 00 00    	je     0x40f71f
40f68e:	ff 45 e4             	incl   -0x1c(%ebp)
40f691:	83 c0 30             	add    $0x30,%eax
40f694:	3d f0 00 00 00       	cmp    $0xf0,%eax
40f699:	72 e7                	jb     0x40f682
40f69b:	81 ff e8 fd 00 00    	cmp    $0xfde8,%edi
40f6a1:	0f 84 70 01 00 00    	je     0x40f817
40f6a7:	81 ff e9 fd 00 00    	cmp    $0xfde9,%edi
40f6ad:	0f 84 64 01 00 00    	je     0x40f817
40f6b3:	0f b7 c7             	movzwl %di,%eax
40f6b6:	50                   	push   %eax
40f6b7:	ff 15 48 a1 41 00    	call   *0x41a148
40f6bd:	85 c0                	test   %eax,%eax
40f6bf:	0f 84 52 01 00 00    	je     0x40f817
40f6c5:	8d 45 e8             	lea    -0x18(%ebp),%eax
40f6c8:	50                   	push   %eax
40f6c9:	57                   	push   %edi
40f6ca:	ff 15 bc a0 41 00    	call   *0x41a0bc
40f6d0:	85 c0                	test   %eax,%eax
40f6d2:	0f 84 33 01 00 00    	je     0x40f80b
40f6d8:	68 01 01 00 00       	push   $0x101
40f6dd:	8d 43 1c             	lea    0x1c(%ebx),%eax
40f6e0:	56                   	push   %esi
40f6e1:	50                   	push   %eax
40f6e2:	e8 19 b0 ff ff       	call   0x40a700
40f6e7:	33 d2                	xor    %edx,%edx
40f6e9:	42                   	inc    %edx
40f6ea:	83 c4 0c             	add    $0xc,%esp
40f6ed:	89 7b 04             	mov    %edi,0x4(%ebx)
40f6f0:	89 73 0c             	mov    %esi,0xc(%ebx)
40f6f3:	39 55 e8             	cmp    %edx,-0x18(%ebp)
40f6f6:	0f 86 f8 00 00 00    	jbe    0x40f7f4
40f6fc:	80 7d ee 00          	cmpb   $0x0,-0x12(%ebp)
40f700:	0f 84 cf 00 00 00    	je     0x40f7d5
40f706:	8d 75 ef             	lea    -0x11(%ebp),%esi
40f709:	8a 0e                	mov    (%esi),%cl
40f70b:	84 c9                	test   %cl,%cl
40f70d:	0f 84 c2 00 00 00    	je     0x40f7d5
40f713:	0f b6 46 ff          	movzbl -0x1(%esi),%eax
40f717:	0f b6 c9             	movzbl %cl,%ecx
40f71a:	e9 a6 00 00 00       	jmp    0x40f7c5
40f71f:	68 01 01 00 00       	push   $0x101
40f724:	8d 43 1c             	lea    0x1c(%ebx),%eax
40f727:	56                   	push   %esi
40f728:	50                   	push   %eax
40f729:	e8 d2 af ff ff       	call   0x40a700
40f72e:	8b 4d e4             	mov    -0x1c(%ebp),%ecx
40f731:	83 c4 0c             	add    $0xc,%esp
40f734:	6b c9 30             	imul   $0x30,%ecx,%ecx
40f737:	89 75 e0             	mov    %esi,-0x20(%ebp)
40f73a:	8d b1 00 be 42 00    	lea    0x42be00(%ecx),%esi
40f740:	89 75 e4             	mov    %esi,-0x1c(%ebp)
40f743:	eb 2a                	jmp    0x40f76f
40f745:	8a 46 01             	mov    0x1(%esi),%al
40f748:	84 c0                	test   %al,%al
40f74a:	74 28                	je     0x40f774
40f74c:	0f b6 3e             	movzbl (%esi),%edi
40f74f:	0f b6 c0             	movzbl %al,%eax
40f752:	eb 12                	jmp    0x40f766
40f754:	8b 45 e0             	mov    -0x20(%ebp),%eax
40f757:	8a 80 ec bd 42 00    	mov    0x42bdec(%eax),%al
40f75d:	08 44 3b 1d          	or     %al,0x1d(%ebx,%edi,1)
40f761:	0f b6 46 01          	movzbl 0x1(%esi),%eax
40f765:	47                   	inc    %edi
40f766:	3b f8                	cmp    %eax,%edi
40f768:	76 ea                	jbe    0x40f754
40f76a:	8b 7d 08             	mov    0x8(%ebp),%edi
40f76d:	46                   	inc    %esi
40f76e:	46                   	inc    %esi
40f76f:	80 3e 00             	cmpb   $0x0,(%esi)
40f772:	75 d1                	jne    0x40f745
40f774:	8b 75 e4             	mov    -0x1c(%ebp),%esi
40f777:	ff 45 e0             	incl   -0x20(%ebp)
40f77a:	83 c6 08             	add    $0x8,%esi
40f77d:	83 7d e0 04          	cmpl   $0x4,-0x20(%ebp)
40f781:	89 75 e4             	mov    %esi,-0x1c(%ebp)
40f784:	72 e9                	jb     0x40f76f
40f786:	8b c7                	mov    %edi,%eax
40f788:	89 7b 04             	mov    %edi,0x4(%ebx)
40f78b:	c7 43 08 01 00 00 00 	movl   $0x1,0x8(%ebx)
40f792:	e8 67 fb ff ff       	call   0x40f2fe
40f797:	6a 06                	push   $0x6
40f799:	89 43 0c             	mov    %eax,0xc(%ebx)
40f79c:	8d 43 10             	lea    0x10(%ebx),%eax
40f79f:	8d 89 f4 bd 42 00    	lea    0x42bdf4(%ecx),%ecx
40f7a5:	5a                   	pop    %edx
40f7a6:	66 8b 31             	mov    (%ecx),%si
40f7a9:	41                   	inc    %ecx
40f7aa:	66 89 30             	mov    %si,(%eax)
40f7ad:	41                   	inc    %ecx
40f7ae:	40                   	inc    %eax
40f7af:	40                   	inc    %eax
40f7b0:	4a                   	dec    %edx
40f7b1:	75 f3                	jne    0x40f7a6
40f7b3:	8b f3                	mov    %ebx,%esi
40f7b5:	e8 d7 fb ff ff       	call   0x40f391
40f7ba:	e9 b7 fe ff ff       	jmp    0x40f676
40f7bf:	80 4c 03 1d 04       	orb    $0x4,0x1d(%ebx,%eax,1)
40f7c4:	40                   	inc    %eax
40f7c5:	3b c1                	cmp    %ecx,%eax
40f7c7:	76 f6                	jbe    0x40f7bf
40f7c9:	46                   	inc    %esi
40f7ca:	46                   	inc    %esi
40f7cb:	80 7e ff 00          	cmpb   $0x0,-0x1(%esi)
40f7cf:	0f 85 34 ff ff ff    	jne    0x40f709
40f7d5:	8d 43 1e             	lea    0x1e(%ebx),%eax
40f7d8:	b9 fe 00 00 00       	mov    $0xfe,%ecx
40f7dd:	80 08 08             	orb    $0x8,(%eax)
40f7e0:	40                   	inc    %eax
40f7e1:	49                   	dec    %ecx
40f7e2:	75 f9                	jne    0x40f7dd
40f7e4:	8b 43 04             	mov    0x4(%ebx),%eax
40f7e7:	e8 12 fb ff ff       	call   0x40f2fe
40f7ec:	89 43 0c             	mov    %eax,0xc(%ebx)