40200d:	56                   	push   %esi
40200e:	ff 15 50 40 40 00    	call   *0x404050
402014:	8d 85 f4 fd ff ff    	lea    -0x20c(%ebp),%eax
40201a:	c7 85 d4 fd ff ff 20 	movl   $0x20,-0x22c(%ebp)
402021:	00 00 00
402024:	89 85 dc fd ff ff    	mov    %eax,-0x224(%ebp)
40202a:	0f b7 c7             	movzwl %di,%eax
40202d:	89 85 e8 fd ff ff    	mov    %eax,-0x218(%ebp)
402033:	8d 85 d4 fd ff ff    	lea    -0x22c(%ebp),%eax
402039:	50                   	push   %eax
40203a:	c7 85 d8 fd ff ff 88 	movl   $0x88,-0x228(%ebp)
402041:	00 00 00
402044:	89 b5 f0 fd ff ff    	mov    %esi,-0x210(%ebp)
40204a:	ff 15 60 40 40 00    	call   *0x404060
402050:	8b d0                	mov    %eax,%edx
402052:	3b d3                	cmp    %ebx,%edx
402054:	74 1d                	je     0x402073
402056:	8b ca                	mov    %edx,%ecx
402058:	be 10 30 40 00       	mov    $0x403010,%esi
40205d:	8b c3                	mov    %ebx,%eax
40205f:	f0 0f b1 0e          	lock cmpxchg %ecx,(%esi)
402063:	3b c3                	cmp    %ebx,%eax
402065:	74 07                	je     0x40206e
402067:	52                   	push   %edx
402068:	ff 15 5c 40 40 00    	call   *0x40405c
40206e:	e8 54 00 00 00       	call   0x4020c7
402073:	8b 4d fc             	mov    -0x4(%ebp),%ecx
402076:	33 c0                	xor    %eax,%eax
402078:	39 1d 10 30 40 00    	cmp    %ebx,0x403010
40207e:	5f                   	pop    %edi
40207f:	0f 95 c0             	setne  %al
402082:	33 cd                	xor    %ebp,%ecx
402084:	5e                   	pop    %esi
402085:	5b                   	pop    %ebx
402086:	e8 25 08 00 00       	call   0x4028b0
40208b:	c9                   	leave
40208c:	c3                   	ret
40208d:	8b ff                	mov    %edi,%edi
40208f:	55                   	push   %ebp
402090:	8b ec                	mov    %esp,%ebp
402092:	51                   	push   %ecx
402093:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
402097:	8d 4d fc             	lea    -0x4(%ebp),%ecx
40209a:	e8 bd fe ff ff       	call   0x401f5c
40209f:	85 c0                	test   %eax,%eax
4020a1:	75 02                	jne    0x4020a5
4020a3:	c9                   	leave
4020a4:	c3                   	ret
4020a5:	56                   	push   %esi
4020a6:	68 00 40 00 00       	push   $0x4000
4020ab:	6a 00                	push   $0x0
4020ad:	68 28 12 40 00       	push   $0x401228
4020b2:	ff 15 14 40 40 00    	call   *0x404014
4020b8:	8b 4d fc             	mov    -0x4(%ebp),%ecx
4020bb:	8b f0                	mov    %eax,%esi
4020bd:	e8 e5 fe ff ff       	call   0x401fa7
4020c2:	8b c6                	mov    %esi,%eax
4020c4:	5e                   	pop    %esi
4020c5:	c9                   	leave
4020c6:	c3                   	ret
4020c7:	8b 0d 7c 33 40 00    	mov    0x40337c,%ecx
4020cd:	85 c9                	test   %ecx,%ecx
4020cf:	75 2a                	jne    0x4020fb
4020d1:	e8 b7 ff ff ff       	call   0x40208d
4020d6:	8b c8                	mov    %eax,%ecx
4020d8:	89 0d 7c 33 40 00    	mov    %ecx,0x40337c
4020de:	85 c9                	test   %ecx,%ecx
4020e0:	75 19                	jne    0x4020fb
4020e2:	68 00 40 00 00       	push   $0x4000
4020e7:	50                   	push   %eax
4020e8:	68 28 12 40 00       	push   $0x401228
4020ed:	ff 15 14 40 40 00    	call   *0x404014
4020f3:	8b c8                	mov    %eax,%ecx
4020f5:	89 0d 7c 33 40 00    	mov    %ecx,0x40337c
4020fb:	33 c0                	xor    %eax,%eax
4020fd:	85 c9                	test   %ecx,%ecx
4020ff:	0f 95 c0             	setne  %al
402102:	c3                   	ret
402103:	8b ff                	mov    %edi,%edi
402105:	55                   	push   %ebp
402106:	8b ec                	mov    %esp,%ebp
402108:	51                   	push   %ecx
402109:	8d 45 fc             	lea    -0x4(%ebp),%eax
40210c:	50                   	push   %eax
40210d:	ff 15 18 40 40 00    	call   *0x404018
402113:	50                   	push   %eax
402114:	ff 15 48 40 40 00    	call   *0x404048
40211a:	85 c0                	test   %eax,%eax
40211c:	74 0a                	je     0x402128
40211e:	83 7d fc 00          	cmpl   $0x0,-0x4(%ebp)
402122:	74 04                	je     0x402128
402124:	b0 01                	mov    $0x1,%al
402126:	c9                   	leave
402127:	c3                   	ret
402128:	32 c0                	xor    %al,%al
40212a:	c9                   	leave
40212b:	c3                   	ret
40212c:	8b ff                	mov    %edi,%edi
40212e:	53                   	push   %ebx
40212f:	56                   	push   %esi
402130:	57                   	push   %edi
402131:	6a 00                	push   $0x0
402133:	6a 00                	push   $0x0
402135:	33 f6                	xor    %esi,%esi
402137:	68 44 12 40 00       	push   $0x401244
40213c:	46                   	inc    %esi
40213d:	ff 15 14 40 40 00    	call   *0x404014
402143:	8b f8                	mov    %eax,%edi
402145:	85 ff                	test   %edi,%edi
402147:	74 32                	je     0x40217b
402149:	68 5c 12 40 00       	push   $0x40125c
40214e:	57                   	push   %edi
40214f:	ff 15 2c 40 40 00    	call   *0x40402c
402155:	8b d8                	mov    %eax,%ebx
402157:	85 db                	test   %ebx,%ebx
402159:	74 19                	je     0x402174
40215b:	8b cb                	mov    %ebx,%ecx
40215d:	ff 15 48 41 40 00    	call   *0x404148
402163:	8b f4                	mov    %esp,%esi
402165:	ff d3                	call   *%ebx
402167:	3b f4                	cmp    %esp,%esi
402169:	74 07                	je     0x402172
40216b:	b9 04 00 00 00       	mov    $0x4,%ecx
402170:	cd 29                	int    $0x29
402172:	8b f0                	mov    %eax,%esi
402174:	57                   	push   %edi
402175:	ff 15 10 40 40 00    	call   *0x404010
40217b:	5f                   	pop    %edi
40217c:	8b c6                	mov    %esi,%eax
40217e:	5e                   	pop    %esi
40217f:	5b                   	pop    %ebx
402180:	c3                   	ret
402181:	8b ff                	mov    %edi,%edi
402183:	55                   	push   %ebp
402184:	8b ec                	mov    %esp,%ebp
402186:	8b 45 0c             	mov    0xc(%ebp),%eax
402189:	56                   	push   %esi
40218a:	33 f6                	xor    %esi,%esi
40218c:	85 c0                	test   %eax,%eax
40218e:	74 07                	je     0x402197
402190:	3d ff ff ff 7f       	cmp    $0x7fffffff,%eax
402195:	76 05                	jbe    0x40219c
402197:	be 57 00 07 80       	mov    $0x80070057,%esi
40219c:	85 f6                	test   %esi,%esi
40219e:	78 37                	js     0x4021d7
4021a0:	53                   	push   %ebx
4021a1:	8b 5d 08             	mov    0x8(%ebp),%ebx
4021a4:	33 f6                	xor    %esi,%esi
4021a6:	57                   	push   %edi
4021a7:	8d 78 ff             	lea    -0x1(%eax),%edi
4021aa:	8d 45 14             	lea    0x14(%ebp),%eax
4021ad:	50                   	push   %eax
4021ae:	ff 75 10             	push   0x10(%ebp)
4021b1:	57                   	push   %edi
4021b2:	53                   	push   %ebx
4021b3:	ff 15 1c 41 40 00    	call   *0x40411c
4021b9:	83 c4 10             	add    $0x10,%esp
4021bc:	85 c0                	test   %eax,%eax
4021be:	78 08                	js     0x4021c8
4021c0:	3b c7                	cmp    %edi,%eax
4021c2:	77 04                	ja     0x4021c8
4021c4:	75 0d                	jne    0x4021d3
4021c6:	eb 05                	jmp    0x4021cd
4021c8:	be 7a 00 07 80       	mov    $0x8007007a,%esi
4021cd:	33 c0                	xor    %eax,%eax
4021cf:	66 89 04 7b          	mov    %ax,(%ebx,%edi,2)
4021d3:	5f                   	pop    %edi
4021d4:	5b                   	pop    %ebx
4021d5:	eb 0c                	jmp    0x4021e3
4021d7:	85 c0                	test   %eax,%eax
4021d9:	74 08                	je     0x4021e3
4021db:	8b 4d 08             	mov    0x8(%ebp),%ecx
4021de:	33 c0                	xor    %eax,%eax
4021e0:	66 89 01             	mov    %ax,(%ecx)
4021e3:	8b c6                	mov    %esi,%eax
4021e5:	5e                   	pop    %esi
4021e6:	5d                   	pop    %ebp
4021e7:	c3                   	ret
4021e8:	8b ff                	mov    %edi,%edi
4021ea:	55                   	push   %ebp
4021eb:	8b ec                	mov    %esp,%ebp
4021ed:	81 ec 0c 02 00 00    	sub    $0x20c,%esp
4021f3:	a1 04 30 40 00       	mov    0x403004,%eax
4021f8:	33 c5                	xor    %ebp,%eax
4021fa:	89 45 fc             	mov    %eax,-0x4(%ebp)
4021fd:	8b 45 08             	mov    0x8(%ebp),%eax
402200:	56                   	push   %esi
402201:	8b f1                	mov    %ecx,%esi
402203:	83 e8 00             	sub    $0x0,%eax
402206:	74 37                	je     0x40223f
402208:	83 e8 01             	sub    $0x1,%eax
40220b:	74 2b                	je     0x402238
40220d:	83 e8 01             	sub    $0x1,%eax
402210:	74 1f                	je     0x402231
402212:	83 e8 01             	sub    $0x1,%eax
402215:	74 13                	je     0x40222a
402217:	83 e8 01             	sub    $0x1,%eax
40221a:	74 07                	je     0x402223
40221c:	b8 57 00 07 80       	mov    $0x80070057,%eax
402221:	eb 50                	jmp    0x402273
402223:	b8 50 13 40 00       	mov    $0x401350,%eax
402228:	eb 1a                	jmp    0x402244
40222a:	b8 20 13 40 00       	mov    $0x401320,%eax
40222f:	eb 13                	jmp    0x402244
402231:	b8 e0 12 40 00       	mov    $0x4012e0,%eax
402236:	eb 0c                	jmp    0x402244
402238:	b8 a8 12 40 00       	mov    $0x4012a8,%eax
40223d:	eb 05                	jmp    0x402244
40223f:	b8 70 12 40 00       	mov    $0x401270,%eax
402244:	57                   	push   %edi
402245:	50                   	push   %eax
402246:	bf 04 01 00 00       	mov    $0x104,%edi
40224b:	8d 85 f4 fd ff ff    	lea    -0x20c(%ebp),%eax
402251:	57                   	push   %edi
402252:	50                   	push   %eax
402253:	ff 15 cc 40 40 00    	call   *0x4040cc
402259:	ff 75 0c             	push   0xc(%ebp)
40225c:	8d 85 f4 fd ff ff    	lea    -0x20c(%ebp),%eax
402262:	50                   	push   %eax
402263:	68 88 13 40 00       	push   $0x401388
402268:	57                   	push   %edi
402269:	56                   	push   %esi
40226a:	e8 12 ff ff ff       	call   0x402181
40226f:	83 c4 14             	add    $0x14,%esp
402272:	5f                   	pop    %edi
402273:	8b 4d fc             	mov    -0x4(%ebp),%ecx
402276:	33 cd                	xor    %ebp,%ecx
402278:	5e                   	pop    %esi
402279:	e8 32 06 00 00       	call   0x4028b0
40227e:	c9                   	leave
40227f:	c2 08 00             	ret    $0x8
402282:	8b ff                	mov    %edi,%edi
402284:	55                   	push   %ebp
402285:	8b ec                	mov    %esp,%ebp
402287:	81 ec 0c 02 00 00    	sub    $0x20c,%esp
40228d:	a1 04 30 40 00       	mov    0x403004,%eax
402292:	33 c5                	xor    %ebp,%eax
402294:	89 45 fc             	mov    %eax,-0x4(%ebp)
402297:	56                   	push   %esi
402298:	57                   	push   %edi
402299:	8b 7d 0c             	mov    0xc(%ebp),%edi
40229c:	8d 8d f4 fd ff ff    	lea    -0x20c(%ebp),%ecx
4022a2:	52                   	push   %edx
4022a3:	ff 75 08             	push   0x8(%ebp)
4022a6:	e8 3d ff ff ff       	call   0x4021e8
4022ab:	8b f0                	mov    %eax,%esi
4022ad:	85 f6                	test   %esi,%esi
4022af:	78 2f                	js     0x4022e0
4022b1:	8d 85 f4 fd ff ff    	lea    -0x20c(%ebp),%eax
4022b7:	50                   	push   %eax
4022b8:	6a 00                	push   $0x0
4022ba:	68 02 00 10 00       	push   $0x100002
4022bf:	ff 15 4c 40 40 00    	call   *0x40404c
4022c5:	89 07                	mov    %eax,(%edi)
4022c7:	85 c0                	test   %eax,%eax
4022c9:	75 15                	jne    0x4022e0
4022cb:	ff 15 3c 40 40 00    	call   *0x40403c
4022d1:	8b f0                	mov    %eax,%esi
4022d3:	85 f6                	test   %esi,%esi
4022d5:	7e 09                	jle    0x4022e0
4022d7:	0f b7 f6             	movzwl %si,%esi
4022da:	81 ce 00 00 07 80    	or     $0x80070000,%esi
4022e0:	8b 4d fc             	mov    -0x4(%ebp),%ecx
4022e3:	8b c6                	mov    %esi,%eax
4022e5:	5f                   	pop    %edi
4022e6:	33 cd                	xor    %ebp,%ecx
4022e8:	5e                   	pop    %esi
4022e9:	e8 c2 05 00 00       	call   0x4028b0
4022ee:	c9                   	leave
4022ef:	c2 08 00             	ret    $0x8
4022f2:	8b ff                	mov    %edi,%edi
4022f4:	55                   	push   %ebp
4022f5:	8b ec                	mov    %esp,%ebp
4022f7:	81 ec 1c 02 00 00    	sub    $0x21c,%esp
4022fd:	a1 04 30 40 00       	mov    0x403004,%eax
402302:	33 c5                	xor    %ebp,%eax
402304:	89 45 fc             	mov    %eax,-0x4(%ebp)
402307:	8b 55 10             	mov    0x10(%ebp),%edx
40230a:	8b 4d 08             	mov    0x8(%ebp),%ecx
40230d:	8b 45 0c             	mov    0xc(%ebp),%eax
402310:	53                   	push   %ebx
402311:	8b 5d 18             	mov    0x18(%ebp),%ebx
402314:	56                   	push   %esi
402315:	89 95 ec fd ff ff    	mov    %edx,-0x214(%ebp)
40231b:	33 f6                	xor    %esi,%esi
40231d:	8b 55 1c             	mov    0x1c(%ebp),%edx
402320:	89 8d e4 fd ff ff    	mov    %ecx,-0x21c(%ebp)
402326:	89 85 f0 fd ff ff    	mov    %eax,-0x210(%ebp)
40232c:	89 95 e8 fd ff ff    	mov    %edx,-0x218(%ebp)
402332:	57                   	push   %edi
402333:	8b 3d 6c 33 40 00    	mov    0x40336c,%edi
402339:	85 c9                	test   %ecx,%ecx
40233b:	74 19                	je     0x402356
40233d:	51                   	push   %ecx
40233e:	56                   	push   %esi
40233f:	8b d7                	mov    %edi,%edx
402341:	e8 3c ff ff ff       	call   0x402282
402346:	8b f0                	mov    %eax,%esi
402348:	85 f6                	test   %esi,%esi
40234a:	0f 88 c1 00 00 00    	js     0x402411
402350:	8b 85 f0 fd ff ff    	mov    -0x210(%ebp),%eax
402356:	85 c0                	test   %eax,%eax
402358:	74 0c                	je     0x402366
40235a:	50                   	push   %eax
40235b:	6a 01                	push   $0x1
40235d:	8b d7                	mov    %edi,%edx
40235f:	e8 1e ff ff ff       	call   0x402282
402364:	8b f0                	mov    %eax,%esi
402366:	85 f6                	test   %esi,%esi
402368:	0f 88 a3 00 00 00    	js     0x402411
40236e:	8b 85 ec fd ff ff    	mov    -0x214(%ebp),%eax
402374:	85 c0                	test   %eax,%eax
402376:	74 0c                	je     0x402384
402378:	50                   	push   %eax
402379:	6a 02                	push   $0x2
40237b:	8b d7                	mov    %edi,%edx
40237d:	e8 00 ff ff ff       	call   0x402282
402382:	8b f0                	mov    %eax,%esi
402384:	85 f6                	test   %esi,%esi
402386:	0f 88 85 00 00 00    	js     0x402411
40238c:	85 db                	test   %ebx,%ebx
40238e:	74 7d                	je     0x40240d
402390:	57                   	push   %edi
402391:	6a 04                	push   $0x4
402393:	8d 8d f4 fd ff ff    	lea    -0x20c(%ebp),%ecx
402399:	e8 4a fe ff ff       	call   0x4021e8
40239e:	8b f0                	mov    %eax,%esi
4023a0:	85 f6                	test   %esi,%esi
4023a2:	78 6d                	js     0x402411
4023a4:	8d 85 f4 fd ff ff    	lea    -0x20c(%ebp),%eax
4023aa:	50                   	push   %eax
4023ab:	6a 00                	push   $0x0
4023ad:	6a 06                	push   $0x6
4023af:	ff 15 40 40 40 00    	call   *0x404040
4023b5:	89 03                	mov    %eax,(%ebx)
4023b7:	85 c0                	test   %eax,%eax
4023b9:	75 15                	jne    0x4023d0
4023bb:	ff 15 3c 40 40 00    	call   *0x40403c
4023c1:	8b f0                	mov    %eax,%esi
4023c3:	85 f6                	test   %esi,%esi
4023c5:	7e 0b                	jle    0x4023d2
4023c7:	0f b7 f6             	movzwl %si,%esi
4023ca:	81 ce 00 00 07 80    	or     $0x80070000,%esi
4023d0:	85 f6                	test   %esi,%esi
4023d2:	78 3d                	js     0x402411
4023d4:	83 3b 00             	cmpl   $0x0,(%ebx)
4023d7:	74 34                	je     0x40240d
4023d9:	8b bd e8 fd ff ff    	mov    -0x218(%ebp),%edi
4023df:	85 ff                	test   %edi,%edi
4023e1:	74 2a                	je     0x40240d