int Printfloat10(char *s,long double ext) { int k; char *e=(char *)&ext; if (*(ulong *)e==0 && *(ushort *)(e+4)==0 && *(ulong *)(e+6)==0x7FFF8000L) k=sprintf(s,"+INF 7FFF 80000000 00000000"); else if (*(ulong *)e==0 && *(ushort *)(e+4)==0 && *(ulong *)(e+6)==0xFFFF8000L) k=sprintf(s,"-INF FFFF 80000000 00000000"); else if ((*(ulong *)(e+6) & 0x7FFF8000L)==0x7FFF8000L) k=sprintf(s,"%cNAN %04X %08lX %08lX",(e[9] & 0x80)==0?'+':'-', (int)(*(ushort *)(e+8)),*(ulong *)(e+4),*(ulong *)e); else if ((*(ulong *)(e+6) & 0x7FFF0000L)==0x7FFF0000L) k=sprintf(s,"%c??? %04X %08lX %08lX",(e[9] & 0x80)==0?'+':'-', (int)(*(ushort *)(e+8)),*(ulong *)(e+4),*(ulong *)e); else if ((*(ulong *)(e+6) & 0x7FFF0000L)!=0 && (*(ulong *)(e+6) & 0x00008000)==0) k=sprintf(s,"%cUNORM %04X %08lX %08lX",(e[9] & 0x80)==0?'+':'-', (int)(*(ushort *)(e+8)),*(ulong *)(e+4),*(ulong *)e); else if (*(ulong *)e==0 && *(ushort *)(e+4)==0 && *(ulong *)(e+6)==0x80000000L) k=sprintf(s,"-0.0"); // Negative floating 0.0 else if (ext==0.0) k=sprintf(s,"0.0"); // Print 0 with decimal point else if ((ext>=-1.e10 && ext<-1.0) || (ext>1.0 && ext<=1.e10)) k=sprintf(s,"%#.20Lg",ext); else if ((ext>=-1.0 && ext<=-1.e-5) || (ext>=1.e-5 && ext<=1.0)) k=sprintf(s,"%#.19Lf",ext); else k=sprintf(s,"%#.19Le",ext); return k; }; -> .text:0047E7D7 mov ax, word ptr [ebp+arg_4+8] .text:0047E7DB push eax .text:0047E7DC push dword ptr [ebp+arg_4+4] .text:0047E7DF push dword ptr [ebp+arg_4] .text:0047E7E2 push offset a_19le ; "%#.19Le" .text:0047E7E7 push edx ; buffer .text:0047E7E8 call _sprintf .text:00407C08 sub_407C08 proc near ; CODE XREF: sub_42EBD0+4CDp .text:00407C08 ; sub_42EBD0+5D8p ... .text:00407C08 .text:00407C08 var_4= dword ptr -4 .text:00407C08 arg_0= dword ptr 8 .text:00407C08 arg_4= dword ptr 0Ch .text:00407C08 arg_8= dword ptr 10h .text:00407C08 arg_C= dword ptr 14h .text:00407C08 arg_10= dword ptr 18h .text:00407C08 arg_14= dword ptr 1Ch .text:00407C08 arg_18= dword ptr 20h .text:00407C08 arg_1C= dword ptr 24h .text:00407C08 arg_20= dword ptr 28h .text:00407C08 .text:00407C08 push ebp .text:00407C09 mov ebp, esp .text:00407C0B push ecx .text:00407C0C push ebx .text:00407C0D push esi .text:00407C0E push edi .text:00407C0F mov eax, [ebp+arg_1C] .text:00407C12 mov esi, [ebp+arg_18] .text:00407C15 mov edi, [ebp+arg_4] .text:00407C18 mov ebx, [ebp+arg_0] .text:00407C1B test ebx, ebx .text:00407C1D jnz short loc_407C26 .text:00407C1F xor eax, eax .text:00407C21 jmp loc_408059 .text:00407C26 ; --------------------------------------------------------------------------- .text:00407C26 .text:00407C26 loc_407C26: ; CODE XREF: sub_407C08+15j .text:00407C26 test edi, edi .text:00407C28 jz short loc_407C2F .text:00407C2A cmp byte ptr [edi], 0 .text:00407C2D jnz short loc_407C52 .text:00407C2F .text:00407C2F loc_407C2F: ; CODE XREF: sub_407C08+20j .text:00407C2F lea edx, [ebx+12h] .text:00407C32 mov edi, edx .text:00407C34 mov esi, offset aNoExpression ; "No expression" .text:00407C39 mov eax, edi .text:00407C3B mov ecx, 3 .text:00407C40 rep movsd .text:00407C42 movsw .text:00407C44 xor edx, edx .text:00407C46 mov [ebx+4], edx .text:00407C49 mov [ebx], edx .text:00407C4B xor eax, eax .text:00407C4D jmp loc_408059 .text:00407C52 ; --------------------------------------------------------------------------- .text:00407C52 .text:00407C52 loc_407C52: ; CODE XREF: sub_407C08+25j .text:00407C52 xor ecx, ecx .text:00407C54 mov edx, [ebp+arg_8] .text:00407C57 mov dword_4CD290, ecx .text:00407C5D mov dword_4CD170, edi .text:00407C63 mov ecx, [ebp+arg_C] .text:00407C66 mov dword_4CD29C, edx .text:00407C6C mov edx, [ebp+arg_10] .text:00407C6F mov dword_4CD2A0, ecx .text:00407C75 mov ecx, [ebp+arg_14] .text:00407C78 mov dword_4CD2A4, edx .text:00407C7E mov dword_4CD2A8, ecx .text:00407C84 mov dword_4CD2AC, esi .text:00407C8A mov dword_4CD294, eax .text:00407C8F push eax .text:00407C90 call _Findthread .text:00407C95 pop ecx .text:00407C96 test eax, eax .text:00407C98 jz short loc_407CA3 .text:00407C9A cmp dword ptr [eax+482h], 0 .text:00407CA1 jnz short loc_407CAC .text:00407CA3 .text:00407CA3 loc_407CA3: ; CODE XREF: sub_407C08+90j .text:00407CA3 xor eax, eax .text:00407CA5 mov dword_4CD298, eax .text:00407CAA jmp short loc_407CB6 .text:00407CAC ; --------------------------------------------------------------------------- .text:00407CAC .text:00407CAC loc_407CAC: ; CODE XREF: sub_407C08+99j .text:00407CAC add eax, 2ECh .text:00407CB1 mov dword_4CD298, eax .text:00407CB6 .text:00407CB6 loc_407CB6: ; CODE XREF: sub_407C08+A2j .text:00407CB6 push 0 .text:00407CB8 push 0 .text:00407CBA call sub_4AA1F8 .text:00407CBF add esp, 8 .text:00407CC2 mov [ebp+var_4], eax .text:00407CC5 push 3Fh .text:00407CC7 push 3Fh .text:00407CC9 call sub_4AA1F8 .text:00407CCE add esp, 8 .text:00407CD1 push 0 .text:00407CD3 call sub_401150 .text:00407CD8 pop ecx .text:00407CD9 push ebx .text:00407CDA call sub_403D5C .text:00407CDF pop ecx .text:00407CE0 push 63h .text:00407CE2 push ebx .text:00407CE3 call sub_4043B8 .text:00407CE8 add esp, 8 .text:00407CEB call __clear87 .text:00407CF0 push 3Fh .text:00407CF2 mov edx, [ebp+var_4] .text:00407CF5 push edx .text:00407CF6 call sub_4AA1F8 .text:00407CFB add esp, 8 .text:00407CFE cmp dword_4CD290, 0 .text:00407D05 jnz short loc_407D33 .text:00407D07 cmp dword_4CD178, 0 .text:00407D0E jz short loc_407D33 .text:00407D10 cmp [ebp+arg_20], 0 .text:00407D14 jz short loc_407D29 .text:00407D16 mov dword_4CD290, offset aExtraCharacter ; "Extra characters on line" .text:00407D20 xor ecx, ecx .text:00407D22 mov [ebx+4], ecx .text:00407D25 mov [ebx], ecx .text:00407D27 jmp short loc_407D33 .text:00407D29 ; --------------------------------------------------------------------------- .text:00407D29 .text:00407D29 loc_407D29: ; CODE XREF: sub_407C08+10Cj .text:00407D29 mov eax, dword_4CD174 .text:00407D2E mov dword_4CD170, eax .text:00407D33 .text:00407D33 loc_407D33: ; CODE XREF: sub_407C08+FDj .text:00407D33 ; sub_407C08+106j ... .text:00407D33 cmp dword_4CD290, 0 .text:00407D3A jz short loc_407D7B .text:00407D3C push edi .text:00407D3D mov eax, dword_4CD290 .text:00407D42 mov edi, eax .text:00407D44 xor eax, eax .text:00407D46 or ecx, 0FFFFFFFFh .text:00407D49 lea edx, [ebx+12h] .text:00407D4C repne scasb .text:00407D4E not ecx .text:00407D50 sub edi, ecx .text:00407D52 mov esi, edx .text:00407D54 xchg esi, edi .text:00407D56 mov edx, ecx .text:00407D58 mov eax, edi .text:00407D5A shr ecx, 2 .text:00407D5D rep movsd .text:00407D5F mov ecx, edx .text:00407D61 and ecx, 3 .text:00407D64 rep movsb .text:00407D66 xor eax, eax .text:00407D68 pop edi .text:00407D69 mov [ebx+4], eax .text:00407D6C mov [ebx], eax .text:00407D6E xor edx, edx .text:00407D70 mov [ebx+112h], edx .text:00407D76 jmp loc_408052 .text:00407D7B ; --------------------------------------------------------------------------- .text:00407D7B .text:00407D7B loc_407D7B: ; CODE XREF: sub_407C08+132j .text:00407D7B mov eax, [ebx] .text:00407D7D cmp eax, 1 .text:00407D80 jz short loc_407D87 .text:00407D82 cmp eax, 21h .text:00407D85 jnz short loc_407DA1 .text:00407D87 .text:00407D87 loc_407D87: ; CODE XREF: sub_407C08+178j .text:00407D87 mov edx, [ebx+8] .text:00407D8A add ebx, 12h .text:00407D8D push edx .text:00407D8E push offset a02lx ; "%02lX" .text:00407D93 push ebx ; buffer .text:00407D94 call _sprintf .text:00407D99 add esp, 0Ch .text:00407D9C jmp loc_408052 .text:00407DA1 ; --------------------------------------------------------------------------- .text:00407DA1 .text:00407DA1 loc_407DA1: ; CODE XREF: sub_407C08+17Dj .text:00407DA1 mov eax, [ebx] .text:00407DA3 cmp eax, 2 .text:00407DA6 jz short loc_407DB2 .text:00407DA8 cmp eax, 22h .text:00407DAB jz short loc_407DB2 .text:00407DAD cmp eax, 2Ah .text:00407DB0 jnz short loc_407DCC .text:00407DB2 .text:00407DB2 loc_407DB2: ; CODE XREF: sub_407C08+19Ej .text:00407DB2 ; sub_407C08+1A3j .text:00407DB2 mov edx, [ebx+8] .text:00407DB5 add ebx, 12h .text:00407DB8 push edx .text:00407DB9 push offset a04lx ; "%04lX" .text:00407DBE push ebx ; buffer .text:00407DBF call _sprintf .text:00407DC4 add esp, 0Ch .text:00407DC7 jmp loc_408052 .text:00407DCC ; --------------------------------------------------------------------------- .text:00407DCC .text:00407DCC loc_407DCC: ; CODE XREF: sub_407C08+1A8j .text:00407DCC cmp dword ptr [ebx+4], 4 .text:00407DD0 jnz short loc_407DEC .text:00407DD2 mov eax, [ebx+8] .text:00407DD5 add ebx, 12h .text:00407DD8 push eax .text:00407DD9 push offset a08lx ; "%08lX" .text:00407DDE push ebx ; buffer .text:00407DDF call _sprintf .text:00407DE4 add esp, 0Ch .text:00407DE7 jmp loc_408052 .text:00407DEC ; --------------------------------------------------------------------------- .text:00407DEC .text:00407DEC loc_407DEC: ; CODE XREF: sub_407C08+1C8j .text:00407DEC cmp dword ptr [ebx+4], 104h .text:00407DF3 jnz short loc_407E10 .text:00407DF5 mov eax, [ebx+8] .text:00407DF8 push eax .text:00407DF9 push eax .text:00407DFA push offset aLi_Lx ; "%li. (%lX)" .text:00407DFF add ebx, 12h .text:00407E02 push ebx ; buffer .text:00407E03 call _sprintf .text:00407E08 add esp, 10h .text:00407E0B jmp loc_408052 .text:00407E10 ; --------------------------------------------------------------------------- .text:00407E10 .text:00407E10 loc_407E10: ; CODE XREF: sub_407C08+1EBj .text:00407E10 cmp dword ptr [ebx+4], 8 .text:00407E14 jnz short loc_407E34 .text:00407E16 mov eax, [ebx+8] .text:00407E19 push eax .text:00407E1A mov edx, [ebx+0Ch] .text:00407E1D add ebx, 12h .text:00407E20 push edx .text:00407E21 push offset a08lx08lx ; "%08lX%08lX" .text:00407E26 push ebx ; buffer .text:00407E27 call _sprintf .text:00407E2C add esp, 10h .text:00407E2F jmp loc_408052 .text:00407E34 ; --------------------------------------------------------------------------- .text:00407E34 .text:00407E34 loc_407E34: ; CODE XREF: sub_407C08+20Cj .text:00407E34 cmp dword ptr [ebx+4], 9 .text:00407E38 jnz short loc_407E56 .text:00407E3A mov ax, [ebx+10h] .text:00407E3E push eax .text:00407E3F push dword ptr [ebx+0Ch] .text:00407E42 push dword ptr [ebx+8] ; long double .text:00407E45 add ebx, 12h .text:00407E48 push ebx ; buffer .text:00407E49 call _Printfloat10