找回密码
 立即注册→加入我们

QQ登录

只需一步,快速开始

搜索
热搜: 下载 VB C 实现 编写
查看: 5017|回复: 14

【VB6】将“十进制”转换为二进制字符串的函数

[复制链接]

1110

主题

1651

回帖

7万

积分

用户组: 管理员

一只技术宅

UID
1
精华
244
威望
743 点
宅币
24217 个
贡献
46222 次
宅之契约
0 份
在线时间
2296 小时
注册时间
2014-1-26
发表于 2019-7-10 14:35:05 | 显示全部楼层 |阅读模式

欢迎访问技术宅的结界,请注册或者登录吧。

您需要 登录 才可以下载或查看,没有账号?立即注册→加入我们

×
应需给人帮忙写了这份代码,经过测试没有发现问题。
个人觉得性能上来说,应该难以被超越了,除非用Detour等方式自己hook自己,然后插入shellcode。
  1. Function Dec2Bin(ByVal Num As Long) As String
  2. Dim Result() As Byte, Pos As Long, I As Long
  3. ReDim Result(63)

  4. If Num And &H1& Then Result(62) = &H31 Else Result(62) = &H30
  5. If Num And &H2& Then Result(60) = &H31 Else Result(60) = &H30
  6. If Num And &H4& Then Result(58) = &H31 Else Result(58) = &H30
  7. If Num And &H8& Then Result(56) = &H31 Else Result(56) = &H30
  8. If Num And &H10& Then Result(54) = &H31 Else Result(54) = &H30
  9. If Num And &H20& Then Result(52) = &H31 Else Result(52) = &H30
  10. If Num And &H40& Then Result(50) = &H31 Else Result(50) = &H30
  11. If Num And &H80& Then Result(48) = &H31 Else Result(48) = &H30
  12. If Num And &H100& Then Result(46) = &H31 Else Result(46) = &H30
  13. If Num And &H200& Then Result(44) = &H31 Else Result(44) = &H30
  14. If Num And &H400& Then Result(42) = &H31 Else Result(42) = &H30
  15. If Num And &H800& Then Result(40) = &H31 Else Result(40) = &H30
  16. If Num And &H1000& Then Result(38) = &H31 Else Result(38) = &H30
  17. If Num And &H2000& Then Result(36) = &H31 Else Result(36) = &H30
  18. If Num And &H4000& Then Result(34) = &H31 Else Result(34) = &H30
  19. If Num And &H8000& Then Result(32) = &H31 Else Result(32) = &H30
  20. If Num And &H10000 Then Result(30) = &H31 Else Result(30) = &H30
  21. If Num And &H20000 Then Result(28) = &H31 Else Result(28) = &H30
  22. If Num And &H40000 Then Result(26) = &H31 Else Result(26) = &H30
  23. If Num And &H80000 Then Result(24) = &H31 Else Result(24) = &H30
  24. If Num And &H100000 Then Result(22) = &H31 Else Result(22) = &H30
  25. If Num And &H200000 Then Result(20) = &H31 Else Result(20) = &H30
  26. If Num And &H400000 Then Result(18) = &H31 Else Result(18) = &H30
  27. If Num And &H800000 Then Result(16) = &H31 Else Result(16) = &H30
  28. If Num And &H1000000 Then Result(14) = &H31 Else Result(14) = &H30
  29. If Num And &H2000000 Then Result(12) = &H31 Else Result(12) = &H30
  30. If Num And &H4000000 Then Result(10) = &H31 Else Result(10) = &H30
  31. If Num And &H8000000 Then Result(8) = &H31 Else Result(8) = &H30
  32. If Num And &H10000000 Then Result(6) = &H31 Else Result(6) = &H30
  33. If Num And &H20000000 Then Result(4) = &H31 Else Result(4) = &H30
  34. If Num And &H40000000 Then Result(2) = &H31 Else Result(2) = &H30
  35. If Num And &H80000000 Then Result(0) = &H31 Else Result(0) = &H30

  36. Dec2Bin = Result
  37. End Function
复制代码
我一直想吐槽的几个点:
  • 输入的参数是个Long,而它并不是“十进制”,而是一个32位的有符号整数类型,在CPU中或者内存中都是以32位二进制的方式存储的。我并没有看出任何“十进制”的地方。

    对于“十进制”的说法,其实有个打擦边球的数据类型,叫“BCD数”,它用4个二进制位存储一个10进制位表示的数值。但即便如此,VB6的Long它也不是BCD数。

    所以实际上根本不存在什么转换。只需要检测Long里面的每一个bit是否为1,然后处理字符串即可。
  • 把一个数值类型的变量以十进制字符串的方式存储或者显示的时候,你需要通过不断除以10求余数和商来判断出它作为十进制的时候每个位的数值是多少。

    同样我也见过有人把Long的数值除以2,然后判断余数是不是1来得出这个位是否为1。但这种做法存在一个问题。那就是CPU做整数除法的运算其实是相当慢的,尤其是有符号整数除法,运算速率甚至比不过浮点数除法。

    判断二进制的每个位的数值,最简单的办法就是用逻辑与来筛选。为何要做除法运算?
  • Long的长度就是32个二进制位,毕竟VB6不会再有什么长进了。它的数据类型,线程结构,能用到的指令集,已经固定。Long也不会变得更长。因此,为何要使用循环语句?VB6的编译器会老老实实地做循环判断跳转的过程,而现在的CPU都不喜欢跳转指令——它意味着指令队列刷新,相当于要多浪费几个指令的周期来填满它的流水线。

    所以我直接写32条语句来判断它每一个bit的状态,并修改字符串中对应位置的字符。
  • VB6的字符串操作过程,尤其是字符串拼接的过程,每次都会造成内存分配和释放。众所周知,内存分配,它慢。频繁的内存分配是造成各种算法的性能瓶颈的理由。

    所以对于 If xxxx Then A = A & "1" Else A = A & "0" 这样的写法,每次执行的时候VB6为了存储A的字符串值,会给它重新分配内存然后在它尾部追加"1"或者"0"。

    这怎么可能快得起来呢?VB6字符串处理里最慢的基本上就是字符串拼接了。

本帖被以下淘专辑推荐:

回复

使用道具 举报

1

主题

42

回帖

971

积分

用户组: 大·技术宅

UID
7437
精华
0
威望
112 点
宅币
594 个
贡献
110 次
宅之契约
0 份
在线时间
129 小时
注册时间
2021-9-11
发表于 2023-4-28 18:48:14 | 显示全部楼层
            Dim x As Long : x = &H55555555
            Dim s As String : s = String(32, 48)
            While x <> 0
                Select Case (x And ( - x))
                    Case 1 : s[31] = 49
                    Case 2 : s[30] = 49
                    Case 4 : s[29] = 49
                    Case 8 : s[28] = 49
                    Case &H10 : s[27] = 49
                    Case &H20 : s[26] = 49
                    Case &H40 : s[25] = 49
                    Case &H80 : s[24] = 49
                        
                    Case &H100 : s[23] = 49
                    Case &H200 : s[22] = 49
                    Case &H400 : s[21] = 49
                    Case &H800 : s[20] = 49
                    Case &H1000 : s[19] = 49
                    Case &H2000 : s[18] = 49
                    Case &H4000 : s[17] = 49
                    Case &H8000 : s[16] = 49
                        
                    Case &H10000 : s[15] = 49
                    Case &H20000 : s[14] = 49
                    Case &H40000 : s[13] = 49
                    Case &H80000 : s[12] = 49
                    Case &H100000 : s[11] = 49
                    Case &H200000 : s[10] = 49
                    Case &H400000 : s[9] = 49
                    Case &H800000 : s[8] = 49
                        
                    Case &H1000000 : s[7] = 49
                    Case &H2000000 : s[6] = 49
                    Case &H4000000 : s[5] = 49
                    Case &H8000000 : s[4] = 49
                    Case &H10000000 : s[3] = 49
                    Case &H20000000 : s[2] = 49
                    Case &H40000000 : s[1] = 49
                    Case &H80000000 : s[0] = 49
                End Select
                x = (x And (x - 1))
            Wend
            Debug.Print s
回复 赞! 0 靠! 1

使用道具 举报

1

主题

60

回帖

201

积分

用户组: 中·技术宅

UID
4683
精华
0
威望
0 点
宅币
140 个
贡献
0 次
宅之契约
0 份
在线时间
31 小时
注册时间
2019-2-11
发表于 2019-7-10 18:54:54 | 显示全部楼层
!!!谢谢A5.
回复

使用道具 举报

30

主题

210

回帖

2774

积分

用户组: 版主

UID
1821
精华
7
威望
69 点
宅币
2155 个
贡献
206 次
宅之契约
0 份
在线时间
478 小时
注册时间
2016-7-12
发表于 2019-7-10 22:41:19 | 显示全部楼层
本帖最后由 Ayala 于 2019-7-10 23:32 编辑

