40255b:	85 d2                	test   %edx,%edx
40255d:	79 03                	jns    0x402562
40255f:	83 c2 01             	add    $0x1,%edx
402562:	d1 fa                	sar    $1,%edx
402564:	8b c3                	mov    %ebx,%eax
402566:	83 e0 01             	and    $0x1,%eax
402569:	c1 e0 02             	shl    $0x2,%eax
40256c:	6a 04                	push   $0x4
40256e:	59                   	pop    %ecx
40256f:	2b c8                	sub    %eax,%ecx
402571:	8b 45 f4             	mov    -0xc(%ebp),%eax
402574:	d2 e0                	shl    %cl,%al
402576:	8b 4d f8             	mov    -0x8(%ebp),%ecx
402579:	6a 00                	push   $0x0
40257b:	08 04 0a             	or     %al,(%edx,%ecx,1)
40257e:	43                   	inc    %ebx
40257f:	5a                   	pop    %edx
402580:	3b de                	cmp    %esi,%ebx
402582:	7c 9f                	jl     0x402523
402584:	8b 5d dc             	mov    -0x24(%ebp),%ebx
402587:	eb 03                	jmp    0x40258c
402589:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40258c:	ff 75 e8             	push   -0x18(%ebp)
40258f:	51                   	push   %ecx
402590:	6a 03                	push   $0x3
402592:	52                   	push   %edx
402593:	8b 45 08             	mov    0x8(%ebp),%eax
402596:	ff 75 0c             	push   0xc(%ebp)
402599:	ff 30                	push   (%eax)
40259b:	ff 15 fc 70 40 00    	call   *0x4070fc
4025a1:	e9 61 01 00 00       	jmp    0x402707
4025a6:	57                   	push   %edi
4025a7:	ff 15 64 71 40 00    	call   *0x407164
4025ad:	53                   	push   %ebx
4025ae:	ff 15 64 71 40 00    	call   *0x407164
4025b4:	be 05 40 00 80       	mov    $0x80004005,%esi
4025b9:	e9 6c 01 00 00       	jmp    0x40272a
4025be:	8b c7                	mov    %edi,%eax
4025c0:	8b f1                	mov    %ecx,%esi
4025c2:	89 45 f0             	mov    %eax,-0x10(%ebp)
4025c5:	38 4d 14             	cmp    %cl,0x14(%ebp)
4025c8:	0f 84 21 01 00 00    	je     0x4026ef
4025ce:	8b cf                	mov    %edi,%ecx
4025d0:	33 f6                	xor    %esi,%esi
4025d2:	8d 51 02             	lea    0x2(%ecx),%edx
4025d5:	66 8b 01             	mov    (%ecx),%ax
4025d8:	83 c1 02             	add    $0x2,%ecx
4025db:	66 3b c6             	cmp    %si,%ax
4025de:	75 f5                	jne    0x4025d5
4025e0:	2b ca                	sub    %edx,%ecx
4025e2:	d1 f9                	sar    $1,%ecx
4025e4:	81 f9 fe 0f 00 00    	cmp    $0xffe,%ecx
4025ea:	7f ba                	jg     0x4025a6
4025ec:	68 00 20 00 00       	push   $0x2000
4025f1:	ff 15 84 71 40 00    	call   *0x407184
4025f7:	89 45 f8             	mov    %eax,-0x8(%ebp)
4025fa:	59                   	pop    %ecx
4025fb:	85 c0                	test   %eax,%eax
4025fd:	75 18                	jne    0x402617
4025ff:	57                   	push   %edi
402600:	ff 15 64 71 40 00    	call   *0x407164
402606:	53                   	push   %ebx
402607:	ff 15 64 71 40 00    	call   *0x407164
40260d:	be 0e 00 07 80       	mov    $0x8007000e,%esi
402612:	e9 13 01 00 00       	jmp    0x40272a
402617:	8b 4d ec             	mov    -0x14(%ebp),%ecx
40261a:	68 fc 14 40 00       	push   $0x4014fc
40261f:	89 75 e8             	mov    %esi,-0x18(%ebp)
402622:	8b 49 04             	mov    0x4(%ecx),%ecx
402625:	e8 8c fa ff ff       	call   0x4020b6
40262a:	8b f0                	mov    %eax,%esi
40262c:	85 f6                	test   %esi,%esi
40262e:	0f 84 ad 00 00 00    	je     0x4026e1
402634:	8b d6                	mov    %esi,%edx
402636:	8b cf                	mov    %edi,%ecx
402638:	e8 18 fb ff ff       	call   0x402155
40263d:	89 45 f4             	mov    %eax,-0xc(%ebp)
402640:	85 c0                	test   %eax,%eax
402642:	0f 84 99 00 00 00    	je     0x4026e1
402648:	3b 45 10             	cmp    0x10(%ebp),%eax
40264b:	74 15                	je     0x402662
40264d:	50                   	push   %eax
40264e:	57                   	push   %edi
40264f:	ff 15 10 71 40 00    	call   *0x407110
402655:	66 83 38 22          	cmpw   $0x22,(%eax)
402659:	0f 84 82 00 00 00    	je     0x4026e1
40265f:	8b 45 f4             	mov    -0xc(%ebp),%eax
402662:	8b 4d f8             	mov    -0x8(%ebp),%ecx
402665:	2b c7                	sub    %edi,%eax
402667:	d1 f8                	sar    $1,%eax
402669:	33 d2                	xor    %edx,%edx
40266b:	50                   	push   %eax
40266c:	57                   	push   %edi
40266d:	51                   	push   %ecx
40266e:	66 89 11             	mov    %dx,(%ecx)
402671:	ff 15 20 71 40 00    	call   *0x407120
402677:	68 0c 15 40 00       	push   $0x40150c
40267c:	68 00 10 00 00       	push   $0x1000
402681:	ff 75 f8             	push   -0x8(%ebp)
402684:	ff 15 ac 71 40 00    	call   *0x4071ac
40268a:	56                   	push   %esi
40268b:	68 00 10 00 00       	push   $0x1000
402690:	ff 75 f8             	push   -0x8(%ebp)
402693:	ff 15 ac 71 40 00    	call   *0x4071ac
402699:	68 0c 15 40 00       	push   $0x40150c
40269e:	68 00 10 00 00       	push   $0x1000
4026a3:	ff 75 f8             	push   -0x8(%ebp)
4026a6:	ff 15 ac 71 40 00    	call   *0x4071ac
4026ac:	83 c4 24             	add    $0x24,%esp
4026af:	8d 4e 02             	lea    0x2(%esi),%ecx
4026b2:	33 d2                	xor    %edx,%edx
4026b4:	66 8b 06             	mov    (%esi),%ax
4026b7:	83 c6 02             	add    $0x2,%esi
4026ba:	66 3b c2             	cmp    %dx,%ax
4026bd:	75 f5                	jne    0x4026b4
4026bf:	8b 45 f4             	mov    -0xc(%ebp),%eax
4026c2:	2b f1                	sub    %ecx,%esi
4026c4:	d1 fe                	sar    $1,%esi
4026c6:	8d 04 70             	lea    (%eax,%esi,2),%eax
4026c9:	8b 75 f8             	mov    -0x8(%ebp),%esi
4026cc:	50                   	push   %eax
4026cd:	68 00 10 00 00       	push   $0x1000
4026d2:	56                   	push   %esi
4026d3:	ff 15 ac 71 40 00    	call   *0x4071ac
4026d9:	83 c4 0c             	add    $0xc,%esp
4026dc:	89 75 f0             	mov    %esi,-0x10(%ebp)
4026df:	eb 03                	jmp    0x4026e4
4026e1:	8b 75 f8             	mov    -0x8(%ebp),%esi
4026e4:	8d 4d e8             	lea    -0x18(%ebp),%ecx
4026e7:	e8 aa 20 00 00       	call   0x404796
4026ec:	8b 45 f0             	mov    -0x10(%ebp),%eax
4026ef:	ff 75 0c             	push   0xc(%ebp)
4026f2:	8b 4d 08             	mov    0x8(%ebp),%ecx
4026f5:	50                   	push   %eax
4026f6:	e8 15 f5 ff ff       	call   0x401c10
4026fb:	85 f6                	test   %esi,%esi
4026fd:	74 08                	je     0x402707
4026ff:	56                   	push   %esi
402700:	ff 15 64 71 40 00    	call   *0x407164
402706:	59                   	pop    %ecx
402707:	ff 75 10             	push   0x10(%ebp)
40270a:	8b 4d ec             	mov    -0x14(%ebp),%ecx
40270d:	e8 18 fb ff ff       	call   0x40222a
402712:	57                   	push   %edi
402713:	8b f0                	mov    %eax,%esi
402715:	ff 15 64 71 40 00    	call   *0x407164
40271b:	53                   	push   %ebx
40271c:	ff 15 64 71 40 00    	call   *0x407164
402722:	85 f6                	test   %esi,%esi
402724:	78 04                	js     0x40272a
402726:	33 c0                	xor    %eax,%eax
402728:	8b f0                	mov    %eax,%esi
40272a:	59                   	pop    %ecx
40272b:	59                   	pop    %ecx
40272c:	8d 4d e0             	lea    -0x20(%ebp),%ecx
40272f:	e8 62 20 00 00       	call   0x404796
402734:	8b c6                	mov    %esi,%eax
402736:	8d 65 d0             	lea    -0x30(%ebp),%esp
402739:	5f                   	pop    %edi
40273a:	5e                   	pop    %esi
40273b:	5b                   	pop    %ebx
40273c:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40273f:	33 cd                	xor    %ebp,%ecx
402741:	e8 5a 28 00 00       	call   0x404fa0
402746:	c9                   	leave
402747:	c2 10 00             	ret    $0x10
40274a:	8b ff                	mov    %edi,%edi
40274c:	55                   	push   %ebp
40274d:	8b ec                	mov    %esp,%ebp
40274f:	56                   	push   %esi
402750:	be e8 10 40 00       	mov    $0x4010e8,%esi
402755:	ff 36                	push   (%esi)
402757:	ff 75 08             	push   0x8(%ebp)
40275a:	ff 15 1c 71 40 00    	call   *0x40711c
402760:	85 c0                	test   %eax,%eax
402762:	74 10                	je     0x402774
402764:	83 c6 04             	add    $0x4,%esi
402767:	81 fe f0 10 40 00    	cmp    $0x4010f0,%esi
40276d:	7c e6                	jl     0x402755
40276f:	33 c0                	xor    %eax,%eax
402771:	40                   	inc    %eax
402772:	eb 02                	jmp    0x402776
402774:	33 c0                	xor    %eax,%eax
402776:	5e                   	pop    %esi
402777:	5d                   	pop    %ebp
402778:	c2 04 00             	ret    $0x4
40277b:	8b ff                	mov    %edi,%edi
40277d:	55                   	push   %ebp
40277e:	8b ec                	mov    %esp,%ebp
402780:	51                   	push   %ecx
402781:	33 c9                	xor    %ecx,%ecx
402783:	8d 45 fc             	lea    -0x4(%ebp),%eax
402786:	51                   	push   %ecx
402787:	51                   	push   %ecx
402788:	51                   	push   %ecx
402789:	51                   	push   %ecx
40278a:	51                   	push   %ecx
40278b:	51                   	push   %ecx
40278c:	51                   	push   %ecx
40278d:	50                   	push   %eax
40278e:	51                   	push   %ecx
40278f:	51                   	push   %ecx
402790:	51                   	push   %ecx
402791:	ff 75 08             	push   0x8(%ebp)
402794:	89 4d fc             	mov    %ecx,-0x4(%ebp)
402797:	ff 15 f0 70 40 00    	call   *0x4070f0
40279d:	85 c0                	test   %eax,%eax
40279f:	79 04                	jns    0x4027a5
4027a1:	33 c0                	xor    %eax,%eax
4027a3:	eb 09                	jmp    0x4027ae
4027a5:	33 c0                	xor    %eax,%eax
4027a7:	3b 45 fc             	cmp    -0x4(%ebp),%eax
4027aa:	1b c0                	sbb    %eax,%eax
4027ac:	f7 d8                	neg    %eax
4027ae:	c9                   	leave
4027af:	c2 04 00             	ret    $0x4
4027b2:	8b ff                	mov    %edi,%edi
4027b4:	55                   	push   %ebp
4027b5:	8b ec                	mov    %esp,%ebp
4027b7:	51                   	push   %ecx
4027b8:	51                   	push   %ecx
4027b9:	53                   	push   %ebx
4027ba:	56                   	push   %esi
4027bb:	57                   	push   %edi
4027bc:	33 db                	xor    %ebx,%ebx
4027be:	8d 45 fc             	lea    -0x4(%ebp),%eax
4027c1:	53                   	push   %ebx
4027c2:	53                   	push   %ebx
4027c3:	53                   	push   %ebx
4027c4:	53                   	push   %ebx
4027c5:	50                   	push   %eax
4027c6:	53                   	push   %ebx
4027c7:	53                   	push   %ebx
4027c8:	53                   	push   %ebx
4027c9:	53                   	push   %ebx
4027ca:	53                   	push   %ebx
4027cb:	53                   	push   %ebx
4027cc:	ff 75 08             	push   0x8(%ebp)
4027cf:	89 5d fc             	mov    %ebx,-0x4(%ebp)
4027d2:	ff 15 f0 70 40 00    	call   *0x4070f0
4027d8:	85 c0                	test   %eax,%eax
4027da:	75 56                	jne    0x402832
4027dc:	33 ff                	xor    %edi,%edi
4027de:	47                   	inc    %edi
4027df:	39 7d fc             	cmp    %edi,-0x4(%ebp)
4027e2:	75 43                	jne    0x402827
4027e4:	68 00 20 00 00       	push   $0x2000
4027e9:	c7 45 f8 00 10 00 00 	movl   $0x1000,-0x8(%ebp)
4027f0:	ff 15 84 71 40 00    	call   *0x407184
4027f6:	8b f0                	mov    %eax,%esi
4027f8:	59                   	pop    %ecx
4027f9:	85 f6                	test   %esi,%esi
4027fb:	74 35                	je     0x402832
4027fd:	53                   	push   %ebx
4027fe:	53                   	push   %ebx
4027ff:	53                   	push   %ebx
402800:	53                   	push   %ebx
402801:	8d 45 f8             	lea    -0x8(%ebp),%eax
402804:	50                   	push   %eax
402805:	56                   	push   %esi
402806:	53                   	push   %ebx
402807:	ff 75 08             	push   0x8(%ebp)
40280a:	ff 15 ec 70 40 00    	call   *0x4070ec
402810:	85 c0                	test   %eax,%eax
402812:	75 05                	jne    0x402819
402814:	66 39 1e             	cmp    %bx,(%esi)
402817:	75 02                	jne    0x40281b
402819:	8b fb                	mov    %ebx,%edi
40281b:	56                   	push   %esi
40281c:	ff 15 64 71 40 00    	call   *0x407164
402822:	59                   	pop    %ecx
402823:	8b c7                	mov    %edi,%eax
402825:	eb 0d                	jmp    0x402834
402827:	33 c0                	xor    %eax,%eax
402829:	3b 45 fc             	cmp    -0x4(%ebp),%eax
40282c:	1b c0                	sbb    %eax,%eax
40282e:	f7 d8                	neg    %eax
402830:	eb 02                	jmp    0x402834
402832:	33 c0                	xor    %eax,%eax
402834:	5f                   	pop    %edi
402835:	5e                   	pop    %esi
402836:	5b                   	pop    %ebx
402837:	c9                   	leave
402838:	c2 04 00             	ret    $0x4
40283b:	8b ff                	mov    %edi,%edi
40283d:	55                   	push   %ebp
40283e:	8b ec                	mov    %esp,%ebp
402840:	51                   	push   %ecx
402841:	53                   	push   %ebx
402842:	68 00 20 00 00       	push   $0x2000
402847:	8b d9                	mov    %ecx,%ebx
402849:	ff 15 84 71 40 00    	call   *0x407184
40284f:	89 45 fc             	mov    %eax,-0x4(%ebp)
402852:	59                   	pop    %ecx
402853:	85 c0                	test   %eax,%eax
402855:	75 07                	jne    0x40285e
402857:	b8 0e 00 07 80       	mov    $0x8007000e,%eax
40285c:	eb 4e                	jmp    0x4028ac
40285e:	56                   	push   %esi
40285f:	57                   	push   %edi
402860:	8b 7d 08             	mov    0x8(%ebp),%edi
402863:	66 83 3f 3d          	cmpw   $0x3d,(%edi)
402867:	75 33                	jne    0x40289c
402869:	57                   	push   %edi
40286a:	8b cb                	mov    %ebx,%ecx
40286c:	e8 b9 f9 ff ff       	call   0x40222a
402871:	8b f0                	mov    %eax,%esi
402873:	85 f6                	test   %esi,%esi
402875:	78 27                	js     0x40289e
402877:	8b cb                	mov    %ebx,%ecx
402879:	e8 7f f9 ff ff       	call   0x4021fd
40287e:	ff 75 fc             	push   -0x4(%ebp)
402881:	8b cb                	mov    %ebx,%ecx
402883:	e8 a2 f9 ff ff       	call   0x40222a
402888:	8b f0                	mov    %eax,%esi
40288a:	85 f6                	test   %esi,%esi
40288c:	78 10                	js     0x40289e
40288e:	57                   	push   %edi
40288f:	8b cb                	mov    %ebx,%ecx
402891:	e8 94 f9 ff ff       	call   0x40222a
402896:	8b f0                	mov    %eax,%esi
402898:	85 f6                	test   %esi,%esi
40289a:	78 02                	js     0x40289e
40289c:	33 f6                	xor    %esi,%esi
40289e:	ff 75 fc             	push   -0x4(%ebp)
4028a1:	ff 15 64 71 40 00    	call   *0x407164
4028a7:	59                   	pop    %ecx
4028a8:	5f                   	pop    %edi
4028a9:	8b c6                	mov    %esi,%eax
4028ab:	5e                   	pop    %esi
4028ac:	5b                   	pop    %ebx
4028ad:	c9                   	leave
4028ae:	c2 04 00             	ret    $0x4
4028b1:	8b ff                	mov    %edi,%edi
4028b3:	55                   	push   %ebp
4028b4:	8b ec                	mov    %esp,%ebp
4028b6:	83 ec 60             	sub    $0x60,%esp
4028b9:	a1 54 60 40 00       	mov    0x406054,%eax
4028be:	33 c5                	xor    %ebp,%eax
4028c0:	89 45 fc             	mov    %eax,-0x4(%ebp)
4028c3:	8b 45 0c             	mov    0xc(%ebp),%eax
4028c6:	53                   	push   %ebx
4028c7:	56                   	push   %esi
4028c8:	57                   	push   %edi
4028c9:	8b 7d 08             	mov    0x8(%ebp),%edi
4028cc:	33 f6                	xor    %esi,%esi
4028ce:	89 45 a4             	mov    %eax,-0x5c(%ebp)
4028d1:	8b d9                	mov    %ecx,%ebx
4028d3:	89 75 a0             	mov    %esi,-0x60(%ebp)
4028d6:	85 ff                	test   %edi,%edi