406fdc:	0f 84 5c 04 00 00    	je     0x40743e
406fe2:	8b c3                	mov    %ebx,%eax
406fe4:	6a 02                	push   $0x2
406fe6:	5a                   	pop    %edx
406fe7:	25 00 00 70 00       	and    $0x700000,%eax
406fec:	0f 85 2a bf 07 00    	jne    0x482f1c
406ff2:	89 55 ac             	mov    %edx,-0x54(%ebp)
406ff5:	33 c9                	xor    %ecx,%ecx
406ff7:	8d 85 40 ee ff ff    	lea    -0x11c0(%ebp),%eax
406ffd:	89 85 44 ff ff ff    	mov    %eax,-0xbc(%ebp)
407003:	89 85 50 ff ff ff    	mov    %eax,-0xb0(%ebp)
407009:	89 85 40 ff ff ff    	mov    %eax,-0xc0(%ebp)
40700f:	89 8d 7c ff ff ff    	mov    %ecx,-0x84(%ebp)
407015:	89 4d 80             	mov    %ecx,-0x80(%ebp)
407018:	89 8d 74 ff ff ff    	mov    %ecx,-0x8c(%ebp)
40701e:	89 8d 70 ff ff ff    	mov    %ecx,-0x90(%ebp)
407024:	89 8d 60 ff ff ff    	mov    %ecx,-0xa0(%ebp)
40702a:	89 8d 64 ff ff ff    	mov    %ecx,-0x9c(%ebp)
407030:	89 8d 5c ff ff ff    	mov    %ecx,-0xa4(%ebp)
407036:	89 4d a8             	mov    %ecx,-0x58(%ebp)
407039:	89 4d 84             	mov    %ecx,-0x7c(%ebp)
40703c:	8d 85 40 fe ff ff    	lea    -0x1c0(%ebp),%eax
407042:	8b cf                	mov    %edi,%ecx
407044:	c7 85 6c ff ff ff 00 	movl   $0x800,-0x94(%ebp)
40704b:	08 00 00
40704e:	89 85 58 ff ff ff    	mov    %eax,-0xa8(%ebp)
407054:	c7 85 68 ff ff ff 14 	movl   $0x14,-0x98(%ebp)
40705b:	00 00 00
40705e:	89 bd 48 ff ff ff    	mov    %edi,-0xb8(%ebp)
407064:	e8 15 1b 00 00       	call   0x408b7e
407069:	8d 04 47             	lea    (%edi,%eax,2),%eax
40706c:	89 85 4c ff ff ff    	mov    %eax,-0xb4(%ebp)
407072:	8d 04 77             	lea    (%edi,%esi,2),%eax
407075:	89 45 c8             	mov    %eax,-0x38(%ebp)
407078:	89 45 dc             	mov    %eax,-0x24(%ebp)
40707b:	8d 85 40 ee ff ff    	lea    -0x11c0(%ebp),%eax
407081:	89 45 e8             	mov    %eax,-0x18(%ebp)
407084:	33 c9                	xor    %ecx,%ecx
407086:	b8 83 00 00 00       	mov    $0x83,%eax
40708b:	66 89 85 40 ee ff ff 	mov    %ax,-0x11c0(%ebp)
407092:	8d 45 d0             	lea    -0x30(%ebp),%eax
407095:	50                   	push   %eax
407096:	8d 85 30 ff ff ff    	lea    -0xd0(%ebp),%eax
40709c:	50                   	push   %eax
40709d:	51                   	push   %ecx
40709e:	8d 45 d4             	lea    -0x2c(%ebp),%eax
4070a1:	50                   	push   %eax
4070a2:	8d 45 e4             	lea    -0x1c(%ebp),%eax
4070a5:	50                   	push   %eax
4070a6:	8d 45 f4             	lea    -0xc(%ebp),%eax
4070a9:	50                   	push   %eax
4070aa:	8d 45 c4             	lea    -0x3c(%ebp),%eax
4070ad:	50                   	push   %eax
4070ae:	51                   	push   %ecx
4070af:	51                   	push   %ecx
4070b0:	51                   	push   %ecx
4070b1:	51                   	push   %ecx
4070b2:	8d 45 f8             	lea    -0x8(%ebp),%eax
4070b5:	50                   	push   %eax
4070b6:	8d 45 dc             	lea    -0x24(%ebp),%eax
4070b9:	89 4d 98             	mov    %ecx,-0x68(%ebp)
4070bc:	89 4d 88             	mov    %ecx,-0x78(%ebp)
4070bf:	89 4d 8c             	mov    %ecx,-0x74(%ebp)
4070c2:	89 8d 78 ff ff ff    	mov    %ecx,-0x88(%ebp)
4070c8:	89 8d 54 ff ff ff    	mov    %ecx,-0xac(%ebp)
4070ce:	50                   	push   %eax
4070cf:	8d 55 e8             	lea    -0x18(%ebp),%edx
4070d2:	8b cb                	mov    %ebx,%ecx
4070d4:	89 5d 90             	mov    %ebx,-0x70(%ebp)
4070d7:	e8 98 03 00 00       	call   0x407474
4070dc:	8b 75 f8             	mov    -0x8(%ebp),%esi
4070df:	83 c4 34             	add    $0x34,%esp
4070e2:	85 f6                	test   %esi,%esi
4070e4:	0f 85 64 c0 07 00    	jne    0x48314e
4070ea:	8b 4d d0             	mov    -0x30(%ebp),%ecx
4070ed:	89 4d d0             	mov    %ecx,-0x30(%ebp)
4070f0:	81 f9 00 00 01 00    	cmp    $0x10000,%ecx
4070f6:	0f 8f 46 03 00 00    	jg     0x407442
4070fc:	39 75 a8             	cmp    %esi,-0x58(%ebp)
4070ff:	0f 85 97 be 07 00    	jne    0x482f9c
407105:	8b 85 64 ff ff ff    	mov    -0x9c(%ebp),%eax
40710b:	0f af 85 60 ff ff ff 	imul   -0xa0(%ebp),%eax
407112:	03 c1                	add    %ecx,%eax
407114:	8d 34 45 38 00 00 00 	lea    0x38(,%eax,2),%esi
40711b:	56                   	push   %esi
40711c:	ff 15 dc bd 4b 00    	call   *0x4bbddc
407122:	8b d8                	mov    %eax,%ebx
407124:	59                   	pop    %ecx
407125:	85 db                	test   %ebx,%ebx
407127:	0f 84 f2 02 00 00    	je     0x40741f
40712d:	89 73 04             	mov    %esi,0x4(%ebx)
407130:	c7 03 45 52 43 50    	movl   $0x50435245,(%ebx)
407136:	8b 45 90             	mov    -0x70(%ebp),%eax
407139:	89 43 08             	mov    %eax,0x8(%ebx)
40713c:	8b 45 94             	mov    -0x6c(%ebp),%eax
40713f:	89 43 0c             	mov    %eax,0xc(%ebx)
407142:	8b 45 d8             	mov    -0x28(%ebp),%eax
407145:	89 43 10             	mov    %eax,0x10(%ebx)
407148:	8b 45 e0             	mov    -0x20(%ebp),%eax
40714b:	89 43 14             	mov    %eax,0x14(%ebx)
40714e:	33 c0                	xor    %eax,%eax
407150:	89 43 18             	mov    %eax,0x18(%ebx)
407153:	6a 1c                	push   $0x1c
407155:	58                   	pop    %eax
407156:	66 89 43 22          	mov    %ax,0x22(%ebx)
40715a:	66 8b 85 64 ff ff ff 	mov    -0x9c(%ebp),%ax
407161:	66 89 43 24          	mov    %ax,0x24(%ebx)
407165:	66 8b 85 60 ff ff ff 	mov    -0xa0(%ebp),%ax
40716c:	66 89 43 26          	mov    %ax,0x26(%ebx)
407170:	33 f6                	xor    %esi,%esi
407172:	89 73 30             	mov    %esi,0x30(%ebx)
407175:	89 73 34             	mov    %esi,0x34(%ebx)
407178:	33 c0                	xor    %eax,%eax
40717a:	89 43 28             	mov    %eax,0x28(%ebx)
40717d:	89 43 2c             	mov    %eax,0x2c(%ebx)
407180:	8b 85 70 ff ff ff    	mov    -0x90(%ebp),%eax
407186:	89 85 74 ff ff ff    	mov    %eax,-0x8c(%ebp)
40718c:	89 75 88             	mov    %esi,-0x78(%ebp)
40718f:	89 75 8c             	mov    %esi,-0x74(%ebp)
407192:	89 b5 70 ff ff ff    	mov    %esi,-0x90(%ebp)
407198:	89 b5 78 ff ff ff    	mov    %esi,-0x88(%ebp)
40719e:	0f b7 43 22          	movzwl 0x22(%ebx),%eax
4071a2:	8d 14 43             	lea    (%ebx,%eax,2),%edx
4071a5:	89 95 5c ff ff ff    	mov    %edx,-0xa4(%ebp)
4071ab:	0f b7 43 24          	movzwl 0x24(%ebx),%eax
4071af:	0f b7 4b 26          	movzwl 0x26(%ebx),%ecx
4071b3:	0f af c8             	imul   %eax,%ecx
4071b6:	8b 85 40 ff ff ff    	mov    -0xc0(%ebp),%eax
4071bc:	89 85 50 ff ff ff    	mov    %eax,-0xb0(%ebp)
4071c2:	8b 85 60 ff ff ff    	mov    -0xa0(%ebp),%eax
4071c8:	8d 3c 4a             	lea    (%edx,%ecx,2),%edi
4071cb:	89 7d e0             	mov    %edi,-0x20(%ebp)
4071ce:	89 bd 44 ff ff ff    	mov    %edi,-0xbc(%ebp)
4071d4:	89 75 98             	mov    %esi,-0x68(%ebp)
4071d7:	89 75 9c             	mov    %esi,-0x64(%ebp)
4071da:	89 75 a0             	mov    %esi,-0x60(%ebp)
4071dd:	89 75 a4             	mov    %esi,-0x5c(%ebp)
4071e0:	89 b5 54 ff ff ff    	mov    %esi,-0xac(%ebp)
4071e6:	85 c0                	test   %eax,%eax
4071e8:	0f 8f c4 bd 07 00    	jg     0x482fb2
4071ee:	8b 45 c8             	mov    -0x38(%ebp),%eax
4071f1:	89 45 dc             	mov    %eax,-0x24(%ebp)
4071f4:	56                   	push   %esi
4071f5:	b8 83 00 00 00       	mov    $0x83,%eax
4071fa:	66 89 07             	mov    %ax,(%edi)
4071fd:	8b 4b 08             	mov    0x8(%ebx),%ecx
407200:	8d 85 30 ff ff ff    	lea    -0xd0(%ebp),%eax
407206:	50                   	push   %eax
407207:	56                   	push   %esi
407208:	8d 45 d4             	lea    -0x2c(%ebp),%eax
40720b:	50                   	push   %eax
40720c:	8d 45 e4             	lea    -0x1c(%ebp),%eax
40720f:	50                   	push   %eax
407210:	8d 45 f4             	lea    -0xc(%ebp),%eax
407213:	50                   	push   %eax
407214:	8d 45 c4             	lea    -0x3c(%ebp),%eax
407217:	50                   	push   %eax
407218:	56                   	push   %esi
407219:	56                   	push   %esi
40721a:	56                   	push   %esi
40721b:	56                   	push   %esi
40721c:	8d 45 f8             	lea    -0x8(%ebp),%eax
40721f:	50                   	push   %eax
407220:	8d 45 dc             	lea    -0x24(%ebp),%eax
407223:	50                   	push   %eax
407224:	8d 55 e8             	lea    -0x18(%ebp),%edx
407227:	89 7d e8             	mov    %edi,-0x18(%ebp)
40722a:	e8 45 02 00 00       	call   0x407474
40722f:	66 8b 85 70 ff ff ff 	mov    -0x90(%ebp),%ax
407236:	66 89 43 1e          	mov    %ax,0x1e(%ebx)
40723a:	66 8b 85 7c ff ff ff 	mov    -0x84(%ebp),%ax
407241:	66 89 43 20          	mov    %ax,0x20(%ebx)
407245:	66 8b 85 78 ff ff ff 	mov    -0x88(%ebp),%ax
40724c:	66 89 43 1c          	mov    %ax,0x1c(%ebx)
407250:	8b 45 94             	mov    -0x6c(%ebp),%eax
407253:	83 c8 02             	or     $0x2,%eax
407256:	83 c4 34             	add    $0x34,%esp
407259:	89 43 0c             	mov    %eax,0xc(%ebx)
40725c:	83 7d 9c 00          	cmpl   $0x0,-0x64(%ebp)
407260:	0f 85 9e bd 07 00    	jne    0x483004
407266:	8b 45 d4             	mov    -0x2c(%ebp),%eax
407269:	89 45 d8             	mov    %eax,-0x28(%ebp)
40726c:	8b 45 e4             	mov    -0x1c(%ebp),%eax
40726f:	89 45 cc             	mov    %eax,-0x34(%ebp)
407272:	8b 75 f8             	mov    -0x8(%ebp),%esi
407275:	33 d2                	xor    %edx,%edx
407277:	89 75 f8             	mov    %esi,-0x8(%ebp)
40727a:	85 f6                	test   %esi,%esi
40727c:	75 0c                	jne    0x40728a
40727e:	8b 45 dc             	mov    -0x24(%ebp),%eax
407281:	66 39 10             	cmp    %dx,(%eax)
407284:	0f 85 8a bd 07 00    	jne    0x483014
40728a:	8b 45 e8             	mov    -0x18(%ebp),%eax
40728d:	33 c9                	xor    %ecx,%ecx
40728f:	66 89 08             	mov    %cx,(%eax)
407292:	83 c0 02             	add    $0x2,%eax
407295:	89 45 e8             	mov    %eax,-0x18(%ebp)
407298:	2b c7                	sub    %edi,%eax
40729a:	d1 f8                	sar    $1,%eax
40729c:	3b 45 d0             	cmp    -0x30(%ebp),%eax
40729f:	0f 8f 7a bd 07 00    	jg     0x48301f
4072a5:	8b 85 50 ff ff ff    	mov    -0xb0(%ebp),%eax
4072ab:	8b 8d 40 ff ff ff    	mov    -0xc0(%ebp),%ecx
4072b1:	3b c1                	cmp    %ecx,%eax
4072b3:	0f 87 71 bd 07 00    	ja     0x48302a
4072b9:	81 bd 6c ff ff ff 00 	cmpl   $0x800,-0x94(%ebp)
4072c0:	08 00 00
4072c3:	0f 8f d5 bd 07 00    	jg     0x48309e
4072c9:	33 c0                	xor    %eax,%eax
4072cb:	89 85 40 ff ff ff    	mov    %eax,-0xc0(%ebp)
4072d1:	85 f6                	test   %esi,%esi
4072d3:	75 0e                	jne    0x4072e3
4072d5:	66 8b 43 20          	mov    0x20(%ebx),%ax
4072d9:	66 3b 43 1e          	cmp    0x1e(%ebx),%ax
4072dd:	0f 87 c8 bd 07 00    	ja     0x4830ab
4072e3:	f7 45 ec 00 00 02 00 	testl  $0x20000,-0x14(%ebp)
4072ea:	8b 75 fc             	mov    -0x4(%ebp),%esi
4072ed:	75 11                	jne    0x407300
4072ef:	8d 85 30 ff ff ff    	lea    -0xd0(%ebp),%eax
4072f5:	50                   	push   %eax
4072f6:	8b d6                	mov    %esi,%edx
4072f8:	8b cf                	mov    %edi,%ecx
4072fa:	e8 8f 18 00 00       	call   0x408b8e
4072ff:	59                   	pop    %ecx
407300:	83 7d a4 00          	cmpl   $0x0,-0x5c(%ebp)
407304:	0f 85 ac bd 07 00    	jne    0x4830b6
40730a:	8b 75 f8             	mov    -0x8(%ebp),%esi
40730d:	85 f6                	test   %esi,%esi
40730f:	0f 85 31 be 07 00    	jne    0x483146
407315:	8b 43 08             	mov    0x8(%ebx),%eax
407318:	be 80 00 00 00       	mov    $0x80,%esi
40731d:	89 45 c8             	mov    %eax,-0x38(%ebp)
407320:	89 75 0c             	mov    %esi,0xc(%ebp)
407323:	a8 10                	test   $0x10,%al
407325:	75 59                	jne    0x407380
407327:	33 f6                	xor    %esi,%esi
407329:	8d 85 30 ff ff ff    	lea    -0xd0(%ebp),%eax
40732f:	56                   	push   %esi
407330:	50                   	push   %eax
407331:	33 d2                	xor    %edx,%edx
407333:	8b cf                	mov    %edi,%ecx
407335:	e8 3b fa ff ff       	call   0x406d75
40733a:	59                   	pop    %ecx
40733b:	59                   	pop    %ecx
40733c:	85 c0                	test   %eax,%eax
40733e:	0f 85 38 be 07 00    	jne    0x48317c
407344:	8b 45 f4             	mov    -0xc(%ebp),%eax
407347:	85 c0                	test   %eax,%eax
407349:	79 74                	jns    0x4073bf
40734b:	56                   	push   %esi
40734c:	8d 55 f4             	lea    -0xc(%ebp),%edx
40734f:	8b cf                	mov    %edi,%ecx
407351:	e8 6e f8 ff ff       	call   0x406bc4
407356:	8b d0                	mov    %eax,%edx
407358:	8b 45 f4             	mov    -0xc(%ebp),%eax
40735b:	59                   	pop    %ecx
40735c:	85 c0                	test   %eax,%eax
40735e:	79 62                	jns    0x4073c2
407360:	8d 85 30 ff ff ff    	lea    -0xd0(%ebp),%eax
407366:	56                   	push   %esi
407367:	50                   	push   %eax
407368:	33 d2                	xor    %edx,%edx
40736a:	8b cf                	mov    %edi,%ecx
40736c:	e8 19 f9 ff ff       	call   0x406c8a
407371:	59                   	pop    %ecx
407372:	59                   	pop    %ecx
407373:	85 c0                	test   %eax,%eax
407375:	0f 85 0f be 07 00    	jne    0x48318a
40737b:	be 80 00 00 00       	mov    $0x80,%esi
407380:	8b 45 d8             	mov    -0x28(%ebp),%eax
407383:	85 c0                	test   %eax,%eax
407385:	79 52                	jns    0x4073d9
407387:	8b 75 e8             	mov    -0x18(%ebp),%esi
40738a:	33 c0                	xor    %eax,%eax
40738c:	50                   	push   %eax
40738d:	8d 85 30 ff ff ff    	lea    -0xd0(%ebp),%eax
407393:	50                   	push   %eax
407394:	ff 75 fc             	push   -0x4(%ebp)
407397:	8b d6                	mov    %esi,%edx
407399:	8b cf                	mov    %edi,%ecx
40739b:	e8 82 15 00 00       	call   0x408922
4073a0:	83 c4 0c             	add    $0xc,%esp
4073a3:	85 c0                	test   %eax,%eax
4073a5:	0f 85 b6 00 00 00    	jne    0x407461
4073ab:	0f b7 47 02          	movzwl 0x2(%edi),%eax
4073af:	8d 3c 47             	lea    (%edi,%eax,2),%edi
4073b2:	66 83 3f 77          	cmpw   $0x77,(%edi)
4073b6:	74 d2                	je     0x40738a
4073b8:	8b c3                	mov    %ebx,%eax
4073ba:	5f                   	pop    %edi
4073bb:	5e                   	pop    %esi
4073bc:	5b                   	pop    %ebx
4073bd:	c9                   	leave
4073be:	c3                   	ret
4073bf:	8b 55 c4             	mov    -0x3c(%ebp),%edx
4073c2:	66 89 53 18          	mov    %dx,0x18(%ebx)
4073c6:	a8 01                	test   $0x1,%al
4073c8:	0f 85 c8 bd 07 00    	jne    0x483196
4073ce:	be 80 00 00 00       	mov    $0x80,%esi
4073d3:	83 4b 0c 10          	orl    $0x10,0xc(%ebx)
4073d7:	eb a7                	jmp    0x407380
4073d9:	f6 43 08 10          	testb  $0x10,0x8(%ebx)
4073dd:	75 67                	jne    0x407446
4073df:	8b 55 cc             	mov    -0x34(%ebp),%edx
4073e2:	66 89 53 1a          	mov    %dx,0x1a(%ebx)
4073e6:	a8 01                	test   $0x1,%al
4073e8:	74 21                	je     0x40740b
4073ea:	83 7d fc 00          	cmpl   $0x0,-0x4(%ebp)
4073ee:	74 60                	je     0x407450
4073f0:	66 3b d6             	cmp    %si,%dx
4073f3:	0f 83 14 be 07 00    	jae    0x48320d
4073f9:	8b 85 34 ff ff ff    	mov    -0xcc(%ebp),%eax
4073ff:	0f b7 ca             	movzwl %dx,%ecx
407402:	0f b6 04 01          	movzbl (%ecx,%eax,1),%eax
407406:	66 3b c2             	cmp    %dx,%ax
407409:	75 51                	jne    0x40745c
40740b:	83 4b 0c 40          	orl    $0x40,0xc(%ebx)
40740f:	e9 73 ff ff ff       	jmp    0x407387
407414:	6a 10                	push   $0x10
407416:	e9 21 b8 07 00       	jmp    0x482c3c
40741b:	6a 11                	push   $0x11
40741d:	eb 02                	jmp    0x407421
40741f:	6a 15                	push   $0x15
407421:	5e                   	pop    %esi
407422:	e9 27 bd 07 00       	jmp    0x48314e
407427:	89 55 e8             	mov    %edx,-0x18(%ebp)
40742a:	e9 6a fb ff ff       	jmp    0x406f99
40742f:	6a 4e                	push   $0x4e
407431:	e9 06 b8 07 00       	jmp    0x482c3c
407436:	89 4d fc             	mov    %ecx,-0x4(%ebp)
407439:	e9 93 fb ff ff       	jmp    0x406fd1
40743e:	6a 38                	push   $0x38
407440:	eb df                	jmp    0x407421
407442:	6a 14                	push   $0x14
407444:	eb db                	jmp    0x407421
407446:	a8 02                	test   $0x2,%al
407448:	0f 84 39 ff ff ff    	je     0x407387
40744e:	eb 8f                	jmp    0x4073df
407450:	b8 ff 00 00 00       	mov    $0xff,%eax
407455:	66 3b d0             	cmp    %ax,%dx
407458:	77 b1                	ja     0x40740b
40745a:	eb 9d                	jmp    0x4073f9
40745c:	09 73 0c             	or     %esi,0xc(%ebx)
40745f:	eb aa                	jmp    0x40740b
407461:	81 4b 0c 00 80 00 00 	orl    $0x8000,0xc(%ebx)
407468:	e9 4b ff ff ff       	jmp    0x4073b8
40746d:	33 c0                	xor    %eax,%eax
40746f:	e9 46 ff ff ff       	jmp    0x4073ba
407474:	55                   	push   %ebp
407475:	8b ec                	mov    %esp,%ebp