函数整体应该是十进制字符串处理成二进制字符串 不过vb可以很“神奇”的自动把"1"转换为 byval 1
传递的参数都已经是long了 用字典处理会不会更快些
"0000","0001","0010","0011","0100","0101","0110","0111",_
"1000","1001","1010","1011","1100","1101","1110","1111"
定义16个就够了
/Fo输出下asm看看

  1. TITLE        C:\Users\Administrator\Desktop\Form1.frm
  2.         .386P
  3. include listing.inc
  4. if @Version gt 510
  5. .model FLAT
  6. else
  7. _TEXT        SEGMENT PARA USE32 PUBLIC 'CODE'
  8. _TEXT        ENDS
  9. _DATA        SEGMENT DWORD USE32 PUBLIC 'DATA'
  10. _DATA        ENDS
  11. CONST        SEGMENT DWORD USE32 PUBLIC 'CONST'
  12. CONST        ENDS
  13. _BSS        SEGMENT DWORD USE32 PUBLIC 'BSS'
  14. _BSS        ENDS
  15. _TLS        SEGMENT DWORD USE32 PUBLIC 'TLS'
  16. _TLS        ENDS
  17. text$1        SEGMENT PARA USE32 PUBLIC ''
  18. text$1        ENDS
  19. ;        COMDAT ?Dec2Bin@Form1@@AAGXXZ
  20. text$1        SEGMENT PARA USE32 PUBLIC ''
  21. text$1        ENDS
  22. ;        COMDAT ?Form_Load@Form1@@AAGXXZ
  23. text$1        SEGMENT PARA USE32 PUBLIC ''
  24. text$1        ENDS
  25. FLAT        GROUP _DATA, CONST, _BSS
  26.         ASSUME        CS: FLAT, DS: FLAT, SS: FLAT
  27. endif
  28. PUBLIC        ?Dec2Bin@Form1@@AAGXXZ                                ; Form1::Dec2Bin
  29. EXTRN        __imp____vbaRedim:NEAR
  30. EXTRN        __imp____vbaGenerateBoundsError:NEAR
  31. EXTRN        __imp_@__vbaUI1I2:NEAR
  32. EXTRN        __imp_@__vbaStrMove:NEAR
  33. EXTRN        __imp____vbaStrVarCopy:NEAR
  34. EXTRN        __imp_@__vbaFreeStr:NEAR
  35. EXTRN        __imp____vbaAryDestruct:NEAR
  36. EXTRN        ___vbaExceptHandler:NEAR
  37. EXTRN        __except_list:DWORD
  38. ;        COMDAT CONST
  39. ; File C:\Users\Administrator\Desktop\Form1.frm
  40. CONST        SEGMENT
  41. $S33        DB        0bH, 00H
  42.         DB        08H, 00H
  43.         DD        FLAT:$L32
  44.         DD        FLAT:$L30
  45.         DD        FLAT:$L31
  46. CONST        ENDS
  47. ;        COMDAT ?Dec2Bin@Form1@@AAGXXZ
  48. text$1        SEGMENT
  49. _Me$ = 8
  50. _Dec2Bin$ = 16
  51. _Num$ = 12
  52. _Result$ = -32
  53. _Dec2Bin$ = -36
  54. _unnamed_var1$ = -52
  55. __$SEHRec$ = -20
  56. ?Dec2Bin@Form1@@AAGXXZ PROC NEAR                        ; Form1::Dec2Bin, COMDAT
  57. ; File C:\Users\Administrator\Desktop\Form1.frm
  58. ; Line 18
  59.         push        ebp
  60.         mov        ebp, esp
  61.         sub        esp, 12                                        ; 0000000cH
  62.         push        OFFSET FLAT:___vbaExceptHandler
  63.         mov        eax, DWORD PTR fs:__except_list
  64.         push        eax
  65.         mov        DWORD PTR fs:__except_list, esp
  66.         sub        esp, 44                                        ; 0000002cH
  67.         push        ebx
  68.         push        esi
  69.         push        edi
  70.         mov        DWORD PTR __$SEHRec$[ebp+8], esp
  71.         mov        DWORD PTR __$SEHRec$[ebp+12], OFFSET FLAT:$S33
  72.         xor        esi, esi
  73.         mov        DWORD PTR __$SEHRec$[ebp+16], esi
  74.         mov        eax, DWORD PTR _Me$[ebp]
  75.         push        eax
  76.         mov        ecx, DWORD PTR [eax]
  77.         call        DWORD PTR [ecx+4]
  78.         mov        edx, DWORD PTR _Dec2Bin$[ebp]
  79. ; Line 20
  80.         push        esi
  81.         push        63                                        ; 0000003fH
  82.         push        1
  83.         lea        eax, DWORD PTR _Result$[ebp]
  84.         push        17                                        ; 00000011H
  85.         push        eax
  86.         push        1
  87.         push        128                                        ; 00000080H
  88.         mov        DWORD PTR _Result$[ebp], esi
  89.         mov        DWORD PTR _Dec2Bin$[ebp], esi
  90.         mov        DWORD PTR _unnamed_var1$[ebp], esi
  91.         mov        DWORD PTR [edx], esi
  92.         call        DWORD PTR __imp____vbaRedim
  93. ; Line 22
  94.         mov        al, BYTE PTR _Num$[ebp]
  95.         add        esp, 28                                        ; 0000001cH
  96.         test        al, 1
  97.         mov        eax, DWORD PTR _Result$[ebp]
  98.         je        SHORT $L35
  99.         cmp        eax, esi
  100.         je        SHORT $L141
  101.         cmp        WORD PTR [eax], 1
  102.         jne        SHORT $L141
  103.         mov        edx, DWORD PTR [eax+20]
  104.         mov        ecx, DWORD PTR [eax+16]
  105.         mov        ebx, DWORD PTR __imp____vbaGenerateBoundsError
  106.         mov        esi, 62                                        ; 0000003eH
  107.         sub        esi, edx
  108.         cmp        esi, ecx
  109.         jb        SHORT $L144
  110.         call        ebx
  111.         mov        ecx, 49                                        ; 00000031H
  112.         jmp        SHORT $L408
  113. $L141:
  114.         mov        ebx, DWORD PTR __imp____vbaGenerateBoundsError
  115.         call        ebx
  116.         mov        esi, eax
  117. $L144:
  118.         mov        ecx, 49                                        ; 00000031H
  119.         jmp        SHORT $L408
  120. $L35:
  121.         cmp        eax, esi
  122.         je        SHORT $L145
  123.         cmp        WORD PTR [eax], 1
  124.         jne        SHORT $L145
  125.         mov        edx, DWORD PTR [eax+20]
  126.         mov        ecx, DWORD PTR [eax+16]
  127.         mov        ebx, DWORD PTR __imp____vbaGenerateBoundsError
  128.         mov        esi, 62                                        ; 0000003eH
  129.         sub        esi, edx
  130.         cmp        esi, ecx
  131.         jb        SHORT $L148
  132.         call        ebx
  133.         jmp        SHORT $L148
  134. $L145:
  135.         mov        ebx, DWORD PTR __imp____vbaGenerateBoundsError
  136.         call        ebx
  137.         mov        esi, eax
  138. $L148:
  139.         mov        ecx, 48                                        ; 00000030H
  140. $L408:
  141.         mov        edi, DWORD PTR __imp_@__vbaUI1I2
  142.         call        edi
  143.         mov        ecx, DWORD PTR _Result$[ebp]
  144.         mov        edx, DWORD PTR [ecx+12]
  145.         mov        BYTE PTR [edx+esi], al
  146. ; Line 23
  147.         mov        al, BYTE PTR _Num$[ebp]
  148.         test        al, 2
  149.         mov        eax, DWORD PTR _Result$[ebp]
  150.         je        SHORT $L39
  151.         test        eax, eax
  152.         je        SHORT $L149
  153.         cmp        WORD PTR [eax], 1
  154.         jne        SHORT $L149
  155.         mov        edx, DWORD PTR [eax+20]
  156.         mov        ecx, DWORD PTR [eax+16]
  157.         mov        esi, 60                                        ; 0000003cH
  158.         sub        esi, edx
  159.         cmp        esi, ecx
  160.         jb        SHORT $L152
  161.         call        ebx
  162.         mov        ecx, 49                                        ; 00000031H
  163.         jmp        SHORT $L409
  164. $L149:
  165.         call        ebx
  166.         mov        esi, eax
  167. $L152:
  168.         mov        ecx, 49                                        ; 00000031H
  169.         jmp        SHORT $L409
  170. $L39:
  171.         test        eax, eax
  172.         je        SHORT $L153
  173.         cmp        WORD PTR [eax], 1
  174.         jne        SHORT $L153
  175.         mov        edx, DWORD PTR [eax+20]
  176.         mov        ecx, DWORD PTR [eax+16]
  177.         mov        esi, 60                                        ; 0000003cH
  178.         sub        esi, edx
  179.         cmp        esi, ecx
  180.         jb        SHORT $L156
  181.         call        ebx
  182.         jmp        SHORT $L156
  183. $L153:
  184.         call        ebx
  185.         mov        esi, eax
  186. $L156:
  187.         mov        ecx, 48                                        ; 00000030H
  188. $L409:
  189.         call        edi
  190.         mov        ecx, DWORD PTR _Result$[ebp]
  191.         mov        edx, DWORD PTR [ecx+12]
  192.         mov        BYTE PTR [edx+esi], al
  193. ; Line 24
  194.         mov        al, BYTE PTR _Num$[ebp]
  195.         test        al, 4
  196.         mov        eax, DWORD PTR _Result$[ebp]
  197.         je        SHORT $L41
  198.         test        eax, eax
  199.         je        SHORT $L157
  200.         cmp        WORD PTR [eax], 1
  201.         jne        SHORT $L157
  202.         mov        edx, DWORD PTR [eax+20]
  203.         mov        ecx, DWORD PTR [eax+16]
  204.         mov        esi, 58                                        ; 0000003aH
  205.         sub        esi, edx
  206.         cmp        esi, ecx
  207.         jb        SHORT $L160
  208.         call        ebx
  209.         mov        ecx, 49                                        ; 00000031H
  210.         jmp        SHORT $L410
  211. $L157:
  212.         call        ebx
  213.         mov        esi, eax
  214. $L160:
  215.         mov        ecx, 49                                        ; 00000031H
  216.         jmp        SHORT $L410
  217. $L41:
  218.         test        eax, eax
  219.         je        SHORT $L161
  220.         cmp        WORD PTR [eax], 1
  221.         jne        SHORT $L161
  222.         mov        edx, DWORD PTR [eax+20]
  223.         mov        ecx, DWORD PTR [eax+16]
  224.         mov        esi, 58                                        ; 0000003aH
  225.         sub        esi, edx
  226.         cmp        esi, ecx
  227.         jb        SHORT $L164
  228.         call        ebx
  229.         jmp        SHORT $L164
  230. $L161:
  231.         call        ebx
  232.         mov        esi, eax
  233. $L164:
  234.         mov        ecx, 48                                        ; 00000030H
  235. $L410:
  236.         call        edi
  237.         mov        ecx, DWORD PTR _Result$[ebp]
  238.         mov        edx, DWORD PTR [ecx+12]
  239.         mov        BYTE PTR [edx+esi], al
  240. ; Line 25
  241.         mov        al, BYTE PTR _Num$[ebp]
  242.         test        al, 8
  243.         mov        eax, DWORD PTR _Result$[ebp]
  244.         je        SHORT $L43
  245.         test        eax, eax
  246.         je        SHORT $L165
  247.         cmp        WORD PTR [eax], 1
  248.         jne        SHORT $L165
  249.         mov        edx, DWORD PTR [eax+20]
  250.         mov        ecx, DWORD PTR [eax+16]
  251.         mov        esi, 56                                        ; 00000038H
  252.         sub        esi, edx
  253.         cmp        esi, ecx
  254.         jb        SHORT $L168
  255.         call        ebx
  256.         mov        ecx, 49                                        ; 00000031H
  257.         jmp        SHORT $L411
  258. $L165:
  259.         call        ebx
  260.         mov        esi, eax
  261. $L168:
  262.         mov        ecx, 49                                        ; 00000031H
  263.         jmp        SHORT $L411
  264. $L43:
  265.         test        eax, eax
  266.         je        SHORT $L169
  267.         cmp        WORD PTR [eax], 1
  268.         jne        SHORT $L169
  269.         mov        edx, DWORD PTR [eax+20]
  270.         mov        ecx, DWORD PTR [eax+16]
  271.         mov        esi, 56                                        ; 00000038H
  272.         sub        esi, edx
  273.         cmp        esi, ecx
  274.         jb        SHORT $L172
  275.         call        ebx
  276.         jmp        SHORT $L172
  277. $L169:
  278.         call        ebx
  279.         mov        esi, eax
  280. $L172:
  281.         mov        ecx, 48                                        ; 00000030H
  282. $L411:
  283.         call        edi
  284.         mov        ecx, DWORD PTR _Result$[ebp]
  285.         mov        edx, DWORD PTR [ecx+12]
  286.         mov        BYTE PTR [edx+esi], al
  287. ; Line 26
  288.         mov        al, BYTE PTR _Num$[ebp]
  289.         test        al, 16                                        ; 00000010H
  290.         mov        eax, DWORD PTR _Result$[ebp]
  291.         je        SHORT $L45
  292.         test        eax, eax
  293.         je        SHORT $L173
  294.         cmp        WORD PTR [eax], 1
  295.         jne        SHORT $L173
  296.         mov        edx, DWORD PTR [eax+20]
  297.         mov        ecx, DWORD PTR [eax+16]
  298.         mov        esi, 54                                        ; 00000036H
  299.         sub        esi, edx
  300.         cmp        esi, ecx
  301.         jb        SHORT $L176
  302.         call        ebx
  303.         mov        ecx, 49                                        ; 00000031H
  304.         jmp        SHORT $L412
  305. $L173:
  306.         call        ebx
  307.         mov        esi, eax
  308. $L176:
  309.         mov        ecx, 49                                        ; 00000031H
  310.         jmp        SHORT $L412
  311. $L45:
  312.         test        eax, eax
  313.         je        SHORT $L177
  314.         cmp        WORD PTR [eax], 1
  315.         jne        SHORT $L177
  316.         mov        edx, DWORD PTR [eax+20]
  317.         mov        ecx, DWORD PTR [eax+16]
  318.         mov        esi, 54                                        ; 00000036H
  319.         sub        esi, edx
  320.         cmp        esi, ecx
  321.         jb        SHORT $L180
  322.         call        ebx
  323.         jmp        SHORT $L180
  324. $L177:
  325.         call        ebx
  326.         mov        esi, eax
  327. $L180:
  328.         mov        ecx, 48                                        ; 00000030H
  329. $L412:
  330.         call        edi
  331.         mov        ecx, DWORD PTR _Result$[ebp]
  332.         mov        edx, DWORD PTR [ecx+12]
  333.         mov        BYTE PTR [edx+esi], al
  334. ; Line 27
  335.         mov        al, BYTE PTR _Num$[ebp]
  336.         test        al, 32                                        ; 00000020H
  337.         mov        eax, DWORD PTR _Result$[ebp]
  338.         je        SHORT $L47
  339.         test        eax, eax
  340.         je        SHORT $L181
  341.         cmp        WORD PTR [eax], 1
  342.         jne        SHORT $L181
  343.         mov        edx, DWORD PTR [eax+20]
  344.         mov        ecx, DWORD PTR [eax+16]
  345.         mov        esi, 52                                        ; 00000034H
  346.         sub        esi, edx
  347.         cmp        esi, ecx
  348.         jb        SHORT $L184
  349.         call        ebx
  350.         mov        ecx, 49                                        ; 00000031H
  351.         jmp        SHORT $L413
  352. $L181:
  353.         call        ebx
  354.         mov        esi, eax
  355. $L184:
  356.         mov        ecx, 49                                        ; 00000031H
  357.         jmp        SHORT $L413
  358. $L47:
  359.         test        eax, eax
  360.         je        SHORT $L185
  361.         cmp        WORD PTR [eax], 1
  362.         jne        SHORT $L185
  363.         mov        edx, DWORD PTR [eax+20]
  364.         mov        ecx, DWORD PTR [eax+16]
  365.         mov        esi, 52                                        ; 00000034H
  366.         sub        esi, edx
  367.         cmp        esi, ecx
  368.         jb        SHORT $L188
  369.         call        ebx
  370.         jmp        SHORT $L188
  371. $L185:
  372.         call        ebx
  373.         mov        esi, eax
  374. $L188:
  375.         mov        ecx, 48                                        ; 00000030H
  376. $L413:
  377.         call        edi
  378.         mov        ecx, DWORD PTR _Result$[ebp]
  379.         mov        edx, DWORD PTR [ecx+12]
  380.         mov        BYTE PTR [edx+esi], al
  381. ; Line 28
  382.         mov        al, BYTE PTR _Num$[ebp]
  383.         test        al, 64                                        ; 00000040H
  384.         mov        eax, DWORD PTR _Result$[ebp]
  385.         je        SHORT $L49
  386.         test        eax, eax
  387.         je        SHORT $L189
  388.         cmp        WORD PTR [eax], 1
  389.         jne        SHORT $L189
  390.         mov        edx, DWORD PTR [eax+20]
  391.         mov        ecx, DWORD PTR [eax+16]
  392.         mov        esi, 50                                        ; 00000032H
  393.         sub        esi, edx
  394.         cmp        esi, ecx
  395.         jb        SHORT $L192
  396.         call        ebx
  397.         mov        ecx, 49                                        ; 00000031H
  398.         jmp        SHORT $L414
  399. $L189:
  400.         call        ebx
  401.         mov        esi, eax
  402. $L192:
  403.         mov        ecx, 49                                        ; 00000031H
  404.         jmp        SHORT $L414
  405. $L49:
  406.         test        eax, eax
  407.         je        SHORT $L193
  408.         cmp        WORD PTR [eax], 1
  409.         jne        SHORT $L193
  410.         mov        edx, DWORD PTR [eax+20]
  411.         mov        ecx, DWORD PTR [eax+16]
  412.         mov        esi, 50                                        ; 00000032H
  413.         sub        esi, edx
  414.         cmp        esi, ecx
  415.         jb        SHORT $L196
  416.         call        ebx
  417.         jmp        SHORT $L196
  418. $L193:
  419.         call        ebx
  420.         mov        esi, eax
  421. $L196:
  422.         mov        ecx, 48                                        ; 00000030H
  423. $L414:
  424.         call        edi
  425.         mov        ecx, DWORD PTR _Result$[ebp]
  426.         mov        edx, DWORD PTR [ecx+12]
  427.         mov        BYTE PTR [edx+esi], al
  428. ; Line 29
  429.         mov        al, BYTE PTR _Num$[ebp]
  430.         test        al, -128                                ; ffffff80H
  431.         mov        eax, DWORD PTR _Result$[ebp]
  432.         je        SHORT $L51
  433.         test        eax, eax
  434.         je        SHORT $L197
  435.         cmp        WORD PTR [eax], 1
  436.         jne        SHORT $L197
  437.         mov        edx, DWORD PTR [eax+20]
  438.         mov        ecx, DWORD PTR [eax+16]
  439.         mov        esi, 48                                        ; 00000030H
  440.         sub        esi, edx
  441.         cmp        esi, ecx
  442.         jb        SHORT $L200
  443.         call        ebx
  444.         mov        ecx, 49                                        ; 00000031H
  445.         jmp        SHORT $L415
  446. $L197:
  447.         call        ebx
  448.         mov        esi, eax
  449. $L200:
  450.         mov        ecx, 49                                        ; 00000031H
  451.         jmp        SHORT $L415
  452. $L51:
  453.         test        eax, eax
  454.         je        SHORT $L201
  455.         cmp        WORD PTR [eax], 1
  456.         jne        SHORT $L201
  457.         mov        edx, DWORD PTR [eax+20]
  458.         mov        ecx, DWORD PTR [eax+16]
  459.         mov        esi, 48                                        ; 00000030H
  460.         sub        esi, edx
  461.         cmp        esi, ecx
  462.         jb        SHORT $L204
  463.         call        ebx
  464.         jmp        SHORT $L204
  465. $L201:
  466.         call        ebx
  467.         mov        esi, eax
  468. $L204:
  469.         mov        ecx, 48                                        ; 00000030H
  470. $L415:
  471.         call        edi
  472.         mov        ecx, DWORD PTR _Result$[ebp]
  473.         mov        edx, DWORD PTR [ecx+12]
  474.         mov        BYTE PTR [edx+esi], al
  475. ; Line 30
  476.         mov        eax, DWORD PTR _Num$[ebp]
  477.         test        ah, 1
  478.         mov        eax, DWORD PTR _Result$[ebp]
  479.         je        SHORT $L53
  480.         test        eax, eax
  481.         je        SHORT $L205
  482.         cmp        WORD PTR [eax], 1
  483.         jne        SHORT $L205
  484.         mov        edx, DWORD PTR [eax+20]
  485.         mov        ecx, DWORD PTR [eax+16]
  486.         mov        esi, 46                                        ; 0000002eH
  487.         sub        esi, edx
  488.         cmp        esi, ecx
  489.         jb        SHORT $L208
  490.         call        ebx
  491.         mov        ecx, 49                                        ; 00000031H
  492.         jmp        SHORT $L416
  493. $L205:
  494.         call        ebx
  495.         mov        esi, eax
  496. $L208:
  497.         mov        ecx, 49                                        ; 00000031H
  498.         jmp        SHORT $L416
  499. $L53:
  500.         test        eax, eax
  501.         je        SHORT $L209
  502.         cmp        WORD PTR [eax], 1
  503.         jne        SHORT $L209
  504.         mov        edx, DWORD PTR [eax+20]
  505.         mov        ecx, DWORD PTR [eax+16]
  506.         mov        esi, 46                                        ; 0000002eH
  507.         sub        esi, edx
  508.         cmp        esi, ecx
  509.         jb        SHORT $L212
  510.         call        ebx
  511.         jmp        SHORT $L212
  512. $L209:
  513.         call        ebx
  514.         mov        esi, eax
  515. $L212:
  516.         mov        ecx, 48                                        ; 00000030H
  517. $L416:
  518.         call        edi
  519.         mov        ecx, DWORD PTR _Result$[ebp]
  520.         mov        edx, DWORD PTR [ecx+12]
  521.         mov        BYTE PTR [edx+esi], al
  522. ; Line 31
  523.         mov        eax, DWORD PTR _Num$[ebp]
  524.         test        ah, 2
  525.         mov        eax, DWORD PTR _Result$[ebp]
  526.         je        SHORT $L55
  527.         test        eax, eax
  528.         je        SHORT $L213
  529.         cmp        WORD PTR [eax], 1
  530.         jne        SHORT $L213
  531.         mov        edx, DWORD PTR [eax+20]
  532.         mov        ecx, DWORD PTR [eax+16]
  533.         mov        esi, 44                                        ; 0000002cH
  534.         sub        esi, edx
  535.         cmp        esi, ecx
  536.         jb        SHORT $L216
  537.         call        ebx
  538.         mov        ecx, 49                                        ; 00000031H
  539.         jmp        SHORT $L417
  540. $L213:
  541.         call        ebx
  542.         mov        esi, eax
  543. $L216:
  544.         mov        ecx, 49                                        ; 00000031H
  545.         jmp        SHORT $L417
  546. $L55:
  547.         test        eax, eax
  548.         je        SHORT $L217
  549.         cmp        WORD PTR [eax], 1
  550.         jne        SHORT $L217
  551.         mov        edx, DWORD PTR [eax+20]
  552.         mov        ecx, DWORD PTR [eax+16]
  553.         mov        esi, 44                                        ; 0000002cH
  554.         sub        esi, edx
  555.         cmp        esi, ecx
  556.         jb        SHORT $L220
  557.         call        ebx
  558.         jmp        SHORT $L220
  559. $L217:
  560.         call        ebx
  561.         mov        esi, eax
  562. $L220:
  563.         mov        ecx, 48                                        ; 00000030H
  564. $L417:
  565.         call        edi
  566.         mov        ecx, DWORD PTR _Result$[ebp]
  567.         mov        edx, DWORD PTR [ecx+12]
  568.         mov        BYTE PTR [edx+esi], al
  569. ; Line 32
  570.         mov        eax, DWORD PTR _Num$[ebp]
  571.         test        ah, 4
  572.         mov        eax, DWORD PTR _Result$[ebp]
  573.         je        SHORT $L57
  574.         test        eax, eax
  575.         je        SHORT $L221
  576.         cmp        WORD PTR [eax], 1
  577.         jne        SHORT $L221
  578.         mov        edx, DWORD PTR [eax+20]
  579.         mov        ecx, DWORD PTR [eax+16]
  580.         mov        esi, 42                                        ; 0000002aH
  581.         sub        esi, edx
  582.         cmp        esi, ecx
  583.         jb        SHORT $L224
  584.         call        ebx
  585.         mov        ecx, 49                                        ; 00000031H
  586.         jmp        SHORT $L418
  587. $L221:
  588.         call        ebx
  589.         mov        esi, eax
  590. $L224:
  591.         mov        ecx, 49                                        ; 00000031H
  592.         jmp        SHORT $L418
  593. $L57:
  594.         test        eax, eax
  595.         je        SHORT $L225
  596.         cmp        WORD PTR [eax], 1
  597.         jne        SHORT $L225
  598.         mov        edx, DWORD PTR [eax+20]
  599.         mov        ecx, DWORD PTR [eax+16]
  600.         mov        esi, 42                                        ; 0000002aH
  601.         sub        esi, edx
  602.         cmp        esi, ecx
  603.         jb        SHORT $L228
  604.         call        ebx
  605.         jmp        SHORT $L228
  606. $L225:
  607.         call        ebx
  608.         mov        esi, eax
  609. $L228:
  610.         mov        ecx, 48                                        ; 00000030H
  611. $L418:
  612.         call        edi
  613.         mov        ecx, DWORD PTR _Result$[ebp]
  614.         mov        edx, DWORD PTR [ecx+12]
  615.         mov        BYTE PTR [edx+esi], al
  616. ; Line 33
  617.         mov        eax, DWORD PTR _Num$[ebp]
  618.         test        ah, 8
  619.         mov        eax, DWORD PTR _Result$[ebp]
  620.         je        SHORT $L59
  621.         test        eax, eax
  622.         je        SHORT $L229
  623.         cmp        WORD PTR [eax], 1
  624.         jne        SHORT $L229
  625.         mov        edx, DWORD PTR [eax+20]
  626.         mov        ecx, DWORD PTR [eax+16]
  627.         mov        esi, 40                                        ; 00000028H
  628.         sub        esi, edx
  629.         cmp        esi, ecx
  630.         jb        SHORT $L232
  631.         call        ebx
  632.         mov        ecx, 49                                        ; 00000031H
  633.         jmp        SHORT $L419
  634. $L229:
  635.         call        ebx
  636.         mov        esi, eax
  637. $L232:
  638.         mov        ecx, 49                                        ; 00000031H
  639.         jmp        SHORT $L419
  640. $L59:
  641.         test        eax, eax
  642.         je        SHORT $L233
  643.         cmp        WORD PTR [eax], 1
  644.         jne        SHORT $L233
  645.         mov        edx, DWORD PTR [eax+20]
  646.         mov        ecx, DWORD PTR [eax+16]
  647.         mov        esi, 40                                        ; 00000028H
  648.         sub        esi, edx
  649.         cmp        esi, ecx
  650.         jb        SHORT $L236
  651.         call        ebx
  652.         jmp        SHORT $L236
  653. $L233:
  654.         call        ebx
  655.         mov        esi, eax
  656. $L236:
  657.         mov        ecx, 48                                        ; 00000030H
  658. $L419:
  659.         call        edi
  660.         mov        ecx, DWORD PTR _Result$[ebp]
  661.         mov        edx, DWORD PTR [ecx+12]
  662.         mov        BYTE PTR [edx+esi], al
  663. ; Line 34
  664.         mov        eax, DWORD PTR _Num$[ebp]
  665.         test        ah, 16                                        ; 00000010H
  666.         mov        eax, DWORD PTR _Result$[ebp]
  667.         je        SHORT $L61
  668.         test        eax, eax
  669.         je        SHORT $L237
  670.         cmp        WORD PTR [eax], 1
  671.         jne        SHORT $L237
  672.         mov        edx, DWORD PTR [eax+20]
  673.         mov        ecx, DWORD PTR [eax+16]
  674.         mov        esi, 38                                        ; 00000026H
  675.         sub        esi, edx
  676.         cmp        esi, ecx
  677.         jb        SHORT $L240
  678.         call        ebx
  679.         mov        ecx, 49                                        ; 00000031H
  680.         jmp        SHORT $L420
  681. $L237:
  682.         call        ebx
  683.         mov        esi, eax
  684. $L240:
  685.         mov        ecx, 49                                        ; 00000031H
  686.         jmp        SHORT $L420
  687. $L61:
  688.         test        eax, eax
  689.         je        SHORT $L241
  690.         cmp        WORD PTR [eax], 1
  691.         jne        SHORT $L241
  692.         mov        edx, DWORD PTR [eax+20]
  693.         mov        ecx, DWORD PTR [eax+16]
  694.         mov        esi, 38                                        ; 00000026H
  695.         sub        esi, edx
  696.         cmp        esi, ecx
  697.         jb        SHORT $L244
  698.         call        ebx
  699.         jmp        SHORT $L244
  700. $L241:
  701.         call        ebx
  702.         mov        esi, eax
  703. $L244:
  704.         mov        ecx, 48                                        ; 00000030H
  705. $L420:
  706.         call        edi
  707.         mov        ecx, DWORD PTR _Result$[ebp]
  708.         mov        edx, DWORD PTR [ecx+12]
  709.         mov        BYTE PTR [edx+esi], al
  710. ; Line 35
  711.         mov        eax, DWORD PTR _Num$[ebp]
  712.         test        ah, 32                                        ; 00000020H
  713.         mov        eax, DWORD PTR _Result$[ebp]
  714.         je        SHORT $L63
  715.         test        eax, eax
  716.         je        SHORT $L245
  717.         cmp        WORD PTR [eax], 1
  718.         jne        SHORT $L245
  719.         mov        edx, DWORD PTR [eax+20]
  720.         mov        ecx, DWORD PTR [eax+16]
  721.         mov        esi, 36                                        ; 00000024H
  722.         sub        esi, edx
  723.         cmp        esi, ecx
  724.         jb        SHORT $L248
  725.         call        ebx
  726.         mov        ecx, 49                                        ; 00000031H
  727.         jmp        SHORT $L421
  728. $L245:
  729.         call        ebx
  730.         mov        esi, eax
  731. $L248:
  732.         mov        ecx, 49                                        ; 00000031H
  733.         jmp        SHORT $L421
  734. $L63:
  735.         test        eax, eax
  736.         je        SHORT $L249
  737.         cmp        WORD PTR [eax], 1
  738.         jne        SHORT $L249
  739.         mov        edx, DWORD PTR [eax+20]
  740.         mov        ecx, DWORD PTR [eax+16]
  741.         mov        esi, 36                                        ; 00000024H
  742.         sub        esi, edx
  743.         cmp        esi, ecx
  744.         jb        SHORT $L252
  745.         call        ebx
  746.         jmp        SHORT $L252
  747. $L249:
  748.         call        ebx
  749.         mov        esi, eax
  750. $L252:
  751.         mov        ecx, 48                                        ; 00000030H
  752. $L421:
  753.         call        edi
  754.         mov        ecx, DWORD PTR _Result$[ebp]
  755.         mov        edx, DWORD PTR [ecx+12]
  756.         mov        BYTE PTR [edx+esi], al
  757. ; Line 36
  758.         mov        eax, DWORD PTR _Num$[ebp]
  759.         test        ah, 64                                        ; 00000040H
  760.         mov        eax, DWORD PTR _Result$[ebp]
  761.         je        SHORT $L65
  762.         test        eax, eax
  763.         je        SHORT $L253
  764.         cmp        WORD PTR [eax], 1
  765.         jne        SHORT $L253
  766.         mov        edx, DWORD PTR [eax+20]
  767.         mov        ecx, DWORD PTR [eax+16]
  768.         mov        esi, 34                                        ; 00000022H
  769.         sub        esi, edx
  770.         cmp        esi, ecx
  771.         jb        SHORT $L256
  772.         call        ebx
  773.         mov        ecx, 49                                        ; 00000031H
  774.         jmp        SHORT $L422
  775. $L253:
  776.         call        ebx
  777.         mov        esi, eax
  778. $L256:
  779.         mov        ecx, 49                                        ; 00000031H
  780.         jmp        SHORT $L422
  781. $L65:
  782.         test        eax, eax
  783.         je        SHORT $L257
  784.         cmp        WORD PTR [eax], 1
  785.         jne        SHORT $L257
  786.         mov        edx, DWORD PTR [eax+20]
  787.         mov        ecx, DWORD PTR [eax+16]
  788.         mov        esi, 34                                        ; 00000022H
  789.         sub        esi, edx
  790.         cmp        esi, ecx
  791.         jb        SHORT $L260
  792.         call        ebx
  793.         jmp        SHORT $L260
  794. $L257:
  795.         call        ebx
  796.         mov        esi, eax
  797. $L260:
  798.         mov        ecx, 48                                        ; 00000030H
  799. $L422:
  800.         call        edi
  801.         mov        ecx, DWORD PTR _Result$[ebp]
  802.         mov        edx, DWORD PTR [ecx+12]
  803.         mov        BYTE PTR [edx+esi], al
  804. ; Line 37
  805.         mov        eax, DWORD PTR _Num$[ebp]
  806.         test        ah, -128                                ; ffffff80H
  807.         mov        eax, DWORD PTR _Result$[ebp]
  808.         je        SHORT $L67
  809.         test        eax, eax
  810.         je        SHORT $L261
  811.         cmp        WORD PTR [eax], 1
  812.         jne        SHORT $L261
  813.         mov        edx, DWORD PTR [eax+20]
  814.         mov        ecx, DWORD PTR [eax+16]
  815.         mov        esi, 32                                        ; 00000020H
  816.         sub        esi, edx
  817.         cmp        esi, ecx
  818.         jb        SHORT $L264
  819.         call        ebx
  820.         mov        ecx, 49                                        ; 00000031H
  821.         jmp        SHORT $L423
  822. $L261:
  823.         call        ebx
  824.         mov        esi, eax
  825. $L264:
  826.         mov        ecx, 49                                        ; 00000031H
  827.         jmp        SHORT $L423
  828. $L67:
  829.         test        eax, eax
  830.         je        SHORT $L265
  831.         cmp        WORD PTR [eax], 1
  832.         jne        SHORT $L265
  833.         mov        edx, DWORD PTR [eax+20]
  834.         mov        ecx, DWORD PTR [eax+16]
  835.         mov        esi, 32                                        ; 00000020H
  836.         sub        esi, edx
  837.         cmp        esi, ecx
  838.         jb        SHORT $L268
  839.         call        ebx
  840.         jmp        SHORT $L268
  841. $L265:
  842.         call        ebx
  843.         mov        esi, eax
  844. $L268:
  845.         mov        ecx, 48                                        ; 00000030H
  846. $L423:
  847.         call        edi
  848.         mov        ecx, DWORD PTR _Result$[ebp]
  849.         mov        edx, DWORD PTR [ecx+12]
  850.         mov        BYTE PTR [edx+esi], al
  851. ; Line 38
  852.         mov        eax, DWORD PTR _Num$[ebp]
  853.         test        eax, 65536                                ; 00010000H
  854.         mov        eax, DWORD PTR _Result$[ebp]
  855.         je        SHORT $L69
  856.         test        eax, eax
  857.         je        SHORT $L269
  858.         cmp        WORD PTR [eax], 1
  859.         jne        SHORT $L269
  860.         mov        edx, DWORD PTR [eax+20]
  861.         mov        ecx, DWORD PTR [eax+16]
  862.         mov        esi, 30                                        ; 0000001eH
  863.         sub        esi, edx
  864.         cmp        esi, ecx
  865.         jb        SHORT $L272
  866.         call        ebx
  867.         mov        ecx, 49                                        ; 00000031H
  868.         jmp        SHORT $L424
  869. $L269:
  870.         call        ebx
  871.         mov        esi, eax
  872. $L272:
  873.         mov        ecx, 49                                        ; 00000031H
  874.         jmp        SHORT $L424
  875. $L69:
  876.         test        eax, eax
  877.         je        SHORT $L273
  878.         cmp        WORD PTR [eax], 1
  879.         jne        SHORT $L273
  880.         mov        edx, DWORD PTR [eax+20]
  881.         mov        ecx, DWORD PTR [eax+16]
  882.         mov        esi, 30                                        ; 0000001eH
  883.         sub        esi, edx
  884.         cmp        esi, ecx
  885.         jb        SHORT $L276
  886.         call        ebx
  887.         jmp        SHORT $L276
  888. $L273:
  889.         call        ebx
  890.         mov        esi, eax
  891. $L276:
  892.         mov        ecx, 48                                        ; 00000030H
  893. $L424:
  894.         call        edi
  895.         mov        ecx, DWORD PTR _Result$[ebp]
  896.         mov        edx, DWORD PTR [ecx+12]
  897.         mov        BYTE PTR [edx+esi], al
  898. ; Line 39
  899.         mov        eax, DWORD PTR _Num$[ebp]
  900.         test        eax, 131072                                ; 00020000H
  901.         mov        eax, DWORD PTR _Result$[ebp]
  902.         je        SHORT $L71
  903.         test        eax, eax
  904.         je        SHORT $L277
  905.         cmp        WORD PTR [eax], 1
  906.         jne        SHORT $L277
  907.         mov        edx, DWORD PTR [eax+20]
  908.         mov        ecx, DWORD PTR [eax+16]
  909.         mov        esi, 28                                        ; 0000001cH
  910.         sub        esi, edx
  911.         cmp        esi, ecx
  912.         jb        SHORT $L280
  913.         call        ebx
  914.         mov        ecx, 49                                        ; 00000031H
  915.         jmp        SHORT $L425
  916. $L277:
  917.         call        ebx
  918.         mov        esi, eax
  919. $L280:
  920.         mov        ecx, 49                                        ; 00000031H
  921.         jmp        SHORT $L425
  922. $L71:
  923.         test        eax, eax
  924.         je        SHORT $L281
  925.         cmp        WORD PTR [eax], 1
  926.         jne        SHORT $L281
  927.         mov        edx, DWORD PTR [eax+20]
  928.         mov        ecx, DWORD PTR [eax+16]
  929.         mov        esi, 28                                        ; 0000001cH
  930.         sub        esi, edx
  931.         cmp        esi, ecx
  932.         jb        SHORT $L284
  933.         call        ebx
  934.         jmp        SHORT $L284
  935. $L281:
  936.         call        ebx
  937.         mov        esi, eax
  938. $L284:
  939.         mov        ecx, 48                                        ; 00000030H
  940. $L425:
  941.         call        edi
  942.         mov        ecx, DWORD PTR _Result$[ebp]
  943.         mov        edx, DWORD PTR [ecx+12]
  944.         mov        BYTE PTR [edx+esi], al
  945. ; Line 40
  946.         mov        eax, DWORD PTR _Num$[ebp]
  947.         test        eax, 262144                                ; 00040000H
  948.         mov        eax, DWORD PTR _Result$[ebp]
  949.         je        SHORT $L73
  950.         test        eax, eax
  951.         je        SHORT $L285
  952.         cmp        WORD PTR [eax], 1
  953.         jne        SHORT $L285
  954.         mov        edx, DWORD PTR [eax+20]
  955.         mov        ecx, DWORD PTR [eax+16]
  956.         mov        esi, 26                                        ; 0000001aH
  957.         sub        esi, edx
  958.         cmp        esi, ecx
  959.         jb        SHORT $L288
  960.         call        ebx
  961.         mov        ecx, 49                                        ; 00000031H
  962.         jmp        SHORT $L426
  963. $L285:
  964.         call        ebx
  965.         mov        esi, eax
  966. $L288:
  967.         mov        ecx, 49                                        ; 00000031H
  968.         jmp        SHORT $L426
  969. $L73:
  970.         test        eax, eax
  971.         je        SHORT $L289
  972.         cmp        WORD PTR [eax], 1
  973.         jne        SHORT $L289
  974.         mov        edx, DWORD PTR [eax+20]
  975.         mov        ecx, DWORD PTR [eax+16]
  976.         mov        esi, 26                                        ; 0000001aH
  977.         sub        esi, edx
  978.         cmp        esi, ecx
  979.         jb        SHORT $L292
  980.         call        ebx
  981.         jmp        SHORT $L292
  982. $L289:
  983.         call        ebx
  984.         mov        esi, eax
  985. $L292:
  986.         mov        ecx, 48                                        ; 00000030H
  987. $L426:
  988.         call        edi
  989.         mov        ecx, DWORD PTR _Result$[ebp]
  990.         mov        edx, DWORD PTR [ecx+12]
  991.         mov        BYTE PTR [edx+esi], al
  992. ; Line 41
  993.         mov        eax, DWORD PTR _Num$[ebp]
  994.         test        eax, 524288                                ; 00080000H
  995.         mov        eax, DWORD PTR _Result$[ebp]
  996.         je        SHORT $L75
  997.         test        eax, eax
  998.         je        SHORT $L293
  999.         cmp        WORD PTR [eax], 1
  1000.         jne        SHORT $L293
  1001.         mov        edx, DWORD PTR [eax+20]
  1002.         mov        ecx, DWORD PTR [eax+16]
  1003.         mov        esi, 24                                        ; 00000018H
  1004.         sub        esi, edx
  1005.         cmp        esi, ecx
  1006.         jb        SHORT $L296
  1007.         call        ebx
  1008.         mov        ecx, 49                                        ; 00000031H
  1009.         jmp        SHORT $L427
  1010. $L293:
  1011.         call        ebx
  1012.         mov        esi, eax
  1013. $L296:
  1014.         mov        ecx, 49                                        ; 00000031H
  1015.         jmp        SHORT $L427
  1016. $L75:
  1017.         test        eax, eax
  1018.         je        SHORT $L297
  1019.         cmp        WORD PTR [eax], 1
  1020.         jne        SHORT $L297
  1021.         mov        edx, DWORD PTR [eax+20]
  1022.         mov        ecx, DWORD PTR [eax+16]
  1023.         mov        esi, 24                                        ; 00000018H
  1024.         sub        esi, edx
  1025.         cmp        esi, ecx
  1026.         jb        SHORT $L300
  1027.         call        ebx
  1028.         jmp        SHORT $L300
  1029. $L297:
  1030.         call        ebx
  1031.         mov        esi, eax
  1032. $L300:
  1033.         mov        ecx, 48                                        ; 00000030H
  1034. $L427:
  1035.         call        edi
  1036.         mov        ecx, DWORD PTR _Result$[ebp]
  1037.         mov        edx, DWORD PTR [ecx+12]
  1038.         mov        BYTE PTR [edx+esi], al
  1039. ; Line 42
  1040.         mov        eax, DWORD PTR _Num$[ebp]
  1041.         test        eax, 1048576                                ; 00100000H
  1042.         mov        eax, DWORD PTR _Result$[ebp]
  1043.         je        SHORT $L77
  1044.         test        eax, eax
  1045.         je        SHORT $L301
  1046.         cmp        WORD PTR [eax], 1
  1047.         jne        SHORT $L301
  1048.         mov        edx, DWORD PTR [eax+20]
  1049.         mov        ecx, DWORD PTR [eax+16]
  1050.         mov        esi, 22                                        ; 00000016H
  1051.         sub        esi, edx
  1052.         cmp        esi, ecx
  1053.         jb        SHORT $L304
  1054.         call        ebx
  1055.         mov        ecx, 49                                        ; 00000031H
  1056.         jmp        SHORT $L428
  1057. $L301:
  1058.         call        ebx
  1059.         mov        esi, eax
  1060. $L304:
  1061.         mov        ecx, 49                                        ; 00000031H
  1062.         jmp        SHORT $L428
  1063. $L77:
  1064.         test        eax, eax
  1065.         je        SHORT $L305
  1066.         cmp        WORD PTR [eax], 1
  1067.         jne        SHORT $L305
  1068.         mov        edx, DWORD PTR [eax+20]
  1069.         mov        ecx, DWORD PTR [eax+16]
  1070.         mov        esi, 22                                        ; 00000016H
  1071.         sub        esi, edx
  1072.         cmp        esi, ecx
  1073.         jb        SHORT $L308
  1074.         call        ebx
  1075.         jmp        SHORT $L308
  1076. $L305:
  1077.         call        ebx
  1078.         mov        esi, eax
  1079. $L308:
  1080.         mov        ecx, 48                                        ; 00000030H
  1081. $L428:
  1082.         call        edi
  1083.         mov        ecx, DWORD PTR _Result$[ebp]
  1084.         mov        edx, DWORD PTR [ecx+12]
  1085.         mov        BYTE PTR [edx+esi], al
  1086. ; Line 43
  1087.         mov        eax, DWORD PTR _Num$[ebp]
  1088.         test        eax, 2097152                                ; 00200000H
  1089.         mov        eax, DWORD PTR _Result$[ebp]
  1090.         je        SHORT $L79
  1091.         test        eax, eax
  1092.         je        SHORT $L309
  1093.         cmp        WORD PTR [eax], 1
  1094.         jne        SHORT $L309
  1095.         mov        edx, DWORD PTR [eax+20]
  1096.         mov        ecx, DWORD PTR [eax+16]
  1097.         mov        esi, 20                                        ; 00000014H
  1098.         sub        esi, edx
  1099.         cmp        esi, ecx
  1100.         jb        SHORT $L312
  1101.         call        ebx
  1102.         mov        ecx, 49                                        ; 00000031H
  1103.         jmp        SHORT $L429
  1104. $L309:
  1105.         call        ebx
  1106.         mov        esi, eax
  1107. $L312:
  1108.         mov        ecx, 49                                        ; 00000031H
  1109.         jmp        SHORT $L429
  1110. $L79:
  1111.         test        eax, eax
  1112.         je        SHORT $L313
  1113.         cmp        WORD PTR [eax], 1
  1114.         jne        SHORT $L313
  1115.         mov        edx, DWORD PTR [eax+20]
  1116.         mov        ecx, DWORD PTR [eax+16]
  1117.         mov        esi, 20                                        ; 00000014H
  1118.         sub        esi, edx
  1119.         cmp        esi, ecx
  1120.         jb        SHORT $L316
  1121.         call        ebx
  1122.         jmp        SHORT $L316
  1123. $L313:
  1124.         call        ebx
  1125.         mov        esi, eax
  1126. $L316:
  1127.         mov        ecx, 48                                        ; 00000030H
  1128. $L429:
  1129.         call        edi
  1130.         mov        ecx, DWORD PTR _Result$[ebp]
  1131.         mov        edx, DWORD PTR [ecx+12]
  1132.         mov        BYTE PTR [edx+esi], al
  1133. ; Line 44
  1134.         mov        eax, DWORD PTR _Num$[ebp]
  1135.         test        eax, 4194304                                ; 00400000H
  1136.         mov        eax, DWORD PTR _Result$[ebp]
  1137.         je        SHORT $L81
  1138.         test        eax, eax
  1139.         je        SHORT $L317
  1140.         cmp        WORD PTR [eax], 1
  1141.         jne        SHORT $L317
  1142.         mov        edx, DWORD PTR [eax+20]
  1143.         mov        ecx, DWORD PTR [eax+16]
  1144.         mov        esi, 18                                        ; 00000012H
  1145.         sub        esi, edx
  1146.         cmp        esi, ecx
  1147.         jb        SHORT $L320
  1148.         call        ebx
  1149.         mov        ecx, 49                                        ; 00000031H
  1150.         jmp        SHORT $L430
  1151. $L317:
  1152.         call        ebx
  1153.         mov        esi, eax
  1154. $L320:
  1155.         mov        ecx, 49                                        ; 00000031H
  1156.         jmp        SHORT $L430
  1157. $L81:
  1158.         test        eax, eax
  1159.         je        SHORT $L321
  1160.         cmp        WORD PTR [eax], 1
  1161.         jne        SHORT $L321
  1162.         mov        edx, DWORD PTR [eax+20]
  1163.         mov        ecx, DWORD PTR [eax+16]
  1164.         mov        esi, 18                                        ; 00000012H
  1165.         sub        esi, edx
  1166.         cmp        esi, ecx
  1167.         jb        SHORT $L324
  1168.         call        ebx
  1169.         jmp        SHORT $L324
  1170. $L321:
  1171.         call        ebx
  1172.         mov        esi, eax
  1173. $L324:
  1174.         mov        ecx, 48                                        ; 00000030H
  1175. $L430:
  1176.         call        edi
  1177.         mov        ecx, DWORD PTR _Result$[ebp]
  1178.         mov        edx, DWORD PTR [ecx+12]
  1179.         mov        BYTE PTR [edx+esi], al
  1180. ; Line 45
  1181.         mov        eax, DWORD PTR _Num$[ebp]
  1182.         test        eax, 8388608                                ; 00800000H
  1183.         mov        eax, DWORD PTR _Result$[ebp]
  1184.         je        SHORT $L83
  1185.         test        eax, eax
  1186.         je        SHORT $L325
  1187.         cmp        WORD PTR [eax], 1
  1188.         jne        SHORT $L325
  1189.         mov        edx, DWORD PTR [eax+20]
  1190.         mov        ecx, DWORD PTR [eax+16]
  1191.         mov        esi, 16                                        ; 00000010H
  1192.         sub        esi, edx
  1193.         cmp        esi, ecx
  1194.         jb        SHORT $L328
  1195.         call        ebx
  1196.         mov        ecx, 49                                        ; 00000031H
  1197.         jmp        SHORT $L431
  1198. $L325:
  1199.         call        ebx
  1200.         mov        esi, eax
  1201. $L328:
  1202.         mov        ecx, 49                                        ; 00000031H
  1203.         jmp        SHORT $L431
  1204. $L83:
  1205.         test        eax, eax
  1206.         je        SHORT $L329
  1207.         cmp        WORD PTR [eax], 1
  1208.         jne        SHORT $L329
  1209.         mov        edx, DWORD PTR [eax+20]
  1210.         mov        ecx, DWORD PTR [eax+16]
  1211.         mov        esi, 16                                        ; 00000010H
  1212.         sub        esi, edx
  1213.         cmp        esi, ecx
  1214.         jb        SHORT $L332
  1215.         call        ebx
  1216.         jmp        SHORT $L332
  1217. $L329:
  1218.         call        ebx
  1219.         mov        esi, eax
  1220. $L332:
  1221.         mov        ecx, 48                                        ; 00000030H
  1222. $L431:
  1223.         call        edi
  1224.         mov        ecx, DWORD PTR _Result$[ebp]
  1225.         mov        edx, DWORD PTR [ecx+12]
  1226.         mov        BYTE PTR [edx+esi], al
  1227. ; Line 46
  1228.         mov        eax, DWORD PTR _Num$[ebp]
  1229.         test        eax, 16777216                                ; 01000000H
  1230.         mov        eax, DWORD PTR _Result$[ebp]
  1231.         je        SHORT $L85
  1232.         test        eax, eax
  1233.         je        SHORT $L333
  1234.         cmp        WORD PTR [eax], 1
  1235.         jne        SHORT $L333
  1236.         mov        edx, DWORD PTR [eax+20]
  1237.         mov        ecx, DWORD PTR [eax+16]
  1238.         mov        esi, 14                                        ; 0000000eH
  1239.         sub        esi, edx
  1240.         cmp        esi, ecx
  1241.         jb        SHORT $L336
  1242.         call        ebx
  1243.         mov        ecx, 49                                        ; 00000031H
  1244.         jmp        SHORT $L432
  1245. $L333:
  1246.         call        ebx
  1247.         mov        esi, eax
  1248. $L336:
  1249.         mov        ecx, 49                                        ; 00000031H
  1250.         jmp        SHORT $L432
  1251. $L85:
  1252.         test        eax, eax
  1253.         je        SHORT $L337
  1254.         cmp        WORD PTR [eax], 1
  1255.         jne        SHORT $L337
  1256.         mov        edx, DWORD PTR [eax+20]
  1257.         mov        ecx, DWORD PTR [eax+16]
  1258.         mov        esi, 14                                        ; 0000000eH
  1259.         sub        esi, edx
  1260.         cmp        esi, ecx
  1261.         jb        SHORT $L340
  1262.         call        ebx
  1263.         jmp        SHORT $L340
  1264. $L337:
  1265.         call        ebx
  1266.         mov        esi, eax
  1267. $L340:
  1268.         mov        ecx, 48                                        ; 00000030H
  1269. $L432:
  1270.         call        edi
  1271.         mov        ecx, DWORD PTR _Result$[ebp]
  1272.         mov        edx, DWORD PTR [ecx+12]
  1273.         mov        BYTE PTR [edx+esi], al
  1274. ; Line 47
  1275.         mov        eax, DWORD PTR _Num$[ebp]
  1276.         test        eax, 33554432                                ; 02000000H
  1277.         mov        eax, DWORD PTR _Result$[ebp]
  1278.         je        SHORT $L87
  1279.         test        eax, eax
  1280.         je        SHORT $L341
  1281.         cmp        WORD PTR [eax], 1
  1282.         jne        SHORT $L341
  1283.         mov        edx, DWORD PTR [eax+20]
  1284.         mov        ecx, DWORD PTR [eax+16]
  1285.         mov        esi, 12                                        ; 0000000cH
  1286.         sub        esi, edx
  1287.         cmp        esi, ecx
  1288.         jb        SHORT $L344
  1289.         call        ebx
  1290.         mov        ecx, 49                                        ; 00000031H
  1291.         jmp        SHORT $L433
  1292. $L341:
  1293.         call        ebx
  1294.         mov        esi, eax
  1295. $L344:
  1296.         mov        ecx, 49                                        ; 00000031H
  1297.         jmp        SHORT $L433
  1298. $L87:
  1299.         test        eax, eax
  1300.         je        SHORT $L345
  1301.         cmp        WORD PTR [eax], 1
  1302.         jne        SHORT $L345
  1303.         mov        edx, DWORD PTR [eax+20]
  1304.         mov        ecx, DWORD PTR [eax+16]
  1305.         mov        esi, 12                                        ; 0000000cH
  1306.         sub        esi, edx
  1307.         cmp        esi, ecx
  1308.         jb        SHORT $L348
  1309.         call        ebx
  1310.         jmp        SHORT $L348
  1311. $L345:
  1312.         call        ebx
  1313.         mov        esi, eax
  1314. $L348:
  1315.         mov        ecx, 48                                        ; 00000030H
  1316. $L433:
  1317.         call        edi
  1318.         mov        ecx, DWORD PTR _Result$[ebp]
  1319.         mov        edx, DWORD PTR [ecx+12]
  1320.         mov        BYTE PTR [edx+esi], al
  1321. ; Line 48
  1322.         mov        eax, DWORD PTR _Num$[ebp]
  1323.         test        eax, 67108864                                ; 04000000H
  1324.         mov        eax, DWORD PTR _Result$[ebp]
  1325.         je        SHORT $L89
  1326.         test        eax, eax
  1327.         je        SHORT $L349
  1328.         cmp        WORD PTR [eax], 1
  1329.         jne        SHORT $L349
  1330.         mov        edx, DWORD PTR [eax+20]
  1331.         mov        ecx, DWORD PTR [eax+16]
  1332.         mov        esi, 10                                        ; 0000000aH
  1333.         sub        esi, edx
  1334.         cmp        esi, ecx
  1335.         jb        SHORT $L352
  1336.         call        ebx
  1337.         mov        ecx, 49                                        ; 00000031H
  1338.         jmp        SHORT $L434
  1339. $L349:
  1340.         call        ebx
  1341.         mov        esi, eax
  1342. $L352:
  1343.         mov        ecx, 49                                        ; 00000031H
  1344.         jmp        SHORT $L434
  1345. $L89:
  1346.         test        eax, eax
  1347.         je        SHORT $L353
  1348.         cmp        WORD PTR [eax], 1
  1349.         jne        SHORT $L353
  1350.         mov        edx, DWORD PTR [eax+20]
  1351.         mov        ecx, DWORD PTR [eax+16]
  1352.         mov        esi, 10                                        ; 0000000aH
  1353.         sub        esi, edx
  1354.         cmp        esi, ecx
  1355.         jb        SHORT $L356
  1356.         call        ebx
  1357.         jmp        SHORT $L356
  1358. $L353:
  1359.         call        ebx
  1360.         mov        esi, eax
  1361. $L356:
  1362.         mov        ecx, 48                                        ; 00000030H
  1363. $L434:
  1364.         call        edi
  1365.         mov        ecx, DWORD PTR _Result$[ebp]
  1366.         mov        edx, DWORD PTR [ecx+12]
  1367.         mov        BYTE PTR [edx+esi], al
  1368. ; Line 49
  1369.         mov        eax, DWORD PTR _Num$[ebp]
  1370.         test        eax, 134217728                                ; 08000000H
  1371.         mov        eax, DWORD PTR _Result$[ebp]
  1372.         je        SHORT $L91
  1373.         test        eax, eax
  1374.         je        SHORT $L357
  1375.         cmp        WORD PTR [eax], 1
  1376.         jne        SHORT $L357
  1377.         mov        edx, DWORD PTR [eax+20]
  1378.         mov        ecx, DWORD PTR [eax+16]
  1379.         mov        esi, 8
  1380.         sub        esi, edx
  1381.         cmp        esi, ecx
  1382.         jb        SHORT $L360
  1383.         call        ebx
  1384.         mov        ecx, 49                                        ; 00000031H
  1385.         jmp        SHORT $L435
  1386. $L357:
  1387.         call        ebx
  1388.         mov        esi, eax
  1389. $L360:
  1390.         mov        ecx, 49                                        ; 00000031H
  1391.         jmp        SHORT $L435
  1392. $L91:
  1393.         test        eax, eax
  1394.         je        SHORT $L361
  1395.         cmp        WORD PTR [eax], 1
  1396.         jne        SHORT $L361
  1397.         mov        edx, DWORD PTR [eax+20]
  1398.         mov        ecx, DWORD PTR [eax+16]
  1399.         mov        esi, 8
  1400.         sub        esi, edx
  1401.         cmp        esi, ecx
  1402.         jb        SHORT $L364
  1403.         call        ebx
  1404.         jmp        SHORT $L364
  1405. $L361:
  1406.         call        ebx
  1407.         mov        esi, eax
  1408. $L364:
  1409.         mov        ecx, 48                                        ; 00000030H
  1410. $L435:
  1411.         call        edi
  1412.         mov        ecx, DWORD PTR _Result$[ebp]
  1413.         mov        edx, DWORD PTR [ecx+12]
  1414.         mov        BYTE PTR [edx+esi], al
  1415. ; Line 50
  1416.         mov        eax, DWORD PTR _Num$[ebp]
  1417.         test        eax, 268435456                                ; 10000000H
  1418.         mov        eax, DWORD PTR _Result$[ebp]
  1419.         je        SHORT $L93
  1420.         test        eax, eax
  1421.         je        SHORT $L365
  1422.         cmp        WORD PTR [eax], 1
  1423.         jne        SHORT $L365
  1424.         mov        edx, DWORD PTR [eax+20]
  1425.         mov        ecx, DWORD PTR [eax+16]
  1426.         mov        esi, 6
  1427.         sub        esi, edx
  1428.         cmp        esi, ecx
  1429.         jb        SHORT $L368
  1430.         call        ebx
  1431.         mov        ecx, 49                                        ; 00000031H
  1432.         jmp        SHORT $L436
  1433. $L365:
  1434.         call        ebx
  1435.         mov        esi, eax
  1436. $L368:
  1437.         mov        ecx, 49                                        ; 00000031H
  1438.         jmp        SHORT $L436
  1439. $L93:
  1440.         test        eax, eax
  1441.         je        SHORT $L369
  1442.         cmp        WORD PTR [eax], 1
  1443.         jne        SHORT $L369
  1444.         mov        edx, DWORD PTR [eax+20]
  1445.         mov        ecx, DWORD PTR [eax+16]
  1446.         mov        esi, 6
  1447.         sub        esi, edx
  1448.         cmp        esi, ecx
  1449.         jb        SHORT $L372
  1450.         call        ebx
  1451.         jmp        SHORT $L372
  1452. $L369:
  1453.         call        ebx
  1454.         mov        esi, eax
  1455. $L372:
  1456.         mov        ecx, 48                                        ; 00000030H
  1457. $L436:
  1458.         call        edi
  1459.         mov        ecx, DWORD PTR _Result$[ebp]
  1460.         mov        edx, DWORD PTR [ecx+12]
  1461.         mov        BYTE PTR [edx+esi], al
  1462. ; Line 51
  1463.         mov        eax, DWORD PTR _Num$[ebp]
  1464.         test        eax, 536870912                                ; 20000000H
  1465.         mov        eax, DWORD PTR _Result$[ebp]
  1466.         je        SHORT $L95
  1467.         test        eax, eax
  1468.         je        SHORT $L373
  1469.         cmp        WORD PTR [eax], 1
  1470.         jne        SHORT $L373
  1471.         mov        edx, DWORD PTR [eax+20]
  1472.         mov        ecx, DWORD PTR [eax+16]
  1473.         mov        esi, 4
  1474.         sub        esi, edx
  1475.         cmp        esi, ecx
  1476.         jb        SHORT $L376
  1477.         call        ebx
  1478.         mov        ecx, 49                                        ; 00000031H
  1479.         jmp        SHORT $L437
  1480. $L373:
  1481.         call        ebx
  1482.         mov        esi, eax
  1483. $L376:
  1484.         mov        ecx, 49                                        ; 00000031H
  1485.         jmp        SHORT $L437
  1486. $L95:
  1487.         test        eax, eax
  1488.         je        SHORT $L377
  1489.         cmp        WORD PTR [eax], 1
  1490.         jne        SHORT $L377
  1491.         mov        edx, DWORD PTR [eax+20]
  1492.         mov        ecx, DWORD PTR [eax+16]
  1493.         mov        esi, 4
  1494.         sub        esi, edx
  1495.         cmp        esi, ecx
  1496.         jb        SHORT $L380
  1497.         call        ebx
  1498.         jmp        SHORT $L380
  1499. $L377:
  1500.         call        ebx
  1501.         mov        esi, eax
  1502. $L380:
  1503.         mov        ecx, 48                                        ; 00000030H
  1504. $L437:
  1505.         call        edi
  1506.         mov        ecx, DWORD PTR _Result$[ebp]
  1507.         mov        edx, DWORD PTR [ecx+12]
  1508.         mov        BYTE PTR [edx+esi], al
  1509. ; Line 52
  1510.         mov        eax, DWORD PTR _Num$[ebp]
  1511.         test        eax, 1073741824                                ; 40000000H
  1512.         mov        eax, DWORD PTR _Result$[ebp]
  1513.         je        SHORT $L97
  1514.         test        eax, eax
  1515.         je        SHORT $L381
  1516.         cmp        WORD PTR [eax], 1
  1517.         jne        SHORT $L381
  1518.         mov        edx, DWORD PTR [eax+20]
  1519.         mov        ecx, DWORD PTR [eax+16]
  1520.         mov        esi, 2
  1521.         sub        esi, edx
  1522.         cmp        esi, ecx
  1523.         jb        SHORT $L384
  1524.         call        ebx
  1525.         mov        ecx, 49                                        ; 00000031H
  1526.         jmp        SHORT $L438
  1527. $L381:
  1528.         call        ebx
  1529.         mov        esi, eax
  1530. $L384:
  1531.         mov        ecx, 49                                        ; 00000031H
  1532.         jmp        SHORT $L438
  1533. $L97:
  1534.         test        eax, eax
  1535.         je        SHORT $L385
  1536.         cmp        WORD PTR [eax], 1
  1537.         jne        SHORT $L385
  1538.         mov        edx, DWORD PTR [eax+20]
  1539.         mov        ecx, DWORD PTR [eax+16]
  1540.         mov        esi, 2
  1541.         sub        esi, edx
  1542.         cmp        esi, ecx
  1543.         jb        SHORT $L388
  1544.         call        ebx
  1545.         jmp        SHORT $L388
  1546. $L385:
  1547.         call        ebx
  1548.         mov        esi, eax
  1549. $L388:
  1550.         mov        ecx, 48                                        ; 00000030H
  1551. $L438:
  1552.         call        edi
  1553.         mov        ecx, DWORD PTR _Result$[ebp]
  1554.         mov        edx, DWORD PTR [ecx+12]
  1555.         mov        BYTE PTR [edx+esi], al
  1556. ; Line 53
  1557.         mov        eax, DWORD PTR _Num$[ebp]
  1558.         test        eax, -2147483648                        ; 80000000H
  1559.         mov        eax, DWORD PTR _Result$[ebp]
  1560.         je        SHORT $L99
  1561.         test        eax, eax
  1562.         je        SHORT $L389
  1563.         cmp        WORD PTR [eax], 1
  1564.         jne        SHORT $L389
  1565.         mov        esi, DWORD PTR [eax+20]
  1566.         mov        ecx, DWORD PTR [eax+16]
  1567.         neg        esi
  1568.         cmp        esi, ecx
  1569.         jb        SHORT $L392
  1570.         call        ebx
  1571.         mov        ecx, 49                                        ; 00000031H
  1572.         jmp        SHORT $L439
  1573. $L389:
  1574.         call        ebx
  1575.         mov        esi, eax
  1576. $L392:
  1577.         mov        ecx, 49                                        ; 00000031H
  1578.         jmp        SHORT $L439
  1579. $L99:
  1580.         test        eax, eax
  1581.         je        SHORT $L393
  1582.         cmp        WORD PTR [eax], 1
  1583.         jne        SHORT $L393
  1584.         mov        esi, DWORD PTR [eax+20]
  1585.         mov        ecx, DWORD PTR [eax+16]
  1586.         neg        esi
  1587.         cmp        esi, ecx
  1588.         jb        SHORT $L396
  1589.         call        ebx
  1590.         jmp        SHORT $L396
  1591. $L393:
  1592.         call        ebx
  1593.         mov        esi, eax
  1594. $L396:
  1595.         mov        ecx, 48                                        ; 00000030H
  1596. $L439:
  1597.         call        edi
  1598.         mov        ecx, DWORD PTR _Result$[ebp]
  1599.         mov        edx, DWORD PTR [ecx+12]
  1600. ; Line 55
  1601.         lea        ecx, DWORD PTR _unnamed_var1$[ebp]
  1602.         push        ecx
  1603.         mov        BYTE PTR [edx+esi], al
  1604.         mov        eax, DWORD PTR _Result$[ebp]
  1605.         mov        DWORD PTR _unnamed_var1$[ebp+8], eax
  1606.         mov        DWORD PTR _unnamed_var1$[ebp], 8209        ; 00002011H
  1607.         call        DWORD PTR __imp____vbaStrVarCopy
  1608.         mov        edx, eax
  1609.         lea        ecx, DWORD PTR _Dec2Bin$[ebp]
  1610.         call        DWORD PTR __imp_@__vbaStrMove
  1611. $L32:
  1612.         push        $L402
  1613.         jmp        SHORT $L397
  1614. $L31:
  1615. ; Line 56
  1616.         lea        ecx, DWORD PTR _Dec2Bin$[ebp]
  1617.         call        DWORD PTR __imp_@__vbaFreeStr
  1618.         ret        0
  1619. $L397:
  1620. $L30:
  1621.         lea        edx, DWORD PTR _Result$[ebp]
  1622.         push        edx
  1623.         push        0
  1624.         call        DWORD PTR __imp____vbaAryDestruct
  1625. $L400:
  1626.         ret        0
  1627. $L402:
  1628.         mov        eax, DWORD PTR _Me$[ebp]
  1629.         push        eax
  1630.         mov        ecx, DWORD PTR [eax]
  1631.         call        DWORD PTR [ecx+8]
  1632.         mov        edx, DWORD PTR _Dec2Bin$[ebp]
  1633.         mov        eax, DWORD PTR _Dec2Bin$[ebp]
  1634.         mov        DWORD PTR [edx], eax
  1635.         mov        eax, DWORD PTR __$SEHRec$[ebp+16]
  1636.         mov        ecx, DWORD PTR __$SEHRec$[ebp]
  1637.         pop        edi
  1638.         pop        esi
  1639.         mov        DWORD PTR fs:__except_list, ecx
  1640.         pop        ebx
  1641.         mov        esp, ebp
  1642.         pop        ebp
  1643.         ret        12                                        ; 0000000cH
  1644. ?Dec2Bin@Form1@@AAGXXZ ENDP                                ; Form1::Dec2Bin
  1645. text$1        ENDS
  1646. PUBLIC        ?Form_Load@Form1@@AAGXXZ                        ; Form1::Form_Load
  1647. EXTRN        __imp____vba@051DF814:NEAR
  1648. EXTRN        __imp____vbaHresultCheckObj:NEAR
  1649. EXTRN        ___vba@006A2A78:BYTE
  1650. EXTRN        __imp____vbaFreeVarList:NEAR
  1651. ;        COMDAT CONST
  1652. ; File C:\Users\Administrator\Desktop\Form1.frm
  1653. CONST        SEGMENT
  1654. $S120        DB        05H, 00H
  1655.         DB        08H, 00H
  1656.         DD        FLAT:$L119
  1657.         DB        00H, 00H, 00H, 00H
  1658.         DD        FLAT:$L118
  1659. CONST        ENDS
  1660. ;        COMDAT ?Form_Load@Form1@@AAGXXZ
  1661. text$1        SEGMENT
  1662. _Me$ = 8
  1663. _unnamed_var1$ = -24
  1664. _unnamed_var1$ = -40
  1665. _unnamed_var1$ = -56
  1666. _unnamed_var1$ = -72
  1667. _unnamed_var1$ = -88
  1668. __$SEHRec$ = -20
  1669. ?Form_Load@Form1@@AAGXXZ PROC NEAR                        ; Form1::Form_Load, COMDAT
  1670. ; File C:\Users\Administrator\Desktop\Form1.frm
  1671. ; Line 58
  1672.         push        ebp
  1673.         mov        ebp, esp
  1674.         sub        esp, 12                                        ; 0000000cH
  1675.         push        OFFSET FLAT:___vbaExceptHandler
  1676.         mov        eax, DWORD PTR fs:__except_list
  1677.         push        eax
  1678.         mov        DWORD PTR fs:__except_list, esp
  1679.         sub        esp, 132                                ; 00000084H
  1680.         push        ebx
  1681.         push        esi
  1682.         push        edi
  1683.         mov        DWORD PTR __$SEHRec$[ebp+8], esp
  1684.         mov        DWORD PTR __$SEHRec$[ebp+12], OFFSET FLAT:$S120
  1685.         mov        esi, DWORD PTR _Me$[ebp]
  1686.         mov        eax, esi
  1687.         and        eax, 1
  1688.         mov        DWORD PTR __$SEHRec$[ebp+16], eax
  1689.         and        esi, -2                                        ; fffffffeH
  1690.         push        esi
  1691.         mov        DWORD PTR _Me$[ebp], esi
  1692.         mov        ecx, DWORD PTR [esi]
  1693.         call        DWORD PTR [ecx+4]
  1694. ; Line 59
  1695.         mov        edx, DWORD PTR [esi]
  1696.         xor        edi, edi
  1697.         mov        eax, 10                                        ; 0000000aH
  1698.         mov        DWORD PTR _unnamed_var1$[ebp], edi
  1699.         mov        DWORD PTR _unnamed_var1$[ebp], edi
  1700.         mov        DWORD PTR _unnamed_var1$[ebp], edi
  1701.         mov        DWORD PTR _unnamed_var1$[ebp], eax
  1702.         mov        DWORD PTR _unnamed_var1$[ebp], eax
  1703.         mov        DWORD PTR _unnamed_var1$[ebp], eax
  1704.         lea        eax, DWORD PTR _unnamed_var1$[ebp]
  1705.         push        eax
  1706.         mov        ecx, -2147352572                        ; 80020004H
  1707.         push        1
  1708.         push        esi
  1709.         mov        DWORD PTR _unnamed_var1$[ebp], edi
  1710.         mov        DWORD PTR _unnamed_var1$[ebp], edi
  1711.         mov        DWORD PTR _unnamed_var1$[ebp+8], ecx
  1712.         mov        DWORD PTR _unnamed_var1$[ebp+8], ecx
  1713.         mov        DWORD PTR _unnamed_var1$[ebp+8], ecx
  1714.         call        DWORD PTR [edx+1784]
  1715.         cmp        eax, edi
  1716.         jge        SHORT $L443
  1717.         push        1784                                        ; 000006f8H
  1718.         push        OFFSET FLAT:___vba@006A2A78
  1719.         push        esi
  1720.         push        eax
  1721.         call        DWORD PTR __imp____vbaHresultCheckObj
  1722. $L443:
  1723.         mov        eax, DWORD PTR _unnamed_var1$[ebp]
  1724.         lea        ecx, DWORD PTR _unnamed_var1$[ebp]
  1725.         mov        DWORD PTR _unnamed_var1$[ebp+8], eax
  1726.         lea        edx, DWORD PTR _unnamed_var1$[ebp]
  1727.         push        ecx
  1728.         lea        eax, DWORD PTR _unnamed_var1$[ebp]
  1729.         push        edx
  1730.         push        eax
  1731.         lea        ecx, DWORD PTR _unnamed_var1$[ebp]
  1732.         push        edi
  1733.         push        ecx
  1734.         mov        DWORD PTR _unnamed_var1$[ebp], edi
  1735.         mov        DWORD PTR _unnamed_var1$[ebp], 8
  1736.         call        DWORD PTR __imp____vba@051DF814
  1737.         lea        edx, DWORD PTR _unnamed_var1$[ebp]
  1738.         lea        eax, DWORD PTR _unnamed_var1$[ebp]
  1739.         push        edx
  1740.         lea        ecx, DWORD PTR _unnamed_var1$[ebp]
  1741.         push        eax
  1742.         lea        edx, DWORD PTR _unnamed_var1$[ebp]
  1743.         push        ecx
  1744.         push        edx
  1745.         push        4
  1746.         call        DWORD PTR __imp____vbaFreeVarList
  1747.         add        esp, 20                                        ; 00000014H
  1748. ; Line 60
  1749.         mov        DWORD PTR __$SEHRec$[ebp+16], edi
  1750. $L119:
  1751.         push        $L450
  1752.         jmp        SHORT $L445
  1753. $L118:
  1754.         lea        ecx, DWORD PTR _unnamed_var1$[ebp]
  1755.         call        DWORD PTR __imp_@__vbaFreeStr
  1756.         lea        eax, DWORD PTR _unnamed_var1$[ebp]
  1757.         lea        ecx, DWORD PTR _unnamed_var1$[ebp]
  1758.         push        eax
  1759.         lea        edx, DWORD PTR _unnamed_var1$[ebp]
  1760.         push        ecx
  1761.         lea        eax, DWORD PTR _unnamed_var1$[ebp]
  1762.         push        edx
  1763.         push        eax
  1764.         push        4
  1765.         call        DWORD PTR __imp____vbaFreeVarList
  1766.         add        esp, 20                                        ; 00000014H
  1767.         ret        0
  1768. $L445:
  1769. $L448:
  1770.         ret        0
  1771. $L450:
  1772.         mov        eax, DWORD PTR _Me$[ebp]
  1773.         push        eax
  1774.         mov        ecx, DWORD PTR [eax]
  1775.         call        DWORD PTR [ecx+8]
  1776.         mov        eax, DWORD PTR __$SEHRec$[ebp+16]
  1777.         mov        ecx, DWORD PTR __$SEHRec$[ebp]
  1778.         pop        edi
  1779.         pop        esi
  1780.         mov        DWORD PTR fs:__except_list, ecx
  1781.         pop        ebx
  1782.         mov        esp, ebp
  1783.         pop        ebp
  1784.         ret        4
  1785. ?Form_Load@Form1@@AAGXXZ ENDP                                ; Form1::Form_Load
  1786. text$1        ENDS
  1787. END
