40c9c3:	8b c8                	mov    %eax,%ecx
40c9c5:	66 83 f9 3d          	cmp    $0x3d,%cx
40c9c9:	0f 85 83 00 00 00    	jne    0x40ca52
40c9cf:	83 c7 02             	add    $0x2,%edi
40c9d2:	66 39 1f             	cmp    %bx,(%edi)
40c9d5:	74 f8                	je     0x40c9cf
40c9d7:	6a 05                	push   $0x5
40c9d9:	68 f8 ae 41 00       	push   $0x41aef8
40c9de:	57                   	push   %edi
40c9df:	e8 cc 50 00 00       	call   0x411ab0
40c9e4:	83 c4 0c             	add    $0xc,%esp
40c9e7:	85 c0                	test   %eax,%eax
40c9e9:	75 0a                	jne    0x40c9f5
40c9eb:	81 0e 00 00 04 00    	orl    $0x40000,(%esi)
40c9f1:	6a 0a                	push   $0xa
40c9f3:	eb 3a                	jmp    0x40ca2f
40c9f5:	6a 08                	push   $0x8
40c9f7:	68 04 af 41 00       	push   $0x41af04
40c9fc:	57                   	push   %edi
40c9fd:	e8 ae 50 00 00       	call   0x411ab0
40ca02:	83 c4 0c             	add    $0xc,%esp
40ca05:	85 c0                	test   %eax,%eax
40ca07:	75 0a                	jne    0x40ca13
40ca09:	81 0e 00 00 02 00    	orl    $0x20000,(%esi)
40ca0f:	6a 10                	push   $0x10
40ca11:	eb 1c                	jmp    0x40ca2f
40ca13:	6a 07                	push   $0x7
40ca15:	68 14 af 41 00       	push   $0x41af14
40ca1a:	57                   	push   %edi
40ca1b:	e8 90 50 00 00       	call   0x411ab0
40ca20:	83 c4 0c             	add    $0xc,%esp
40ca23:	85 c0                	test   %eax,%eax
40ca25:	75 2b                	jne    0x40ca52
40ca27:	81 0e 00 00 01 00    	orl    $0x10000,(%esi)
40ca2d:	6a 0e                	push   $0xe
40ca2f:	58                   	pop    %eax
40ca30:	8d 0c 07             	lea    (%edi,%eax,1),%ecx
40ca33:	0f b7 01             	movzwl (%ecx),%eax
40ca36:	8b d0                	mov    %eax,%edx
40ca38:	66 3b c3             	cmp    %bx,%ax
40ca3b:	75 0d                	jne    0x40ca4a
40ca3d:	8d 49 02             	lea    0x2(%ecx),%ecx
40ca40:	0f b7 01             	movzwl (%ecx),%eax
40ca43:	66 3b c3             	cmp    %bx,%ax
40ca46:	74 f5                	je     0x40ca3d
40ca48:	8b d0                	mov    %eax,%edx
40ca4a:	66 85 d2             	test   %dx,%dx
40ca4d:	e9 2f ff ff ff       	jmp    0x40c981
40ca52:	e8 d8 dc ff ff       	call   0x40a72f
40ca57:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40ca5d:	e8 67 aa ff ff       	call   0x4074c9
40ca62:	5f                   	pop    %edi
40ca63:	8b c6                	mov    %esi,%eax
40ca65:	5e                   	pop    %esi
40ca66:	5b                   	pop    %ebx
40ca67:	c9                   	leave
40ca68:	c3                   	ret
40ca69:	8b ff                	mov    %edi,%edi
40ca6b:	55                   	push   %ebp
40ca6c:	8b ec                	mov    %esp,%ebp
40ca6e:	83 ec 1c             	sub    $0x1c,%esp
40ca71:	56                   	push   %esi
40ca72:	57                   	push   %edi
40ca73:	ff 75 0c             	push   0xc(%ebp)
40ca76:	8d 45 e4             	lea    -0x1c(%ebp),%eax
40ca79:	50                   	push   %eax
40ca7a:	e8 7f fd ff ff       	call   0x40c7fe
40ca7f:	8b f0                	mov    %eax,%esi
40ca81:	8d 7d f0             	lea    -0x10(%ebp),%edi
40ca84:	59                   	pop    %ecx
40ca85:	59                   	pop    %ecx
40ca86:	a5                   	movsl  %ds:(%esi),%es:(%edi)
40ca87:	a5                   	movsl  %ds:(%esi),%es:(%edi)
40ca88:	a5                   	movsl  %ds:(%esi),%es:(%edi)
40ca89:	80 7d f8 00          	cmpb   $0x0,-0x8(%ebp)
40ca8d:	5f                   	pop    %edi
40ca8e:	5e                   	pop    %esi
40ca8f:	74 57                	je     0x40cae8
40ca91:	68 80 01 00 00       	push   $0x180
40ca96:	ff 75 10             	push   0x10(%ebp)
40ca99:	8d 45 fc             	lea    -0x4(%ebp),%eax
40ca9c:	ff 75 f0             	push   -0x10(%ebp)
40ca9f:	ff 75 08             	push   0x8(%ebp)
40caa2:	50                   	push   %eax
40caa3:	e8 3b 5a 00 00       	call   0x4124e3
40caa8:	83 c4 14             	add    $0x14,%esp
40caab:	85 c0                	test   %eax,%eax
40caad:	75 39                	jne    0x40cae8
40caaf:	8b 45 14             	mov    0x14(%ebp),%eax
40cab2:	ff 05 44 1e 42 00    	incl   0x421e44
40cab8:	83 c0 0c             	add    $0xc,%eax
40cabb:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40cabe:	f0 09 08             	lock or %ecx,(%eax)
40cac1:	8b 45 14             	mov    0x14(%ebp),%eax
40cac4:	33 c9                	xor    %ecx,%ecx
40cac6:	89 48 08             	mov    %ecx,0x8(%eax)
40cac9:	8b 45 14             	mov    0x14(%ebp),%eax
40cacc:	89 48 1c             	mov    %ecx,0x1c(%eax)
40cacf:	8b 45 14             	mov    0x14(%ebp),%eax
40cad2:	89 48 04             	mov    %ecx,0x4(%eax)
40cad5:	8b 45 14             	mov    0x14(%ebp),%eax
40cad8:	89 08                	mov    %ecx,(%eax)
40cada:	8b 4d 14             	mov    0x14(%ebp),%ecx
40cadd:	8b 45 fc             	mov    -0x4(%ebp),%eax
40cae0:	89 41 10             	mov    %eax,0x10(%ecx)
40cae3:	8b 45 14             	mov    0x14(%ebp),%eax
40cae6:	c9                   	leave
40cae7:	c3                   	ret
40cae8:	33 c0                	xor    %eax,%eax
40caea:	c9                   	leave
40caeb:	c3                   	ret
40caec:	8b ff                	mov    %edi,%edi
40caee:	55                   	push   %ebp
40caef:	8b ec                	mov    %esp,%ebp
40caf1:	8b 4d 08             	mov    0x8(%ebp),%ecx
40caf4:	8b 01                	mov    (%ecx),%eax
40caf6:	a8 40                	test   $0x40,%al
40caf8:	74 04                	je     0x40cafe
40cafa:	32 c0                	xor    %al,%al
40cafc:	5d                   	pop    %ebp
40cafd:	c3                   	ret
40cafe:	83 c8 40             	or     $0x40,%eax
40cb01:	89 01                	mov    %eax,(%ecx)
40cb03:	b0 01                	mov    $0x1,%al
40cb05:	5d                   	pop    %ebp
40cb06:	c3                   	ret
40cb07:	8b ff                	mov    %edi,%edi
40cb09:	55                   	push   %ebp
40cb0a:	8b ec                	mov    %esp,%ebp
40cb0c:	8b 4d 08             	mov    0x8(%ebp),%ecx
40cb0f:	ba 00 10 00 00       	mov    $0x1000,%edx
40cb14:	8b 01                	mov    (%ecx),%eax
40cb16:	85 c2                	test   %eax,%edx
40cb18:	74 04                	je     0x40cb1e
40cb1a:	32 c0                	xor    %al,%al
40cb1c:	5d                   	pop    %ebp
40cb1d:	c3                   	ret
40cb1e:	0b c2                	or     %edx,%eax
40cb20:	89 01                	mov    %eax,(%ecx)
40cb22:	b0 01                	mov    $0x1,%al
40cb24:	5d                   	pop    %ebp
40cb25:	c3                   	ret
40cb26:	8b ff                	mov    %edi,%edi
40cb28:	55                   	push   %ebp
40cb29:	8b ec                	mov    %esp,%ebp
40cb2b:	8b 4d 08             	mov    0x8(%ebp),%ecx
40cb2e:	8b 01                	mov    (%ecx),%eax
40cb30:	a9 00 c0 00 00       	test   $0xc000,%eax
40cb35:	74 04                	je     0x40cb3b
40cb37:	32 c0                	xor    %al,%al
40cb39:	5d                   	pop    %ebp
40cb3a:	c3                   	ret
40cb3b:	0d 00 80 00 00       	or     $0x8000,%eax
40cb40:	89 01                	mov    %eax,(%ecx)
40cb42:	b0 01                	mov    $0x1,%al
40cb44:	5d                   	pop    %ebp
40cb45:	c3                   	ret
40cb46:	8b ff                	mov    %edi,%edi
40cb48:	55                   	push   %ebp
40cb49:	8b ec                	mov    %esp,%ebp
40cb4b:	8b 45 0c             	mov    0xc(%ebp),%eax
40cb4e:	80 38 00             	cmpb   $0x0,(%eax)
40cb51:	74 04                	je     0x40cb57
40cb53:	32 c0                	xor    %al,%al
40cb55:	5d                   	pop    %ebp
40cb56:	c3                   	ret
40cb57:	8b 4d 08             	mov    0x8(%ebp),%ecx
40cb5a:	c6 00 01             	movb   $0x1,(%eax)
40cb5d:	b0 01                	mov    $0x1,%al
40cb5f:	81 49 04 00 08 00 00 	orl    $0x800,0x4(%ecx)
40cb66:	5d                   	pop    %ebp
40cb67:	c3                   	ret
40cb68:	8b ff                	mov    %edi,%edi
40cb6a:	55                   	push   %ebp
40cb6b:	8b ec                	mov    %esp,%ebp
40cb6d:	8b 45 0c             	mov    0xc(%ebp),%eax
40cb70:	80 38 00             	cmpb   $0x0,(%eax)
40cb73:	74 04                	je     0x40cb79
40cb75:	32 c0                	xor    %al,%al
40cb77:	5d                   	pop    %ebp
40cb78:	c3                   	ret
40cb79:	8b 4d 08             	mov    0x8(%ebp),%ecx
40cb7c:	c6 00 01             	movb   $0x1,(%eax)
40cb7f:	b0 01                	mov    $0x1,%al
40cb81:	81 61 04 ff f7 ff ff 	andl   $0xfffff7ff,0x4(%ecx)
40cb88:	5d                   	pop    %ebp
40cb89:	c3                   	ret
40cb8a:	8b ff                	mov    %edi,%edi
40cb8c:	55                   	push   %ebp
40cb8d:	8b ec                	mov    %esp,%ebp
40cb8f:	8b 45 0c             	mov    0xc(%ebp),%eax
40cb92:	80 38 00             	cmpb   $0x0,(%eax)
40cb95:	75 25                	jne    0x40cbbc
40cb97:	8b 55 08             	mov    0x8(%ebp),%edx
40cb9a:	c6 00 01             	movb   $0x1,(%eax)
40cb9d:	8b 0a                	mov    (%edx),%ecx
40cb9f:	f6 c1 02             	test   $0x2,%cl
40cba2:	75 18                	jne    0x40cbbc
40cba4:	83 e1 fe             	and    $0xfffffffe,%ecx
40cba7:	b0 01                	mov    $0x1,%al
40cba9:	83 c9 02             	or     $0x2,%ecx
40cbac:	89 0a                	mov    %ecx,(%edx)
40cbae:	8b 4a 04             	mov    0x4(%edx),%ecx
40cbb1:	83 e1 fc             	and    $0xfffffffc,%ecx
40cbb4:	83 c9 04             	or     $0x4,%ecx
40cbb7:	89 4a 04             	mov    %ecx,0x4(%edx)
40cbba:	5d                   	pop    %ebp
40cbbb:	c3                   	ret
40cbbc:	32 c0                	xor    %al,%al
40cbbe:	5d                   	pop    %ebp
40cbbf:	c3                   	ret
40cbc0:	8b ff                	mov    %edi,%edi
40cbc2:	55                   	push   %ebp
40cbc3:	8b ec                	mov    %esp,%ebp
40cbc5:	8b 4d 08             	mov    0x8(%ebp),%ecx
40cbc8:	8b 01                	mov    (%ecx),%eax
40cbca:	a9 00 c0 00 00       	test   $0xc000,%eax
40cbcf:	74 04                	je     0x40cbd5
40cbd1:	32 c0                	xor    %al,%al
40cbd3:	5d                   	pop    %ebp
40cbd4:	c3                   	ret
40cbd5:	0d 00 40 00 00       	or     $0x4000,%eax
40cbda:	89 01                	mov    %eax,(%ecx)
40cbdc:	b0 01                	mov    $0x1,%al
40cbde:	5d                   	pop    %ebp
40cbdf:	c3                   	ret
40cbe0:	8b ff                	mov    %edi,%edi
40cbe2:	55                   	push   %ebp
40cbe3:	8b ec                	mov    %esp,%ebp
40cbe5:	8b 4d 08             	mov    0x8(%ebp),%ecx
40cbe8:	8b 01                	mov    (%ecx),%eax
40cbea:	a9 00 02 00 00       	test   $0x200,%eax
40cbef:	75 04                	jne    0x40cbf5
40cbf1:	32 c0                	xor    %al,%al
40cbf3:	5d                   	pop    %ebp
40cbf4:	c3                   	ret
40cbf5:	0d 00 04 00 00       	or     $0x400,%eax
40cbfa:	89 01                	mov    %eax,(%ecx)
40cbfc:	b0 01                	mov    $0x1,%al
40cbfe:	5d                   	pop    %ebp
40cbff:	c3                   	ret
40cc00:	8b ff                	mov    %edi,%edi
40cc02:	55                   	push   %ebp
40cc03:	8b ec                	mov    %esp,%ebp
40cc05:	5d                   	pop    %ebp
40cc06:	e9 5e fe ff ff       	jmp    0x40ca69
40cc0b:	8b ff                	mov    %edi,%edi
40cc0d:	55                   	push   %ebp
40cc0e:	8b ec                	mov    %esp,%ebp
40cc10:	51                   	push   %ecx
40cc11:	51                   	push   %ecx
40cc12:	53                   	push   %ebx
40cc13:	56                   	push   %esi
40cc14:	57                   	push   %edi
40cc15:	8b 7d 08             	mov    0x8(%ebp),%edi
40cc18:	8b 47 0c             	mov    0xc(%edi),%eax
40cc1b:	90                   	nop
40cc1c:	c1 e8 0c             	shr    $0xc,%eax
40cc1f:	bb e8 11 42 00       	mov    $0x4211e8,%ebx
40cc24:	a8 01                	test   $0x1,%al
40cc26:	75 66                	jne    0x40cc8e
40cc28:	57                   	push   %edi
40cc29:	e8 95 e5 ff ff       	call   0x40b1c3
40cc2e:	59                   	pop    %ecx
40cc2f:	83 f8 ff             	cmp    $0xffffffff,%eax
40cc32:	74 30                	je     0x40cc64
40cc34:	57                   	push   %edi
40cc35:	e8 89 e5 ff ff       	call   0x40b1c3
40cc3a:	59                   	pop    %ecx
40cc3b:	83 f8 fe             	cmp    $0xfffffffe,%eax
40cc3e:	74 24                	je     0x40cc64
40cc40:	57                   	push   %edi
40cc41:	e8 7d e5 ff ff       	call   0x40b1c3
40cc46:	8b f0                	mov    %eax,%esi
40cc48:	57                   	push   %edi
40cc49:	c1 fe 06             	sar    $0x6,%esi
40cc4c:	e8 72 e5 ff ff       	call   0x40b1c3
40cc51:	59                   	pop    %ecx
40cc52:	83 e0 3f             	and    $0x3f,%eax
40cc55:	59                   	pop    %ecx
40cc56:	6b c8 38             	imul   $0x38,%eax,%ecx
40cc59:	8b 04 b5 a8 21 42 00 	mov    0x4221a8(,%esi,4),%eax
40cc60:	03 c1                	add    %ecx,%eax
40cc62:	eb 02                	jmp    0x40cc66
40cc64:	8b c3                	mov    %ebx,%eax
40cc66:	80 78 29 00          	cmpb   $0x0,0x29(%eax)
40cc6a:	74 22                	je     0x40cc8e
40cc6c:	8d 75 fc             	lea    -0x4(%ebp),%esi
40cc6f:	57                   	push   %edi
40cc70:	e8 4d 01 00 00       	call   0x40cdc2
40cc75:	59                   	pop    %ecx
40cc76:	83 f8 ff             	cmp    $0xffffffff,%eax
40cc79:	74 71                	je     0x40ccec
40cc7b:	88 06                	mov    %al,(%esi)
40cc7d:	46                   	inc    %esi
40cc7e:	8d 45 fe             	lea    -0x2(%ebp),%eax
40cc81:	3b f0                	cmp    %eax,%esi
40cc83:	75 ea                	jne    0x40cc6f
40cc85:	66 8b 45 fc          	mov    -0x4(%ebp),%ax
40cc89:	e9 e8 00 00 00       	jmp    0x40cd76
40cc8e:	8b 47 0c             	mov    0xc(%edi),%eax
40cc91:	90                   	nop
40cc92:	c1 e8 0c             	shr    $0xc,%eax
40cc95:	a8 01                	test   $0x1,%al
40cc97:	0f 85 b8 00 00 00    	jne    0x40cd55
40cc9d:	57                   	push   %edi
40cc9e:	e8 20 e5 ff ff       	call   0x40b1c3
40cca3:	59                   	pop    %ecx
40cca4:	83 f8 ff             	cmp    $0xffffffff,%eax
40cca7:	74 2e                	je     0x40ccd7
40cca9:	57                   	push   %edi
40ccaa:	e8 14 e5 ff ff       	call   0x40b1c3
40ccaf:	59                   	pop    %ecx
40ccb0:	83 f8 fe             	cmp    $0xfffffffe,%eax
40ccb3:	74 22                	je     0x40ccd7
40ccb5:	57                   	push   %edi
40ccb6:	e8 08 e5 ff ff       	call   0x40b1c3
40ccbb:	8b f0                	mov    %eax,%esi
40ccbd:	57                   	push   %edi
40ccbe:	c1 fe 06             	sar    $0x6,%esi
40ccc1:	e8 fd e4 ff ff       	call   0x40b1c3
40ccc6:	8b 1c b5 a8 21 42 00 	mov    0x4221a8(,%esi,4),%ebx
40cccd:	83 e0 3f             	and    $0x3f,%eax
40ccd0:	59                   	pop    %ecx
40ccd1:	59                   	pop    %ecx
40ccd2:	6b c8 38             	imul   $0x38,%eax,%ecx
40ccd5:	03 d9                	add    %ecx,%ebx
40ccd7:	80 7b 28 00          	cmpb   $0x0,0x28(%ebx)
40ccdb:	7d 78                	jge    0x40cd55
40ccdd:	33 f6                	xor    %esi,%esi
40ccdf:	57                   	push   %edi
40cce0:	46                   	inc    %esi
40cce1:	e8 dc 00 00 00       	call   0x40cdc2
40cce6:	59                   	pop    %ecx
40cce7:	83 f8 ff             	cmp    $0xffffffff,%eax
40ccea:	75 0a                	jne    0x40ccf6
40ccec:	b8 ff ff 00 00       	mov    $0xffff,%eax
40ccf1:	e9 80 00 00 00       	jmp    0x40cd76
40ccf6:	88 45 f8             	mov    %al,-0x8(%ebp)
40ccf9:	e8 ed 2e 00 00       	call   0x40fbeb
40ccfe:	0f b6 4d f8          	movzbl -0x8(%ebp),%ecx
40cd02:	66 83 3c 48 00       	cmpw   $0x0,(%eax,%ecx,2)
40cd07:	7d 25                	jge    0x40cd2e
40cd09:	57                   	push   %edi
40cd0a:	e8 b3 00 00 00       	call   0x40cdc2
40cd0f:	59                   	pop    %ecx
40cd10:	83 f8 ff             	cmp    $0xffffffff,%eax
40cd13:	75 13                	jne    0x40cd28
40cd15:	0f be 45 f8          	movsbl -0x8(%ebp),%eax
40cd19:	57                   	push   %edi