40c7f6:	e8 ec 9e ff ff       	call   0x4066e7
40c7fb:	59                   	pop    %ecx
40c7fc:	eb b2                	jmp    0x40c7b0
40c7fe:	8b ff                	mov    %edi,%edi
40c800:	55                   	push   %ebp
40c801:	8b ec                	mov    %esp,%ebp
40c803:	51                   	push   %ecx
40c804:	53                   	push   %ebx
40c805:	56                   	push   %esi
40c806:	8b 75 08             	mov    0x8(%ebp),%esi
40c809:	33 c0                	xor    %eax,%eax
40c80b:	57                   	push   %edi
40c80c:	8b fe                	mov    %esi,%edi
40c80e:	6a 02                	push   $0x2
40c810:	5a                   	pop    %edx
40c811:	6a 20                	push   $0x20
40c813:	ab                   	stos   %eax,%es:(%edi)
40c814:	5b                   	pop    %ebx
40c815:	ab                   	stos   %eax,%es:(%edi)
40c816:	ab                   	stos   %eax,%es:(%edi)
40c817:	8b 7d 0c             	mov    0xc(%ebp),%edi
40c81a:	a1 a0 20 42 00       	mov    0x4220a0,%eax
40c81f:	89 46 04             	mov    %eax,0x4(%esi)
40c822:	0f b7 07             	movzwl (%edi),%eax
40c825:	8b c8                	mov    %eax,%ecx
40c827:	66 3b c3             	cmp    %bx,%ax
40c82a:	75 0c                	jne    0x40c838
40c82c:	03 fa                	add    %edx,%edi
40c82e:	0f b7 07             	movzwl (%edi),%eax
40c831:	66 3b c3             	cmp    %bx,%ax
40c834:	74 f6                	je     0x40c82c
40c836:	8b c8                	mov    %eax,%ecx
40c838:	0f b7 c1             	movzwl %cx,%eax
40c83b:	83 f8 61             	cmp    $0x61,%eax
40c83e:	74 20                	je     0x40c860
40c840:	83 f8 72             	cmp    $0x72,%eax
40c843:	74 12                	je     0x40c857
40c845:	66 83 f9 77          	cmp    $0x77,%cx
40c849:	0f 85 03 02 00 00    	jne    0x40ca52
40c84f:	c7 06 01 03 00 00    	movl   $0x301,(%esi)
40c855:	eb 0f                	jmp    0x40c866
40c857:	c7 46 04 01 00 00 00 	movl   $0x1,0x4(%esi)
40c85e:	eb 09                	jmp    0x40c869
40c860:	c7 06 09 01 00 00    	movl   $0x109,(%esi)
40c866:	89 56 04             	mov    %edx,0x4(%esi)
40c869:	03 fa                	add    %edx,%edi
40c86b:	b1 01                	mov    $0x1,%cl
40c86d:	33 c0                	xor    %eax,%eax
40c86f:	6a 0a                	push   $0xa
40c871:	88 45 ff             	mov    %al,-0x1(%ebp)
40c874:	8a d8                	mov    %al,%bl
40c876:	88 45 fe             	mov    %al,-0x2(%ebp)
40c879:	8a f8                	mov    %al,%bh
40c87b:	5a                   	pop    %edx
40c87c:	0f b7 07             	movzwl (%edi),%eax
40c87f:	66 85 c0             	test   %ax,%ax
40c882:	0f 84 dc 00 00 00    	je     0x40c964
40c888:	83 f8 53             	cmp    $0x53,%eax
40c88b:	77 65                	ja     0x40c8f2
40c88d:	74 56                	je     0x40c8e5
40c88f:	83 e8 20             	sub    $0x20,%eax
40c892:	0f 84 b8 00 00 00    	je     0x40c950
40c898:	83 e8 0b             	sub    $0xb,%eax
40c89b:	74 3b                	je     0x40c8d8
40c89d:	83 e8 01             	sub    $0x1,%eax
40c8a0:	74 30                	je     0x40c8d2
40c8a2:	83 e8 18             	sub    $0x18,%eax
40c8a5:	74 23                	je     0x40c8ca
40c8a7:	2b c2                	sub    %edx,%eax
40c8a9:	74 12                	je     0x40c8bd
40c8ab:	83 e8 04             	sub    $0x4,%eax
40c8ae:	0f 85 9e 01 00 00    	jne    0x40ca52
40c8b4:	84 db                	test   %bl,%bl
40c8b6:	75 1c                	jne    0x40c8d4
40c8b8:	83 0e 10             	orl    $0x10,(%esi)
40c8bb:	eb 2f                	jmp    0x40c8ec
40c8bd:	81 0e 80 00 00 00    	orl    $0x80,(%esi)
40c8c3:	b1 01                	mov    $0x1,%cl
40c8c5:	e9 86 00 00 00       	jmp    0x40c950
40c8ca:	56                   	push   %esi
40c8cb:	e8 1c 02 00 00       	call   0x40caec
40c8d0:	eb 78                	jmp    0x40c94a
40c8d2:	b7 01                	mov    $0x1,%bh
40c8d4:	32 c9                	xor    %cl,%cl
40c8d6:	eb 78                	jmp    0x40c950
40c8d8:	8d 45 fe             	lea    -0x2(%ebp),%eax
40c8db:	50                   	push   %eax
40c8dc:	56                   	push   %esi
40c8dd:	e8 a8 02 00 00       	call   0x40cb8a
40c8e2:	59                   	pop    %ecx
40c8e3:	eb 65                	jmp    0x40c94a
40c8e5:	84 db                	test   %bl,%bl
40c8e7:	75 eb                	jne    0x40c8d4
40c8e9:	83 0e 20             	orl    $0x20,(%esi)
40c8ec:	b3 01                	mov    $0x1,%bl
40c8ee:	8a cb                	mov    %bl,%cl
40c8f0:	eb 5e                	jmp    0x40c950
40c8f2:	83 e8 54             	sub    $0x54,%eax
40c8f5:	74 4d                	je     0x40c944
40c8f7:	83 e8 0e             	sub    $0xe,%eax
40c8fa:	74 40                	je     0x40c93c
40c8fc:	83 e8 01             	sub    $0x1,%eax
40c8ff:	74 2f                	je     0x40c930
40c901:	83 e8 0b             	sub    $0xb,%eax
40c904:	74 1e                	je     0x40c924
40c906:	83 e8 06             	sub    $0x6,%eax
40c909:	74 11                	je     0x40c91c
40c90b:	83 e8 04             	sub    $0x4,%eax
40c90e:	0f 85 3e 01 00 00    	jne    0x40ca52
40c914:	56                   	push   %esi
40c915:	e8 c6 02 00 00       	call   0x40cbe0
40c91a:	eb 2e                	jmp    0x40c94a
40c91c:	56                   	push   %esi
40c91d:	e8 9e 02 00 00       	call   0x40cbc0
40c922:	eb 26                	jmp    0x40c94a
40c924:	8d 45 ff             	lea    -0x1(%ebp),%eax
40c927:	50                   	push   %eax
40c928:	56                   	push   %esi
40c929:	e8 3a 02 00 00       	call   0x40cb68
40c92e:	eb b2                	jmp    0x40c8e2
40c930:	8d 45 ff             	lea    -0x1(%ebp),%eax
40c933:	50                   	push   %eax
40c934:	56                   	push   %esi
40c935:	e8 0c 02 00 00       	call   0x40cb46
40c93a:	eb a6                	jmp    0x40c8e2
40c93c:	56                   	push   %esi
40c93d:	e8 e4 01 00 00       	call   0x40cb26
40c942:	eb 06                	jmp    0x40c94a
40c944:	56                   	push   %esi
40c945:	e8 bd 01 00 00       	call   0x40cb07
40c94a:	59                   	pop    %ecx
40c94b:	6a 0a                	push   $0xa
40c94d:	5a                   	pop    %edx
40c94e:	8a c8                	mov    %al,%cl
40c950:	0f b6 c1             	movzbl %cl,%eax
40c953:	f7 d8                	neg    %eax
40c955:	1b c0                	sbb    %eax,%eax
40c957:	83 e0 02             	and    $0x2,%eax
40c95a:	03 f8                	add    %eax,%edi
40c95c:	84 c9                	test   %cl,%cl
40c95e:	0f 85 18 ff ff ff    	jne    0x40c87c
40c964:	84 ff                	test   %bh,%bh
40c966:	74 03                	je     0x40c96b
40c968:	83 c7 02             	add    $0x2,%edi
40c96b:	6a 20                	push   $0x20
40c96d:	58                   	pop    %eax
40c96e:	eb 03                	jmp    0x40c973
40c970:	83 c7 02             	add    $0x2,%edi
40c973:	66 39 07             	cmp    %ax,(%edi)
40c976:	74 f8                	je     0x40c970
40c978:	84 ff                	test   %bh,%bh
40c97a:	75 14                	jne    0x40c990
40c97c:	33 c0                	xor    %eax,%eax
40c97e:	66 39 07             	cmp    %ax,(%edi)
40c981:	0f 85 cb 00 00 00    	jne    0x40ca52
40c987:	c6 46 08 01          	movb   $0x1,0x8(%esi)
40c98b:	e9 d2 00 00 00       	jmp    0x40ca62
40c990:	6a 03                	push   $0x3
40c992:	68 f0 ae 41 00       	push   $0x41aef0
40c997:	57                   	push   %edi
40c998:	e8 bb dc ff ff       	call   0x40a658
40c99d:	83 c4 0c             	add    $0xc,%esp
40c9a0:	85 c0                	test   %eax,%eax
40c9a2:	0f 85 aa 00 00 00    	jne    0x40ca52
40c9a8:	83 c7 06             	add    $0x6,%edi
40c9ab:	6a 20                	push   $0x20
40c9ad:	5b                   	pop    %ebx
40c9ae:	0f b7 07             	movzwl (%edi),%eax
40c9b1:	8b c8                	mov    %eax,%ecx
40c9b3:	66 3b c3             	cmp    %bx,%ax
40c9b6:	75 0d                	jne    0x40c9c5
40c9b8:	83 c7 02             	add    $0x2,%edi
40c9bb:	0f b7 07             	movzwl (%edi),%eax
40c9be:	66 3b c3             	cmp    %bx,%ax
40c9c1:	74 f5                	je     0x40c9b8
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