复制代码
回复 赞! 靠!

使用道具 举报

30

主题

210

回帖

2774

积分

用户组: 版主

UID
1821
精华
7
威望
69 点
宅币
2155 个
贡献
206 次
宅之契约
0 份
在线时间
478 小时
注册时间
2016-7-12
发表于 2019-7-11 20:02:34 | 显示全部楼层
本帖最后由 Ayala 于 2019-7-11 20:17 编辑

伪代码 不知道速度怎样 太多年不写vb了 不知道怎么玩了
Dim s() As String
Dim nums(4) As Byte
s() = Array("00000000", "00000001", "00000010", "00000011", "00000100", "00000101", "00000110", "00000111", _
        "00001000", "00001001", "00001010", "00001011", "00001100", "00001101", "00001110", "00001111", _
             ...
                                                                                                "11111111")

memcpy nums(0),num
d2cbin =  s(nums(3)) & s(nums(2)) & s(nums(1)) & (nums(0))
Dec2Bin = Result
回复 赞! 靠!

使用道具 举报

1110

主题

1651

回帖

7万

积分

用户组: 管理员

一只技术宅

UID
1
精华
244
威望
743 点
宅币
24217 个
贡献
46222 次
宅之契约
0 份
在线时间
2296 小时
注册时间
2014-1-26
 楼主| 发表于 2019-7-13 15:58:04 | 显示全部楼层
