40f166:	66 c7 03 00 00       	movw   $0x0,(%ebx)
40f16b:	8d 43 08             	lea    0x8(%ebx),%eax
40f16e:	e8 dd 4e ff ff       	call   0x404050
40f173:	eb 45                	jmp    0x40f1ba
40f175:	66 81 fe 01 01       	cmp    $0x101,%si
40f17a:	75 0a                	jne    0x40f186
40f17c:	8b c3                	mov    %ebx,%eax
40f17e:	ff 15 10 58 47 00    	call   *0x475810
40f184:	eb 34                	jmp    0x40f1ba
40f186:	66 f7 c6 00 20       	test   $0x2000,%si
40f18b:	74 09                	je     0x40f196
40f18d:	8b c3                	mov    %ebx,%eax
40f18f:	e8 34 fe ff ff       	call   0x40efc8
40f194:	eb 24                	jmp    0x40f1ba
40f196:	8b d4                	mov    %esp,%edx
40f198:	8b c6                	mov    %esi,%eax
40f19a:	e8 35 55 00 00       	call   0x4146d4
40f19f:	84 c0                	test   %al,%al
40f1a1:	74 0c                	je     0x40f1af
40f1a3:	8b d3                	mov    %ebx,%edx
40f1a5:	8b 04 24             	mov    (%esp),%eax
40f1a8:	8b 08                	mov    (%eax),%ecx
40f1aa:	ff 51 24             	call   *0x24(%ecx)
40f1ad:	eb 0b                	jmp    0x40f1ba
40f1af:	53                   	push   %ebx
40f1b0:	e8 4b e9 ff ff       	call   0x40db00
40f1b5:	e8 56 fc ff ff       	call   0x40ee10
40f1ba:	5a                   	pop    %edx
40f1bb:	5e                   	pop    %esi
40f1bc:	5b                   	pop    %ebx
40f1bd:	c3                   	ret
40f1be:	8b c0                	mov    %eax,%eax
40f1c0:	66 f7 00 e8 bf       	testw  $0xbfe8,(%eax)
40f1c5:	75 06                	jne    0x40f1cd
40f1c7:	66 c7 00 00 00       	movw   $0x0,(%eax)
40f1cc:	c3                   	ret
40f1cd:	e8 72 ff ff ff       	call   0x40f144
40f1d2:	c3                   	ret
40f1d3:	90                   	nop
40f1d4:	50                   	push   %eax
40f1d5:	e8 e6 ff ff ff       	call   0x40f1c0
40f1da:	58                   	pop    %eax
40f1db:	c3                   	ret
40f1dc:	55                   	push   %ebp
40f1dd:	8b ec                	mov    %esp,%ebp
40f1df:	53                   	push   %ebx
40f1e0:	8b 4d 08             	mov    0x8(%ebp),%ecx
40f1e3:	81 c1 00 fd ff ff    	add    $0xfffffd00,%ecx
40f1e9:	8b 54 c1 04          	mov    0x4(%ecx,%eax,8),%edx
40f1ed:	03 14 c1             	add    (%ecx,%eax,8),%edx
40f1f0:	8b 5d 08             	mov    0x8(%ebp),%ebx
40f1f3:	3b 94 83 00 ff ff ff 	cmp    -0x100(%ebx,%eax,4),%edx
40f1fa:	0f 9f c2             	setg   %dl
40f1fd:	48                   	dec    %eax
40f1fe:	84 d2                	test   %dl,%dl
40f200:	74 04                	je     0x40f206
40f202:	85 c0                	test   %eax,%eax
40f204:	7d e3                	jge    0x40f1e9
40f206:	8b c2                	mov    %edx,%eax
40f208:	5b                   	pop    %ebx
40f209:	5d                   	pop    %ebp
40f20a:	c3                   	ret
40f20b:	90                   	nop
40f20c:	55                   	push   %ebp
40f20d:	8b ec                	mov    %esp,%ebp
40f20f:	53                   	push   %ebx
40f210:	56                   	push   %esi
40f211:	b2 01                	mov    $0x1,%dl
40f213:	8b 4d 08             	mov    0x8(%ebp),%ecx
40f216:	ff 84 81 00 ff ff ff 	incl   -0x100(%ecx,%eax,4)
40f21d:	8b 4d 08             	mov    0x8(%ebp),%ecx
40f220:	8b 8c c1 04 fd ff ff 	mov    -0x2fc(%ecx,%eax,8),%ecx
40f227:	8b d9                	mov    %ecx,%ebx
40f229:	8b 75 08             	mov    0x8(%ebp),%esi
40f22c:	03 9c c6 00 fd ff ff 	add    -0x300(%esi,%eax,8),%ebx
40f233:	8b 75 08             	mov    0x8(%ebp),%esi
40f236:	3b 9c 86 00 ff ff ff 	cmp    -0x100(%esi,%eax,4),%ebx
40f23d:	7f 22                	jg     0x40f261
40f23f:	85 c0                	test   %eax,%eax
40f241:	75 04                	jne    0x40f247
40f243:	33 d2                	xor    %edx,%edx
40f245:	eb 1a                	jmp    0x40f261
40f247:	8b 55 08             	mov    0x8(%ebp),%edx
40f24a:	8b 55 08             	mov    0x8(%ebp),%edx
40f24d:	89 8c 82 00 ff ff ff 	mov    %ecx,-0x100(%edx,%eax,4)
40f254:	8b 55 08             	mov    0x8(%ebp),%edx
40f257:	52                   	push   %edx
40f258:	48                   	dec    %eax
40f259:	e8 ae ff ff ff       	call   0x40f20c
40f25e:	59                   	pop    %ecx
40f25f:	8b d0                	mov    %eax,%edx
40f261:	8b c2                	mov    %edx,%eax
40f263:	5e                   	pop    %esi
40f264:	5b                   	pop    %ebx
40f265:	5d                   	pop    %ebp
40f266:	c3                   	ret
40f267:	90                   	nop
40f268:	55                   	push   %ebp
40f269:	8b ec                	mov    %esp,%ebp
40f26b:	81 c4 e0 fc ff ff    	add    $0xfffffce0,%esp
40f271:	53                   	push   %ebx
40f272:	56                   	push   %esi
40f273:	57                   	push   %edi
40f274:	89 8d f8 fc ff ff    	mov    %ecx,-0x308(%ebp)
40f27a:	8b da                	mov    %edx,%ebx
40f27c:	89 85 fc fc ff ff    	mov    %eax,-0x304(%ebp)
40f282:	f6 43 01 20          	testb  $0x20,0x1(%ebx)
40f286:	75 0a                	jne    0x40f292
40f288:	b8 57 00 07 80       	mov    $0x80070057,%eax
40f28d:	e8 7e fb ff ff       	call   0x40ee10
40f292:	66 8b 03             	mov    (%ebx),%ax
40f295:	8b d0                	mov    %eax,%edx
40f297:	66 81 e2 ff 0f       	and    $0xfff,%dx
40f29c:	66 83 fa 0c          	cmp    $0xc,%dx
40f2a0:	0f 85 73 01 00 00    	jne    0x40f419
40f2a6:	f6 c4 40             	test   $0x40,%ah
40f2a9:	74 0d                	je     0x40f2b8
40f2ab:	8b 43 08             	mov    0x8(%ebx),%eax
40f2ae:	8b 00                	mov    (%eax),%eax
40f2b0:	89 85 ec fc ff ff    	mov    %eax,-0x314(%ebp)
40f2b6:	eb 09                	jmp    0x40f2c1
40f2b8:	8b 43 08             	mov    0x8(%ebx),%eax
40f2bb:	89 85 ec fc ff ff    	mov    %eax,-0x314(%ebp)
40f2c1:	8b 85 ec fc ff ff    	mov    -0x314(%ebp),%eax
40f2c7:	0f b7 00             	movzwl (%eax),%eax
40f2ca:	89 85 f0 fc ff ff    	mov    %eax,-0x310(%ebp)
40f2d0:	8b 9d f0 fc ff ff    	mov    -0x310(%ebp),%ebx
40f2d6:	4b                   	dec    %ebx
40f2d7:	85 db                	test   %ebx,%ebx
40f2d9:	7c 6b                	jl     0x40f346
40f2db:	43                   	inc    %ebx
40f2dc:	33 ff                	xor    %edi,%edi
40f2de:	8d b5 00 fd ff ff    	lea    -0x300(%ebp),%esi
40f2e4:	8b c6                	mov    %esi,%eax
40f2e6:	89 85 e0 fc ff ff    	mov    %eax,-0x320(%ebp)
40f2ec:	8b 85 e0 fc ff ff    	mov    -0x320(%ebp),%eax
40f2f2:	83 c0 04             	add    $0x4,%eax
40f2f5:	50                   	push   %eax
40f2f6:	8d 47 01             	lea    0x1(%edi),%eax
40f2f9:	50                   	push   %eax
40f2fa:	8b 85 ec fc ff ff    	mov    -0x314(%ebp),%eax
40f300:	50                   	push   %eax
40f301:	e8 5e ec ff ff       	call   0x40df64
40f306:	e8 05 fb ff ff       	call   0x40ee10
40f30b:	8d 85 f4 fc ff ff    	lea    -0x30c(%ebp),%eax
40f311:	50                   	push   %eax
40f312:	8d 47 01             	lea    0x1(%edi),%eax
40f315:	50                   	push   %eax
40f316:	8b 85 ec fc ff ff    	mov    -0x314(%ebp),%eax
40f31c:	50                   	push   %eax
40f31d:	e8 4a ec ff ff       	call   0x40df6c
40f322:	e8 e9 fa ff ff       	call   0x40ee10
40f327:	8b 85 e0 fc ff ff    	mov    -0x320(%ebp),%eax
40f32d:	8b 95 f4 fc ff ff    	mov    -0x30c(%ebp),%edx
40f333:	2b 50 04             	sub    0x4(%eax),%edx
40f336:	42                   	inc    %edx
40f337:	8b 85 e0 fc ff ff    	mov    -0x320(%ebp),%eax
40f33d:	89 10                	mov    %edx,(%eax)
40f33f:	47                   	inc    %edi
40f340:	83 c6 08             	add    $0x8,%esi
40f343:	4b                   	dec    %ebx
40f344:	75 9e                	jne    0x40f2e4
40f346:	8d 85 00 fd ff ff    	lea    -0x300(%ebp),%eax
40f34c:	50                   	push   %eax
40f34d:	8b 85 f0 fc ff ff    	mov    -0x310(%ebp),%eax
40f353:	50                   	push   %eax
40f354:	6a 0c                	push   $0xc
40f356:	e8 01 ec ff ff       	call   0x40df5c
40f35b:	8b f0                	mov    %eax,%esi
40f35d:	85 f6                	test   %esi,%esi
40f35f:	75 05                	jne    0x40f366
40f361:	e8 02 f8 ff ff       	call   0x40eb68
40f366:	8b 85 fc fc ff ff    	mov    -0x304(%ebp),%eax
40f36c:	e8 4f fe ff ff       	call   0x40f1c0
40f371:	8b 85 fc fc ff ff    	mov    -0x304(%ebp),%eax
40f377:	66 c7 00 0c 20       	movw   $0x200c,(%eax)
40f37c:	8b 85 fc fc ff ff    	mov    -0x304(%ebp),%eax
40f382:	89 70 08             	mov    %esi,0x8(%eax)
40f385:	8b 9d f0 fc ff ff    	mov    -0x310(%ebp),%ebx
40f38b:	4b                   	dec    %ebx
40f38c:	85 db                	test   %ebx,%ebx
40f38e:	7c 1a                	jl     0x40f3aa
40f390:	43                   	inc    %ebx
40f391:	8d 85 04 fd ff ff    	lea    -0x2fc(%ebp),%eax
40f397:	8d 95 00 ff ff ff    	lea    -0x100(%ebp),%edx
40f39d:	8b 08                	mov    (%eax),%ecx
40f39f:	89 0a                	mov    %ecx,(%edx)
40f3a1:	83 c2 04             	add    $0x4,%edx
40f3a4:	83 c0 08             	add    $0x8,%eax
40f3a7:	4b                   	dec    %ebx
40f3a8:	75 f3                	jne    0x40f39d
40f3aa:	55                   	push   %ebp
40f3ab:	8b 9d f0 fc ff ff    	mov    -0x310(%ebp),%ebx
40f3b1:	4b                   	dec    %ebx
40f3b2:	8b c3                	mov    %ebx,%eax
40f3b4:	e8 23 fe ff ff       	call   0x40f1dc
40f3b9:	59                   	pop    %ecx
40f3ba:	84 c0                	test   %al,%al
40f3bc:	74 4c                	je     0x40f40a
40f3be:	8d 85 e8 fc ff ff    	lea    -0x318(%ebp),%eax
40f3c4:	50                   	push   %eax
40f3c5:	8d 85 00 ff ff ff    	lea    -0x100(%ebp),%eax
40f3cb:	50                   	push   %eax
40f3cc:	8b 85 ec fc ff ff    	mov    -0x314(%ebp),%eax
40f3d2:	50                   	push   %eax
40f3d3:	e8 9c eb ff ff       	call   0x40df74
40f3d8:	e8 33 fa ff ff       	call   0x40ee10
40f3dd:	8d 85 e4 fc ff ff    	lea    -0x31c(%ebp),%eax
40f3e3:	50                   	push   %eax
40f3e4:	8d 85 00 ff ff ff    	lea    -0x100(%ebp),%eax
40f3ea:	50                   	push   %eax
40f3eb:	56                   	push   %esi
40f3ec:	e8 83 eb ff ff       	call   0x40df74
40f3f1:	e8 1a fa ff ff       	call   0x40ee10
40f3f6:	8b 85 e8 fc ff ff    	mov    -0x318(%ebp),%eax
40f3fc:	8b d0                	mov    %eax,%edx
40f3fe:	8b 85 e4 fc ff ff    	mov    -0x31c(%ebp),%eax
40f404:	ff 95 f8 fc ff ff    	call   *-0x308(%ebp)
40f40a:	55                   	push   %ebp
40f40b:	8b c3                	mov    %ebx,%eax
40f40d:	e8 fa fd ff ff       	call   0x40f20c
40f412:	59                   	pop    %ecx
40f413:	84 c0                	test   %al,%al
40f415:	75 93                	jne    0x40f3aa
40f417:	eb 12                	jmp    0x40f42b
40f419:	53                   	push   %ebx
40f41a:	8b 85 fc fc ff ff    	mov    -0x304(%ebp),%eax
40f420:	50                   	push   %eax
40f421:	e8 e2 e6 ff ff       	call   0x40db08
40f426:	e8 e5 f9 ff ff       	call   0x40ee10
40f42b:	5f                   	pop    %edi
40f42c:	5e                   	pop    %esi
40f42d:	5b                   	pop    %ebx
40f42e:	8b e5                	mov    %ebp,%esp
40f430:	5d                   	pop    %ebp
40f431:	c3                   	ret
40f432:	8b c0                	mov    %eax,%eax
40f434:	e8 af 00 00 00       	call   0x40f4e8
40f439:	c3                   	ret
40f43a:	8b c0                	mov    %eax,%eax
40f43c:	53                   	push   %ebx
40f43d:	56                   	push   %esi
40f43e:	57                   	push   %edi
40f43f:	51                   	push   %ecx
40f440:	8b f2                	mov    %edx,%esi
40f442:	8b d8                	mov    %eax,%ebx
40f444:	66 f7 03 e8 bf       	testw  $0xbfe8,(%ebx)
40f449:	74 07                	je     0x40f452
40f44b:	8b c3                	mov    %ebx,%eax
40f44d:	e8 f2 fc ff ff       	call   0x40f144
40f452:	66 8b 3e             	mov    (%esi),%di
40f455:	66 83 ff 14          	cmp    $0x14,%di
40f459:	73 0e                	jae    0x40f469
40f45b:	56                   	push   %esi
40f45c:	53                   	push   %ebx
40f45d:	e8 a6 e6 ff ff       	call   0x40db08
40f462:	e8 a9 f9 ff ff       	call   0x40ee10
40f467:	eb 79                	jmp    0x40f4e2
40f469:	66 81 ff 00 01       	cmp    $0x100,%di
40f46e:	75 17                	jne    0x40f487
40f470:	66 c7 03 00 01       	movw   $0x100,(%ebx)
40f475:	33 c0                	xor    %eax,%eax
40f477:	89 43 08             	mov    %eax,0x8(%ebx)
40f47a:	8d 43 08             	lea    0x8(%ebx),%eax
40f47d:	8b 56 08             	mov    0x8(%esi),%edx
40f480:	e8 1f 4c ff ff       	call   0x4040a4
40f485:	eb 5b                	jmp    0x40f4e2
40f487:	66 81 ff 01 01       	cmp    $0x101,%di
40f48c:	75 13                	jne    0x40f4a1
40f48e:	66 89 3b             	mov    %di,(%ebx)
40f491:	8b 46 08             	mov    0x8(%esi),%eax
40f494:	89 43 08             	mov    %eax,0x8(%ebx)
40f497:	8b c3                	mov    %ebx,%eax
40f499:	ff 15 18 58 47 00    	call   *0x475818
40f49f:	eb 41                	jmp    0x40f4e2
40f4a1:	66 f7 c7 00 20       	test   $0x2000,%di
40f4a6:	74 10                	je     0x40f4b8
40f4a8:	b9 34 f4 40 00       	mov    $0x40f434,%ecx
40f4ad:	8b d6                	mov    %esi,%edx
40f4af:	8b c3                	mov    %ebx,%eax
40f4b1:	e8 b2 fd ff ff       	call   0x40f268
40f4b6:	eb 2a                	jmp    0x40f4e2
40f4b8:	8b d4                	mov    %esp,%edx
40f4ba:	8b c7                	mov    %edi,%eax
40f4bc:	e8 13 52 00 00       	call   0x4146d4
40f4c1:	84 c0                	test   %al,%al
40f4c3:	74 11                	je     0x40f4d6
40f4c5:	6a 00                	push   $0x0
40f4c7:	8b ce                	mov    %esi,%ecx
40f4c9:	8b d3                	mov    %ebx,%edx
40f4cb:	8b 44 24 04          	mov    0x4(%esp),%eax
40f4cf:	8b 18                	mov    (%eax),%ebx
40f4d1:	ff 53 28             	call   *0x28(%ebx)
40f4d4:	eb 0c                	jmp    0x40f4e2
40f4d6:	56                   	push   %esi
40f4d7:	53                   	push   %ebx
40f4d8:	e8 2b e6 ff ff       	call   0x40db08
40f4dd:	e8 2e f9 ff ff       	call   0x40ee10
40f4e2:	5a                   	pop    %edx
40f4e3:	5f                   	pop    %edi
40f4e4:	5e                   	pop    %esi
40f4e5:	5b                   	pop    %ebx
40f4e6:	c3                   	ret
40f4e7:	90                   	nop
40f4e8:	53                   	push   %ebx
40f4e9:	56                   	push   %esi
40f4ea:	8b da                	mov    %edx,%ebx
40f4ec:	8b f0                	mov    %eax,%esi
40f4ee:	3b f3                	cmp    %ebx,%esi
40f4f0:	74 36                	je     0x40f528
40f4f2:	66 f7 03 e8 bf       	testw  $0xbfe8,(%ebx)
40f4f7:	75 26                	jne    0x40f51f
40f4f9:	66 f7 06 e8 bf       	testw  $0xbfe8,(%esi)
40f4fe:	74 07                	je     0x40f507
40f500:	8b c6                	mov    %esi,%eax
40f502:	e8 3d fc ff ff       	call   0x40f144
40f507:	8b 03                	mov    (%ebx),%eax
40f509:	89 06                	mov    %eax,(%esi)
40f50b:	8b 43 04             	mov    0x4(%ebx),%eax
40f50e:	89 46 04             	mov    %eax,0x4(%esi)
40f511:	8b 43 08             	mov    0x8(%ebx),%eax
40f514:	89 46 08             	mov    %eax,0x8(%esi)
40f517:	8b 43 0c             	mov    0xc(%ebx),%eax
40f51a:	89 46 0c             	mov    %eax,0xc(%esi)
40f51d:	eb 09                	jmp    0x40f528
40f51f:	8b d3                	mov    %ebx,%edx
40f521:	8b c6                	mov    %esi,%eax
40f523:	e8 14 ff ff ff       	call   0x40f43c
40f528:	5e                   	pop    %esi
40f529:	5b                   	pop    %ebx
40f52a:	c3                   	ret
40f52b:	90                   	nop
40f52c:	55                   	push   %ebp
40f52d:	8b ec                	mov    %esp,%ebp
40f52f:	83 c4 f0             	add    $0xfffffff0,%esp
40f532:	53                   	push   %ebx
40f533:	56                   	push   %esi
40f534:	57                   	push   %edi
40f535:	8b f9                	mov    %ecx,%edi
40f537:	8b f2                	mov    %edx,%esi
40f539:	8b d8                	mov    %eax,%ebx
40f53b:	8d 45 f0             	lea    -0x10(%ebp),%eax
40f53e:	50                   	push   %eax
40f53f:	e8 b4 e5 ff ff       	call   0x40daf8
40f544:	33 c0                	xor    %eax,%eax
40f546:	55                   	push   %ebp
40f547:	68 88 f5 40 00       	push   $0x40f588
40f54c:	64 ff 30             	push   %fs:(%eax)
40f54f:	64 89 20             	mov    %esp,%fs:(%eax)
40f552:	8b d6                	mov    %esi,%edx