40362d:	89 85 c4 fc ff ff    	mov    %eax,-0x33c(%ebp)
403633:	e9 3a 01 00 00       	jmp    0x403772
403638:	50                   	push   %eax
403639:	8b 85 b0 fc ff ff    	mov    -0x350(%ebp),%eax
40363f:	8b d1                	mov    %ecx,%edx
403641:	8b 48 08             	mov    0x8(%eax),%ecx
403644:	e8 06 8d 00 00       	call   0x40c34f
403649:	89 85 b4 fc ff ff    	mov    %eax,-0x34c(%ebp)
40364f:	3b 85 bc fc ff ff    	cmp    -0x344(%ebp),%eax
403655:	74 3e                	je     0x403695
403657:	0f bf c8             	movswl %ax,%ecx
40365a:	51                   	push   %ecx
40365b:	68 b4 13 40 00       	push   $0x4013b4
403660:	57                   	push   %edi
403661:	56                   	push   %esi
403662:	89 85 bc fc ff ff    	mov    %eax,-0x344(%ebp)
403668:	e8 3b 03 00 00       	call   0x4039a8
40366d:	83 c4 10             	add    $0x10,%esp
403670:	85 c0                	test   %eax,%eax
403672:	0f 88 23 ff ff ff    	js     0x40359b
403678:	8b ce                	mov    %esi,%ecx
40367a:	8d 51 02             	lea    0x2(%ecx),%edx
40367d:	66 8b 01             	mov    (%ecx),%ax
403680:	83 c1 02             	add    $0x2,%ecx
403683:	66 3b 85 b8 fc ff ff 	cmp    -0x348(%ebp),%ax
40368a:	75 f1                	jne    0x40367d
40368c:	2b ca                	sub    %edx,%ecx
40368e:	d1 f9                	sar    $1,%ecx
403690:	2b f9                	sub    %ecx,%edi
403692:	8d 34 4e             	lea    (%esi,%ecx,2),%esi
403695:	8b 85 c8 fc ff ff    	mov    -0x338(%ebp),%eax
40369b:	0f bf 00             	movswl (%eax),%eax
40369e:	50                   	push   %eax
40369f:	68 c0 13 40 00       	push   $0x4013c0
4036a4:	57                   	push   %edi
4036a5:	56                   	push   %esi
4036a6:	e8 fd 02 00 00       	call   0x4039a8
4036ab:	83 c4 10             	add    $0x10,%esp
4036ae:	85 c0                	test   %eax,%eax
4036b0:	0f 88 e5 fe ff ff    	js     0x40359b
4036b6:	8b ce                	mov    %esi,%ecx
4036b8:	8d 51 02             	lea    0x2(%ecx),%edx
4036bb:	66 8b 01             	mov    (%ecx),%ax
4036be:	83 c1 02             	add    $0x2,%ecx
4036c1:	66 3b 85 b8 fc ff ff 	cmp    -0x348(%ebp),%ax
4036c8:	75 f1                	jne    0x4036bb
4036ca:	8b 85 b4 fc ff ff    	mov    -0x34c(%ebp),%eax
4036d0:	2b ca                	sub    %edx,%ecx
4036d2:	d1 f9                	sar    $1,%ecx
4036d4:	2b f9                	sub    %ecx,%edi
4036d6:	6a 02                	push   $0x2
4036d8:	5a                   	pop    %edx
4036d9:	8d 34 4e             	lea    (%esi,%ecx,2),%esi
4036dc:	8b 8d c8 fc ff ff    	mov    -0x338(%ebp),%ecx
4036e2:	03 ca                	add    %edx,%ecx
4036e4:	89 8d c8 fc ff ff    	mov    %ecx,-0x338(%ebp)
4036ea:	85 c0                	test   %eax,%eax
4036ec:	74 7c                	je     0x40376a
4036ee:	48                   	dec    %eax
4036ef:	89 85 b4 fc ff ff    	mov    %eax,-0x34c(%ebp)
4036f5:	3b fa                	cmp    %edx,%edi
4036f7:	0f 82 9e fe ff ff    	jb     0x40359b
4036fd:	8b 8d c4 fc ff ff    	mov    -0x33c(%ebp),%ecx
403703:	2b fa                	sub    %edx,%edi
403705:	6a 5c                	push   $0x5c
403707:	58                   	pop    %eax
403708:	66 89 06             	mov    %ax,(%esi)
40370b:	03 f2                	add    %edx,%esi
40370d:	6a 27                	push   $0x27
40370f:	58                   	pop    %eax
403710:	66 89 06             	mov    %ax,(%esi)
403713:	03 f2                	add    %edx,%esi
403715:	0f be 01             	movsbl (%ecx),%eax
403718:	41                   	inc    %ecx
403719:	50                   	push   %eax
40371a:	68 cc 13 40 00       	push   $0x4013cc
40371f:	8d 45 c8             	lea    -0x38(%ebp),%eax
403722:	89 8d c4 fc ff ff    	mov    %ecx,-0x33c(%ebp)
403728:	6a 19                	push   $0x19
40372a:	50                   	push   %eax
40372b:	e8 78 02 00 00       	call   0x4039a8
403730:	83 c4 10             	add    $0x10,%esp
403733:	85 c0                	test   %eax,%eax
403735:	0f 88 60 fe ff ff    	js     0x40359b
40373b:	6a 02                	push   $0x2
40373d:	5a                   	pop    %edx
40373e:	3b fa                	cmp    %edx,%edi
403740:	0f 82 55 fe ff ff    	jb     0x40359b
403746:	66 8b 45 c8          	mov    -0x38(%ebp),%ax
40374a:	2b fa                	sub    %edx,%edi
40374c:	66 89 06             	mov    %ax,(%esi)
40374f:	03 f2                	add    %edx,%esi
403751:	66 8b 45 ca          	mov    -0x36(%ebp),%ax
403755:	66 89 06             	mov    %ax,(%esi)
403758:	03 f2                	add    %edx,%esi
40375a:	8b 85 b4 fc ff ff    	mov    -0x34c(%ebp),%eax
403760:	85 c0                	test   %eax,%eax
403762:	75 8a                	jne    0x4036ee
403764:	8b 8d c8 fc ff ff    	mov    -0x338(%ebp),%ecx
40376a:	8b 85 c4 fc ff ff    	mov    -0x33c(%ebp),%eax
403770:	33 d2                	xor    %edx,%edx
403772:	66 39 11             	cmp    %dx,(%ecx)
403775:	0f 85 bd fe ff ff    	jne    0x403638
40377b:	83 ff 02             	cmp    $0x2,%edi
40377e:	72 0f                	jb     0x40378f
403780:	6a 7d                	push   $0x7d
403782:	58                   	pop    %eax
403783:	66 89 06             	mov    %ax,(%esi)
403786:	33 c0                	xor    %eax,%eax
403788:	66 89 46 02          	mov    %ax,0x2(%esi)
40378c:	83 c6 04             	add    $0x4,%esi
40378f:	52                   	push   %edx
403790:	52                   	push   %edx
403791:	52                   	push   %edx
403792:	52                   	push   %edx
403793:	2b f3                	sub    %ebx,%esi
403795:	d1 fe                	sar    $1,%esi
403797:	56                   	push   %esi
403798:	53                   	push   %ebx
403799:	52                   	push   %edx
40379a:	52                   	push   %edx
40379b:	ff 15 b0 31 43 00    	call   *0x4331b0
4037a1:	89 85 b8 fc ff ff    	mov    %eax,-0x348(%ebp)
4037a7:	85 c0                	test   %eax,%eax
4037a9:	74 4d                	je     0x4037f8
4037ab:	50                   	push   %eax
4037ac:	68 02 20 00 00       	push   $0x2002
4037b1:	ff 15 a0 31 43 00    	call   *0x4331a0
4037b7:	8b f8                	mov    %eax,%edi
4037b9:	85 ff                	test   %edi,%edi
4037bb:	74 3b                	je     0x4037f8
4037bd:	57                   	push   %edi
4037be:	ff 15 ac 31 43 00    	call   *0x4331ac
4037c4:	33 c9                	xor    %ecx,%ecx
4037c6:	51                   	push   %ecx
4037c7:	51                   	push   %ecx
4037c8:	ff b5 b8 fc ff ff    	push   -0x348(%ebp)
4037ce:	50                   	push   %eax
4037cf:	56                   	push   %esi
4037d0:	53                   	push   %ebx
4037d1:	51                   	push   %ecx
4037d2:	51                   	push   %ecx
4037d3:	ff 15 b0 31 43 00    	call   *0x4331b0
4037d9:	57                   	push   %edi
4037da:	ff 15 b4 31 43 00    	call   *0x4331b4
4037e0:	8b b5 c0 fc ff ff    	mov    -0x340(%ebp),%esi
4037e6:	56                   	push   %esi
4037e7:	ff 15 b4 31 43 00    	call   *0x4331b4
4037ed:	56                   	push   %esi
4037ee:	ff 15 9c 31 43 00    	call   *0x43319c
4037f4:	8b f7                	mov    %edi,%esi
4037f6:	eb 06                	jmp    0x4037fe
4037f8:	8b b5 c0 fc ff ff    	mov    -0x340(%ebp),%esi
4037fe:	8b 85 a8 fc ff ff    	mov    -0x358(%ebp),%eax
403804:	c7 00 01 00 00 00    	movl   $0x1,(%eax)
40380a:	89 70 04             	mov    %esi,0x4(%eax)
40380d:	33 c0                	xor    %eax,%eax
40380f:	e9 a0 fd ff ff       	jmp    0x4035b4
403814:	8b ff                	mov    %edi,%edi
403816:	55                   	push   %ebp
403817:	8b ec                	mov    %esp,%ebp
403819:	51                   	push   %ecx
40381a:	51                   	push   %ecx
40381b:	53                   	push   %ebx
40381c:	56                   	push   %esi
40381d:	8d 71 0c             	lea    0xc(%ecx),%esi
403820:	33 db                	xor    %ebx,%ebx
403822:	8b ce                	mov    %esi,%ecx
403824:	89 5d fc             	mov    %ebx,-0x4(%ebp)
403827:	57                   	push   %edi
403828:	8d 51 02             	lea    0x2(%ecx),%edx
40382b:	66 8b 01             	mov    (%ecx),%ax
40382e:	83 c1 02             	add    $0x2,%ecx
403831:	66 3b c3             	cmp    %bx,%ax
403834:	75 f5                	jne    0x40382b
403836:	53                   	push   %ebx
403837:	53                   	push   %ebx
403838:	53                   	push   %ebx
403839:	53                   	push   %ebx
40383a:	2b ca                	sub    %edx,%ecx
40383c:	d1 f9                	sar    $1,%ecx
40383e:	51                   	push   %ecx
40383f:	56                   	push   %esi
403840:	53                   	push   %ebx
403841:	53                   	push   %ebx
403842:	ff 15 b0 31 43 00    	call   *0x4331b0
403848:	8d 58 01             	lea    0x1(%eax),%ebx
40384b:	53                   	push   %ebx
40384c:	68 40 20 00 00       	push   $0x2040
403851:	ff 15 a0 31 43 00    	call   *0x4331a0
403857:	8b f8                	mov    %eax,%edi
403859:	85 ff                	test   %edi,%edi
40385b:	75 07                	jne    0x403864
40385d:	b8 0e 00 07 80       	mov    $0x8007000e,%eax
403862:	eb 45                	jmp    0x4038a9
403864:	57                   	push   %edi
403865:	ff 15 ac 31 43 00    	call   *0x4331ac
40386b:	8b d6                	mov    %esi,%edx
40386d:	8d 4a 02             	lea    0x2(%edx),%ecx
403870:	89 4d f8             	mov    %ecx,-0x8(%ebp)
403873:	66 8b 0a             	mov    (%edx),%cx
403876:	83 c2 02             	add    $0x2,%edx
403879:	66 3b 4d fc          	cmp    -0x4(%ebp),%cx
40387d:	75 f4                	jne    0x403873
40387f:	2b 55 f8             	sub    -0x8(%ebp),%edx
403882:	33 c9                	xor    %ecx,%ecx
403884:	51                   	push   %ecx
403885:	51                   	push   %ecx
403886:	53                   	push   %ebx
403887:	50                   	push   %eax
403888:	d1 fa                	sar    $1,%edx
40388a:	52                   	push   %edx
40388b:	56                   	push   %esi
40388c:	51                   	push   %ecx
40388d:	51                   	push   %ecx
40388e:	ff 15 b0 31 43 00    	call   *0x4331b0
403894:	57                   	push   %edi
403895:	ff 15 b4 31 43 00    	call   *0x4331b4
40389b:	8b 45 08             	mov    0x8(%ebp),%eax
40389e:	c7 00 01 00 00 00    	movl   $0x1,(%eax)
4038a4:	89 78 04             	mov    %edi,0x4(%eax)
4038a7:	33 c0                	xor    %eax,%eax
4038a9:	5f                   	pop    %edi
4038aa:	5e                   	pop    %esi
4038ab:	5b                   	pop    %ebx
4038ac:	c9                   	leave
4038ad:	c2 04 00             	ret    $0x4
4038b0:	8b ff                	mov    %edi,%edi
4038b2:	55                   	push   %ebp
4038b3:	8b ec                	mov    %esp,%ebp
4038b5:	51                   	push   %ecx
4038b6:	53                   	push   %ebx
4038b7:	56                   	push   %esi
4038b8:	57                   	push   %edi
4038b9:	8d 79 0c             	lea    0xc(%ecx),%edi
4038bc:	33 db                	xor    %ebx,%ebx
4038be:	8b cf                	mov    %edi,%ecx
4038c0:	89 5d fc             	mov    %ebx,-0x4(%ebp)
4038c3:	8d 51 02             	lea    0x2(%ecx),%edx
4038c6:	66 8b 01             	mov    (%ecx),%ax
4038c9:	83 c1 02             	add    $0x2,%ecx
4038cc:	66 3b c3             	cmp    %bx,%ax
4038cf:	75 f5                	jne    0x4038c6
4038d1:	2b ca                	sub    %edx,%ecx
4038d3:	d1 f9                	sar    $1,%ecx
4038d5:	8d 04 4d 02 00 00 00 	lea    0x2(,%ecx,2),%eax
4038dc:	50                   	push   %eax
4038dd:	68 40 20 00 00       	push   $0x2040
4038e2:	ff 15 a0 31 43 00    	call   *0x4331a0
4038e8:	8b f0                	mov    %eax,%esi
4038ea:	85 f6                	test   %esi,%esi
4038ec:	75 07                	jne    0x4038f5
4038ee:	b8 0e 00 07 80       	mov    $0x8007000e,%eax
4038f3:	eb 3e                	jmp    0x403933
4038f5:	56                   	push   %esi
4038f6:	ff 15 ac 31 43 00    	call   *0x4331ac
4038fc:	8b d7                	mov    %edi,%edx
4038fe:	8d 5a 02             	lea    0x2(%edx),%ebx
403901:	66 8b 0a             	mov    (%edx),%cx
403904:	83 c2 02             	add    $0x2,%edx
403907:	66 3b 4d fc          	cmp    -0x4(%ebp),%cx
40390b:	75 f4                	jne    0x403901
40390d:	2b d3                	sub    %ebx,%edx
40390f:	8b c8                	mov    %eax,%ecx
403911:	d1 fa                	sar    $1,%edx
403913:	57                   	push   %edi
403914:	42                   	inc    %edx
403915:	e8 45 01 00 00       	call   0x403a5f
40391a:	85 c0                	test   %eax,%eax
40391c:	74 07                	je     0x403925
40391e:	56                   	push   %esi
40391f:	ff 15 b4 31 43 00    	call   *0x4331b4
403925:	8b 45 08             	mov    0x8(%ebp),%eax
403928:	c7 00 01 00 00 00    	movl   $0x1,(%eax)
40392e:	89 70 04             	mov    %esi,0x4(%eax)
403931:	33 c0                	xor    %eax,%eax
403933:	5f                   	pop    %edi
403934:	5e                   	pop    %esi
403935:	5b                   	pop    %ebx
403936:	c9                   	leave
403937:	c2 04 00             	ret    $0x4
40393a:	8b ff                	mov    %edi,%edi
40393c:	55                   	push   %ebp
40393d:	8b ec                	mov    %esp,%ebp
40393f:	53                   	push   %ebx
403940:	56                   	push   %esi
403941:	57                   	push   %edi
403942:	33 ff                	xor    %edi,%edi
403944:	bb 57 00 07 80       	mov    $0x80070057,%ebx
403949:	8b f7                	mov    %edi,%esi
40394b:	85 d2                	test   %edx,%edx
40394d:	74 08                	je     0x403957
40394f:	81 fa ff ff ff 7f    	cmp    $0x7fffffff,%edx
403955:	76 02                	jbe    0x403959
403957:	8b f3                	mov    %ebx,%esi
403959:	85 f6                	test   %esi,%esi
40395b:	78 42                	js     0x40399f
40395d:	8b f2                	mov    %edx,%esi
40395f:	8b c1                	mov    %ecx,%eax
403961:	85 d2                	test   %edx,%edx
403963:	74 0d                	je     0x403972
403965:	66 39 38             	cmp    %di,(%eax)
403968:	74 08                	je     0x403972
40396a:	83 c0 02             	add    $0x2,%eax
40396d:	83 ee 01             	sub    $0x1,%esi
403970:	75 f3                	jne    0x403965
403972:	8b fe                	mov    %esi,%edi
403974:	8b c2                	mov    %edx,%eax
403976:	f7 de                	neg    %esi
403978:	1b f6                	sbb    %esi,%esi
40397a:	2b c7                	sub    %edi,%eax
40397c:	81 e6 a9 ff f8 7f    	and    $0x7ff8ffa9,%esi
403982:	03 f3                	add    %ebx,%esi
403984:	f7 df                	neg    %edi
403986:	1b ff                	sbb    %edi,%edi
403988:	23 f8                	and    %eax,%edi
40398a:	85 f6                	test   %esi,%esi
40398c:	78 11                	js     0x40399f
40398e:	51                   	push   %ecx
40398f:	ff 75 08             	push   0x8(%ebp)
403992:	2b d7                	sub    %edi,%edx
403994:	51                   	push   %ecx
403995:	8d 0c 79             	lea    (%ecx,%edi,2),%ecx
403998:	e8 72 00 00 00       	call   0x403a0f
40399d:	8b f0                	mov    %eax,%esi
40399f:	5f                   	pop    %edi
4039a0:	8b c6                	mov    %esi,%eax
4039a2:	5e                   	pop    %esi
4039a3:	5b                   	pop    %ebx
4039a4:	5d                   	pop    %ebp
4039a5:	c2 04 00             	ret    $0x4
4039a8:	8b ff                	mov    %edi,%edi
4039aa:	55                   	push   %ebp
4039ab:	8b ec                	mov    %esp,%ebp
4039ad:	8b 45 0c             	mov    0xc(%ebp),%eax
4039b0:	56                   	push   %esi
4039b1:	33 f6                	xor    %esi,%esi
4039b3:	85 c0                	test   %eax,%eax
4039b5:	74 07                	je     0x4039be
4039b7:	3d ff ff ff 7f       	cmp    $0x7fffffff,%eax
4039bc:	76 05                	jbe    0x4039c3
4039be:	be 57 00 07 80       	mov    $0x80070057,%esi
4039c3:	85 f6                	test   %esi,%esi
4039c5:	78 37                	js     0x4039fe
4039c7:	53                   	push   %ebx
4039c8:	8b 5d 08             	mov    0x8(%ebp),%ebx
4039cb:	33 f6                	xor    %esi,%esi
4039cd:	57                   	push   %edi
4039ce:	8d 78 ff             	lea    -0x1(%eax),%edi
4039d1:	8d 45 14             	lea    0x14(%ebp),%eax