Ayala 发表于 2019-7-11 20:02
伪代码 不知道速度怎样 太多年不写vb了 不知道怎么玩了
Dim s() As String
Dim nums(4) As Byte

这个是最快的。但这个表的初始化不能重复执行。

我测试过65536个表项的,并且使用整数除法而非CopyMemory等玩意儿。

确实查表法是最快的。
回复 赞! 靠!

使用道具 举报

30

主题

210

回帖

2774

积分

用户组: 版主

UID
1821
精华
7
威望
69 点
宅币
2155 个
贡献
206 次
宅之契约
0 份
在线时间
478 小时
注册时间
2016-7-12
发表于 2019-7-14 12:14:16 | 显示全部楼层
本帖最后由 Ayala 于 2019-7-14 19:25 编辑
0xAA55 发表于 2019-7-13 15:58
这个是最快的。但这个表的初始化不能重复执行。

我测试过65536个表项的,并且使用整数除法而非CopyMemor ...


65536个就太占内存了不是很必要256个就可以处理任意位数的16进制数据了,可以不用copymemeory,可以利用vb的__vbaCopyBytes或者直接GetMem4
回复 赞! 靠!

使用道具 举报

0

主题

41

回帖

89

积分

用户组: 小·技术宅

UID
1457
精华
0
威望
2 点
宅币
44 个
贡献
0 次
宅之契约
0 份
在线时间
8 小时
注册时间
2016-1-29
发表于 2019-7-20 17:31:22 | 显示全部楼层
老外的原始代码如下:
  1. Public Static Function Dec2Bin(ByVal L As Long) As String
  2. ' by Peter Nierop, [email]pnierop.pnc@inter.nl.net[/email], 20001226
  3.     Dim lDone&, sNibble(0 To 15) As String, sByte(0 To 255) As String
  4.     If lDone = 0 Then
  5.         sNibble(0) = "0000"
  6.         sNibble(1) = "0001"
  7.         sNibble(2) = "0010"
  8.         sNibble(3) = "0011"
  9.         sNibble(4) = "0100"
  10.         sNibble(5) = "0101"
  11.         sNibble(6) = "0110"
  12.         sNibble(7) = "0111"
  13.         sNibble(8) = "1000"
  14.         sNibble(9) = "1001"
  15.         sNibble(10) = "1010"
  16.         sNibble(11) = "1011"
  17.         sNibble(12) = "1100"
  18.         sNibble(13) = "1101"
  19.         sNibble(14) = "1110"
  20.         sNibble(15) = "1111"
  21.         For lDone = 0 To 255
  22.             sByte(lDone) = sNibble(lDone \ &H10) & sNibble(lDone And &HF)
  23.         Next
  24.     End If
  25.     If L < 0 Then
  26.         L = L And &H7FFFFFFF
  27.         Dec2Bin = sByte(128 + L \ &H1000000 And &HFF) _
  28.                   & sByte(L \ &H10000 And &HFF) _
  29.                   & sByte(L \ &H100 And &HFF) _
  30.                   & sByte(L And &HFF)
  31.     Else
  32.         Dec2Bin = sByte(L \ &H1000000 And &HFF) _
  33.                   & sByte(L \ &H10000 And &HFF) _
  34.                   & sByte(L \ &H100 And &HFF) _
  35.                   & sByte(L And &HFF)
  36.     End If
  37. End Function
