Code:
924: switch(code[liner][4]){
0040382B mov ecx,dword ptr [ebp-6Ch]
0040382E and ecx,0FFFFh
00403834 shl ecx,4
00403837 xor edx,edx
00403839 mov dx,word ptr code+8 (00434f9c)[ecx]
00403840 mov dword ptr [ebp-0C0h],edx
00403846 cmp dword ptr [ebp-0C0h],0Fh
0040384D ja $L53487+39h (00403b9e)
00403853 mov eax,dword ptr [ebp-0C0h]
00403859 jmp dword ptr [eax*4+403CDCh]
925: case 0:
926: ax=rhs;
00403860 mov ecx,dword ptr [ebp-48h]
00403863 mov dword ptr [ebp-10h],ecx
00403866 mov edx,dword ptr [ebp-44h]
00403869 mov dword ptr [ebp-0Ch],edx
927: liner++;
0040386C mov ax,word ptr [ebp-6Ch]
00403870 add ax,offset $L53439+12h (00403872)
00403874 mov word ptr [ebp-6Ch],ax
928: break;
00403878 jmp $L53487+59h (00403bbe)
929: case 1:
930: if (ax==rhs) liner=(unsigned short)(code[liner][6] + 1);
0040387D fld qword ptr [ebp-10h]
00403880 fcomp qword ptr [ebp-48h]
00403883 fnstsw ax
00403885 test ah,40h
00403888 je $L53440+2Bh (004038a8)
0040388A mov ecx,dword ptr [ebp-6Ch]
0040388D and ecx,0FFFFh
00403893 shl ecx,4
00403896 xor edx,edx
00403898 mov dx,word ptr code+0Ch (00434fa0)[ecx]
0040389F add edx,1
004038A2 mov word ptr [ebp-6Ch],dx
931: else
004038A6 jmp $L53440+37h (004038b4)
932: liner++;
004038A8 mov ax,word ptr [ebp-6Ch]
004038AC add ax,offset $L53440+31h (004038ae)
004038B0 mov word ptr [ebp-6Ch],ax
933: break;
004038B4 jmp $L53487+59h (00403bbe)
934: case 2:
935: if (ax<rhs) liner=(unsigned short)(code[liner][6] + 1);
004038B9 fld qword ptr [ebp-10h]
004038BC fcomp qword ptr [ebp-48h]
004038BF fnstsw ax
004038C1 test ah,1
004038C4 je $L53444+2Bh (004038e4)
004038C6 mov ecx,dword ptr [ebp-6Ch]
004038C9 and ecx,0FFFFh
004038CF shl ecx,4
004038D2 xor edx,edx
004038D4 mov dx,word ptr code+0Ch (00434fa0)[ecx]
004038DB add edx,1
004038DE mov word ptr [ebp-6Ch],dx
936: else
004038E2 jmp $L53444+37h (004038f0)
937: liner++;
004038E4 mov ax,word ptr [ebp-6Ch]
004038E8 add ax,offset $L53444+31h (004038ea)
004038EC mov word ptr [ebp-6Ch],ax
938: break;
004038F0 jmp $L53487+59h (00403bbe)
939: case 3:
.........
lots more!
.........
1001: default:
1002: conloc(1,22);
00403B9E push 16h
00403BA0 push 1
00403BA2 call @ILT+90(_conloc) (0040105f)
00403BA7 add esp,8
1003: puts("Error 1 in scorer - default case!");
00403BAA push offset string "Error 1 in scorer - default case"... (00430274)
00403BAF call puts (00404b60)
00403BB4 add esp,4
1004: exit(0);
00403BB7 push 0
00403BB9 call exit (00405080)
1005: }
1006: if(liner>length)
00403BBE mov ecx,dword ptr [ebp-6Ch]
00403BC1 and ecx,0FFFFh
00403BC7 xor edx,edx
00403BC9 mov dx,word ptr [length (00434f92)]
00403BD0 cmp ecx,edx
00403BD2 jle $L53487+71h (00403bd6)
1007: goto success; // .. acceptable end of "prog"
00403BD4 jmp success (00403be2)
1008:
1009: } //end of "while" loop ( from old progrun )
00403BD6 jmp scorer+112h (00403612)
1010: return(FALSE); //.. is looping too long
00403BDB xor eax,eax
00403BDD jmp success+0E6h (00403cc8)
1011:
1012: success:
From the above you can see ( I think ) that the heart of the switch() statement is: