401fb0:	89 75 f8             	mov    %esi,-0x8(%ebp)
401fb3:	85 c0                	test   %eax,%eax
401fb5:	75 30                	jne    0x401fe7
401fb7:	ff 15 e8 b0 44 00    	call   *0x44b0e8
401fbd:	0f b7 f0             	movzwl %ax,%esi
401fc0:	81 ce 00 00 07 80    	or     $0x80070000,%esi
401fc6:	85 c0                	test   %eax,%eax
401fc8:	0f 4e f0             	cmovle %eax,%esi
401fcb:	b8 05 40 00 80       	mov    $0x80004005,%eax
401fd0:	85 f6                	test   %esi,%esi
401fd2:	0f 49 f0             	cmovns %eax,%esi
401fd5:	56                   	push   %esi
401fd6:	68 89 04 00 00       	push   $0x489
401fdb:	68 90 b5 44 00       	push   $0x44b590
401fe0:	e8 ee 17 00 00       	call   0x4037d3
401fe5:	eb 0e                	jmp    0x401ff5
401fe7:	50                   	push   %eax
401fe8:	ff 75 fc             	push   -0x4(%ebp)
401feb:	ff 75 08             	push   0x8(%ebp)
401fee:	e8 b2 01 00 00       	call   0x4021a5
401ff3:	8b f0                	mov    %eax,%esi
401ff5:	83 7d fc 00          	cmpl   $0x0,-0x4(%ebp)
401ff9:	74 09                	je     0x402004
401ffb:	ff 75 fc             	push   -0x4(%ebp)
401ffe:	ff 15 e0 b0 44 00    	call   *0x44b0e0
402004:	8b c6                	mov    %esi,%eax
402006:	5e                   	pop    %esi
402007:	8b e5                	mov    %ebp,%esp
402009:	5d                   	pop    %ebp
40200a:	c3                   	ret
40200b:	55                   	push   %ebp
40200c:	8b ec                	mov    %esp,%ebp
40200e:	51                   	push   %ecx
40200f:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
402013:	8d 45 fc             	lea    -0x4(%ebp),%eax
402016:	56                   	push   %esi
402017:	50                   	push   %eax
402018:	68 ff ff ff 7f       	push   $0x7fffffff
40201d:	ff 75 08             	push   0x8(%ebp)
402020:	e8 32 fc ff ff       	call   0x401c57
402025:	8b f0                	mov    %eax,%esi
402027:	85 f6                	test   %esi,%esi
402029:	78 64                	js     0x40208f
40202b:	53                   	push   %ebx
40202c:	8b 5d fc             	mov    -0x4(%ebp),%ebx
40202f:	f6 c3 01             	test   $0x1,%bl
402032:	74 07                	je     0x40203b
402034:	be 57 00 07 80       	mov    $0x80070057,%esi
402039:	eb 53                	jmp    0x40208e
40203b:	57                   	push   %edi
40203c:	6a 01                	push   $0x1
40203e:	d1 eb                	shr    $1,%ebx
402040:	53                   	push   %ebx
402041:	e8 8e 18 00 00       	call   0x4038d4
402046:	8b f8                	mov    %eax,%edi
402048:	85 ff                	test   %edi,%edi
40204a:	75 17                	jne    0x402063
40204c:	be 0e 00 07 80       	mov    $0x8007000e,%esi
402051:	56                   	push   %esi
402052:	68 d1 05 00 00       	push   $0x5d1
402057:	68 90 b5 44 00       	push   $0x44b590
40205c:	e8 72 17 00 00       	call   0x4037d3
402061:	eb 2a                	jmp    0x40208d
402063:	53                   	push   %ebx
402064:	57                   	push   %edi
402065:	ff 75 08             	push   0x8(%ebp)
402068:	e8 0d 06 00 00       	call   0x40267a
40206d:	8b f0                	mov    %eax,%esi
40206f:	85 f6                	test   %esi,%esi
402071:	78 10                	js     0x402083
402073:	8b 45 0c             	mov    0xc(%ebp),%eax
402076:	89 38                	mov    %edi,(%eax)
402078:	33 ff                	xor    %edi,%edi
40207a:	8b 45 10             	mov    0x10(%ebp),%eax
40207d:	85 c0                	test   %eax,%eax
40207f:	74 0c                	je     0x40208d
402081:	89 18                	mov    %ebx,(%eax)
402083:	85 ff                	test   %edi,%edi
402085:	74 06                	je     0x40208d
402087:	57                   	push   %edi
402088:	e8 0c 19 00 00       	call   0x403999
40208d:	5f                   	pop    %edi
40208e:	5b                   	pop    %ebx
40208f:	8b c6                	mov    %esi,%eax
402091:	5e                   	pop    %esi
402092:	8b e5                	mov    %ebp,%esp
402094:	5d                   	pop    %ebp
402095:	c2 0c 00             	ret    $0xc
402098:	55                   	push   %ebp
402099:	8b ec                	mov    %esp,%ebp
40209b:	53                   	push   %ebx
40209c:	8b 5d 10             	mov    0x10(%ebp),%ebx
40209f:	56                   	push   %esi
4020a0:	8b 75 0c             	mov    0xc(%ebp),%esi
4020a3:	57                   	push   %edi
4020a4:	6a 00                	push   $0x0
4020a6:	8d 3c 75 02 00 00 00 	lea    0x2(,%esi,2),%edi
4020ad:	57                   	push   %edi
4020ae:	53                   	push   %ebx
4020af:	e8 88 f3 ff ff       	call   0x40143c
4020b4:	85 c0                	test   %eax,%eax
4020b6:	78 0c                	js     0x4020c4
4020b8:	57                   	push   %edi
4020b9:	ff 33                	push   (%ebx)
4020bb:	56                   	push   %esi
4020bc:	ff 75 08             	push   0x8(%ebp)
4020bf:	e8 2a 06 00 00       	call   0x4026ee
4020c4:	5f                   	pop    %edi
4020c5:	5e                   	pop    %esi
4020c6:	5b                   	pop    %ebx
4020c7:	5d                   	pop    %ebp
4020c8:	c2 0c 00             	ret    $0xc
4020cb:	55                   	push   %ebp
4020cc:	8b ec                	mov    %esp,%ebp
4020ce:	51                   	push   %ecx
4020cf:	53                   	push   %ebx
4020d0:	56                   	push   %esi
4020d1:	8b 75 08             	mov    0x8(%ebp),%esi
4020d4:	33 db                	xor    %ebx,%ebx
4020d6:	21 5d fc             	and    %ebx,-0x4(%ebp)
4020d9:	57                   	push   %edi
4020da:	33 ff                	xor    %edi,%edi
4020dc:	39 1e                	cmp    %ebx,(%esi)
4020de:	74 30                	je     0x402110
4020e0:	ff 36                	push   (%esi)
4020e2:	e8 6a 1a 00 00       	call   0x403b51
4020e7:	8b d8                	mov    %eax,%ebx
4020e9:	83 fb ff             	cmp    $0xffffffff,%ebx
4020ec:	75 0a                	jne    0x4020f8
4020ee:	bf 57 00 07 80       	mov    $0x80070057,%edi
4020f3:	e9 8e 00 00 00       	jmp    0x402186
4020f8:	8d 45 fc             	lea    -0x4(%ebp),%eax
4020fb:	d1 eb                	shr    $1,%ebx
4020fd:	50                   	push   %eax
4020fe:	68 ff ff ff 7f       	push   $0x7fffffff
402103:	ff 36                	push   (%esi)
402105:	e8 4d fb ff ff       	call   0x401c57
40210a:	8b f8                	mov    %eax,%edi
40210c:	85 ff                	test   %edi,%edi
40210e:	78 76                	js     0x402186
402110:	8b 55 10             	mov    0x10(%ebp),%edx
402113:	85 d2                	test   %edx,%edx
402115:	75 1a                	jne    0x402131
402117:	8d 45 10             	lea    0x10(%ebp),%eax
40211a:	50                   	push   %eax
40211b:	68 ff ff ff 7f       	push   $0x7fffffff
402120:	ff 75 0c             	push   0xc(%ebp)
402123:	e8 2f fb ff ff       	call   0x401c57
402128:	8b f8                	mov    %eax,%edi
40212a:	85 ff                	test   %edi,%edi
40212c:	78 58                	js     0x402186
40212e:	8b 55 10             	mov    0x10(%ebp),%edx
402131:	8b cb                	mov    %ebx,%ecx
402133:	8d 42 01             	lea    0x1(%edx),%eax
402136:	2b 4d fc             	sub    -0x4(%ebp),%ecx
402139:	3b c8                	cmp    %eax,%ecx
40213b:	73 18                	jae    0x402155
40213d:	8b 5d fc             	mov    -0x4(%ebp),%ebx
402140:	43                   	inc    %ebx
402141:	6a 00                	push   $0x0
402143:	03 da                	add    %edx,%ebx
402145:	53                   	push   %ebx
402146:	56                   	push   %esi
402147:	e8 f0 f2 ff ff       	call   0x40143c
40214c:	8b f8                	mov    %eax,%edi
40214e:	85 ff                	test   %edi,%edi
402150:	78 34                	js     0x402186
402152:	8b 55 10             	mov    0x10(%ebp),%edx
402155:	8b 0e                	mov    (%esi),%ecx
402157:	85 c9                	test   %ecx,%ecx
402159:	74 26                	je     0x402181
40215b:	8d 34 12             	lea    (%edx,%edx,1),%esi
40215e:	8d 04 1b             	lea    (%ebx,%ebx,1),%eax
402161:	2b c6                	sub    %esi,%eax
402163:	50                   	push   %eax
402164:	51                   	push   %ecx
402165:	8d 04 0e             	lea    (%esi,%ecx,1),%eax
402168:	50                   	push   %eax
402169:	e8 02 ca 02 00       	call   0x42eb70
40216e:	8b 45 08             	mov    0x8(%ebp),%eax
402171:	56                   	push   %esi
402172:	ff 75 0c             	push   0xc(%ebp)
402175:	ff 30                	push   (%eax)
402177:	e8 74 cf 02 00       	call   0x42f0f0
40217c:	83 c4 18             	add    $0x18,%esp
40217f:	eb 05                	jmp    0x402186
402181:	bf ff ff 00 80       	mov    $0x8000ffff,%edi
402186:	8b c7                	mov    %edi,%eax
402188:	5f                   	pop    %edi
402189:	5e                   	pop    %esi
40218a:	5b                   	pop    %ebx
40218b:	8b e5                	mov    %ebp,%esp
40218d:	5d                   	pop    %ebp
40218e:	c2 0c 00             	ret    $0xc
402191:	55                   	push   %ebp
402192:	8b ec                	mov    %esp,%ebp
402194:	6a 01                	push   $0x1
402196:	ff 75 0c             	push   0xc(%ebp)
402199:	ff 75 08             	push   0x8(%ebp)
40219c:	e8 9b f2 ff ff       	call   0x40143c
4021a1:	5d                   	pop    %ebp
4021a2:	c2 08 00             	ret    $0x8
4021a5:	55                   	push   %ebp
4021a6:	8b ec                	mov    %esp,%ebp
4021a8:	6a 00                	push   $0x0
4021aa:	ff 75 10             	push   0x10(%ebp)
4021ad:	ff 75 0c             	push   0xc(%ebp)
4021b0:	ff 75 08             	push   0x8(%ebp)
4021b3:	e8 fa f2 ff ff       	call   0x4014b2
4021b8:	5d                   	pop    %ebp
4021b9:	c2 0c 00             	ret    $0xc
4021bc:	55                   	push   %ebp
4021bd:	8b ec                	mov    %esp,%ebp
4021bf:	8b 4d 08             	mov    0x8(%ebp),%ecx
4021c2:	83 ca ff             	or     $0xffffffff,%edx
4021c5:	8b 45 10             	mov    0x10(%ebp),%eax
4021c8:	53                   	push   %ebx
4021c9:	56                   	push   %esi
4021ca:	33 f6                	xor    %esi,%esi
4021cc:	8b d8                	mov    %eax,%ebx
4021ce:	57                   	push   %edi
4021cf:	8b fe                	mov    %esi,%edi
4021d1:	39 31                	cmp    %esi,(%ecx)
4021d3:	74 1e                	je     0x4021f3
4021d5:	ff 31                	push   (%ecx)
4021d7:	e8 75 19 00 00       	call   0x403b51
4021dc:	8b f8                	mov    %eax,%edi
4021de:	83 ca ff             	or     $0xffffffff,%edx
4021e1:	3b fa                	cmp    %edx,%edi
4021e3:	75 0a                	jne    0x4021ef
4021e5:	be 57 00 07 80       	mov    $0x80070057,%esi
4021ea:	e9 01 01 00 00       	jmp    0x4022f0
4021ef:	d1 ef                	shr    $1,%edi
4021f1:	8b c3                	mov    %ebx,%eax
4021f3:	8b 4d 0c             	mov    0xc(%ebp),%ecx
4021f6:	85 c0                	test   %eax,%eax
4021f8:	75 4a                	jne    0x402244
4021fa:	56                   	push   %esi
4021fb:	56                   	push   %esi
4021fc:	52                   	push   %edx
4021fd:	51                   	push   %ecx
4021fe:	56                   	push   %esi
4021ff:	ff 75 14             	push   0x14(%ebp)
402202:	ff 15 fc b0 44 00    	call   *0x44b0fc
402208:	8b d8                	mov    %eax,%ebx
40220a:	85 db                	test   %ebx,%ebx
40220c:	75 33                	jne    0x402241
40220e:	ff 15 e8 b0 44 00    	call   *0x44b0e8
402214:	0f b7 f0             	movzwl %ax,%esi
402217:	81 ce 00 00 07 80    	or     $0x80070000,%esi
40221d:	85 c0                	test   %eax,%eax
40221f:	0f 4e f0             	cmovle %eax,%esi
402222:	b8 05 40 00 80       	mov    $0x80004005,%eax
402227:	85 f6                	test   %esi,%esi
402229:	0f 49 f0             	cmovns %eax,%esi
40222c:	56                   	push   %esi
40222d:	68 0c 02 00 00       	push   $0x20c
402232:	68 90 b5 44 00       	push   $0x44b590
402237:	e8 97 15 00 00       	call   0x4037d3
40223c:	e9 af 00 00 00       	jmp    0x4022f0
402241:	4b                   	dec    %ebx
402242:	eb 09                	jmp    0x40224d
402244:	80 3c 01 00          	cmpb   $0x0,(%ecx,%eax,1)
402248:	75 03                	jne    0x40224d
40224a:	8d 58 ff             	lea    -0x1(%eax),%ebx
40224d:	8d 43 01             	lea    0x1(%ebx),%eax
402250:	3b f8                	cmp    %eax,%edi
402252:	73 48                	jae    0x40229c
402254:	8b f8                	mov    %eax,%edi
402256:	81 ff ff ff ff 7f    	cmp    $0x7fffffff,%edi
40225c:	72 0a                	jb     0x402268
40225e:	be 0e 00 07 80       	mov    $0x8007000e,%esi
402263:	e9 88 00 00 00       	jmp    0x4022f0
402268:	8b 45 08             	mov    0x8(%ebp),%eax
40226b:	6a 01                	push   $0x1
40226d:	8b 08                	mov    (%eax),%ecx
40226f:	8d 04 3f             	lea    (%edi,%edi,1),%eax
402272:	50                   	push   %eax
402273:	85 c9                	test   %ecx,%ecx
402275:	74 08                	je     0x40227f
402277:	51                   	push   %ecx
402278:	e8 f5 17 00 00       	call   0x403a72
40227d:	eb 05                	jmp    0x402284
40227f:	e8 50 16 00 00       	call   0x4038d4
402284:	8b c8                	mov    %eax,%ecx
402286:	85 c9                	test   %ecx,%ecx
402288:	75 0d                	jne    0x402297
40228a:	be 0e 00 07 80       	mov    $0x8007000e,%esi
40228f:	56                   	push   %esi
402290:	68 28 02 00 00       	push   $0x228
402295:	eb 9b                	jmp    0x402232
402297:	8b 45 08             	mov    0x8(%ebp),%eax
40229a:	89 08                	mov    %ecx,(%eax)
40229c:	8b 45 10             	mov    0x10(%ebp),%eax
40229f:	85 c0                	test   %eax,%eax
4022a1:	57                   	push   %edi
4022a2:	8b 7d 08             	mov    0x8(%ebp),%edi
4022a5:	ff 37                	push   (%edi)
4022a7:	6a ff                	push   $0xffffffff
4022a9:	59                   	pop    %ecx
4022aa:	0f 44 c1             	cmove  %ecx,%eax
4022ad:	50                   	push   %eax
4022ae:	ff 75 0c             	push   0xc(%ebp)
4022b1:	56                   	push   %esi
4022b2:	ff 75 14             	push   0x14(%ebp)
4022b5:	ff 15 fc b0 44 00    	call   *0x44b0fc
4022bb:	85 c0                	test   %eax,%eax
4022bd:	75 29                	jne    0x4022e8
4022bf:	ff 15 e8 b0 44 00    	call   *0x44b0e8
4022c5:	0f b7 f0             	movzwl %ax,%esi
4022c8:	81 ce 00 00 07 80    	or     $0x80070000,%esi
4022ce:	85 c0                	test   %eax,%eax
4022d0:	0f 4e f0             	cmovle %eax,%esi
4022d3:	b8 05 40 00 80       	mov    $0x80004005,%eax
4022d8:	85 f6                	test   %esi,%esi
4022da:	0f 49 f0             	cmovns %eax,%esi
4022dd:	56                   	push   %esi
4022de:	68 2f 02 00 00       	push   $0x22f
4022e3:	e9 4a ff ff ff       	jmp    0x402232
4022e8:	8b 0f                	mov    (%edi),%ecx
4022ea:	33 c0                	xor    %eax,%eax
4022ec:	66 89 04 59          	mov    %ax,(%ecx,%ebx,2)
4022f0:	5f                   	pop    %edi
4022f1:	8b c6                	mov    %esi,%eax
4022f3:	5e                   	pop    %esi
4022f4:	5b                   	pop    %ebx
4022f5:	5d                   	pop    %ebp
4022f6:	c2 10 00             	ret    $0x10
4022f9:	55                   	push   %ebp
4022fa:	8b ec                	mov    %esp,%ebp
4022fc:	6a 01                	push   $0x1
4022fe:	ff 75 10             	push   0x10(%ebp)
402301:	ff 75 0c             	push   0xc(%ebp)
402304:	ff 75 08             	push   0x8(%ebp)
402307:	e8 a6 f1 ff ff       	call   0x4014b2
40230c:	5d                   	pop    %ebp
40230d:	c2 0c 00             	ret    $0xc
402310:	55                   	push   %ebp
402311:	8b ec                	mov    %esp,%ebp
402313:	68 00 02 00 00       	push   $0x200
402318:	ff 75 10             	push   0x10(%ebp)
40231b:	ff 75 0c             	push   0xc(%ebp)
40231e:	ff 75 08             	push   0x8(%ebp)
402321:	e8 39 f2 ff ff       	call   0x40155f
402326:	5d                   	pop    %ebp
402327:	c2 0c 00             	ret    $0xc
40232a:	55                   	push   %ebp
40232b:	8b ec                	mov    %esp,%ebp
40232d:	56                   	push   %esi
40232e:	33 f6                	xor    %esi,%esi