复制代码
回复 赞! 靠!

使用道具 举报

30

主题

210

回帖

2774

积分

用户组: 版主

UID
1821
精华
7
威望
69 点
宅币
2155 个
贡献
206 次
宅之契约
0 份
在线时间
478 小时
注册时间
2016-7-12
发表于 2019-7-20 19:49:09 | 显示全部楼层
搬砖工 发表于 2019-7-20 17:31
老外的原始代码如下:
[code]Public Static Function Dec2Bin(ByVal L As Long) As String
...

这个效率并不如楼主的效率高
回复 赞! 靠!

使用道具 举报

0

主题

41

回帖

89

积分

用户组: 小·技术宅

UID
1457
精华
0
威望
2 点
宅币
44 个
贡献
0 次
宅之契约
0 份
在线时间
8 小时
注册时间
2016-1-29
发表于 2021-7-6 11:00:14 | 显示全部楼层
Ayala 发表于 2019-7-20 19:49
这个效率并不如楼主的效率高

不知道你比没比过,我比了一下好像我这个比楼主的效率高一些。
用的CPU计时器记录时间
回复 赞! 靠!

使用道具 举报

1

主题

159

回帖

618

积分

用户组: 大·技术宅

UID
7535
精华
0
威望
0 点
宅币
458 个
贡献
0 次
宅之契约
0 份
在线时间
70 小时
注册时间
2021-10-16
发表于 2023-3-16 09:09:03 | 显示全部楼层

谢谢楼主无私分享
回复 赞! 靠!

使用道具 举报

1110

主题

1651

回帖

7万

积分

用户组: 管理员

一只技术宅

UID
1
精华
244
威望
743 点
宅币
24217 个
贡献
46222 次
宅之契约
0 份
在线时间
2296 小时
注册时间
2014-1-26
 楼主| 发表于 2023-4-29 16:07:14 | 显示全部楼层
tlwh163 发表于 2023-4-28 18:48
Dim x As Long : x = &H55555555
            Dim s As String : s = String(32, 48)
         ...

你这个代码是 ChatGPT 给你回答的吧,根本就不符合 VB 的语法。

VB 哪有用 [] 运算符来修改字符串里面的字符的写法呢?

以及,Case &H8000 的那句,实际上你是在判断 (x And ( - x)) 的值是否为 &HFFFF8000。你不知道 VB6 默认使用更小的整数类型,而对整数长度进行扩展的时候,用的是符号扩展。
回复 赞! 靠!

使用道具 举报

1

主题

42

回帖

971

积分

用户组: 大·技术宅

UID
7437
精华
0
威望
112 点
宅币
594 个
贡献
110 次
宅之契约
0 份
在线时间
129 小时
注册时间
2021-9-11
发表于 2023-4-29 21:30:54 | 显示全部楼层
...这可是我自己想的思路 网上有这样的代码吗?
最近正好在鼓捣显示二进制01字符串的事 就发了下自己的想法
手头没有VB6 用VFB写的
至于你说的2个问题 也是可以修正的
1.  值域的问题    &H8000&
2.  []的问题      mid(s,16,1) = "1"

大概是这样吧

回复 赞! 靠!

使用道具 举报

1110

主题

1651

回帖

7万

积分

用户组: 管理员

一只技术宅

UID
1
精华
244
威望
743 点
宅币
24217 个
贡献
46222 次
宅之契约
0 份
在线时间
2296 小时
注册时间
2014-1-26
 楼主| 发表于 2023-5-1 15:58:24 | 显示全部楼层
tlwh163 发表于 2023-4-29 21:30
...这可是我自己想的思路 网上有这样的代码吗?
最近正好在鼓捣显示二进制01字符串的事 就发了下自己的想法 ...

1、值域问题对的。
2、不如用 Byte 数组赋值,然后直接把 Byte 数组赋值给 String
回复 赞! 靠!

使用道具 举报

QQ|Archiver|小黑屋|技术宅的结界 ( 滇ICP备16008837号 )|网站地图

GMT+8, 2024-4-17 02:35 , Processed in 0.049389 second(s), 38 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表