Why Is Houdini Not Entered In The WCCC??

General discussion about computer chess...
User avatar
kingliveson
Posts: 1388
Joined: Thu Jun 10, 2010 1:22 am
Real Name: Franklin Titus
Location: 28°32'1"N 81°22'33"W

Re: Why Is Houdini Not Entered In The WCCC??

Post by kingliveson » Tue Aug 10, 2010 3:13 am

It's actually not that funny. First of all, I have not seen code snippets posted by Lance. Further more, would you be willing to let me examine the source code of the initial release of Houdini? If not me, would you allow BB+, Zach Wegner, or anyone else? I have no dog in the fight, call things as they are, and would glady appologize should the findings exonerate you. More modified code below:

RobboLito 0.09 w32
Aug 4 2010 19:40:41
basic windows version by kranium, improved by sentinel

Code: Select all

.text:0040AC20 ; =============== S U B R O U T I N E =======================================
.text:0040AC20
.text:0040AC20 ; Attributes: bp-based frame
.text:0040AC20
.text:0040AC20 sub_40AC20      proc near               ; CODE XREF: sub_411840+51p
.text:0040AC20                                         ; sub_411840+1CCp ...
.text:0040AC20
.text:0040AC20 var_10          = dword ptr -10h
.text:0040AC20 var_C           = dword ptr -0Ch
.text:0040AC20 var_8           = qword ptr -8
.text:0040AC20 arg_0           = dword ptr  8
.text:0040AC20 arg_4           = dword ptr  0Ch
.text:0040AC20
.text:0040AC20                 push    ebp
.text:0040AC21                 mov     ebp, esp
.text:0040AC23                 sub     esp, 10h
.text:0040AC26                 push    ebx
.text:0040AC27                 mov     ebx, dword_73E940
.text:0040AC2D                 movzx   eax, byte ptr [ebx+1Ah]
.text:0040AC31                 push    esi
.text:0040AC32                 mov     esi, dword ptr qword_780EA8+4
.text:0040AC38                 push    edi
.text:0040AC39                 test    eax, eax
.text:0040AC3B                 jz      loc_40ACCD
.text:0040AC41                 mov     edx, dword ptr qword_780EA8
.text:0040AC47                 mov     edi, esi
.text:0040AC49                 shrd    edx, edi, 9
.text:0040AC4D                 and     edx, dword_5F5FC0[eax*8]
.text:0040AC54                 shr     edi, 9
.text:0040AC57                 and     edi, dword_5F5FC4[eax*8]
.text:0040AC5E                 and     edx, 7F7F7F7Fh
.text:0040AC64                 and     edi, 7F7F7Fh
.text:0040AC6A                 or      edx, edi
.text:0040AC6C                 jz      short loc_40AC87
.text:0040AC6E                 lea     edx, [eax+9]
.text:0040AC71                 shl     edx, 6
.text:0040AC74                 or      edx, dword_44919C
.text:0040AC7A                 or      edx, eax
.text:0040AC7C                 or      edx, 3000h
.text:0040AC82                 mov     [ecx], edx
.text:0040AC84                 add     ecx, 4
.text:0040AC87
.text:0040AC87 loc_40AC87:                             ; CODE XREF: sub_40AC20+4Cj
.text:0040AC87                 mov     edx, dword ptr qword_780EA8
.text:0040AC8D                 mov     edi, esi
.text:0040AC8F                 shrd    edx, edi, 7
.text:0040AC93                 and     edx, dword_5F5FC0[eax*8]
.text:0040AC9A                 shr     edi, 7
.text:0040AC9D                 and     edi, dword_5F5FC4[eax*8]
.text:0040ACA4                 and     edx, 0FEFEFEFEh
.text:0040ACAA                 and     edi, 0FEFEFEh
.text:0040ACB0                 or      edx, edi
.text:0040ACB2                 jz      short loc_40ACCD
.text:0040ACB4                 lea     edx, [eax+7]
.text:0040ACB7                 shl     edx, 6
.text:0040ACBA                 or      edx, dword_44919C
.text:0040ACC0                 or      edx, eax
.text:0040ACC2                 or      edx, 3000h
.text:0040ACC8                 mov     [ecx], edx
.text:0040ACCA                 add     ecx, 4
.text:0040ACCD
.text:0040ACCD loc_40ACCD:                             ; CODE XREF: sub_40AC20+1Bj
.text:0040ACCD                                         ; sub_40AC20+92j
.text:0040ACCD                 mov     edx, [ebx+28h]
.text:0040ACD0                 mov     edi, [ebx+2Ch]
.text:0040ACD3                 mov     eax, [ebp+arg_0]
.text:0040ACD6                 mov     ebx, [ebp+arg_4]
.text:0040ACD9                 and     edx, eax
.text:0040ACDB                 and     edi, ebx
.text:0040ACDD                 or      edx, edi
.text:0040ACDF                 jz      loc_40B29C
.text:0040ACE5                 mov     edi, dword ptr qword_780EA8
.text:0040ACEB                 mov     edx, esi
.text:0040ACED                 shrd    edi, edx, 9
.text:0040ACF1                 shr     edx, 9
.text:0040ACF4                 and     edi, eax
.text:0040ACF6                 and     edi, 7F7F7F00h
.text:0040ACFC                 and     edx, ebx
.text:0040ACFE                 and     edx, 7F7F7Fh
.text:0040AD04                 mov     eax, edi
.text:0040AD06                 or      eax, edx
.text:0040AD08                 mov     [ebp+var_10], edi
.text:0040AD0B                 mov     [ebp+var_C], edx
.text:0040AD0E                 jz      short loc_40AD63
.text:0040AD10
.text:0040AD10 loc_40AD10:                             ; CODE XREF: sub_40AC20+13Bj
.text:0040AD10                 mov     eax, [ebp+var_10]
.text:0040AD13                 test    eax, eax
.text:0040AD15                 jz      short loc_40AD1C
.text:0040AD17                 bsf     eax, eax
.text:0040AD1A                 jmp     short loc_40AD23
.text:0040AD1C ; ---------------------------------------------------------------------------
.text:0040AD1C
.text:0040AD1C loc_40AD1C:                             ; CODE XREF: sub_40AC20+F5j
.text:0040AD1C                 bsf     eax, [ebp+var_C]
.text:0040AD20                 add     eax, 20h
.text:0040AD23
.text:0040AD23 loc_40AD23:                             ; CODE XREF: sub_40AC20+FAj
.text:0040AD23                 movzx   esi, byte_780E20[eax]
.text:0040AD2A                 mov     dword ptr [ebp+var_8+4], eax
.text:0040AD2D                 add     eax, 9
.text:0040AD30                 shl     eax, 6
.text:0040AD33                 or      eax, dword_449198[esi*4]
.text:0040AD3A                 add     ecx, 4
.text:0040AD3D                 or      eax, dword ptr [ebp+var_8+4]
.text:0040AD40                 mov     esi, edx
.text:0040AD42                 mov     [ecx-4], eax
.text:0040AD45                 mov     eax, edi
.text:0040AD47                 add     eax, 0FFFFFFFFh
.text:0040AD4A                 adc     esi, 0FFFFFFFFh
.text:0040AD4D                 and     edi, eax
.text:0040AD4F                 and     edx, esi
.text:0040AD51                 mov     eax, edi
.text:0040AD53                 or      eax, edx
.text:0040AD55                 mov     [ebp+var_10], edi
.text:0040AD58                 mov     [ebp+var_C], edx
.text:0040AD5B                 jnz     short loc_40AD10
.text:0040AD5D                 mov     esi, dword ptr qword_780EA8+4
.text:0040AD63
.text:0040AD63 loc_40AD63:                             ; CODE XREF: sub_40AC20+EEj
.text:0040AD63                 mov     edx, dword ptr qword_780EA8
.text:0040AD69                 shrd    edx, esi, 7
.text:0040AD6D                 and     edx, [ebp+arg_0]
.text:0040AD70                 shr     esi, 7
.text:0040AD73                 and     edx, 0FEFEFE00h
.text:0040AD79                 and     esi, ebx
.text:0040AD7B                 and     esi, 0FEFEFEh
.text:0040AD81                 mov     eax, edx
.text:0040AD83                 or      eax, esi
.text:0040AD85                 mov     [ebp+var_10], edx
.text:0040AD88                 mov     [ebp+var_C], esi
.text:0040AD8B                 jz      short loc_40ADDD
.text:0040AD8D                 lea     ecx, [ecx+0]
.text:0040AD90
.text:0040AD90 loc_40AD90:                             ; CODE XREF: sub_40AC20+1BBj
.text:0040AD90                 mov     eax, [ebp+var_10]
.text:0040AD93                 test    eax, eax
.text:0040AD95                 jz      short loc_40AD9C
.text:0040AD97                 bsf     eax, eax
.text:0040AD9A                 jmp     short loc_40ADA3
.text:0040AD9C ; ---------------------------------------------------------------------------
.text:0040AD9C
.text:0040AD9C loc_40AD9C:                             ; CODE XREF: sub_40AC20+175j
.text:0040AD9C                 bsf     eax, [ebp+var_C]
.text:0040ADA0                 add     eax, 20h
.text:0040ADA3
.text:0040ADA3 loc_40ADA3:                             ; CODE XREF: sub_40AC20+17Aj
.text:0040ADA3                 movzx   edi, byte_780E20[eax]
.text:0040ADAA                 mov     dword ptr [ebp+var_8+4], eax
.text:0040ADAD                 add     eax, 7
.text:0040ADB0                 shl     eax, 6
.text:0040ADB3                 or      eax, dword_449198[edi*4]
.text:0040ADBA                 add     ecx, 4
.text:0040ADBD                 or      eax, dword ptr [ebp+var_8+4]
.text:0040ADC0                 mov     edi, esi
.text:0040ADC2                 mov     [ecx-4], eax
.text:0040ADC5                 mov     eax, edx
.text:0040ADC7                 add     eax, 0FFFFFFFFh
.text:0040ADCA                 adc     edi, 0FFFFFFFFh
.text:0040ADCD                 and     edx, eax
.text:0040ADCF                 and     esi, edi
.text:0040ADD1                 mov     eax, edx
.text:0040ADD3                 or      eax, esi
.text:0040ADD5                 mov     [ebp+var_10], edx
.text:0040ADD8                 mov     [ebp+var_C], esi
.text:0040ADDB                 jnz     short loc_40AD90
.text:0040ADDD
.text:0040ADDD loc_40ADDD:                             ; CODE XREF: sub_40AC20+16Bj
.text:0040ADDD                 mov     eax, dword ptr qword_780EB0
.text:0040ADE2                 mov     edx, dword ptr qword_780EB0+4
.text:0040ADE8                 mov     dword ptr [ebp+var_8], eax
.text:0040ADEB                 or      eax, edx
.text:0040ADED                 mov     dword ptr [ebp+var_8+4], edx
.text:0040ADF0                 jz      loc_40AE99
.text:0040ADF6
.text:0040ADF6 loc_40ADF6:                             ; CODE XREF: sub_40AC20+273j
.text:0040ADF6                 mov     eax, dword ptr [ebp+var_8]
.text:0040ADF9                 test    eax, eax
.text:0040ADFB                 jz      short loc_40AE02
.text:0040ADFD                 bsf     eax, eax
.text:0040AE00                 jmp     short loc_40AE09
.text:0040AE02 ; ---------------------------------------------------------------------------
.text:0040AE02
.text:0040AE02 loc_40AE02:                             ; CODE XREF: sub_40AC20+1DBj
.text:0040AE02                 bsf     eax, dword ptr [ebp+var_8+4]
.text:0040AE06                 add     eax, 20h
.text:0040AE09
.text:0040AE09 loc_40AE09:                             ; CODE XREF: sub_40AC20+1E0j
.text:0040AE09                 mov     edx, dword_5F7720[eax*8]
.text:0040AE10                 and     edx, [ebp+arg_0]
.text:0040AE13                 mov     esi, dword_5F7724[eax*8]
.text:0040AE1A                 and     esi, ebx
.text:0040AE1C                 mov     edi, edx
.text:0040AE1E                 or      edi, esi
.text:0040AE20                 mov     [ebp+var_10], edx
.text:0040AE23                 mov     [ebp+var_C], esi
.text:0040AE26                 jz      short loc_40AE77
.text:0040AE28                 mov     edi, eax
.text:0040AE2A                 shl     edi, 6
.text:0040AE2D                 lea     ecx, [ecx+0]
.text:0040AE30
.text:0040AE30 loc_40AE30:                             ; CODE XREF: sub_40AC20+252j
.text:0040AE30                 mov     eax, [ebp+var_10]
.text:0040AE33                 test    eax, eax
.text:0040AE35                 jz      short loc_40AE3C
.text:0040AE37                 bsf     eax, eax
.text:0040AE3A                 jmp     short loc_40AE43
.text:0040AE3C ; ---------------------------------------------------------------------------
.text:0040AE3C
.text:0040AE3C loc_40AE3C:                             ; CODE XREF: sub_40AC20+215j
.text:0040AE3C                 bsf     eax, [ebp+var_C]
.text:0040AE40                 add     eax, 20h
.text:0040AE43
.text:0040AE43 loc_40AE43:                             ; CODE XREF: sub_40AC20+21Aj
.text:0040AE43                 movzx   ebx, byte_780E20[eax]
.text:0040AE4A                 mov     ebx, dword_4491D8[ebx*4]
.text:0040AE51                 or      ebx, edi
.text:0040AE53                 or      ebx, eax
.text:0040AE55                 mov     [ecx], ebx
.text:0040AE57                 mov     eax, edx
.text:0040AE59                 add     ecx, 4
.text:0040AE5C                 add     eax, 0FFFFFFFFh
.text:0040AE5F                 mov     ebx, esi
.text:0040AE61                 adc     ebx, 0FFFFFFFFh
.text:0040AE64                 and     edx, eax
.text:0040AE66                 and     esi, ebx
.text:0040AE68                 mov     eax, edx
.text:0040AE6A                 or      eax, esi
.text:0040AE6C                 mov     [ebp+var_10], edx
.text:0040AE6F                 mov     [ebp+var_C], esi
.text:0040AE72                 jnz     short loc_40AE30
.text:0040AE74                 mov     ebx, [ebp+arg_4]
.text:0040AE77
.text:0040AE77 loc_40AE77:                             ; CODE XREF: sub_40AC20+206j
.text:0040AE77                 mov     eax, dword ptr [ebp+var_8]
.text:0040AE7A                 mov     edx, dword ptr [ebp+var_8+4]
.text:0040AE7D                 mov     esi, eax
.text:0040AE7F                 add     esi, 0FFFFFFFFh
.text:0040AE82                 mov     edi, edx
.text:0040AE84                 adc     edi, 0FFFFFFFFh
.text:0040AE87                 and     eax, esi
.text:0040AE89                 and     edx, edi
.text:0040AE8B                 mov     dword ptr [ebp+var_8], eax
.text:0040AE8E                 or      eax, edx
.text:0040AE90                 mov     dword ptr [ebp+var_8+4], edx
.text:0040AE93                 jnz     loc_40ADF6
.text:0040AE99
.text:0040AE99 loc_40AE99:                             ; CODE XREF: sub_40AC20+1D0j
.text:0040AE99                 mov     eax, dword ptr qword_780EC8
.text:0040AE9E                 or      eax, dword ptr qword_780EC0
.text:0040AEA4                 mov     edx, dword ptr qword_780EC8+4
.text:0040AEAA                 or      edx, dword ptr qword_780EC0+4
.text:0040AEB0                 mov     dword ptr [ebp+var_8], eax
.text:0040AEB3                 or      eax, edx
.text:0040AEB5                 mov     dword ptr [ebp+var_8+4], edx
.text:0040AEB8                 jz      loc_40AFAF
.text:0040AEBE                 mov     edi, edi
.text:0040AEC0
.text:0040AEC0 loc_40AEC0:                             ; CODE XREF: sub_40AC20+389j
.text:0040AEC0                 mov     eax, dword ptr [ebp+var_8]
.text:0040AEC3                 test    eax, eax
.text:0040AEC5                 jz      short loc_40AECC
.text:0040AEC7                 bsf     eax, eax
.text:0040AECA                 jmp     short loc_40AED3
.text:0040AECC ; ---------------------------------------------------------------------------
.text:0040AECC
.text:0040AECC loc_40AECC:                             ; CODE XREF: sub_40AC20+2A5j
.text:0040AECC                 bsf     eax, dword ptr [ebp+var_8+4]
.text:0040AED0                 add     eax, 20h
.text:0040AED3
.text:0040AED3 loc_40AED3:                             ; CODE XREF: sub_40AC20+2AAj
.text:0040AED3                 movd    xmm1, dword_73F120[eax*4]
.text:0040AEDC                 movq    xmm0, qword_780EF8
.text:0040AEE4                 psrlq   xmm0, xmm1
.text:0040AEE8                 movd    xmm1, dword_73F020[eax*4]
.text:0040AEF1                 movd    esi, xmm0
.text:0040AEF5                 movq    xmm0, qword_780EF0
.text:0040AEFD                 and     esi, 3Fh
.text:0040AF00                 mov     edx, eax
.text:0040AF02                 shl     edx, 6
.text:0040AF05                 add     esi, edx
.text:0040AF07                 psrlq   xmm0, xmm1
.text:0040AF0B                 movd    edi, xmm0
.text:0040AF0F                 and     edi, 3Fh
.text:0040AF12                 add     edi, edx
.text:0040AF14                 mov     edx, dword_723C80[esi*8]
.text:0040AF1B                 or      edx, dword_71BC80[edi*8]
.text:0040AF22                 mov     esi, dword_723C84[esi*8]
.text:0040AF29                 or      esi, dword_71BC84[edi*8]
.text:0040AF30                 and     edx, [ebp+arg_0]
.text:0040AF33                 and     esi, ebx
.text:0040AF35                 mov     edi, edx
.text:0040AF37                 or      edi, esi
.text:0040AF39                 mov     [ebp+var_10], edx
.text:0040AF3C                 mov     [ebp+var_C], esi
.text:0040AF3F                 jz      short loc_40AF8D
.text:0040AF41                 mov     edi, eax
.text:0040AF43                 shl     edi, 6
.text:0040AF46
.text:0040AF46 loc_40AF46:                             ; CODE XREF: sub_40AC20+368j
.text:0040AF46                 mov     eax, [ebp+var_10]
.text:0040AF49                 test    eax, eax
.text:0040AF4B                 jz      short loc_40AF52
.text:0040AF4D                 bsf     eax, eax
.text:0040AF50                 jmp     short loc_40AF59
.text:0040AF52 ; ---------------------------------------------------------------------------
.text:0040AF52
.text:0040AF52 loc_40AF52:                             ; CODE XREF: sub_40AC20+32Bj
.text:0040AF52                 bsf     eax, [ebp+var_C]
.text:0040AF56                 add     eax, 20h
.text:0040AF59
.text:0040AF59 loc_40AF59:                             ; CODE XREF: sub_40AC20+330j
.text:0040AF59                 movzx   ebx, byte_780E20[eax]
.text:0040AF60                 mov     ebx, dword_449258[ebx*4]
.text:0040AF67                 or      ebx, edi
.text:0040AF69                 or      ebx, eax
.text:0040AF6B                 mov     [ecx], ebx
.text:0040AF6D                 mov     eax, edx
.text:0040AF6F                 add     ecx, 4
.text:0040AF72                 add     eax, 0FFFFFFFFh
.text:0040AF75                 mov     ebx, esi
.text:0040AF77                 adc     ebx, 0FFFFFFFFh
.text:0040AF7A                 and     edx, eax
.text:0040AF7C                 and     esi, ebx
.text:0040AF7E                 mov     eax, edx
.text:0040AF80                 or      eax, esi
.text:0040AF82                 mov     [ebp+var_10], edx
.text:0040AF85                 mov     [ebp+var_C], esi
.text:0040AF88                 jnz     short loc_40AF46
.text:0040AF8A                 mov     ebx, [ebp+arg_4]
.text:0040AF8D
.text:0040AF8D loc_40AF8D:                             ; CODE XREF: sub_40AC20+31Fj
.text:0040AF8D                 mov     eax, dword ptr [ebp+var_8]
.text:0040AF90                 mov     edx, dword ptr [ebp+var_8+4]
.text:0040AF93                 mov     esi, eax
.text:0040AF95                 add     esi, 0FFFFFFFFh
.text:0040AF98                 mov     edi, edx
.text:0040AF9A                 adc     edi, 0FFFFFFFFh
.text:0040AF9D                 and     eax, esi
.text:0040AF9F                 and     edx, edi
.text:0040AFA1                 mov     dword ptr [ebp+var_8], eax
.text:0040AFA4                 or      eax, edx
.text:0040AFA6                 mov     dword ptr [ebp+var_8+4], edx
.text:0040AFA9                 jnz     loc_40AEC0
.text:0040AFAF
.text:0040AFAF loc_40AFAF:                             ; CODE XREF: sub_40AC20+298j
.text:0040AFAF                 mov     eax, dword ptr qword_780ED0
.text:0040AFB4                 mov     edx, dword ptr qword_780ED0+4
.text:0040AFBA                 mov     dword ptr [ebp+var_8], eax
.text:0040AFBD                 or      eax, edx
.text:0040AFBF                 mov     dword ptr [ebp+var_8+4], edx
.text:0040AFC2                 jz      loc_40B0B9
.text:0040AFC8
.text:0040AFC8 loc_40AFC8:                             ; CODE XREF: sub_40AC20+493j
.text:0040AFC8                 mov     eax, dword ptr [ebp+var_8]
.text:0040AFCB                 test    eax, eax
.text:0040AFCD                 jz      short loc_40AFD4
.text:0040AFCF                 bsf     eax, eax
.text:0040AFD2                 jmp     short loc_40AFDB
.text:0040AFD4 ; ---------------------------------------------------------------------------
.text:0040AFD4
.text:0040AFD4 loc_40AFD4:                             ; CODE XREF: sub_40AC20+3ADj
.text:0040AFD4                 bsf     eax, dword ptr [ebp+var_8+4]
.text:0040AFD8                 add     eax, 20h
.text:0040AFDB
.text:0040AFDB loc_40AFDB:                             ; CODE XREF: sub_40AC20+3B2j
.text:0040AFDB                 movd    xmm1, dword_73F320[eax*4]
.text:0040AFE4                 movq    xmm0, qword_780EE8
.text:0040AFEC                 psrlq   xmm0, xmm1
.text:0040AFF0                 movd    xmm1, dword_73F220[eax*4]
.text:0040AFF9                 movd    esi, xmm0
.text:0040AFFD                 movq    xmm0, qword_780EE0
.text:0040B005                 and     esi, 3Fh
.text:0040B008                 mov     edx, eax
.text:0040B00A                 shl     edx, 6
.text:0040B00D                 add     esi, edx
.text:0040B00F                 psrlq   xmm0, xmm1
.text:0040B013                 movd    edi, xmm0
.text:0040B017                 and     edi, 3Fh
.text:0040B01A                 add     edi, edx
.text:0040B01C                 mov     edx, dword_733C80[esi*8]
.text:0040B023                 or      edx, dword_72BC80[edi*8]
.text:0040B02A                 mov     esi, dword_733C84[esi*8]
.text:0040B031                 or      esi, dword_72BC84[edi*8]
.text:0040B038                 and     edx, [ebp+arg_0]
.text:0040B03B                 and     esi, ebx
.text:0040B03D                 mov     edi, edx
.text:0040B03F                 or      edi, esi
.text:0040B041                 mov     [ebp+var_10], edx
.text:0040B044                 mov     [ebp+var_C], esi
.text:0040B047                 jz      short loc_40B097
.text:0040B049                 mov     edi, eax
.text:0040B04B                 shl     edi, 6
.text:0040B04E                 mov     edi, edi
.text:0040B050
.text:0040B050 loc_40B050:                             ; CODE XREF: sub_40AC20+472j
.text:0040B050                 mov     eax, [ebp+var_10]
.text:0040B053                 test    eax, eax
.text:0040B055                 jz      short loc_40B05C
.text:0040B057                 bsf     eax, eax
.text:0040B05A                 jmp     short loc_40B063
.text:0040B05C ; ---------------------------------------------------------------------------
.text:0040B05C
.text:0040B05C loc_40B05C:                             ; CODE XREF: sub_40AC20+435j
.text:0040B05C                 bsf     eax, [ebp+var_C]
.text:0040B060                 add     eax, 20h
.text:0040B063
.text:0040B063 loc_40B063:                             ; CODE XREF: sub_40AC20+43Aj
.text:0040B063                 movzx   ebx, byte_780E20[eax]
.text:0040B06A                 mov     ebx, dword_4492D8[ebx*4]
.text:0040B071                 or      ebx, edi
.text:0040B073                 or      ebx, eax
.text:0040B075                 mov     [ecx], ebx
.text:0040B077                 mov     eax, edx
.text:0040B079                 add     ecx, 4
.text:0040B07C                 add     eax, 0FFFFFFFFh
.text:0040B07F                 mov     ebx, esi
.text:0040B081                 adc     ebx, 0FFFFFFFFh
.text:0040B084                 and     edx, eax
.text:0040B086                 and     esi, ebx
.text:0040B088                 mov     eax, edx
.text:0040B08A                 or      eax, esi
.text:0040B08C                 mov     [ebp+var_10], edx
.text:0040B08F                 mov     [ebp+var_C], esi
.text:0040B092                 jnz     short loc_40B050
.text:0040B094                 mov     ebx, [ebp+arg_4]
.text:0040B097
.text:0040B097 loc_40B097:                             ; CODE XREF: sub_40AC20+427j
.text:0040B097                 mov     eax, dword ptr [ebp+var_8]
.text:0040B09A                 mov     edx, dword ptr [ebp+var_8+4]
.text:0040B09D                 mov     esi, eax
.text:0040B09F                 add     esi, 0FFFFFFFFh
.text:0040B0A2                 mov     edi, edx
.text:0040B0A4                 adc     edi, 0FFFFFFFFh
.text:0040B0A7                 and     eax, esi
.text:0040B0A9                 and     edx, edi
.text:0040B0AB                 mov     dword ptr [ebp+var_8], eax
.text:0040B0AE                 or      eax, edx
.text:0040B0B0                 mov     dword ptr [ebp+var_8+4], edx
.text:0040B0B3                 jnz     loc_40AFC8
.text:0040B0B9
.text:0040B0B9 loc_40B0B9:                             ; CODE XREF: sub_40AC20+3A2j
.text:0040B0B9                 mov     eax, dword ptr qword_780ED8
.text:0040B0BE                 mov     edx, dword ptr qword_780ED8+4
.text:0040B0C4                 mov     dword ptr [ebp+var_8], eax
.text:0040B0C7                 or      eax, edx
.text:0040B0C9                 mov     dword ptr [ebp+var_8+4], edx
.text:0040B0CC                 jz      loc_40B21C
.text:0040B0D2
.text:0040B0D2 loc_40B0D2:                             ; CODE XREF: sub_40AC20+5F6j
.text:0040B0D2                 mov     eax, dword ptr [ebp+var_8]
.text:0040B0D5                 test    eax, eax
.text:0040B0D7                 jz      short loc_40B0DE
.text:0040B0D9                 bsf     eax, eax
.text:0040B0DC                 jmp     short loc_40B0E5
.text:0040B0DE ; ---------------------------------------------------------------------------
.text:0040B0DE
.text:0040B0DE loc_40B0DE:                             ; CODE XREF: sub_40AC20+4B7j
.text:0040B0DE                 bsf     eax, dword ptr [ebp+var_8+4]
.text:0040B0E2                 add     eax, 20h
.text:0040B0E5
.text:0040B0E5 loc_40B0E5:                             ; CODE XREF: sub_40AC20+4BCj
.text:0040B0E5                 movd    xmm1, dword_73F320[eax*4]
.text:0040B0EE                 movq    xmm0, qword_780EE8
.text:0040B0F6                 psrlq   xmm0, xmm1
.text:0040B0FA                 movd    xmm1, dword_73F220[eax*4]
.text:0040B103                 movd    esi, xmm0
.text:0040B107                 movq    xmm0, qword_780EE0
.text:0040B10F                 and     esi, 3Fh
.text:0040B112                 psrlq   xmm0, xmm1
.text:0040B116                 movd    xmm1, dword_73F120[eax*4]
.text:0040B11F                 mov     edi, eax
.text:0040B121                 shl     edi, 6
.text:0040B124                 add     esi, edi
.text:0040B126                 mov     edx, dword_733C80[esi*8]
.text:0040B12D                 mov     esi, dword_733C84[esi*8]
.text:0040B134                 movd    ebx, xmm0
.text:0040B138                 movq    xmm0, qword_780EF8
.text:0040B140                 and     ebx, 3Fh
.text:0040B143                 add     ebx, edi
.text:0040B145                 or      edx, dword_72BC80[ebx*8]
.text:0040B14C                 or      esi, dword_72BC84[ebx*8]
.text:0040B153                 psrlq   xmm0, xmm1
.text:0040B157                 movd    xmm1, dword_73F020[eax*4]
.text:0040B160                 movd    ebx, xmm0
.text:0040B164                 movq    xmm0, qword_780EF0
.text:0040B16C                 and     ebx, 3Fh
.text:0040B16F                 add     ebx, edi
.text:0040B171                 or      edx, dword_723C80[ebx*8]
.text:0040B178                 or      esi, dword_723C84[ebx*8]
.text:0040B17F                 psrlq   xmm0, xmm1
.text:0040B183                 movd    ebx, xmm0
.text:0040B187                 and     ebx, 3Fh
.text:0040B18A                 add     ebx, edi
.text:0040B18C                 or      edx, dword_71BC80[ebx*8]
.text:0040B193                 or      esi, dword_71BC84[ebx*8]
.text:0040B19A                 and     edx, [ebp+arg_0]
.text:0040B19D                 mov     ebx, [ebp+arg_4]
.text:0040B1A0                 and     esi, ebx
.text:0040B1A2                 mov     edi, edx
.text:0040B1A4                 or      edi, esi
.text:0040B1A6                 mov     [ebp+var_10], edx
.text:0040B1A9                 mov     [ebp+var_C], esi
.text:0040B1AC                 jz      short loc_40B1FA
.text:0040B1AE                 mov     edi, eax
.text:0040B1B0                 shl     edi, 6
.text:0040B1B3
.text:0040B1B3 loc_40B1B3:                             ; CODE XREF: sub_40AC20+5D5j
.text:0040B1B3                 mov     eax, [ebp+var_10]
.text:0040B1B6                 test    eax, eax
.text:0040B1B8                 jz      short loc_40B1BF
.text:0040B1BA                 bsf     eax, eax
.text:0040B1BD                 jmp     short loc_40B1C6
.text:0040B1BF ; ---------------------------------------------------------------------------
.text:0040B1BF
.text:0040B1BF loc_40B1BF:                             ; CODE XREF: sub_40AC20+598j
.text:0040B1BF                 bsf     eax, [ebp+var_C]
.text:0040B1C3                 add     eax, 20h
.text:0040B1C6
.text:0040B1C6 loc_40B1C6:                             ; CODE XREF: sub_40AC20+59Dj
.text:0040B1C6                 movzx   ebx, byte_780E20[eax]
.text:0040B1CD                 mov     ebx, dword_449318[ebx*4]
.text:0040B1D4                 or      ebx, edi
.text:0040B1D6                 or      ebx, eax
.text:0040B1D8                 mov     [ecx], ebx
.text:0040B1DA                 mov     eax, edx
.text:0040B1DC                 add     ecx, 4
.text:0040B1DF                 add     eax, 0FFFFFFFFh
.text:0040B1E2                 mov     ebx, esi
.text:0040B1E4                 adc     ebx, 0FFFFFFFFh
.text:0040B1E7                 and     edx, eax
.text:0040B1E9                 and     esi, ebx
.text:0040B1EB                 mov     eax, edx
.text:0040B1ED                 or      eax, esi
.text:0040B1EF                 mov     [ebp+var_10], edx
.text:0040B1F2                 mov     [ebp+var_C], esi
.text:0040B1F5                 jnz     short loc_40B1B3
.text:0040B1F7                 mov     ebx, [ebp+arg_4]
.text:0040B1FA
.text:0040B1FA loc_40B1FA:                             ; CODE XREF: sub_40AC20+58Cj
.text:0040B1FA                 mov     eax, dword ptr [ebp+var_8]
.text:0040B1FD                 mov     edx, dword ptr [ebp+var_8+4]
.text:0040B200                 mov     esi, eax
.text:0040B202                 add     esi, 0FFFFFFFFh
.text:0040B205                 mov     edi, edx
.text:0040B207                 adc     edi, 0FFFFFFFFh
.text:0040B20A                 and     eax, esi
.text:0040B20C                 and     edx, edi
.text:0040B20E                 mov     dword ptr [ebp+var_8], eax
.text:0040B211                 or      eax, edx
.text:0040B213                 mov     dword ptr [ebp+var_8+4], edx
.text:0040B216                 jnz     loc_40B0D2
.text:0040B21C
.text:0040B21C loc_40B21C:                             ; CODE XREF: sub_40AC20+4ACj
.text:0040B21C                 mov     eax, dword_780EB8
.text:0040B221                 test    eax, eax
.text:0040B223                 jz      short loc_40B22A
.text:0040B225                 bsf     eax, eax
.text:0040B228                 jmp     short loc_40B234
.text:0040B22A ; ---------------------------------------------------------------------------
.text:0040B22A
.text:0040B22A loc_40B22A:                             ; CODE XREF: sub_40AC20+603j
.text:0040B22A                 bsf     eax, dword_780EBC
.text:0040B231                 add     eax, 20h
.text:0040B234
.text:0040B234 loc_40B234:                             ; CODE XREF: sub_40AC20+608j
.text:0040B234                 mov     edx, dword_73C700[eax*8]
.text:0040B23B                 and     edx, [ebp+arg_0]
.text:0040B23E                 mov     esi, dword_73C704[eax*8]
.text:0040B245                 and     esi, ebx
.text:0040B247                 mov     edi, edx
.text:0040B249                 or      edi, esi
.text:0040B24B                 mov     [ebp+var_10], edx
.text:0040B24E                 mov     [ebp+var_C], esi
.text:0040B251                 jz      short loc_40B29C
.text:0040B253                 mov     edi, eax
.text:0040B255                 shl     edi, 6
.text:0040B258
.text:0040B258 loc_40B258:                             ; CODE XREF: sub_40AC20+67Aj
.text:0040B258                 mov     eax, [ebp+var_10]
.text:0040B25B                 test    eax, eax
.text:0040B25D                 jz      short loc_40B264
.text:0040B25F                 bsf     eax, eax
.text:0040B262                 jmp     short loc_40B26B
.text:0040B264 ; ---------------------------------------------------------------------------
.text:0040B264
.text:0040B264 loc_40B264:                             ; CODE XREF: sub_40AC20+63Dj
.text:0040B264                 bsf     eax, [ebp+var_C]
.text:0040B268                 add     eax, 20h
.text:0040B26B
.text:0040B26B loc_40B26B:                             ; CODE XREF: sub_40AC20+642j
.text:0040B26B                 movzx   ebx, byte_780E20[eax]
.text:0040B272                 mov     ebx, dword_449218[ebx*4]
.text:0040B279                 or      ebx, edi
.text:0040B27B                 or      ebx, eax
.text:0040B27D                 mov     [ecx], ebx
.text:0040B27F                 mov     eax, edx
.text:0040B281                 add     ecx, 4
.text:0040B284                 add     eax, 0FFFFFFFFh
.text:0040B287                 mov     ebx, esi
.text:0040B289                 adc     ebx, 0FFFFFFFFh
.text:0040B28C                 and     edx, eax
.text:0040B28E                 and     esi, ebx
.text:0040B290                 mov     eax, edx
.text:0040B292                 or      eax, esi
.text:0040B294                 mov     [ebp+var_10], edx
.text:0040B297                 mov     [ebp+var_C], esi
.text:0040B29A                 jnz     short loc_40B258
.text:0040B29C
.text:0040B29C loc_40B29C:                             ; CODE XREF: sub_40AC20+BFj
.text:0040B29C                                         ; sub_40AC20+631j
.text:0040B29C                 mov     eax, dword ptr qword_780EA8
.text:0040B2A1                 and     eax, 0FF00h
.text:0040B2A6                 xor     edx, edx
.text:0040B2A8                 mov     dword ptr [ebp+var_8], eax
.text:0040B2AB                 or      eax, edx
.text:0040B2AD                 mov     dword ptr [ebp+var_8+4], edx
.text:0040B2B0                 jz      loc_40B44C
.text:0040B2B6
.text:0040B2B6 loc_40B2B6:                             ; CODE XREF: sub_40AC20+826j
.text:0040B2B6                 mov     eax, dword ptr [ebp+var_8]
.text:0040B2B9                 test    eax, eax
.text:0040B2BB                 jz      short loc_40B2C2
.text:0040B2BD                 bsf     eax, eax
.text:0040B2C0                 jmp     short loc_40B2C9
.text:0040B2C2 ; ---------------------------------------------------------------------------
.text:0040B2C2
.text:0040B2C2 loc_40B2C2:                             ; CODE XREF: sub_40AC20+69Bj
.text:0040B2C2                 bsf     eax, dword ptr [ebp+var_8+4]
.text:0040B2C6                 add     eax, 20h
.text:0040B2C9
.text:0040B2C9 loc_40B2C9:                             ; CODE XREF: sub_40AC20+6A0j
.text:0040B2C9                 lea     esi, [eax-8]
.text:0040B2CC                 cmp     byte_780E20[esi], 0
.text:0040B2D3                 jnz     short loc_40B317
.text:0040B2D5                 mov     edx, eax
.text:0040B2D7                 or      edx, 0FF6001C0h
.text:0040B2DD                 shl     edx, 6
.text:0040B2E0                 or      edx, esi
.text:0040B2E2                 mov     [ecx], edx
.text:0040B2E4                 mov     edx, dword_5F7720[esi*8]
.text:0040B2EB                 mov     edi, dword_5F7724[esi*8]
.text:0040B2F2                 and     edx, dword_780E78
.text:0040B2F8                 and     edi, dword_780E7C
.text:0040B2FE                 add     ecx, 4
.text:0040B301                 or      edx, edi
.text:0040B303                 jz      short loc_40B317
.text:0040B305                 mov     edx, eax
.text:0040B307                 or      edx, 0FF080100h
.text:0040B30D                 shl     edx, 6
.text:0040B310                 or      edx, esi
.text:0040B312                 mov     [ecx], edx
.text:0040B314                 add     ecx, 4
.text:0040B317
.text:0040B317 loc_40B317:                             ; CODE XREF: sub_40AC20+6B3j
.text:0040B317                                         ; sub_40AC20+6E3j
.text:0040B317                 lea     esi, [eax-9]
.text:0040B31A                 cmp     eax, 8
.text:0040B31D                 jz      loc_40B3A2
.text:0040B323                 mov     edx, dword_5F5FC0[esi*8]
.text:0040B32A                 mov     edi, dword_5F5FC4[esi*8]
.text:0040B331                 and     edx, [ebp+arg_0]
.text:0040B334                 and     edi, [ebp+arg_4]
.text:0040B337                 or      edx, edi
.text:0040B339                 jz      short loc_40B3A2
.text:0040B33B                 movzx   ebx, byte_780E20[esi]
.text:0040B342                 mov     edi, dword_449198[ebx*4]
.text:0040B349                 mov     edx, eax
.text:0040B34B                 or      edx, 1C0h
.text:0040B351                 shl     edx, 6
.text:0040B354                 add     edi, 28000000h
.text:0040B35A                 or      edx, edi
.text:0040B35C                 or      edx, esi
.text:0040B35E                 mov     [ecx], edx
.text:0040B360                 mov     edx, dword_5F7720[esi*8]
.text:0040B367                 mov     edi, dword_5F7724[esi*8]
.text:0040B36E                 and     edx, dword_780E78
.text:0040B374                 and     edi, dword_780E7C
.text:0040B37A                 add     ecx, 4
.text:0040B37D                 or      edx, edi
.text:0040B37F                 jz      short loc_40B3A2
.text:0040B381                 mov     edi, dword_449198[ebx*4]
.text:0040B388                 mov     edx, eax
.text:0040B38A                 or      edx, 100h
.text:0040B390                 shl     edx, 6
.text:0040B393                 add     edi, 1A000000h
.text:0040B399                 or      edx, edi
.text:0040B39B                 or      edx, esi
.text:0040B39D                 mov     [ecx], edx
.text:0040B39F                 add     ecx, 4
.text:0040B3A2
.text:0040B3A2 loc_40B3A2:                             ; CODE XREF: sub_40AC20+6FDj
.text:0040B3A2                                         ; sub_40AC20+719j ...
.text:0040B3A2                 lea     esi, [eax-7]
.text:0040B3A5                 cmp     eax, 0Fh
.text:0040B3A8                 jz      loc_40B42A
.text:0040B3AE                 mov     edx, dword_5F5FC0[esi*8]
.text:0040B3B5                 mov     edi, dword_5F5FC4[esi*8]
.text:0040B3BC                 and     edx, [ebp+arg_0]
.text:0040B3BF                 and     edi, [ebp+arg_4]
.text:0040B3C2                 or      edx, edi
.text:0040B3C4                 jz      short loc_40B42A
.text:0040B3C6                 movzx   ebx, byte_780E20[esi]
.text:0040B3CD                 mov     edi, dword_449198[ebx*4]
.text:0040B3D4                 mov     edx, eax
.text:0040B3D6                 or      edx, 1C0h
.text:0040B3DC                 shl     edx, 6
.text:0040B3DF                 add     edi, 28000000h
.text:0040B3E5                 or      edx, edi
.text:0040B3E7                 or      edx, esi
.text:0040B3E9                 mov     [ecx], edx
.text:0040B3EB                 mov     edx, dword_5F7720[esi*8]
.text:0040B3F2                 mov     edi, dword_5F7724[esi*8]
.text:0040B3F9                 and     edx, dword_780E78
.text:0040B3FF                 and     edi, dword_780E7C
.text:0040B405                 add     ecx, 4
.text:0040B408                 or      edx, edi
.text:0040B40A                 jz      short loc_40B42A
.text:0040B40C                 mov     edx, dword_449198[ebx*4]
.text:0040B413                 or      eax, 100h
.text:0040B418                 shl     eax, 6
.text:0040B41B                 add     edx, 1A000000h
.text:0040B421                 or      eax, edx
.text:0040B423                 or      eax, esi
.text:0040B425                 mov     [ecx], eax
.text:0040B427                 add     ecx, 4
.text:0040B42A
.text:0040B42A loc_40B42A:                             ; CODE XREF: sub_40AC20+788j
.text:0040B42A                                         ; sub_40AC20+7A4j ...
.text:0040B42A                 mov     eax, dword ptr [ebp+var_8]
.text:0040B42D                 mov     edx, dword ptr [ebp+var_8+4]
.text:0040B430                 mov     esi, eax
.text:0040B432                 add     esi, 0FFFFFFFFh
.text:0040B435                 mov     edi, edx
.text:0040B437                 adc     edi, 0FFFFFFFFh
.text:0040B43A                 and     eax, esi
.text:0040B43C                 and     edx, edi
.text:0040B43E                 mov     dword ptr [ebp+var_8], eax
.text:0040B441                 or      eax, edx
.text:0040B443                 mov     dword ptr [ebp+var_8+4], edx
.text:0040B446                 jnz     loc_40B2B6
.text:0040B44C
.text:0040B44C loc_40B44C:                             ; CODE XREF: sub_40AC20+690j
.text:0040B44C                 pop     edi
.text:0040B44D                 pop     esi
.text:0040B44E                 mov     eax, ecx
.text:0040B450                 mov     dword ptr [ecx], 0
.text:0040B456                 pop     ebx
.text:0040B457                 mov     esp, ebp
.text:0040B459                 pop     ebp
.text:0040B45A                 retn
.text:0040B45A sub_40AC20      endp
Houdini w32 1_CPU
build 2010-05-15
by Robert Houdart*

Code: Select all

.text:0040A6E0 sub_40A6E0      proc near               ; CODE XREF: sub_411C80+5Bp
.text:0040A6E0                                         ; sub_411C80+24Dp ...
.text:0040A6E0
.text:0040A6E0 var_18          = dword ptr -18h
.text:0040A6E0 var_C           = dword ptr -0Ch
.text:0040A6E0 var_8           = dword ptr -8
.text:0040A6E0 arg_0           = dword ptr  4
.text:0040A6E0 arg_4           = dword ptr  8
.text:0040A6E0
.text:0040A6E0                 mov     ecx, dword_5854F0
.text:0040A6E6                 movzx   ecx, byte ptr [ecx+1Ah]
.text:0040A6EA                 sub     esp, 18h
.text:0040A6ED                 push    ebx
.text:0040A6EE                 push    ebp
.text:0040A6EF                 push    esi
.text:0040A6F0                 mov     esi, dword ptr qword_585468
.text:0040A6F6                 push    edi
.text:0040A6F7                 test    ecx, ecx
.text:0040A6F9                 jz      loc_40A797
.text:0040A6FF                 mov     edi, dword ptr qword_585468+4
.text:0040A705                 mov     edx, esi
.text:0040A707                 and     edx, 0FEFEFEFEh
.text:0040A70D                 and     edi, 0FEFEFEh
.text:0040A713                 shld    edi, edx, 7
.text:0040A717                 and     edi, dword ptr (qword_828A78+4)[ecx*8]
.text:0040A71E                 shl     edx, 7
.text:0040A721                 and     edx, dword ptr qword_828A78[ecx*8]
.text:0040A728                 or      edx, edi
.text:0040A72A                 jz      short loc_40A74B
.text:0040A72C                 lea     edx, [ecx-7]
.text:0040A72F                 shl     edx, 6
.text:0040A732                 add     edx, ecx
.text:0040A734                 or      edx, dword_9313F4
.text:0040A73A                 or      edx, 3000h
.text:0040A740                 mov     [eax], edx
.text:0040A742                 mov     esi, dword ptr qword_585468
.text:0040A748                 add     eax, 4
.text:0040A74B
.text:0040A74B loc_40A74B:                             ; CODE XREF: sub_40A6E0+4Aj
.text:0040A74B                 mov     edi, dword ptr qword_585468+4
.text:0040A751                 mov     edx, esi
.text:0040A753                 and     edx, 7F7F7F7Fh
.text:0040A759                 and     edi, 0FFFF7F7Fh
.text:0040A75F                 shld    edi, edx, 9
.text:0040A763                 and     edi, dword ptr (qword_828A78+4)[ecx*8]
.text:0040A76A                 shl     edx, 9
.text:0040A76D                 and     edx, dword ptr qword_828A78[ecx*8]
.text:0040A774                 or      edx, edi
.text:0040A776                 jz      short loc_40A797
.text:0040A778                 lea     edx, [ecx-9]
.text:0040A77B                 shl     edx, 6
.text:0040A77E                 add     edx, ecx
.text:0040A780                 or      edx, dword_9313F4
.text:0040A786                 or      edx, 3000h
.text:0040A78C                 mov     [eax], edx
.text:0040A78E                 mov     esi, dword ptr qword_585468
.text:0040A794                 add     eax, 4
.text:0040A797
.text:0040A797 loc_40A797:                             ; CODE XREF: sub_40A6E0+19j
.text:0040A797                                         ; sub_40A6E0+96j
.text:0040A797                 mov     edx, dword_5854F0
.text:0040A79D                 mov     ecx, [edx+20h]
.text:0040A7A0                 mov     edx, [edx+24h]
.text:0040A7A3                 and     ecx, [esp+28h+arg_0]
.text:0040A7A7                 and     edx, [esp+28h+arg_4]
.text:0040A7AB                 or      ecx, edx
.text:0040A7AD                 jz      loc_40AC0C
.text:0040A7B3                 mov     edi, dword ptr qword_585468+4
.text:0040A7B9                 mov     ebp, [esp+28h+arg_0]
.text:0040A7BD                 mov     ecx, esi
.text:0040A7BF                 and     ecx, 0FEFEFEFEh
.text:0040A7C5                 and     edi, 0FEFEh
.text:0040A7CB                 shld    edi, ecx, 7
.text:0040A7CF                 shl     ecx, 7
.text:0040A7D2                 mov     edx, ecx
.text:0040A7D4                 mov     ecx, edi
.text:0040A7D6                 and     ecx, [esp+28h+arg_4]
.text:0040A7DA                 and     edx, ebp
.text:0040A7DC                 mov     edi, edx
.text:0040A7DE                 or      edi, ecx
.text:0040A7E0                 jz      short loc_40A826
.text:0040A7E2
.text:0040A7E2 loc_40A7E2:                             ; CODE XREF: sub_40A6E0+13Ej
.text:0040A7E2                 bsf     esi, edx
.text:0040A7E5                 jnz     short loc_40A7F1
.text:0040A7E7                 bsf     esi, ecx
.text:0040A7EA                 mov     [esp+28h+var_18], esi
.text:0040A7EE                 add     esi, 20h
.text:0040A7F1
.text:0040A7F1 loc_40A7F1:                             ; CODE XREF: sub_40A6E0+105j
.text:0040A7F1                 mov     edi, edx
.text:0040A7F3                 add     edi, 0FFFFFFFFh
.text:0040A7F6                 mov     ebx, ecx
.text:0040A7F8                 adc     ebx, 0FFFFFFFFh
.text:0040A7FB                 and     ecx, ebx
.text:0040A7FD                 lea     ebx, [esi-7]
.text:0040A800                 and     edx, edi
.text:0040A802                 movzx   edi, byte_585380[esi]
.text:0040A809                 shl     ebx, 6
.text:0040A80C                 add     ebx, esi
.text:0040A80E                 or      ebx, dword_9313D0[edi*4]
.text:0040A815                 mov     esi, edx
.text:0040A817                 mov     [eax], ebx
.text:0040A819                 add     eax, 4
.text:0040A81C                 or      esi, ecx
.text:0040A81E                 jnz     short loc_40A7E2
.text:0040A820                 mov     esi, dword ptr qword_585468
.text:0040A826
.text:0040A826 loc_40A826:                             ; CODE XREF: sub_40A6E0+100j
.text:0040A826                 mov     ecx, dword ptr qword_585468+4
.text:0040A82C                 and     esi, 7F7F7F7Fh
.text:0040A832                 and     ecx, 7F7Fh
.text:0040A838                 shld    ecx, esi, 9
.text:0040A83C                 and     ecx, [esp+28h+arg_4]
.text:0040A840                 shl     esi, 9
.text:0040A843                 mov     edx, esi
.text:0040A845                 and     edx, ebp
.text:0040A847                 mov     esi, edx
.text:0040A849                 or      esi, ecx
.text:0040A84B                 jz      short loc_40A88B
.text:0040A84D
.text:0040A84D loc_40A84D:                             ; CODE XREF: sub_40A6E0+1A9j
.text:0040A84D                 bsf     esi, edx
.text:0040A850                 jnz     short loc_40A85C
.text:0040A852                 bsf     esi, ecx
.text:0040A855                 mov     [esp+28h+var_18], esi
.text:0040A859                 add     esi, 20h
.text:0040A85C
.text:0040A85C loc_40A85C:                             ; CODE XREF: sub_40A6E0+170j
.text:0040A85C                 mov     edi, edx
.text:0040A85E                 add     edi, 0FFFFFFFFh
.text:0040A861                 mov     ebx, ecx
.text:0040A863                 adc     ebx, 0FFFFFFFFh
.text:0040A866                 and     ecx, ebx
.text:0040A868                 lea     ebx, [esi-9]
.text:0040A86B                 and     edx, edi
.text:0040A86D                 movzx   edi, byte_585380[esi]
.text:0040A874                 shl     ebx, 6
.text:0040A877                 add     ebx, esi
.text:0040A879                 or      ebx, dword_9313D0[edi*4]
.text:0040A880                 mov     esi, edx
.text:0040A882                 mov     [eax], ebx
.text:0040A884                 add     eax, 4
.text:0040A887                 or      esi, ecx
.text:0040A889                 jnz     short loc_40A84D
.text:0040A88B
.text:0040A88B loc_40A88B:                             ; CODE XREF: sub_40A6E0+16Bj
.text:0040A88B                 cmp     byte_585401, 0FFh
.text:0040A892                 mov     edi, offset byte_585401
.text:0040A897                 jz      short loc_40A90C
.text:0040A899                 lea     esp, [esp+0]
.text:0040A8A0
.text:0040A8A0 loc_40A8A0:                             ; CODE XREF: sub_40A6E0+22Aj
.text:0040A8A0                 movzx   esi, byte ptr [edi]
.text:0040A8A3                 mov     edx, dword_8F2178[esi*8]
.text:0040A8AA                 mov     ecx, dword_8F217C[esi*8]
.text:0040A8B1                 and     ecx, [esp+28h+arg_4]
.text:0040A8B5                 and     edx, ebp
.text:0040A8B7                 inc     edi
.text:0040A8B8                 mov     ebx, edx
.text:0040A8BA                 or      ebx, ecx
.text:0040A8BC                 mov     [esp+28h+var_C], edi
.text:0040A8C0                 jz      short loc_40A907
.text:0040A8C2                 shl     esi, 6
.text:0040A8C5                 mov     edi, esi
.text:0040A8C7
.text:0040A8C7 loc_40A8C7:                             ; CODE XREF: sub_40A6E0+21Dj
.text:0040A8C7                 bsf     esi, edx
.text:0040A8CA                 jnz     short loc_40A8D6
.text:0040A8CC                 bsf     esi, ecx
.text:0040A8CF                 mov     [esp+28h+var_18], esi
.text:0040A8D3                 add     esi, 20h
.text:0040A8D6
.text:0040A8D6 loc_40A8D6:                             ; CODE XREF: sub_40A6E0+1EAj
.text:0040A8D6                 mov     ebx, edx
.text:0040A8D8                 add     ebx, 0FFFFFFFFh
.text:0040A8DB                 mov     ebp, ecx
.text:0040A8DD                 adc     ebp, 0FFFFFFFFh
.text:0040A8E0                 and     edx, ebx
.text:0040A8E2                 movzx   ebx, byte_585380[esi]
.text:0040A8E9                 add     esi, edi
.text:0040A8EB                 or      esi, dword_931410[ebx*4]
.text:0040A8F2                 and     ecx, ebp
.text:0040A8F4                 mov     [eax], esi
.text:0040A8F6                 mov     esi, edx
.text:0040A8F8                 add     eax, 4
.text:0040A8FB                 or      esi, ecx
.text:0040A8FD                 jnz     short loc_40A8C7
.text:0040A8FF                 mov     ebp, [esp+28h+arg_0]
.text:0040A903                 mov     edi, [esp+28h+var_C]
.text:0040A907
.text:0040A907 loc_40A907:                             ; CODE XREF: sub_40A6E0+1E0j
.text:0040A907                 cmp     byte ptr [edi], 0FFh
.text:0040A90A                 jnz     short loc_40A8A0
.text:0040A90C
.text:0040A90C loc_40A90C:                             ; CODE XREF: sub_40A6E0+1B7j
.text:0040A90C                 cmp     byte_58540C, 0FFh
.text:0040A913                 mov     ebx, offset byte_58540C
.text:0040A918                 jz      loc_40A9CC
.text:0040A91E                 mov     edi, edi
.text:0040A920
.text:0040A920 loc_40A920:                             ; CODE XREF: sub_40A6E0+2E6j
.text:0040A920                 movzx   esi, byte ptr [ebx]
.text:0040A923                 mov     ecx, dword_926270[esi*8]
.text:0040A92A                 and     ecx, dword ptr qword_5854E0
.text:0040A930                 mov     edx, dword_926274[esi*8]
.text:0040A937                 and     edx, dword ptr qword_5854E0+4
.text:0040A93D                 mov     edi, ds:dword_438B00[esi*8]
.text:0040A944                 imul    edx, ds:dword_438B04[esi*8]
.text:0040A94C                 imul    edi, ecx
.text:0040A94F                 mov     ecx, ds:dword_438F00[esi*4]
.text:0040A956                 xor     edx, edi
.text:0040A958                 shr     edx, cl
.text:0040A95A                 inc     ebx
.text:0040A95B                 add     edx, dword_8F2378[esi*4]
.text:0040A962                 mov     edi, dword_926D00[edx*8]
.text:0040A969                 mov     ecx, dword_926D04[edx*8]
.text:0040A970                 and     ecx, [esp+28h+arg_4]
.text:0040A974                 and     edi, ebp
.text:0040A976                 mov     edx, edi
.text:0040A978                 or      edx, ecx
.text:0040A97A                 jz      short loc_40A9C3
.text:0040A97C                 shl     esi, 6
.text:0040A97F                 mov     [esp+28h+var_18], esi
.text:0040A983
.text:0040A983 loc_40A983:                             ; CODE XREF: sub_40A6E0+2DDj
.text:0040A983                 bsf     edx, edi
.text:0040A986                 jnz     short loc_40A992
.text:0040A988                 bsf     edx, ecx
.text:0040A98B                 mov     [esp+28h+var_C], edx
.text:0040A98F                 add     edx, 20h
.text:0040A992
.text:0040A992 loc_40A992:                             ; CODE XREF: sub_40A6E0+2A6j
.text:0040A992                 mov     esi, edi
.text:0040A994                 add     esi, 0FFFFFFFFh
.text:0040A997                 mov     ebp, ecx
.text:0040A999                 adc     ebp, 0FFFFFFFFh
.text:0040A99C                 and     ecx, ebp
.text:0040A99E                 mov     ebp, [esp+28h+var_18]
.text:0040A9A2                 and     edi, esi
.text:0040A9A4                 movzx   esi, byte_585380[edx]
.text:0040A9AB                 add     ebp, edx
.text:0040A9AD                 or      ebp, dword_931490[esi*4]
.text:0040A9B4                 mov     edx, edi
.text:0040A9B6                 mov     [eax], ebp
.text:0040A9B8                 add     eax, 4
.text:0040A9BB                 or      edx, ecx
.text:0040A9BD                 jnz     short loc_40A983
.text:0040A9BF                 mov     ebp, [esp+28h+arg_0]
.text:0040A9C3
.text:0040A9C3 loc_40A9C3:                             ; CODE XREF: sub_40A6E0+29Aj
.text:0040A9C3                 cmp     byte ptr [ebx], 0FFh
.text:0040A9C6                 jnz     loc_40A920
.text:0040A9CC
.text:0040A9CC loc_40A9CC:                             ; CODE XREF: sub_40A6E0+238j
.text:0040A9CC                 cmp     byte_585417, 0FFh
.text:0040A9D3                 mov     ebx, offset byte_585417
.text:0040A9D8                 jz      loc_40AA8C
.text:0040A9DE                 mov     edi, edi
.text:0040A9E0
.text:0040A9E0 loc_40A9E0:                             ; CODE XREF: sub_40A6E0+3A6j
.text:0040A9E0                 movzx   esi, byte ptr [ebx]
.text:0040A9E3                 mov     ecx, dword_829CB8[esi*8]
.text:0040A9EA                 and     ecx, dword ptr qword_5854E0
.text:0040A9F0                 mov     edx, dword_829CBC[esi*8]
.text:0040A9F7                 and     edx, dword ptr qword_5854E0+4
.text:0040A9FD                 mov     edi, ds:dword_438D00[esi*8]
.text:0040AA04                 imul    edx, ds:dword_438D04[esi*8]
.text:0040AA0C                 imul    edi, ecx
.text:0040AA0F                 mov     ecx, ds:dword_439000[esi*4]
.text:0040AA16                 xor     edx, edi
.text:0040AA18                 shr     edx, cl
.text:0040AA1A                 inc     ebx
.text:0040AA1B                 add     edx, dword_8FBB68[esi*4]
.text:0040AA22                 mov     edi, dword_829EF8[edx*8]
.text:0040AA29                 mov     ecx, dword_829EFC[edx*8]
.text:0040AA30                 and     ecx, [esp+28h+arg_4]
.text:0040AA34                 and     edi, ebp
.text:0040AA36                 mov     edx, edi
.text:0040AA38                 or      edx, ecx
.text:0040AA3A                 jz      short loc_40AA83
.text:0040AA3C                 shl     esi, 6
.text:0040AA3F                 mov     [esp+28h+var_18], esi
.text:0040AA43
.text:0040AA43 loc_40AA43:                             ; CODE XREF: sub_40A6E0+39Dj
.text:0040AA43                 bsf     edx, edi
.text:0040AA46                 jnz     short loc_40AA52
.text:0040AA48                 bsf     edx, ecx
.text:0040AA4B                 mov     [esp+28h+var_C], edx
.text:0040AA4F                 add     edx, 20h
.text:0040AA52
.text:0040AA52 loc_40AA52:                             ; CODE XREF: sub_40A6E0+366j
.text:0040AA52                 mov     esi, edi
.text:0040AA54                 add     esi, 0FFFFFFFFh
.text:0040AA57                 mov     ebp, ecx
.text:0040AA59                 adc     ebp, 0FFFFFFFFh
.text:0040AA5C                 and     ecx, ebp
.text:0040AA5E                 mov     ebp, [esp+28h+var_18]
.text:0040AA62                 and     edi, esi
.text:0040AA64                 movzx   esi, byte_585380[edx]
.text:0040AA6B                 add     ebp, edx
.text:0040AA6D                 or      ebp, dword_931510[esi*4]
.text:0040AA74                 mov     edx, edi
.text:0040AA76                 mov     [eax], ebp
.text:0040AA78                 add     eax, 4
.text:0040AA7B                 or      edx, ecx
.text:0040AA7D                 jnz     short loc_40AA43
.text:0040AA7F                 mov     ebp, [esp+28h+arg_0]
.text:0040AA83
.text:0040AA83 loc_40AA83:                             ; CODE XREF: sub_40A6E0+35Aj
.text:0040AA83                 cmp     byte ptr [ebx], 0FFh
.text:0040AA86                 jnz     loc_40A9E0
.text:0040AA8C
.text:0040AA8C loc_40AA8C:                             ; CODE XREF: sub_40A6E0+2F8j
.text:0040AA8C                 cmp     byte_585422, 0FFh
.text:0040AA93                 mov     ebx, offset byte_585422
.text:0040AA98                 jz      loc_40AB9C
.text:0040AA9E
.text:0040AA9E loc_40AA9E:                             ; CODE XREF: sub_40A6E0+4B6j
.text:0040AA9E                 movzx   edx, byte ptr [ebx]
.text:0040AAA1                 mov     ecx, dword_926270[edx*8]
.text:0040AAA8                 and     ecx, dword ptr qword_5854E0
.text:0040AAAE                 mov     edi, dword_926274[edx*8]
.text:0040AAB5                 and     edi, dword ptr qword_5854E0+4
.text:0040AABB                 mov     ebp, dword_829CB8[edx*8]
.text:0040AAC2                 imul    edi, ds:dword_438B04[edx*8]
.text:0040AACA                 and     ebp, dword ptr qword_5854E0
.text:0040AAD0                 mov     esi, dword_829CBC[edx*8]
.text:0040AAD7                 and     esi, dword ptr qword_5854E0+4
.text:0040AADD                 mov     [esp+28h+var_8], ecx
.text:0040AAE1                 mov     ecx, ds:dword_438B00[edx*8]
.text:0040AAE8                 imul    esi, ds:dword_438D04[edx*8]
.text:0040AAF0                 imul    ecx, [esp+28h+var_8]
.text:0040AAF5                 xor     edi, ecx
.text:0040AAF7                 mov     ecx, ds:dword_438F00[edx*4]
.text:0040AAFE                 shr     edi, cl
.text:0040AB00                 mov     ecx, ds:dword_438D00[edx*8]
.text:0040AB07                 imul    ecx, ebp
.text:0040AB0A                 add     edi, dword_8F2378[edx*4]
.text:0040AB11                 xor     esi, ecx
.text:0040AB13                 mov     ecx, ds:dword_439000[edx*4]
.text:0040AB1A                 mov     ebp, dword_926D00[edi*8]
.text:0040AB21                 shr     esi, cl
.text:0040AB23                 mov     ecx, dword_926D04[edi*8]
.text:0040AB2A                 inc     ebx
.text:0040AB2B                 add     esi, dword_8FBB68[edx*4]
.text:0040AB32                 or      ebp, dword_829EF8[esi*8]
.text:0040AB39                 or      ecx, dword_829EFC[esi*8]
.text:0040AB40                 and     ebp, [esp+28h+arg_0]
.text:0040AB44                 and     ecx, [esp+28h+arg_4]
.text:0040AB48                 mov     esi, ebp
.text:0040AB4A                 or      esi, ecx
.text:0040AB4C                 jz      short loc_40AB93
.text:0040AB4E                 shl     edx, 6
.text:0040AB51                 mov     [esp+28h+var_18], edx
.text:0040AB55
.text:0040AB55 loc_40AB55:                             ; CODE XREF: sub_40A6E0+4B1j
.text:0040AB55                 bsf     esi, ebp
.text:0040AB58                 jnz     short loc_40AB66
.text:0040AB5A                 bsf     edx, ecx
.text:0040AB5D                 mov     esi, edx
.text:0040AB5F                 mov     [esp+28h+var_C], edx
.text:0040AB63                 add     esi, 20h
.text:0040AB66
.text:0040AB66 loc_40AB66:                             ; CODE XREF: sub_40A6E0+478j
.text:0040AB66                 mov     edx, ebp
.text:0040AB68                 add     edx, 0FFFFFFFFh
.text:0040AB6B                 mov     edi, ecx
.text:0040AB6D                 adc     edi, 0FFFFFFFFh
.text:0040AB70                 and     ecx, edi
.text:0040AB72                 mov     edi, [esp+28h+var_18]
.text:0040AB76                 and     ebp, edx
.text:0040AB78                 movzx   edx, byte_585380[esi]
.text:0040AB7F                 add     edi, esi
.text:0040AB81                 or      edi, dword_931550[edx*4]
.text:0040AB88                 mov     edx, ebp
.text:0040AB8A                 mov     [eax], edi
.text:0040AB8C                 add     eax, 4
.text:0040AB8F                 or      edx, ecx
.text:0040AB91                 jnz     short loc_40AB55
.text:0040AB93
.text:0040AB93 loc_40AB93:                             ; CODE XREF: sub_40A6E0+46Cj
.text:0040AB93                 cmp     byte ptr [ebx], 0FFh
.text:0040AB96                 jnz     loc_40AA9E
.text:0040AB9C
.text:0040AB9C loc_40AB9C:                             ; CODE XREF: sub_40A6E0+3B8j
.text:0040AB9C                 mov     ecx, dword_5854F0
.text:0040ABA2                 mov     edx, [ecx+28h]
.text:0040ABA5                 movzx   esi, byte_5854E8
.text:0040ABAC                 mov     ecx, [ecx+2Ch]
.text:0040ABAF                 not     edx
.text:0040ABB1                 and     edx, dword_926678[esi*8]
.text:0040ABB8                 not     ecx
.text:0040ABBA                 and     ecx, dword_92667C[esi*8]
.text:0040ABC1                 and     edx, [esp+28h+arg_0]
.text:0040ABC5                 and     ecx, [esp+28h+arg_4]
.text:0040ABC9                 mov     edi, edx
.text:0040ABCB                 or      edi, ecx
.text:0040ABCD                 jz      short loc_40AC0C
.text:0040ABCF                 shl     esi, 6
.text:0040ABD2                 mov     edi, esi
.text:0040ABD4
.text:0040ABD4 loc_40ABD4:                             ; CODE XREF: sub_40A6E0+52Aj
.text:0040ABD4                 bsf     esi, edx
.text:0040ABD7                 jnz     short loc_40ABE3
.text:0040ABD9                 bsf     esi, ecx
.text:0040ABDC                 mov     [esp+28h+var_C], esi
.text:0040ABE0                 add     esi, 20h
.text:0040ABE3
.text:0040ABE3 loc_40ABE3:                             ; CODE XREF: sub_40A6E0+4F7j
.text:0040ABE3                 mov     ebx, edx
.text:0040ABE5                 add     ebx, 0FFFFFFFFh
.text:0040ABE8                 mov     ebp, ecx
.text:0040ABEA                 adc     ebp, 0FFFFFFFFh
.text:0040ABED                 and     edx, ebx
.text:0040ABEF                 movzx   ebx, byte_585380[esi]
.text:0040ABF6                 add     esi, edi
.text:0040ABF8                 or      esi, dword_931450[ebx*4]
.text:0040ABFF                 and     ecx, ebp
.text:0040AC01                 mov     [eax], esi
.text:0040AC03                 mov     esi, edx
.text:0040AC05                 add     eax, 4
.text:0040AC08                 or      esi, ecx
.text:0040AC0A                 jnz     short loc_40ABD4
.text:0040AC0C
.text:0040AC0C loc_40AC0C:                             ; CODE XREF: sub_40A6E0+CDj
.text:0040AC0C                                         ; sub_40A6E0+4EDj
.text:0040AC0C                 mov     ebx, dword ptr qword_585468+4
.text:0040AC12                 xor     ebp, ebp
.text:0040AC14                 and     ebx, 0FF0000h
.text:0040AC1A                 mov     ecx, ebp
.text:0040AC1C                 or      ecx, ebx
.text:0040AC1E                 jz      loc_40ADB1
.text:0040AC24
.text:0040AC24 loc_40AC24:                             ; CODE XREF: sub_40A6E0+6C1j
.text:0040AC24                 bsf     ecx, ebp
.text:0040AC27                 jnz     short loc_40AC35
.text:0040AC29                 bsf     edx, ebx
.text:0040AC2C                 mov     ecx, edx
.text:0040AC2E                 mov     [esp+28h+var_C], edx
.text:0040AC32                 add     ecx, 20h
.text:0040AC35
.text:0040AC35 loc_40AC35:                             ; CODE XREF: sub_40A6E0+547j
.text:0040AC35                 mov     edx, ebp
.text:0040AC37                 add     edx, 0FFFFFFFFh
.text:0040AC3A                 mov     esi, ebx
.text:0040AC3C                 adc     esi, 0FFFFFFFFh
.text:0040AC3F                 and     ebp, edx
.text:0040AC41                 and     ebx, esi
.text:0040AC43                 cmp     byte ptr dword_585388[ecx], 0
.text:0040AC4A                 mov     [esp+28h+var_18], ebp
.text:0040AC4E                 jnz     short loc_40AC8F
.text:0040AC50                 mov     edx, ecx
.text:0040AC52                 shl     edx, 6
.text:0040AC55                 lea     edi, [edx+ecx+8]
.text:0040AC59                 mov     edx, edi
.text:0040AC5B                 or      edx, 0D8007000h
.text:0040AC61                 mov     [eax], edx
.text:0040AC63                 mov     edx, dword_8F21B8[ecx*8]
.text:0040AC6A                 mov     esi, dword_8F21BC[ecx*8]
.text:0040AC71                 and     edx, dword ptr qword_5854B8
.text:0040AC77                 and     esi, dword ptr qword_5854B8+4
.text:0040AC7D                 add     eax, 4
.text:0040AC80                 or      edx, esi
.text:0040AC82                 jz      short loc_40AC8F
.text:0040AC84                 or      edi, 0C2004000h
.text:0040AC8A                 mov     [eax], edi
.text:0040AC8C                 add     eax, 4
.text:0040AC8F
.text:0040AC8F loc_40AC8F:                             ; CODE XREF: sub_40A6E0+56Ej
.text:0040AC8F                                         ; sub_40A6E0+5A2j
.text:0040AC8F                 cmp     ecx, 30h
.text:0040AC92                 jz      loc_40AD18
.text:0040AC98                 mov     edx, dword ptr qword_828AB0[ecx*8]
.text:0040AC9F                 mov     esi, dword ptr (qword_828AB0+4)[ecx*8]
.text:0040ACA6                 and     edx, [esp+28h+arg_0]
.text:0040ACAA                 and     esi, [esp+28h+arg_4]
.text:0040ACAE                 or      edx, esi
.text:0040ACB0                 jz      short loc_40AD18
.text:0040ACB2                 movzx   edi, byte_585387[ecx]
.text:0040ACB9                 mov     edx, ecx
.text:0040ACBB                 shl     edx, 6
.text:0040ACBE                 lea     ebp, [edx+ecx+7]
.text:0040ACC2                 mov     edx, dword_9313D0[edi*4]
.text:0040ACC9                 add     edx, 28000000h
.text:0040ACCF                 or      edx, ebp
.text:0040ACD1                 or      edx, 7000h
.text:0040ACD7                 mov     [eax], edx
.text:0040ACD9                 mov     edx, dword_8F21B0[ecx*8]
.text:0040ACE0                 mov     esi, dword_8F21B4[ecx*8]
.text:0040ACE7                 and     edx, dword ptr qword_5854B8
.text:0040ACED                 and     esi, dword ptr qword_5854B8+4
.text:0040ACF3                 add     eax, 4
.text:0040ACF6                 or      edx, esi
.text:0040ACF8                 jz      short loc_40AD14
.text:0040ACFA                 mov     edx, dword_9313D0[edi*4]
.text:0040AD01                 add     edx, 1A000000h
.text:0040AD07                 or      edx, ebp
.text:0040AD09                 or      edx, 4000h
.text:0040AD0F                 mov     [eax], edx
.text:0040AD11                 add     eax, 4
.text:0040AD14
.text:0040AD14 loc_40AD14:                             ; CODE XREF: sub_40A6E0+618j
.text:0040AD14                 mov     ebp, [esp+28h+var_18]
.text:0040AD18
.text:0040AD18 loc_40AD18:                             ; CODE XREF: sub_40A6E0+5B2j
.text:0040AD18                                         ; sub_40A6E0+5D0j
.text:0040AD18                 cmp     ecx, 37h
.text:0040AD1B                 jz      loc_40AD9D
.text:0040AD21                 mov     edx, dword ptr qword_828AC0[ecx*8]
.text:0040AD28                 mov     esi, dword ptr (qword_828AC0+4)[ecx*8]
.text:0040AD2F                 and     edx, [esp+28h+arg_0]
.text:0040AD33                 and     esi, [esp+28h+arg_4]
.text:0040AD37                 or      edx, esi
.text:0040AD39                 jz      short loc_40AD9D
.text:0040AD3B                 movzx   esi, byte ptr (dword_585388+1)[ecx]
.text:0040AD42                 mov     edx, ecx
.text:0040AD44                 shl     edx, 6
.text:0040AD47                 lea     edi, [edx+ecx+9]
.text:0040AD4B                 mov     edx, dword_9313D0[esi*4]
.text:0040AD52                 add     edx, 28000000h
.text:0040AD58                 or      edx, edi
.text:0040AD5A                 or      edx, 7000h
.text:0040AD60                 mov     [eax], edx
.text:0040AD62                 mov     edx, dword_8F21C0[ecx*8]
.text:0040AD69                 mov     ecx, dword_8F21C4[ecx*8]
.text:0040AD70                 and     edx, dword ptr qword_5854B8
.text:0040AD76                 and     ecx, dword ptr qword_5854B8+4
.text:0040AD7C                 add     eax, 4
.text:0040AD7F                 or      edx, ecx
.text:0040AD81                 jz      short loc_40AD9D
.text:0040AD83                 mov     ecx, dword_9313D0[esi*4]
.text:0040AD8A                 add     ecx, 1A000000h
.text:0040AD90                 or      ecx, edi
.text:0040AD92                 or      ecx, 4000h
.text:0040AD98                 mov     [eax], ecx
.text:0040AD9A                 add     eax, 4
.text:0040AD9D
.text:0040AD9D loc_40AD9D:                             ; CODE XREF: sub_40A6E0+63Bj
.text:0040AD9D                                         ; sub_40A6E0+659j ...
.text:0040AD9D                 mov     edx, ebp
.text:0040AD9F                 or      edx, ebx
.text:0040ADA1                 jnz     loc_40AC24
.text:0040ADA7                 mov     [eax], edx
.text:0040ADA9                 pop     edi
.text:0040ADAA                 pop     esi
.text:0040ADAB                 pop     ebp
.text:0040ADAC                 pop     ebx
.text:0040ADAD                 add     esp, 18h
.text:0040ADB0                 retn
.text:0040ADB1 ; ---------------------------------------------------------------------------
.text:0040ADB1
.text:0040ADB1 loc_40ADB1:                             ; CODE XREF: sub_40A6E0+53Ej
.text:0040ADB1                 pop     edi
.text:0040ADB2                 pop     esi
.text:0040ADB3                 mov     [eax], ebp
.text:0040ADB5                 pop     ebp
.text:0040ADB6                 pop     ebx
.text:0040ADB7                 add     esp, 18h
.text:0040ADBA                 retn
.text:0040ADBA sub_40A6E0      endp
.text:0040ADBA
.text:0040ADBA ; ---------------------------------------------------------------------------
.text:0040ADBB                 align 10h
.text:0040ADC0
.text:0040ADC0 ; =============== S U B R O U T I N E =======================================
.text:0040ADC0
.text:0040ADC0
.text:0040ADC0 sub_40ADC0      proc near               ; CODE XREF: sub_4120A0+5Bp
.text:0040ADC0                                         ; sub_4120A0+24Dp ...
.text:0040ADC0
.text:0040ADC0 var_18          = dword ptr -18h
.text:0040ADC0 var_C           = dword ptr -0Ch
.text:0040ADC0 var_8           = dword ptr -8
.text:0040ADC0 arg_0           = qword ptr  4
.text:0040ADC0
.text:0040ADC0                 mov     ecx, dword_5854F0
.text:0040ADC6                 movzx   edx, byte ptr [ecx+1Ah]
.text:0040ADCA                 mov     ecx, dword ptr qword_5854A8+4
.text:0040ADD0                 sub     esp, 18h
.text:0040ADD3                 push    ebx
.text:0040ADD4                 push    ebp
.text:0040ADD5                 push    esi
.text:0040ADD6                 push    edi
.text:0040ADD7                 test    edx, edx
.text:0040ADD9                 jz      loc_40AE7F
.text:0040ADDF                 mov     esi, dword ptr qword_5854A8
.text:0040ADE5                 mov     edi, ecx
.text:0040ADE7                 shrd    esi, edi, 9
.text:0040ADEB                 and     esi, dword ptr qword_828A78[edx*8]
.text:0040ADF2                 shr     edi, 9
.text:0040ADF5                 and     edi, dword ptr (qword_828A78+4)[edx*8]
.text:0040ADFC                 and     esi, 7F7F7F7Fh
.text:0040AE02                 and     edi, offset byte_7F7F7F
.text:0040AE08                 or      esi, edi
.text:0040AE0A                 jz      short loc_40AE2F
.text:0040AE0C                 mov     ecx, edx
.text:0040AE0E                 shl     ecx, 6
.text:0040AE11                 lea     ecx, [ecx+edx+240h]
.text:0040AE18                 or      ecx, dword_9315D4
.text:0040AE1E                 or      ecx, 3000h
.text:0040AE24                 mov     [eax], ecx
.text:0040AE26                 mov     ecx, dword ptr qword_5854A8+4
.text:0040AE2C                 add     eax, 4
.text:0040AE2F
.text:0040AE2F loc_40AE2F:                             ; CODE XREF: sub_40ADC0+4Aj
.text:0040AE2F                 mov     esi, dword ptr qword_5854A8
.text:0040AE35                 mov     edi, ecx
.text:0040AE37                 shrd    esi, edi, 7
.text:0040AE3B                 and     esi, dword ptr qword_828A78[edx*8]
.text:0040AE42                 shr     edi, 7
.text:0040AE45                 and     edi, dword ptr (qword_828A78+4)[edx*8]
.text:0040AE4C                 and     esi, 0FEFEFEFEh
.text:0040AE52                 and     edi, 0FEFEFEh
.text:0040AE58                 or      esi, edi
.text:0040AE5A                 jz      short loc_40AE7F
.text:0040AE5C                 mov     ecx, edx
.text:0040AE5E                 shl     ecx, 6
.text:0040AE61                 lea     edx, [ecx+edx+1C0h]
.text:0040AE68                 or      edx, dword_9315D4
.text:0040AE6E                 or      edx, 3000h
.text:0040AE74                 mov     [eax], edx
.text:0040AE76                 mov     ecx, dword ptr qword_5854A8+4
.text:0040AE7C                 add     eax, 4
.text:0040AE7F
.text:0040AE7F loc_40AE7F:                             ; CODE XREF: sub_40ADC0+19j
.text:0040AE7F                                         ; sub_40ADC0+9Aj
.text:0040AE7F                 mov     esi, dword_5854F0
.text:0040AE85                 mov     edx, [esi+28h]
.text:0040AE88                 mov     esi, [esi+2Ch]
.text:0040AE8B                 and     edx, dword ptr [esp+28h+arg_0]
.text:0040AE8F                 and     esi, dword ptr [esp+28h+arg_0+4]
.text:0040AE93                 or      edx, esi
.text:0040AE95                 jz      loc_40B2FC
.text:0040AE9B                 mov     esi, dword ptr qword_5854A8
.text:0040AEA1                 mov     ebp, dword ptr [esp+28h+arg_0]
.text:0040AEA5                 mov     edx, ecx
.text:0040AEA7                 shrd    esi, edx, 9
.text:0040AEAB                 shr     edx, 9
.text:0040AEAE                 and     edx, dword ptr [esp+28h+arg_0+4]
.text:0040AEB2                 and     esi, ebp
.text:0040AEB4                 and     esi, 7F7F7F00h
.text:0040AEBA                 and     edx, offset byte_7F7F7F
.text:0040AEC0                 mov     edi, esi
.text:0040AEC2                 or      edi, edx
.text:0040AEC4                 jz      short loc_40AF0F
.text:0040AEC6
.text:0040AEC6 loc_40AEC6:                             ; CODE XREF: sub_40ADC0+147j
.text:0040AEC6                 bsf     ecx, esi
.text:0040AEC9                 jnz     short loc_40AED5
.text:0040AECB                 bsf     ecx, edx
.text:0040AECE                 mov     [esp+28h+var_18], ecx
.text:0040AED2                 add     ecx, 20h
.text:0040AED5
.text:0040AED5 loc_40AED5:                             ; CODE XREF: sub_40ADC0+109j
.text:0040AED5                 mov     edi, esi
.text:0040AED7                 add     edi, 0FFFFFFFFh
.text:0040AEDA                 mov     ebx, edx
.text:0040AEDC                 adc     ebx, 0FFFFFFFFh
.text:0040AEDF                 and     edx, ebx
.text:0040AEE1                 mov     ebx, ecx
.text:0040AEE3                 and     esi, edi
.text:0040AEE5                 movzx   edi, byte_585380[ecx]
.text:0040AEEC                 shl     ebx, 6
.text:0040AEEF                 lea     ecx, [ebx+ecx+240h]
.text:0040AEF6                 or      ecx, dword_9315D0[edi*4]
.text:0040AEFD                 add     eax, 4
.text:0040AF00                 mov     [eax-4], ecx
.text:0040AF03                 mov     ecx, esi
.text:0040AF05                 or      ecx, edx
.text:0040AF07                 jnz     short loc_40AEC6
.text:0040AF09                 mov     ecx, dword ptr qword_5854A8+4
.text:0040AF0F
.text:0040AF0F loc_40AF0F:                             ; CODE XREF: sub_40ADC0+104j
.text:0040AF0F                 mov     edx, dword ptr qword_5854A8
.text:0040AF15                 shrd    edx, ecx, 7
.text:0040AF19                 shr     ecx, 7
.text:0040AF1C                 and     ecx, dword ptr [esp+28h+arg_0+4]
.text:0040AF20                 and     edx, ebp
.text:0040AF22                 and     edx, 0FEFEFE00h
.text:0040AF28                 and     ecx, 0FEFEFEh
.text:0040AF2E                 mov     esi, edx
.text:0040AF30                 or      esi, ecx
.text:0040AF32                 jz      short loc_40AF77
.text:0040AF34
.text:0040AF34 loc_40AF34:                             ; CODE XREF: sub_40ADC0+1B5j
.text:0040AF34                 bsf     esi, edx
.text:0040AF37                 jnz     short loc_40AF43
.text:0040AF39                 bsf     esi, ecx
.text:0040AF3C                 mov     [esp+28h+var_18], esi
.text:0040AF40                 add     esi, 20h
.text:0040AF43
.text:0040AF43 loc_40AF43:                             ; CODE XREF: sub_40ADC0+177j
.text:0040AF43                 mov     edi, edx
.text:0040AF45                 add     edi, 0FFFFFFFFh
.text:0040AF48                 mov     ebx, ecx
.text:0040AF4A                 adc     ebx, 0FFFFFFFFh
.text:0040AF4D                 and     ecx, ebx
.text:0040AF4F                 mov     ebx, esi
.text:0040AF51                 and     edx, edi
.text:0040AF53                 movzx   edi, byte_585380[esi]
.text:0040AF5A                 shl     ebx, 6
.text:0040AF5D                 lea     esi, [ebx+esi+1C0h]
.text:0040AF64                 or      esi, dword_9315D0[edi*4]
.text:0040AF6B                 add     eax, 4
.text:0040AF6E                 mov     [eax-4], esi
.text:0040AF71                 mov     esi, edx
.text:0040AF73                 or      esi, ecx
.text:0040AF75                 jnz     short loc_40AF34
.text:0040AF77
.text:0040AF77 loc_40AF77:                             ; CODE XREF: sub_40ADC0+172j
.text:0040AF77                 cmp     byte_58542C, 0FFh
.text:0040AF7E                 mov     edi, offset byte_58542C
.text:0040AF83                 jz      short loc_40AFF1
.text:0040AF85
.text:0040AF85 loc_40AF85:                             ; CODE XREF: sub_40ADC0+22Fj
.text:0040AF85                 movzx   esi, byte ptr [edi]
.text:0040AF88                 mov     edx, dword_8F2178[esi*8]
.text:0040AF8F                 mov     ecx, dword_8F217C[esi*8]
.text:0040AF96                 and     ecx, dword ptr [esp+28h+arg_0+4]
.text:0040AF9A                 and     edx, ebp
.text:0040AF9C                 inc     edi
.text:0040AF9D                 mov     ebx, edx
.text:0040AF9F                 or      ebx, ecx
.text:0040AFA1                 mov     [esp+28h+var_C], edi
.text:0040AFA5                 jz      short loc_40AFEC
.text:0040AFA7                 shl     esi, 6
.text:0040AFAA                 mov     edi, esi
.text:0040AFAC
.text:0040AFAC loc_40AFAC:                             ; CODE XREF: sub_40ADC0+222j
.text:0040AFAC                 bsf     esi, edx
.text:0040AFAF                 jnz     short loc_40AFBB
.text:0040AFB1                 bsf     esi, ecx
.text:0040AFB4                 mov     [esp+28h+var_18], esi
.text:0040AFB8                 add     esi, 20h
.text:0040AFBB
.text:0040AFBB loc_40AFBB:                             ; CODE XREF: sub_40ADC0+1EFj
.text:0040AFBB                 mov     ebx, edx
.text:0040AFBD                 add     ebx, 0FFFFFFFFh
.text:0040AFC0                 mov     ebp, ecx
.text:0040AFC2                 adc     ebp, 0FFFFFFFFh
.text:0040AFC5                 and     edx, ebx
.text:0040AFC7                 movzx   ebx, byte_585380[esi]
.text:0040AFCE                 add     esi, edi
.text:0040AFD0                 or      esi, dword_931610[ebx*4]
.text:0040AFD7                 and     ecx, ebp
.text:0040AFD9                 mov     [eax], esi
.text:0040AFDB                 mov     esi, edx
.text:0040AFDD                 add     eax, 4
.text:0040AFE0                 or      esi, ecx
.text:0040AFE2                 jnz     short loc_40AFAC
.text:0040AFE4                 mov     ebp, dword ptr [esp+28h+arg_0]
.text:0040AFE8                 mov     edi, [esp+28h+var_C]
.text:0040AFEC
.text:0040AFEC loc_40AFEC:                             ; CODE XREF: sub_40ADC0+1E5j
.text:0040AFEC                 cmp     byte ptr [edi], 0FFh
.text:0040AFEF                 jnz     short loc_40AF85
.text:0040AFF1
.text:0040AFF1 loc_40AFF1:                             ; CODE XREF: sub_40ADC0+1C3j
.text:0040AFF1                 cmp     byte_585437, 0FFh
.text:0040AFF8                 mov     ebx, offset byte_585437
.text:0040AFFD                 jz      loc_40B0BC
.text:0040B003                 jmp     short loc_40B010
.text:0040B003 ; ---------------------------------------------------------------------------
.text:0040B005                 align 10h
.text:0040B010
.text:0040B010 loc_40B010:                             ; CODE XREF: sub_40ADC0+243j
.text:0040B010                                         ; sub_40ADC0+2F6j
.text:0040B010                 movzx   esi, byte ptr [ebx]
.text:0040B013                 mov     ecx, dword_926270[esi*8]
.text:0040B01A                 and     ecx, dword ptr qword_5854E0
.text:0040B020                 mov     edx, dword_926274[esi*8]
.text:0040B027                 and     edx, dword ptr qword_5854E0+4
.text:0040B02D                 mov     edi, ds:dword_438B00[esi*8]
.text:0040B034                 imul    edx, ds:dword_438B04[esi*8]
.text:0040B03C                 imul    edi, ecx
.text:0040B03F                 mov     ecx, ds:dword_438F00[esi*4]
.text:0040B046                 xor     edx, edi
.text:0040B048                 shr     edx, cl
.text:0040B04A                 inc     ebx
.text:0040B04B                 add     edx, dword_8F2378[esi*4]
.text:0040B052                 mov     edi, dword_926D00[edx*8]
.text:0040B059                 mov     ecx, dword_926D04[edx*8]
.text:0040B060                 and     ecx, dword ptr [esp+28h+arg_0+4]
.text:0040B064                 and     edi, ebp
.text:0040B066                 mov     edx, edi
.text:0040B068                 or      edx, ecx
.text:0040B06A                 jz      short loc_40B0B3
.text:0040B06C                 shl     esi, 6
.text:0040B06F                 mov     [esp+28h+var_18], esi
.text:0040B073
.text:0040B073 loc_40B073:                             ; CODE XREF: sub_40ADC0+2EDj
.text:0040B073                 bsf     edx, edi
.text:0040B076                 jnz     short loc_40B082
.text:0040B078                 bsf     edx, ecx
.text:0040B07B                 mov     [esp+28h+var_C], edx
.text:0040B07F                 add     edx, 20h
.text:0040B082
.text:0040B082 loc_40B082:                             ; CODE XREF: sub_40ADC0+2B6j
.text:0040B082                 mov     esi, edi
.text:0040B084                 add     esi, 0FFFFFFFFh
.text:0040B087                 mov     ebp, ecx
.text:0040B089                 adc     ebp, 0FFFFFFFFh
.text:0040B08C                 and     ecx, ebp
.text:0040B08E                 mov     ebp, [esp+28h+var_18]
.text:0040B092                 and     edi, esi
.text:0040B094                 movzx   esi, byte_585380[edx]
.text:0040B09B                 add     ebp, edx
.text:0040B09D                 or      ebp, dword_931690[esi*4]
.text:0040B0A4                 mov     edx, edi
.text:0040B0A6                 mov     [eax], ebp
.text:0040B0A8                 add     eax, 4
.text:0040B0AB                 or      edx, ecx
.text:0040B0AD                 jnz     short loc_40B073
.text:0040B0AF                 mov     ebp, dword ptr [esp+28h+arg_0]
.text:0040B0B3
.text:0040B0B3 loc_40B0B3:                             ; CODE XREF: sub_40ADC0+2AAj
.text:0040B0B3                 cmp     byte ptr [ebx], 0FFh
.text:0040B0B6                 jnz     loc_40B010
.text:0040B0BC
.text:0040B0BC loc_40B0BC:                             ; CODE XREF: sub_40ADC0+23Dj
.text:0040B0BC                 cmp     byte_585442, 0FFh
.text:0040B0C3                 mov     ebx, offset byte_585442
.text:0040B0C8                 jz      loc_40B17C
.text:0040B0CE                 mov     edi, edi
.text:0040B0D0
.text:0040B0D0 loc_40B0D0:                             ; CODE XREF: sub_40ADC0+3B6j
.text:0040B0D0                 movzx   esi, byte ptr [ebx]
.text:0040B0D3                 mov     ecx, dword_829CB8[esi*8]
.text:0040B0DA                 and     ecx, dword ptr qword_5854E0
.text:0040B0E0                 mov     edx, dword_829CBC[esi*8]
.text:0040B0E7                 and     edx, dword ptr qword_5854E0+4
.text:0040B0ED                 mov     edi, ds:dword_438D00[esi*8]
.text:0040B0F4                 imul    edx, ds:dword_438D04[esi*8]
.text:0040B0FC                 imul    edi, ecx
.text:0040B0FF                 mov     ecx, ds:dword_439000[esi*4]
.text:0040B106                 xor     edx, edi
.text:0040B108                 shr     edx, cl
.text:0040B10A                 inc     ebx
.text:0040B10B                 add     edx, dword_8FBB68[esi*4]
.text:0040B112                 mov     edi, dword_829EF8[edx*8]
.text:0040B119                 mov     ecx, dword_829EFC[edx*8]
.text:0040B120                 and     ecx, dword ptr [esp+28h+arg_0+4]
.text:0040B124                 and     edi, ebp
.text:0040B126                 mov     edx, edi
.text:0040B128                 or      edx, ecx
.text:0040B12A                 jz      short loc_40B173
.text:0040B12C                 shl     esi, 6
.text:0040B12F                 mov     [esp+28h+var_18], esi
.text:0040B133
.text:0040B133 loc_40B133:                             ; CODE XREF: sub_40ADC0+3ADj
.text:0040B133                 bsf     edx, edi
.text:0040B136                 jnz     short loc_40B142
.text:0040B138                 bsf     edx, ecx
.text:0040B13B                 mov     [esp+28h+var_C], edx
.text:0040B13F                 add     edx, 20h
.text:0040B142
.text:0040B142 loc_40B142:                             ; CODE XREF: sub_40ADC0+376j
.text:0040B142                 mov     esi, edi
.text:0040B144                 add     esi, 0FFFFFFFFh
.text:0040B147                 mov     ebp, ecx
.text:0040B149                 adc     ebp, 0FFFFFFFFh
.text:0040B14C                 and     ecx, ebp
.text:0040B14E                 mov     ebp, [esp+28h+var_18]
.text:0040B152                 and     edi, esi
.text:0040B154                 movzx   esi, byte_585380[edx]
.text:0040B15B                 add     ebp, edx
.text:0040B15D                 or      ebp, dword_931710[esi*4]
.text:0040B164                 mov     edx, edi
.text:0040B166                 mov     [eax], ebp
.text:0040B168                 add     eax, 4
.text:0040B16B                 or      edx, ecx
.text:0040B16D                 jnz     short loc_40B133
.text:0040B16F                 mov     ebp, dword ptr [esp+28h+arg_0]
.text:0040B173
.text:0040B173 loc_40B173:                             ; CODE XREF: sub_40ADC0+36Aj
.text:0040B173                 cmp     byte ptr [ebx], 0FFh
.text:0040B176                 jnz     loc_40B0D0
.text:0040B17C
.text:0040B17C loc_40B17C:                             ; CODE XREF: sub_40ADC0+308j
.text:0040B17C                 cmp     byte_58544D, 0FFh
.text:0040B183                 mov     ebx, offset byte_58544D
.text:0040B188                 jz      loc_40B28C
.text:0040B18E
.text:0040B18E loc_40B18E:                             ; CODE XREF: sub_40ADC0+4C6j
.text:0040B18E                 movzx   edx, byte ptr [ebx]
.text:0040B191                 mov     ecx, dword_926270[edx*8]
.text:0040B198                 and     ecx, dword ptr qword_5854E0
.text:0040B19E                 mov     edi, dword_926274[edx*8]
.text:0040B1A5                 and     edi, dword ptr qword_5854E0+4
.text:0040B1AB                 mov     ebp, dword_829CB8[edx*8]
.text:0040B1B2                 imul    edi, ds:dword_438B04[edx*8]
.text:0040B1BA                 and     ebp, dword ptr qword_5854E0
.text:0040B1C0                 mov     esi, dword_829CBC[edx*8]
.text:0040B1C7                 and     esi, dword ptr qword_5854E0+4
.text:0040B1CD                 mov     [esp+28h+var_8], ecx
.text:0040B1D1                 mov     ecx, ds:dword_438B00[edx*8]
.text:0040B1D8                 imul    esi, ds:dword_438D04[edx*8]
.text:0040B1E0                 imul    ecx, [esp+28h+var_8]
.text:0040B1E5                 xor     edi, ecx
.text:0040B1E7                 mov     ecx, ds:dword_438F00[edx*4]
.text:0040B1EE                 shr     edi, cl
.text:0040B1F0                 mov     ecx, ds:dword_438D00[edx*8]
.text:0040B1F7                 imul    ecx, ebp
.text:0040B1FA                 add     edi, dword_8F2378[edx*4]
.text:0040B201                 xor     esi, ecx
.text:0040B203                 mov     ecx, ds:dword_439000[edx*4]
.text:0040B20A                 mov     ebp, dword_926D00[edi*8]
.text:0040B211                 shr     esi, cl
.text:0040B213                 mov     ecx, dword_926D04[edi*8]
.text:0040B21A                 inc     ebx
.text:0040B21B                 add     esi, dword_8FBB68[edx*4]
.text:0040B222                 or      ebp, dword_829EF8[esi*8]
.text:0040B229                 or      ecx, dword_829EFC[esi*8]
.text:0040B230                 and     ebp, dword ptr [esp+28h+arg_0]
.text:0040B234                 and     ecx, dword ptr [esp+28h+arg_0+4]
.text:0040B238                 mov     esi, ebp
.text:0040B23A                 or      esi, ecx
.text:0040B23C                 jz      short loc_40B283
.text:0040B23E                 shl     edx, 6
.text:0040B241                 mov     [esp+28h+var_18], edx
.text:0040B245
.text:0040B245 loc_40B245:                             ; CODE XREF: sub_40ADC0+4C1j
.text:0040B245                 bsf     esi, ebp
.text:0040B248                 jnz     short loc_40B256
.text:0040B24A                 bsf     edx, ecx
.text:0040B24D                 mov     esi, edx
.text:0040B24F                 mov     [esp+28h+var_C], edx
.text:0040B253                 add     esi, 20h
.text:0040B256
.text:0040B256 loc_40B256:                             ; CODE XREF: sub_40ADC0+488j
.text:0040B256                 mov     edx, ebp
.text:0040B258                 add     edx, 0FFFFFFFFh
.text:0040B25B                 mov     edi, ecx
.text:0040B25D                 adc     edi, 0FFFFFFFFh
.text:0040B260                 and     ecx, edi
.text:0040B262                 mov     edi, [esp+28h+var_18]
.text:0040B266                 and     ebp, edx
.text:0040B268                 movzx   edx, byte_585380[esi]
.text:0040B26F                 add     edi, esi
.text:0040B271                 or      edi, dword_931750[edx*4]
.text:0040B278                 mov     edx, ebp
.text:0040B27A                 mov     [eax], edi
.text:0040B27C                 add     eax, 4
.text:0040B27F                 or      edx, ecx
.text:0040B281                 jnz     short loc_40B245
.text:0040B283
.text:0040B283 loc_40B283:                             ; CODE XREF: sub_40ADC0+47Cj
.text:0040B283                 cmp     byte ptr [ebx], 0FFh
.text:0040B286                 jnz     loc_40B18E
.text:0040B28C
.text:0040B28C loc_40B28C:                             ; CODE XREF: sub_40ADC0+3C8j
.text:0040B28C                 mov     ecx, dword_5854F0
.text:0040B292                 mov     edx, [ecx+20h]
.text:0040B295                 movzx   esi, byte_5854E9
.text:0040B29C                 mov     ecx, [ecx+24h]
.text:0040B29F                 not     edx
.text:0040B2A1                 and     edx, dword_926678[esi*8]
.text:0040B2A8                 not     ecx
.text:0040B2AA                 and     ecx, dword_92667C[esi*8]
.text:0040B2B1                 and     edx, dword ptr [esp+28h+arg_0]
.text:0040B2B5                 and     ecx, dword ptr [esp+28h+arg_0+4]
.text:0040B2B9                 mov     edi, edx
.text:0040B2BB                 or      edi, ecx
.text:0040B2BD                 jz      short loc_40B2FC
.text:0040B2BF                 shl     esi, 6
.text:0040B2C2                 mov     edi, esi
.text:0040B2C4
.text:0040B2C4 loc_40B2C4:                             ; CODE XREF: sub_40ADC0+53Aj
.text:0040B2C4                 bsf     esi, edx
.text:0040B2C7                 jnz     short loc_40B2D3
.text:0040B2C9                 bsf     esi, ecx
.text:0040B2CC                 mov     [esp+28h+var_C], esi
.text:0040B2D0                 add     esi, 20h
.text:0040B2D3
.text:0040B2D3 loc_40B2D3:                             ; CODE XREF: sub_40ADC0+507j
.text:0040B2D3                 mov     ebx, edx
.text:0040B2D5                 add     ebx, 0FFFFFFFFh
.text:0040B2D8                 mov     ebp, ecx
.text:0040B2DA                 adc     ebp, 0FFFFFFFFh
.text:0040B2DD                 and     edx, ebx
.text:0040B2DF                 movzx   ebx, byte_585380[esi]
.text:0040B2E6                 add     esi, edi
.text:0040B2E8                 or      esi, dword_931650[ebx*4]
.text:0040B2EF                 and     ecx, ebp
.text:0040B2F1                 mov     [eax], esi
.text:0040B2F3                 mov     esi, edx
.text:0040B2F5                 add     eax, 4
.text:0040B2F8                 or      esi, ecx
.text:0040B2FA                 jnz     short loc_40B2C4
.text:0040B2FC
.text:0040B2FC loc_40B2FC:                             ; CODE XREF: sub_40ADC0+D5j
.text:0040B2FC                                         ; sub_40ADC0+4FDj
.text:0040B2FC                 mov     ebp, dword ptr qword_5854A8
.text:0040B302                 and     ebp, 0FF00h
.text:0040B308                 xor     ebx, ebx
.text:0040B30A                 mov     ecx, ebp
.text:0040B30C                 or      ecx, ebx
.text:0040B30E                 jz      loc_40B4A1
.text:0040B314
.text:0040B314 loc_40B314:                             ; CODE XREF: sub_40ADC0+6D1j
.text:0040B314                 bsf     ecx, ebp
.text:0040B317                 jnz     short loc_40B325
.text:0040B319                 bsf     edx, ebx
.text:0040B31C                 mov     ecx, edx
.text:0040B31E                 mov     [esp+28h+var_C], edx
.text:0040B322                 add     ecx, 20h
.text:0040B325
.text:0040B325 loc_40B325:                             ; CODE XREF: sub_40ADC0+557j
.text:0040B325                 mov     edx, ebp
.text:0040B327                 add     edx, 0FFFFFFFFh
.text:0040B32A                 mov     esi, ebx
.text:0040B32C                 adc     esi, 0FFFFFFFFh
.text:0040B32F                 and     ebp, edx
.text:0040B331                 and     ebx, esi
.text:0040B333                 cmp     byte_585378[ecx], 0
.text:0040B33A                 mov     [esp+28h+var_18], ebp
.text:0040B33E                 jnz     short loc_40B37F
.text:0040B340                 mov     edx, ecx
.text:0040B342                 shl     edx, 6
.text:0040B345                 lea     edi, [edx+ecx-8]
.text:0040B349                 mov     edx, edi
.text:0040B34B                 or      edx, 0D8007000h
.text:0040B351                 mov     [eax], edx
.text:0040B353                 mov     edx, dword_8F2138[ecx*8]
.text:0040B35A                 mov     esi, dword_8F213C[ecx*8]
.text:0040B361                 and     edx, dword ptr qword_585478
.text:0040B367                 and     esi, dword ptr qword_585478+4
.text:0040B36D                 add     eax, 4
.text:0040B370                 or      edx, esi
.text:0040B372                 jz      short loc_40B37F
.text:0040B374                 or      edi, 0C2004000h
.text:0040B37A                 mov     [eax], edi
.text:0040B37C                 add     eax, 4
.text:0040B37F
.text:0040B37F loc_40B37F:                             ; CODE XREF: sub_40ADC0+57Ej
.text:0040B37F                                         ; sub_40ADC0+5B2j
.text:0040B37F                 cmp     ecx, 8
.text:0040B382                 jz      loc_40B408
.text:0040B388                 mov     edx, dword_828A30[ecx*8]
.text:0040B38F                 mov     esi, dword_828A34[ecx*8]
.text:0040B396                 and     edx, dword ptr [esp+28h+arg_0]
.text:0040B39A                 and     esi, dword ptr [esp+28h+arg_0+4]
.text:0040B39E                 or      edx, esi
.text:0040B3A0                 jz      short loc_40B408
.text:0040B3A2                 movzx   edi, byte_585377[ecx]
.text:0040B3A9                 mov     edx, ecx
.text:0040B3AB                 shl     edx, 6
.text:0040B3AE                 lea     ebp, [edx+ecx-9]
.text:0040B3B2                 mov     edx, dword_9315D0[edi*4]
.text:0040B3B9                 add     edx, 28000000h
.text:0040B3BF                 or      edx, ebp
.text:0040B3C1                 or      edx, 7000h
.text:0040B3C7                 mov     [eax], edx
.text:0040B3C9                 mov     edx, dword_8F2130[ecx*8]
.text:0040B3D0                 mov     esi, dword_8F2134[ecx*8]
.text:0040B3D7                 and     edx, dword ptr qword_585478
.text:0040B3DD                 and     esi, dword ptr qword_585478+4
.text:0040B3E3                 add     eax, 4
.text:0040B3E6                 or      edx, esi
.text:0040B3E8                 jz      short loc_40B404
.text:0040B3EA                 mov     edx, dword_9315D0[edi*4]
.text:0040B3F1                 add     edx, 1A000000h
.text:0040B3F7                 or      edx, ebp
.text:0040B3F9                 or      edx, 4000h
.text:0040B3FF                 mov     [eax], edx
.text:0040B401                 add     eax, 4
.text:0040B404
.text:0040B404 loc_40B404:                             ; CODE XREF: sub_40ADC0+628j
.text:0040B404                 mov     ebp, [esp+28h+var_18]
.text:0040B408
.text:0040B408 loc_40B408:                             ; CODE XREF: sub_40ADC0+5C2j
.text:0040B408                                         ; sub_40ADC0+5E0j
.text:0040B408                 cmp     ecx, 0Fh
.text:0040B40B                 jz      loc_40B48D
.text:0040B411                 mov     edx, dword_828A40[ecx*8]
.text:0040B418                 mov     esi, dword_828A44[ecx*8]
.text:0040B41F                 and     edx, dword ptr [esp+28h+arg_0]
.text:0040B423                 and     esi, dword ptr [esp+28h+arg_0+4]
.text:0040B427                 or      edx, esi
.text:0040B429                 jz      short loc_40B48D
.text:0040B42B                 movzx   esi, byte_585379[ecx]
.text:0040B432                 mov     edx, ecx
.text:0040B434                 shl     edx, 6
.text:0040B437                 lea     edi, [edx+ecx-7]
.text:0040B43B                 mov     edx, dword_9315D0[esi*4]
.text:0040B442                 add     edx, 28000000h
.text:0040B448                 or      edx, edi
.text:0040B44A                 or      edx, 7000h
.text:0040B450                 mov     [eax], edx
.text:0040B452                 mov     edx, dword_8F2140[ecx*8]
.text:0040B459                 mov     ecx, dword_8F2144[ecx*8]
.text:0040B460                 and     edx, dword ptr qword_585478
.text:0040B466                 and     ecx, dword ptr qword_585478+4
.text:0040B46C                 add     eax, 4
.text:0040B46F                 or      edx, ecx
.text:0040B471                 jz      short loc_40B48D
.text:0040B473                 mov     ecx, dword_9315D0[esi*4]
.text:0040B47A                 add     ecx, 1A000000h
.text:0040B480                 or      ecx, edi
.text:0040B482                 or      ecx, 4000h
.text:0040B488                 mov     [eax], ecx
.text:0040B48A                 add     eax, 4
.text:0040B48D
.text:0040B48D loc_40B48D:                             ; CODE XREF: sub_40ADC0+64Bj
.text:0040B48D                                         ; sub_40ADC0+669j ...
.text:0040B48D                 mov     edx, ebp
.text:0040B48F                 or      edx, ebx
.text:0040B491                 jnz     loc_40B314
.text:0040B497                 mov     [eax], edx
.text:0040B499                 pop     edi
.text:0040B49A                 pop     esi
.text:0040B49B                 pop     ebp
.text:0040B49C                 pop     ebx
.text:0040B49D                 add     esp, 18h
.text:0040B4A0                 retn
.text:0040B4A1 ; ---------------------------------------------------------------------------
.text:0040B4A1
.text:0040B4A1 loc_40B4A1:                             ; CODE XREF: sub_40ADC0+54Ej
.text:0040B4A1                 pop     edi
.text:0040B4A2                 pop     esi
.text:0040B4A3                 pop     ebp
.text:0040B4A4                 mov     [eax], ebx
.text:0040B4A6                 pop     ebx
.text:0040B4A7                 add     esp, 18h
.text:0040B4AA                 retn
.text:0040B4AA sub_40ADC0      endp
RobboLito 009 Source Code move_gen.h

Code: Select all

type_move_list *capture_black(type_move_list *LIST, uint64 cel)
{
	uint64 U, T;
	int square, ai;

	if ((cel &DYNAMIC->black_attacks) == 0)
		goto TAG_NOT;
	T = ((bitboard_black_pawn & ~FILEa) >> 9) & (~RANK1) &cel;

	while (T)
	{
		ai = LSB(T);
		ADD(LIST, ((ai + 9) << 6) | ai);
		bit_free(ai, T);
	}
	T = ((bitboard_black_pawn & ~FILEh) >> 7) & (~RANK1) &cel;

	while (T)
	{
		ai = LSB(T);
		ADD(LIST, ((ai + 7) << 6) | ai);
		bit_free(ai, T);
	}

	for (U = bitboard_black_knight; U; bit_free(square, U))
	{
		square = LSB(U);
		T = attack_knight[square] & cel;
		ANNEX_AI(T);
	}

	for (U = bitboard_black_bishop; U; bit_free(square, U))
	{
		square = LSB(U);
		T = attack_bishop(square) & cel;
		ANNEX_AI(T);
	}

	for (U = bitboard_black_rook; U; bit_free(square, U))
	{
		square = LSB(U);
		T = attack_rook(square) & cel;
		ANNEX_AI(T);
	}

	for (U = bitboard_black_queen; U; bit_free(square, U))
	{
		square = LSB(U);
		T = attack_queen(square) & cel;
		ANNEX_AI(T);
	}
	square = LSB(bitboard_black_king);
	T = attack_king[square] & cel & ~DYNAMIC->white_attacks;
	ANNEX_AI(T);
	TAG_NOT:
	for (U = bitboard_black_pawn & RANK2; U; bit_free(square, U))
	{
		square = LSB(U);
		ai = square - 8;

		if (SQUARE[ai] == 0)
			ADD(LIST, flag_promotion_queen | (square << 6) | ai);
		ai = square - 9;

		if (square != A2 && square_fixed[ai] & cel)
			ADD(LIST, flag_promotion_queen | (square << 6) | ai);
		ai = square - 7;

		if (square != H2 && square_fixed[ai] & cel)
			ADD(LIST, flag_promotion_queen | (square << 6) | ai);
	}
	LIST->move = 0;
	return LIST;
}
*Modified
PAWN : Knight >> Bishop >> Rook >>Queen

LucenaTheLucid
Posts: 160
Joined: Thu Jun 10, 2010 2:14 am
Real Name: Luis Smith

Re: Why Is Houdini Not Entered In The WCCC??

Post by LucenaTheLucid » Tue Aug 10, 2010 3:33 am

Robert Houdart wrote:
LucenaTheLucid wrote:You sound a bit cryptic here.
I'm sorry if my words are cryptic, that is certainly not the intent (on the contrary).

I can only point at the following anomaly.
- Person 1 (Lance P) claimed 2 months ago that engine Houdini is largely copied from another engine and showed a code snippet.
- Person 2 (kingliveson) now likewise claims that engine Houdini is largely copied from another engine and shows the same code snippet.
If Houdini was largely copied from Robbo or Ippo with "just a tweak or two" (as some claim :)), isn't it disctinctly odd that both persons would need to resort to exactly the same code snippet (significantly less than 1% of the binary) to prove their case? This strongly suggests that the snippet that is shown is the exception rather than the rule.

But I now understand that this is a battle that apparently cannot be won. There is actually very little I can prove without publishing the source code.
Since I end up repeating myself over and over again, it's probably better that I pull the plug here and now 8-) .

Cheers,
Robert
Hi again Robert,

I think you've made it clear that your work (Houdini) stands on the shoulders of giants. Ippo, Stockfish, Crafty. I think you have made it clear that in due time that the Houdini source code will be released. You have also made it clear that you do not like others snooping around in the inner workings of your binaries. Lance Perkins has posted evidence that maybe Houdini is a Robbolito clone (with many modifications obviously as it is stronger). You have not provided signifigant evidence to disprove this.

Let me explain what myself and maybe some others view on the matter is. Vas has also made it clear that his work stands on the shoulders of giants. He also made it clear that after this Ippo issue that he will release the source code in due time. He has also made it clear that that he does not like people snooping around in the inner workings of his binaries. Someone (Zach Wegner I think?) has made available evidence that maybe Rybka is a clone of Fruit (with many modifications obviously as it is stronger). He (Vas) has not provided signifigant evidence to disprove this.

My point if it is not already clear is that people think that Vas maybe hiding something. He could simply end this whole "Ippo is a clone" issue by simply posting a part of his source code that provides evidence against the fact that Rybka is not a clone of Fruit.

You can also end this issue by 'simply' providing the source code to a neutral programmer. Perhaps someone who has nothing to do with computer chess and letting them analyze it against several open source Ippo derivatives.

I believe Vas has reason to not want to publish his source code of even an older version of his engine. For most of the same reasons I believe you may have some reason to not want to publish your source code.

Also Robert please do not take this as an attack on yourself or Vas. I believe I do not know. I can only speculate. I do not wish to attack you in anyway. I only wish for you to know why myself or perhaps some others may feel the way I do.

Peter C
Posts: 154
Joined: Thu Jun 10, 2010 3:12 am
Real Name: Peter C

Re: Why Is Houdini Not Entered In The WCCC??

Post by Peter C » Tue Aug 10, 2010 4:07 am

tomgdrums wrote:What I don't understand is why so many on this forum are now hunting Robert Houdart.

And yet Norman Schmidt is treated as royalty and given the benefit of the doubt.

It seems that some on this forum are now Ippolit "fan boys" and are acting like many of the Rybka "fan boys".

It seems to me that computer chess is completely fractured right now.

No one knows for sure about the ippos, Vas won't fix bugs, now everyone is after Houdini even though Robert does great customer service and yet he doesn't charge for the engine.

And for the record I don't use any of the Ippo family or Houdini because I am just not sure. But I also don't like to see how some of the people who wanted "freedom" are now witch hunting Houdini and it's creator.

Man I hope Hiarcs and Shredder never go out of business....or I won't know what to do!
At least Norm recognizes that Fire comes from Ippolit.

I believe Robert though, in part because he seems like an honest nice guy.

Robert, I think it would be well worth the time to submit your code to someone like Dr. Hyatt or Tord Romstad and have them decide. For one thing, CCRL and CEGT would have no excuse not to test Houdini (it has an author, it's not of questionable legality, etc).

My 2 cents.

Peter

Peter

LucenaTheLucid
Posts: 160
Joined: Thu Jun 10, 2010 2:14 am
Real Name: Luis Smith

Re: Why Is Houdini Not Entered In The WCCC??

Post by LucenaTheLucid » Tue Aug 10, 2010 4:18 am

Peter C wrote:
tomgdrums wrote:What I don't understand is why so many on this forum are now hunting Robert Houdart.

And yet Norman Schmidt is treated as royalty and given the benefit of the doubt.

It seems that some on this forum are now Ippolit "fan boys" and are acting like many of the Rybka "fan boys".

It seems to me that computer chess is completely fractured right now.

No one knows for sure about the ippos, Vas won't fix bugs, now everyone is after Houdini even though Robert does great customer service and yet he doesn't charge for the engine.

And for the record I don't use any of the Ippo family or Houdini because I am just not sure. But I also don't like to see how some of the people who wanted "freedom" are now witch hunting Houdini and it's creator.

Man I hope Hiarcs and Shredder never go out of business....or I won't know what to do!
At least Norm recognizes that Fire comes from Ippolit.

I believe Robert though, in part because he seems like an honest nice guy.

Robert, I think it would be well worth the time to submit your code to someone like Dr. Hyatt or Tord Romstad and have them decide. For one thing, CCRL and CEGT would have no excuse not to test Houdini (it has an author, it's not of questionable legality, etc).

My 2 cents.

Peter

Peter
I don't know if an engine author would be the best of ideas. I think someone along the lines of Dann Corbit is maybe a better choice for this task.

BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: Why Is Houdini Not Entered In The WCCC??

Post by BB+ » Tue Aug 10, 2010 4:51 am

Code: Select all

type_move_list *capture_black(type_move_list *LIST, uint64 cel)
{
   uint64 U, T;
   int square, ai;

   if ((cel &DYNAMIC->black_attacks) == 0)
      goto TAG_NOT;
Something is wrong with your source code, as the first thing the ASM blocks do is check en passant (at 0x1a from the DYN pointer, in RobboLito speak). Here is the first part of the analogous code in the 64-bit Houdini 1.03:

Code: Select all

0x140008d50:  push   %rbp
0x140008d52:  mov    0x17d227(%rip),%rax  # 0x140185f80 // get StackInfo ptr
0x140008d59:  mov    %rdi,0x20(%rsp)
0x140008d5e:  mov    %rdx,%rdi
0x140008d61:  movzbl 0x1a(%rax),%edx                    // get en passant byte from ptr
0x140008d65:  mov    %rcx,%r10
0x140008d68:  lea    -0x8d6f(%rip),%rbp  # 0x140000000
0x140008d6f:  test   %edx,%edx                          // test en passant byte
0x140008d71:  je     0x140008dfb                        // if 0, jump, ignoring ep generation

BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: Why Is Houdini Not Entered In The WCCC??

Post by BB+ » Tue Aug 10, 2010 5:15 am

Here's the above example more fully:

Code: Select all

function WhiteCaptures
0x140008d50:  push   %rbp
0x140008d52:  mov    #0x140185f80,%rax      // DYN pointer
0x140008d59:  mov    %rdi,0x20(%rsp)
0x140008d5e:  mov    %rdx,%rdi 	   	    // MASK, passed variable
0x140008d61:  movzbl 0x1a(%rax),%edx        // en passant byte from DYN
0x140008d65:  mov    %rcx,%r10
0x140008d68:  lea    #0x140000000,%rbp
0x140008d6f:  test   %edx,%edx 	          // test ep byte
0x140008d71:  je     0x140008dfb            // if 0, skip ep generation
0x140008d77:  mov    #0x140185f10,%rax      // WhitePawns
0x140008d7e:  mov    $0xfefefefefefefe,%rcx
0x140008d88:  and    %rcx,%rax 	          // AND WhitePawns with not-a mask
0x140008d8b:  shl    $0x7,%rax 	          // CAPTURE_LEFT in IvanHoe-speak
0x140008d8f:  test   %rax,0x4296c0(%rbp,%rdx,8) // test with SqSet[ep]
0x140008d97:  je     0x140008db9            // if zero, skip to CAPTURE_RIGHT
0x140008d99:  mov    %edx,%eax
0x140008d9b:  shl    $0x6,%eax 	          // to-square
0x140008d9e:  lea    -0x1c0(%rax,%rdx,1),%ecx // from-square
0x140008da5:  or     #0x14052e664,%ecx	   // 0xb0100000 // CAP_VAL[wP][bP]
0x140008dab:  or     $0x3000,%ecx           // FlagEP
0x140008db1:  add    $0x4,%r10		        // increment move stack counter
0x140008db5:  mov    %ecx,-0x4(%r10)   	  // store move
0x140008db9:  mov    #0140185f10,%rax       // WhitePawns
0x140008dc0:  mov    $0xffff7f7f7f7f7f7f,%rcx
0x140008dca:  and    %rcx,%rax	       	 // AND WhitePawns with not-h mask
0x140008dcd:  shl    $0x9,%rax 	          // CAPTURE_RIGHT in IvanHoe-speak
0x140008dd1:  test   %rax,0x4296c0(%rbp,%rdx,8) // test with SqSet[ep]
0x140008dd9:  je     0x140008dfb       	  // if zero, jump
0x140008ddb:  mov    %edx,%eax
0x140008ddd:  shl    $0x6,%eax 	          // to-square
0x140008de0:  lea    -0x240(%rax,%rdx,1),%ecx // from-square
0x140008de7:  or     #0x14052e664,%ecx	   // 0xb0100000 // CAP_VAL[wP][bP]
0x140008ded:  or     $0x3000,%ecx      	  // FlagEP
0x140008df3:  add    $0x4,%r10 	          // increment move stack counter
0x140008df7:  mov    %ecx,-0x4(%r10)   	  // store move
0x140008dfb:  mov    #0x140185f80,%rax	   // DYN pointer
0x140008e02:  test   %rdi,0x20(%rax)   	  // test MASK against MyAttacked
0x140008e06:  je     0x1400091f0       	  // if 0, skip this
0x140008e0c:  mov    #0x140185f10,%r8       // WhitePawns
[...]
In fact, the entire CAPTURE_VALUE table seems overly reminiscent of that of IvanHoe (see init_gen.i), though the pieces are re-ordered, and the "EasySEE" flags are not always the same (these have changed over various versions of IvanHoe, but I can't find an exact match).

Code: Select all

0x14052e600:	0x07000000	0x00000000	0x00000000	0x00000000
0x14052e610:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e620:	0x00000000	0xab200000	0xb3200000	0xbb200000
0x14052e630:	0xc3200000	0xcb200000	0x00000000	0x00000000
0x14052e640:	0x06008000	0x00000000	0x00000000	0x00000000
0x14052e650:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e660:	0x00000000	0xb0100000	0xb8200000	0xc0200000
0x14052e670:	0xc8200000	0xd0200000	0x00000000	0x00000000
0x14052e680:	0x05008000	0x00000000	0x00000000	0x00000000
0x14052e690:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e6a0:	0x00000000	0xaf000000	0xb7100000	0xbf100000
0x14052e6b0:	0xc7200000	0xcf200000	0x00000000	0x00000000
0x14052e6c0:	0x04008000	0x00000000	0x00000000	0x00000000
0x14052e6d0:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e6e0:	0x00000000	0xae000000	0xb6100000	0xbe100000
0x14052e6f0:	0xc6200000	0xce200000	0x00000000	0x00000000
0x14052e700:	0x03008000	0x00000000	0x00000000	0x00000000
0x14052e710:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e720:	0x00000000	0xad000000	0xb5000000	0xbd000000
0x14052e730:	0xc5100000	0xcd200000	0x00000000	0x00000000
0x14052e740:	0x02008000	0x00000000	0x00000000	0x00000000
0x14052e750:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e760:	0x00000000	0xac000000	0xb4000000	0xbc000000
0x14052e770:	0xc4000000	0xcc100000	0x00000000	0x00000000
0x14052e780:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e790:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e7a0:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e7b0:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e7c0:	0x07000000	0x00000000	0xab200000	0xb3200000
0x14052e7d0:	0xbb200000	0xc3200000	0xcb200000	0x00000000
0x14052e7e0:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e7f0:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e800:	0x06008000	0x00000000	0xb0100000	0xb8200000
0x14052e810:	0xc0200000	0xc8200000	0xd0200000	0x00000000
0x14052e820:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e830:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e840:	0x05008000	0x00000000	0xaf000000	0xb7100000
0x14052e850:	0xbf100000	0xc7200000	0xcf200000	0x00000000
0x14052e860:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e870:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e880:	0x04008000	0x00000000	0xae000000	0xb6100000
0x14052e890:	0xbe100000	0xc6200000	0xce200000	0x00000000
0x14052e8a0:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e8b0:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e8c0:	0x03008000	0x00000000	0xad000000	0xb5000000
0x14052e8d0:	0xbd000000	0xc5100000	0xcd200000	0x00000000
0x14052e8e0:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e8f0:	0x00000000	0x00000000	0x00000000	0x00000000
0x14052e900:	0x02008000	0x00000000	0xac000000	0xb4000000
Last edited by BB+ on Tue Aug 10, 2010 5:24 am, edited 1 time in total.

User avatar
kingliveson
Posts: 1388
Joined: Thu Jun 10, 2010 1:22 am
Real Name: Franklin Titus
Location: 28°32'1"N 81°22'33"W

Re: Why Is Houdini Not Entered In The WCCC??

Post by kingliveson » Tue Aug 10, 2010 5:23 am

I need to be more careful with what is posted. If you really want to do better analysis, use the initial release of Houdini. I have attached the binary, including RobboLito and source. More modified code below:

RobboLito 0.09 w32
Aug 4 2010 19:40:41
basic windows version by kranium, improved by sentinel

Code: Select all

.text:00424010 ; =============== S U B R O U T I N E =======================================
.text:00424010
.text:00424010 ; Attributes: bp-based frame
.text:00424010
.text:00424010 sub_424010      proc near               ; CODE XREF: sub_417AC0+5C2p
.text:00424010                                         ; sub_4254F0+E9p
.text:00424010
.text:00424010 var_10          = qword ptr -10h
.text:00424010 var_8           = dword ptr -8
.text:00424010 var_4           = dword ptr -4
.text:00424010
.text:00424010                 push    ebp
.text:00424011                 mov     ebp, esp
.text:00424013                 sub     esp, 10h
.text:00424016                 xor     eax, eax
.text:00424018                 push    esi
.text:00424019                 mov     dword ptr qword_780E60, eax
.text:0042401E                 mov     dword ptr qword_780E60+4, eax
.text:00424023                 push    edi
.text:00424024                 mov     byte_5F7500, al
.text:00424029                 mov     ecx, 1Eh
.text:0042402E                 mov     esi, offset qword_780E60
.text:00424033                 mov     edi, offset qword_780E68
.text:00424038                 rep movsd
.text:0042403A                 mov     esi, dword_73E940
.text:00424040                 mov     [esi+8], eax
.text:00424043                 mov     [esi+0Ch], eax
.text:00424046                 mov     [esi], eax
.text:00424048                 mov     [esi+4], eax
.text:0042404B                 mov     [esi+10h], eax
.text:0042404E                 mov     [esi+14h], eax
.text:00424051                 mov     eax, 1
.text:00424056                 sub     eax, offset byte_780E20
.text:0042405B                 mov     [ebp+var_4], eax
.text:0042405E                 mov     eax, 2
.text:00424063                 sub     eax, offset byte_780E20
.text:00424068                 mov     [ebp+var_8], eax
.text:0042406B                 mov     eax, 3
.text:00424070                 xor     edi, edi
.text:00424072                 sub     eax, offset byte_780E20
.text:00424077                 mov     dword ptr [ebp+var_10+4], eax
.text:0042407A                 push    ebx
.text:0042407B                 jmp     short loc_424080
.text:0042407B ; ---------------------------------------------------------------------------
.text:0042407D                 align 10h
.text:00424080
.text:00424080 loc_424080:                             ; CODE XREF: sub_424010+6Bj
.text:00424080                                         ; sub_424010+25Bj
.text:00424080                 movzx   ebx, byte_780E20[edi]
.text:00424087                 test    ebx, ebx
.text:00424089                 jz      short loc_4240F3
.text:0042408B                 mov     eax, ebx
.text:0042408D                 shl     eax, 6
.text:00424090                 add     eax, edi
.text:00424092                 mov     ecx, dword_77FE20[eax*4]
.text:00424099                 add     [esi+14h], ecx
.text:0042409C                 mov     edx, dword_719A80[eax*8]
.text:004240A3                 xor     [esi], edx
.text:004240A5                 mov     ecx, dword_719A84[eax*8]
.text:004240AC                 xor     [esi+4], ecx
.text:004240AF                 cmp     ebx, 1
.text:004240B2                 jz      short loc_4240B9
.text:004240B4                 cmp     ebx, 9
.text:004240B7                 jnz     short loc_4240CD
.text:004240B9
.text:004240B9 loc_4240B9:                             ; CODE XREF: sub_424010+A2j
.text:004240B9                 mov     edx, dword_719A80[eax*8]
.text:004240C0                 xor     [esi+8], edx
.text:004240C3                 mov     eax, dword_719A84[eax*8]
.text:004240CA                 xor     [esi+0Ch], eax
.text:004240CD
.text:004240CD loc_4240CD:                             ; CODE XREF: sub_424010+A7j
.text:004240CD                 mov     ecx, ds:dword_436BC0[ebx*4]
.text:004240D4                 add     [esi+10h], ecx
.text:004240D7                 mov     eax, 1
.text:004240DC                 xor     edx, edx
.text:004240DE                 mov     ecx, edi
.text:004240E0                 call    __allshl
.text:004240E5                 or      dword ptr qword_780E60[ebx*8], eax
.text:004240EC                 or      dword ptr qword_780E60+4[ebx*8], edx
.text:004240F3
.text:004240F3 loc_4240F3:                             ; CODE XREF: sub_424010+79j
.text:004240F3                 movzx   ebx, byte_780E21[edi]
.text:004240FA                 test    ebx, ebx
.text:004240FC                 jz      short loc_42416F
.text:004240FE                 mov     edx, ebx
.text:00424100                 shl     edx, 6
.text:00424103                 lea     eax, [edx+edi]
.text:00424106                 mov     ecx, dword_77FE24[eax*4]
.text:0042410D                 add     [esi+14h], ecx
.text:00424110                 mov     edx, dword_719A88[eax*8]
.text:00424117                 xor     [esi], edx
.text:00424119                 mov     ecx, dword_719A8C[eax*8]
.text:00424120                 xor     [esi+4], ecx
.text:00424123                 cmp     ebx, 1
.text:00424126                 jz      short loc_42412D
.text:00424128                 cmp     ebx, 9
.text:0042412B                 jnz     short loc_424141
.text:0042412D
.text:0042412D loc_42412D:                             ; CODE XREF: sub_424010+116j
.text:0042412D                 mov     edx, dword_719A88[eax*8]
.text:00424134                 xor     [esi+8], edx
.text:00424137                 mov     eax, dword_719A8C[eax*8]
.text:0042413E                 xor     [esi+0Ch], eax
.text:00424141
.text:00424141 loc_424141:                             ; CODE XREF: sub_424010+11Bj
.text:00424141                 mov     ecx, ds:dword_436BC0[ebx*4]
.text:00424148                 mov     edx, [ebp+var_4]
.text:0042414B                 add     [esi+10h], ecx
.text:0042414E                 lea     ecx, byte_780E20[edi+edx]
.text:00424155                 mov     eax, 1
.text:0042415A                 xor     edx, edx
.text:0042415C                 call    __allshl
.text:00424161                 or      dword ptr qword_780E60[ebx*8], eax
.text:00424168                 or      dword ptr qword_780E60+4[ebx*8], edx
.text:0042416F
.text:0042416F loc_42416F:                             ; CODE XREF: sub_424010+ECj
.text:0042416F                 movzx   ebx, byte_780E22[edi]
.text:00424176                 test    ebx, ebx
.text:00424178                 jz      short loc_4241EA
.text:0042417A                 mov     eax, ebx
.text:0042417C                 shl     eax, 6
.text:0042417F                 add     eax, edi
.text:00424181                 mov     ecx, dword_77FE28[eax*4]
.text:00424188                 add     [esi+14h], ecx
.text:0042418B                 mov     edx, dword_719A90[eax*8]
.text:00424192                 xor     [esi], edx
.text:00424194                 mov     ecx, dword_719A94[eax*8]
.text:0042419B                 xor     [esi+4], ecx
.text:0042419E                 cmp     ebx, 1
.text:004241A1                 jz      short loc_4241A8
.text:004241A3                 cmp     ebx, 9
.text:004241A6                 jnz     short loc_4241BC
.text:004241A8
.text:004241A8 loc_4241A8:                             ; CODE XREF: sub_424010+191j
.text:004241A8                 mov     edx, dword_719A90[eax*8]
.text:004241AF                 xor     [esi+8], edx
.text:004241B2                 mov     eax, dword_719A94[eax*8]
.text:004241B9                 xor     [esi+0Ch], eax
.text:004241BC
.text:004241BC loc_4241BC:                             ; CODE XREF: sub_424010+196j
.text:004241BC                 mov     ecx, ds:dword_436BC0[ebx*4]
.text:004241C3                 mov     edx, [ebp+var_8]
.text:004241C6                 add     [esi+10h], ecx
.text:004241C9                 lea     ecx, byte_780E20[edi+edx]
.text:004241D0                 mov     eax, 1
.text:004241D5                 xor     edx, edx
.text:004241D7                 call    __allshl
.text:004241DC                 or      dword ptr qword_780E60[ebx*8], eax
.text:004241E3                 or      dword ptr qword_780E60+4[ebx*8], edx
.text:004241EA
.text:004241EA loc_4241EA:                             ; CODE XREF: sub_424010+168j
.text:004241EA                 movzx   ebx, byte_780E23[edi]
.text:004241F1                 test    ebx, ebx
.text:004241F3                 jz      short loc_424265
.text:004241F5                 mov     eax, ebx
.text:004241F7                 shl     eax, 6
.text:004241FA                 add     eax, edi
.text:004241FC                 mov     ecx, dword_77FE2C[eax*4]
.text:00424203                 add     [esi+14h], ecx
.text:00424206                 mov     edx, dword_719A98[eax*8]
.text:0042420D                 xor     [esi], edx
.text:0042420F                 mov     ecx, dword_719A9C[eax*8]
.text:00424216                 xor     [esi+4], ecx
.text:00424219                 cmp     ebx, 1
.text:0042421C                 jz      short loc_424223
.text:0042421E                 cmp     ebx, 9
.text:00424221                 jnz     short loc_424237
.text:00424223
.text:00424223 loc_424223:                             ; CODE XREF: sub_424010+20Cj
.text:00424223                 mov     edx, dword_719A98[eax*8]
.text:0042422A                 xor     [esi+8], edx
.text:0042422D                 mov     eax, dword_719A9C[eax*8]
.text:00424234                 xor     [esi+0Ch], eax
.text:00424237
.text:00424237 loc_424237:                             ; CODE XREF: sub_424010+211j
.text:00424237                 mov     ecx, ds:dword_436BC0[ebx*4]
.text:0042423E                 mov     edx, dword ptr [ebp+var_10+4]
.text:00424241                 add     [esi+10h], ecx
.text:00424244                 lea     ecx, byte_780E20[edi+edx]
.text:0042424B                 mov     eax, 1
.text:00424250                 xor     edx, edx
.text:00424252                 call    __allshl
.text:00424257                 or      dword ptr qword_780E60[ebx*8], eax
.text:0042425E                 or      dword ptr qword_780E60+4[ebx*8], edx
.text:00424265
.text:00424265 loc_424265:                             ; CODE XREF: sub_424010+1E3j
.text:00424265                 add     edi, 4
.text:00424268                 cmp     edi, 3Fh
.text:0042426B                 jle     loc_424080
.text:00424271                 mov     eax, dword ptr qword_780E68
.text:00424276                 or      eax, dword ptr qword_780E70
.text:0042427C                 mov     edi, dword ptr qword_780E78
.text:00424282                 or      eax, dword ptr qword_780E88
.text:00424288                 mov     ecx, dword ptr qword_780EA8+4
.text:0042428E                 or      eax, dword ptr qword_780E80
.text:00424294                 or      ecx, dword ptr qword_780EB0+4
.text:0042429A                 or      eax, dword ptr qword_780E90
.text:004242A0                 or      ecx, dword ptr qword_780EC8+4
.text:004242A6                 or      eax, dword ptr qword_780E98
.text:004242AC                 or      ecx, dword ptr qword_780EC0+4
.text:004242B2                 mov     edx, dword ptr qword_780E68+4
.text:004242B8                 or      edx, dword ptr qword_780E70+4
.text:004242BE                 or      ecx, dword ptr qword_780ED0+4
.text:004242C4                 or      edx, dword ptr qword_780E88+4
.text:004242CA                 or      eax, edi
.text:004242CC                 or      edx, dword ptr qword_780E80+4
.text:004242D2                 or      ecx, dword ptr qword_780ED8+4
.text:004242D8                 or      edx, dword ptr qword_780E90+4
.text:004242DE                 mov     dword ptr qword_780E60, eax
.text:004242E3                 mov     eax, dword ptr qword_780EA8
.text:004242E8                 or      eax, dword ptr qword_780EB0
.text:004242EE                 or      edx, dword ptr qword_780E98+4
.text:004242F4                 or      eax, dword ptr qword_780EC8
.text:004242FA                 or      ecx, dword ptr qword_780EB8+4
.text:00424300                 or      eax, dword ptr qword_780EC0
.text:00424306                 mov     ebx, dword ptr qword_780E78+4
.text:0042430C                 or      eax, dword ptr qword_780ED0
.text:00424312                 or      edx, ebx
.text:00424314                 or      eax, dword ptr qword_780ED8
.text:0042431A                 mov     dword ptr qword_780EA0+4, ecx
.text:00424320                 or      eax, dword ptr qword_780EB8
.text:00424326                 or      ecx, edx
.text:00424328                 mov     dword ptr qword_780EA0, eax
.text:0042432D                 or      eax, dword ptr qword_780E60
.text:00424333                 mov     dword ptr qword_780EE0+4, ecx
.text:00424339                 mov     dword ptr qword_780EE0, eax
.text:0042433E                 mov     dword ptr [ebp+var_10], eax
.text:00424341                 mov     eax, dword ptr qword_780E98
.text:00424346                 mov     dword ptr [ebp+var_10+4], ecx
.text:00424349                 mov     ecx, eax
.text:0042434B                 shr     ecx, 1
.text:0042434D                 and     ecx, 55555555h
.text:00424353                 sub     eax, ecx
.text:00424355                 mov     ecx, eax
.text:00424357                 mov     dword ptr qword_780E60+4, edx
.text:0042435D                 xor     edx, edx
.text:0042435F                 and     eax, 33333333h
.text:00424364                 mov     dword ptr qword_780EF8, edx
.text:0042436A                 mov     dword ptr qword_780EF8+4, edx
.text:00424370                 mov     dword ptr qword_780EF0, edx
.text:00424376                 mov     dword ptr qword_780EF0+4, edx
.text:0042437C                 mov     dword ptr qword_780EE8, edx
.text:00424382                 mov     dword ptr qword_780EE8+4, edx
.text:00424388                 shr     ecx, 2
.text:0042438B                 and     ecx, 33333333h
.text:00424391                 add     ecx, eax
.text:00424393                 mov     eax, dword ptr qword_780E98+4
.text:00424398                 mov     edx, eax
.text:0042439A                 shr     edx, 1
.text:0042439C                 and     edx, 55555555h
.text:004243A2                 sub     eax, edx
.text:004243A4                 mov     edx, eax
.text:004243A6                 shr     edx, 2
.text:004243A9                 and     eax, 33333333h
.text:004243AE                 and     edx, 33333333h
.text:004243B4                 add     edx, eax
.text:004243B6                 mov     eax, edx
.text:004243B8                 shr     eax, 4
.text:004243BB                 add     eax, edx
.text:004243BD                 mov     edx, ecx
.text:004243BF                 shr     edx, 4
.text:004243C2                 add     edx, ecx
.text:004243C4                 and     eax, 0F0F0F0Fh
.text:004243C9                 and     edx, 0F0F0F0Fh
.text:004243CF                 imul    eax, 1010101h
.text:004243D5                 imul    edx, 1010101h
.text:004243DB                 shr     eax, 18h
.text:004243DE                 shr     edx, 18h
.text:004243E1                 add     eax, edx
.text:004243E3                 cmp     eax, 1
.text:004243E6                 jg      loc_424602
.text:004243EC                 mov     eax, dword ptr qword_780ED8
.text:004243F1                 mov     ecx, eax
.text:004243F3                 shr     ecx, 1
.text:004243F5                 and     ecx, 55555555h
.text:004243FB                 sub     eax, ecx
.text:004243FD                 mov     ecx, eax
.text:004243FF                 and     eax, 33333333h
.text:00424404                 shr     ecx, 2
.text:00424407                 and     ecx, 33333333h
.text:0042440D                 add     ecx, eax
.text:0042440F                 mov     eax, dword ptr qword_780ED8+4
.text:00424414                 mov     edx, eax
.text:00424416                 shr     edx, 1
.text:00424418                 and     edx, 55555555h
.text:0042441E                 sub     eax, edx
.text:00424420                 mov     edx, eax
.text:00424422                 shr     edx, 2
.text:00424425                 and     eax, 33333333h
.text:0042442A                 and     edx, 33333333h
.text:00424430                 add     edx, eax
.text:00424432                 mov     eax, edx
.text:00424434                 shr     eax, 4
.text:00424437                 add     eax, edx
.text:00424439                 mov     edx, ecx
.text:0042443B                 shr     edx, 4
.text:0042443E                 add     edx, ecx
.text:00424440                 and     eax, 0F0F0F0Fh
.text:00424445                 and     edx, 0F0F0F0Fh
.text:0042444B                 imul    eax, 1010101h
.text:00424451                 imul    edx, 1010101h
.text:00424457                 shr     eax, 18h
.text:0042445A                 shr     edx, 18h
.text:0042445D                 add     eax, edx
.text:0042445F                 cmp     eax, 1
.text:00424462                 jg      loc_424602
.text:00424468                 mov     eax, dword ptr qword_780E90
.text:0042446D                 mov     ecx, eax
.text:0042446F                 shr     ecx, 1
.text:00424471                 and     ecx, 55555555h
.text:00424477                 sub     eax, ecx
.text:00424479                 mov     ecx, eax
.text:0042447B                 and     eax, 33333333h
.text:00424480                 shr     ecx, 2
.text:00424483                 and     ecx, 33333333h
.text:00424489                 add     ecx, eax
.text:0042448B                 mov     eax, dword ptr qword_780E90+4
.text:00424490                 mov     edx, eax
.text:00424492                 shr     edx, 1
.text:00424494                 and     edx, 55555555h
.text:0042449A                 sub     eax, edx
.text:0042449C                 mov     edx, eax
.text:0042449E                 shr     edx, 2
.text:004244A1                 and     eax, 33333333h
.text:004244A6                 and     edx, 33333333h
.text:004244AC                 add     edx, eax
.text:004244AE                 mov     eax, edx
.text:004244B0                 shr     eax, 4
.text:004244B3                 add     eax, edx
.text:004244B5                 mov     edx, ecx
.text:004244B7                 shr     edx, 4
.text:004244BA                 add     edx, ecx
.text:004244BC                 and     eax, 0F0F0F0Fh
.text:004244C1                 and     edx, 0F0F0F0Fh
.text:004244C7                 imul    eax, 1010101h
.text:004244CD                 imul    edx, 1010101h
.text:004244D3                 shr     eax, 18h
.text:004244D6                 shr     edx, 18h
.text:004244D9                 add     eax, edx
.text:004244DB                 cmp     eax, 2
.text:004244DE                 jg      loc_424602
.text:004244E4                 mov     eax, dword ptr qword_780ED0
.text:004244E9                 mov     ecx, eax
.text:004244EB                 shr     ecx, 1
.text:004244ED                 and     ecx, 55555555h
.text:004244F3                 sub     eax, ecx
.text:004244F5                 mov     ecx, eax
.text:004244F7                 and     eax, 33333333h
.text:004244FC                 shr     ecx, 2
.text:004244FF                 and     ecx, 33333333h
.text:00424505                 add     ecx, eax
.text:00424507                 mov     eax, dword ptr qword_780ED0+4
.text:0042450C                 mov     edx, eax
.text:0042450E                 shr     edx, 1
.text:00424510                 and     edx, 55555555h
.text:00424516                 sub     eax, edx
.text:00424518                 mov     edx, eax
.text:0042451A                 shr     edx, 2
.text:0042451D                 and     eax, 33333333h
.text:00424522                 and     edx, 33333333h
.text:00424528                 add     edx, eax
.text:0042452A                 mov     eax, edx
.text:0042452C                 shr     eax, 4
.text:0042452F                 add     eax, edx
.text:00424531                 mov     edx, ecx
.text:00424533                 shr     edx, 4
.text:00424536                 add     edx, ecx
.text:00424538                 and     eax, 0F0F0F0Fh
.text:0042453D                 and     edx, 0F0F0F0Fh
.text:00424543                 imul    eax, 1010101h
.text:00424549                 imul    edx, 1010101h
.text:0042454F                 shr     eax, 18h
.text:00424552                 shr     edx, 18h
.text:00424555                 add     eax, edx
.text:00424557                 cmp     eax, 2
.text:0042455A                 jg      loc_424602
.text:00424560                 mov     eax, dword ptr qword_780E80+4
.text:00424565                 mov     ecx, dword ptr qword_780E80
.text:0042456B                 push    eax
.text:0042456C                 push    ecx
.text:0042456D                 call    sub_401000
.text:00424572                 add     esp, 8
.text:00424575                 cmp     eax, 1
.text:00424578                 jg      loc_424602
.text:0042457E                 mov     edx, dword ptr qword_780EC0+4
.text:00424584                 mov     eax, dword ptr qword_780EC0
.text:00424589                 push    edx
.text:0042458A                 push    eax
.text:0042458B                 call    sub_401000
.text:00424590                 add     esp, 8
.text:00424593                 cmp     eax, 1
.text:00424596                 jg      short loc_424602
.text:00424598                 mov     ecx, dword ptr qword_780E70+4
.text:0042459E                 mov     edx, dword ptr qword_780E70
.text:004245A4                 push    ecx
.text:004245A5                 push    edx
.text:004245A6                 call    sub_401000
.text:004245AB                 add     esp, 8
.text:004245AE                 cmp     eax, 2
.text:004245B1                 jg      short loc_424602
.text:004245B3                 mov     eax, dword ptr qword_780EB0+4
.text:004245B8                 mov     ecx, dword ptr qword_780EB0
.text:004245BE                 push    eax
.text:004245BF                 push    ecx
.text:004245C0                 call    sub_401000
.text:004245C5                 add     esp, 8
.text:004245C8                 cmp     eax, 2
.text:004245CB                 jg      short loc_424602
.text:004245CD                 mov     edx, dword ptr qword_780E88+4
.text:004245D3                 mov     eax, dword ptr qword_780E88
.text:004245D8                 push    edx
.text:004245D9                 push    eax
.text:004245DA                 call    sub_401000
.text:004245DF                 add     esp, 8
.text:004245E2                 cmp     eax, 1
.text:004245E5                 jg      short loc_424602
.text:004245E7                 mov     ecx, dword ptr qword_780EC8+4
.text:004245ED                 mov     edx, dword ptr qword_780EC8
.text:004245F3                 push    ecx
.text:004245F4                 push    edx
.text:004245F5                 call    sub_401000
.text:004245FA                 add     esp, 8
.text:004245FD                 cmp     eax, 1
.text:00424600                 jle     short loc_424609
.text:00424602
.text:00424602 loc_424602:                             ; CODE XREF: sub_424010+3D6j
.text:00424602                                         ; sub_424010+452j ...
.text:00424602                 or      dword ptr [esi+10h], 80000000h
.text:00424609
.text:00424609 loc_424609:                             ; CODE XREF: sub_424010+5F0j
.text:00424609                 mov     eax, edi
.text:0042460B                 mov     ecx, eax
.text:0042460D                 shr     ecx, 1
.text:0042460F                 and     ecx, 55555555h
.text:00424615                 sub     eax, ecx
.text:00424617                 mov     ecx, eax
.text:00424619                 and     eax, 33333333h
.text:0042461E                 shr     ecx, 2
.text:00424621                 and     ecx, 33333333h
.text:00424627                 add     ecx, eax
.text:00424629                 mov     eax, ebx
.text:0042462B                 mov     edx, eax
.text:0042462D                 shr     edx, 1
.text:0042462F                 and     edx, 55555555h
.text:00424635                 sub     eax, edx
.text:00424637                 mov     edx, eax
.text:00424639                 shr     edx, 2
.text:0042463C                 and     eax, 33333333h
.text:00424641                 and     edx, 33333333h
.text:00424647                 add     edx, eax
.text:00424649                 mov     eax, edx
.text:0042464B                 shr     eax, 4
.text:0042464E                 add     eax, edx
.text:00424650                 mov     edx, ecx
.text:00424652                 shr     edx, 4
.text:00424655                 add     edx, ecx
.text:00424657                 and     eax, 0F0F0F0Fh
.text:0042465C                 and     edx, 0F0F0F0Fh
.text:00424662                 imul    eax, 1010101h
.text:00424668                 imul    edx, 1010101h
.text:0042466E                 shr     eax, 18h
.text:00424671                 shr     edx, 18h
.text:00424674                 add     eax, edx
.text:00424676                 cmp     eax, 1
.text:00424679                 jz      short loc_42469B
.text:0042467B                 push    offset aKingWhite1 ; "king white != 1"
.text:00424680                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00424685                 call    sub_427298
.text:0042468A                 call    sub_426EFD
.text:0042468F                 add     eax, 20h
.text:00424692                 push    eax             ; FILE *
.text:00424693                 call    _fflush
.text:00424698                 add     esp, 0Ch
.text:0042469B
.text:0042469B loc_42469B:                             ; CODE XREF: sub_424010+669j
.text:0042469B                 mov     eax, dword ptr qword_780EB8
.text:004246A0                 mov     ecx, eax
.text:004246A2                 shr     ecx, 1
.text:004246A4                 and     ecx, 55555555h
.text:004246AA                 sub     eax, ecx
.text:004246AC                 mov     ecx, eax
.text:004246AE                 and     eax, 33333333h
.text:004246B3                 shr     ecx, 2
.text:004246B6                 and     ecx, 33333333h
.text:004246BC                 add     ecx, eax
.text:004246BE                 mov     eax, dword ptr qword_780EB8+4
.text:004246C3                 mov     edx, eax
.text:004246C5                 shr     edx, 1
.text:004246C7                 and     edx, 55555555h
.text:004246CD                 sub     eax, edx
.text:004246CF                 mov     edx, eax
.text:004246D1                 shr     edx, 2
.text:004246D4                 and     eax, 33333333h
.text:004246D9                 and     edx, 33333333h
.text:004246DF                 add     edx, eax
.text:004246E1                 mov     eax, edx
.text:004246E3                 shr     eax, 4
.text:004246E6                 add     eax, edx
.text:004246E8                 mov     edx, ecx
.text:004246EA                 shr     edx, 4
.text:004246ED                 add     edx, ecx
.text:004246EF                 and     eax, 0F0F0F0Fh
.text:004246F4                 and     edx, 0F0F0F0Fh
.text:004246FA                 imul    eax, 1010101h
.text:00424700                 imul    edx, 1010101h
.text:00424706                 shr     eax, 18h
.text:00424709                 shr     edx, 18h
.text:0042470C                 add     eax, edx
.text:0042470E                 cmp     eax, 1
.text:00424711                 jz      short loc_424733
.text:00424713                 push    offset aKingBlack1 ; "king black != 1"
.text:00424718                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:0042471D                 call    sub_427298
.text:00424722                 call    sub_426EFD
.text:00424727                 add     eax, 20h
.text:0042472A                 push    eax             ; FILE *
.text:0042472B                 call    _fflush
.text:00424730                 add     esp, 0Ch
.text:00424733
.text:00424733 loc_424733:                             ; CODE XREF: sub_424010+701j
.text:00424733                 mov     eax, dword ptr qword_780E98
.text:00424738                 mov     ecx, eax
.text:0042473A                 shr     ecx, 1
.text:0042473C                 and     ecx, 55555555h
.text:00424742                 sub     eax, ecx
.text:00424744                 mov     ecx, eax
.text:00424746                 and     eax, 33333333h
.text:0042474B                 shr     ecx, 2
.text:0042474E                 and     ecx, 33333333h
.text:00424754                 add     ecx, eax
.text:00424756                 mov     eax, dword ptr qword_780E98+4
.text:0042475B                 mov     edx, eax
.text:0042475D                 shr     edx, 1
.text:0042475F                 and     edx, 55555555h
.text:00424765                 sub     eax, edx
.text:00424767                 mov     edx, eax
.text:00424769                 shr     edx, 2
.text:0042476C                 and     eax, 33333333h
.text:00424771                 and     edx, 33333333h
.text:00424777                 add     edx, eax
.text:00424779                 mov     eax, edx
.text:0042477B                 shr     eax, 4
.text:0042477E                 add     eax, edx
.text:00424780                 mov     edx, ecx
.text:00424782                 shr     edx, 4
.text:00424785                 add     edx, ecx
.text:00424787                 and     eax, 0F0F0F0Fh
.text:0042478C                 and     edx, 0F0F0F0Fh
.text:00424792                 imul    eax, 1010101h
.text:00424798                 imul    edx, 1010101h
.text:0042479E                 shr     eax, 18h
.text:004247A1                 shr     edx, 18h
.text:004247A4                 add     eax, edx
.text:004247A6                 cmp     eax, 9
.text:004247A9                 jle     short loc_4247CB
.text:004247AB                 push    offset aQueenWhite9 ; "queen white > 9"
.text:004247B0                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:004247B5                 call    sub_427298
.text:004247BA                 call    sub_426EFD
.text:004247BF                 add     eax, 20h
.text:004247C2                 push    eax             ; FILE *
.text:004247C3                 call    _fflush
.text:004247C8                 add     esp, 0Ch
.text:004247CB
.text:004247CB loc_4247CB:                             ; CODE XREF: sub_424010+799j
.text:004247CB                 mov     eax, dword ptr qword_780ED8
.text:004247D0                 mov     ecx, eax
.text:004247D2                 shr     ecx, 1
.text:004247D4                 and     ecx, 55555555h
.text:004247DA                 sub     eax, ecx
.text:004247DC                 mov     ecx, eax
.text:004247DE                 and     eax, 33333333h
.text:004247E3                 shr     ecx, 2
.text:004247E6                 and     ecx, 33333333h
.text:004247EC                 add     ecx, eax
.text:004247EE                 mov     eax, dword ptr qword_780ED8+4
.text:004247F3                 mov     edx, eax
.text:004247F5                 shr     edx, 1
.text:004247F7                 and     edx, 55555555h
.text:004247FD                 sub     eax, edx
.text:004247FF                 mov     edx, eax
.text:00424801                 shr     edx, 2
.text:00424804                 and     eax, 33333333h
.text:00424809                 and     edx, 33333333h
.text:0042480F                 add     edx, eax
.text:00424811                 mov     eax, edx
.text:00424813                 shr     eax, 4
.text:00424816                 add     eax, edx
.text:00424818                 mov     edx, ecx
.text:0042481A                 shr     edx, 4
.text:0042481D                 add     edx, ecx
.text:0042481F                 and     eax, 0F0F0F0Fh
.text:00424824                 and     edx, 0F0F0F0Fh
.text:0042482A                 imul    eax, 1010101h
.text:00424830                 imul    edx, 1010101h
.text:00424836                 shr     eax, 18h
.text:00424839                 shr     edx, 18h
.text:0042483C                 add     eax, edx
.text:0042483E                 cmp     eax, 9
.text:00424841                 jle     short loc_424863
.text:00424843                 push    offset aQueenBlack9 ; "queen black > 9"
.text:00424848                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:0042484D                 call    sub_427298
.text:00424852                 call    sub_426EFD
.text:00424857                 add     eax, 20h
.text:0042485A                 push    eax             ; FILE *
.text:0042485B                 call    _fflush
.text:00424860                 add     esp, 0Ch
.text:00424863
.text:00424863 loc_424863:                             ; CODE XREF: sub_424010+831j
.text:00424863                 mov     eax, dword ptr qword_780E90
.text:00424868                 mov     ecx, eax
.text:0042486A                 shr     ecx, 1
.text:0042486C                 and     ecx, 55555555h
.text:00424872                 sub     eax, ecx
.text:00424874                 mov     ecx, eax
.text:00424876                 and     eax, 33333333h
.text:0042487B                 shr     ecx, 2
.text:0042487E                 and     ecx, 33333333h
.text:00424884                 add     ecx, eax
.text:00424886                 mov     eax, dword ptr qword_780E90+4
.text:0042488B                 mov     edx, eax
.text:0042488D                 shr     edx, 1
.text:0042488F                 and     edx, 55555555h
.text:00424895                 sub     eax, edx
.text:00424897                 mov     edx, eax
.text:00424899                 shr     edx, 2
.text:0042489C                 and     eax, 33333333h
.text:004248A1                 and     edx, 33333333h
.text:004248A7                 add     edx, eax
.text:004248A9                 mov     eax, edx
.text:004248AB                 shr     eax, 4
.text:004248AE                 add     eax, edx
.text:004248B0                 mov     edx, ecx
.text:004248B2                 shr     edx, 4
.text:004248B5                 add     edx, ecx
.text:004248B7                 and     eax, 0F0F0F0Fh
.text:004248BC                 and     edx, 0F0F0F0Fh
.text:004248C2                 imul    eax, 1010101h
.text:004248C8                 imul    edx, 1010101h
.text:004248CE                 shr     eax, 18h
.text:004248D1                 shr     edx, 18h
.text:004248D4                 add     eax, edx
.text:004248D6                 cmp     eax, 0Ah
.text:004248D9                 jle     short loc_4248FB
.text:004248DB                 push    offset aRookWhite10 ; "rook white > 10"
.text:004248E0                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:004248E5                 call    sub_427298
.text:004248EA                 call    sub_426EFD
.text:004248EF                 add     eax, 20h
.text:004248F2                 push    eax             ; FILE *
.text:004248F3                 call    _fflush
.text:004248F8                 add     esp, 0Ch
.text:004248FB
.text:004248FB loc_4248FB:                             ; CODE XREF: sub_424010+8C9j
.text:004248FB                 mov     eax, dword ptr qword_780ED0
.text:00424900                 mov     ecx, eax
.text:00424902                 shr     ecx, 1
.text:00424904                 and     ecx, 55555555h
.text:0042490A                 sub     eax, ecx
.text:0042490C                 mov     ecx, eax
.text:0042490E                 and     eax, 33333333h
.text:00424913                 shr     ecx, 2
.text:00424916                 and     ecx, 33333333h
.text:0042491C                 add     ecx, eax
.text:0042491E                 mov     eax, dword ptr qword_780ED0+4
.text:00424923                 mov     edx, eax
.text:00424925                 shr     edx, 1
.text:00424927                 and     edx, 55555555h
.text:0042492D                 sub     eax, edx
.text:0042492F                 mov     edx, eax
.text:00424931                 shr     edx, 2
.text:00424934                 and     eax, 33333333h
.text:00424939                 and     edx, 33333333h
.text:0042493F                 add     edx, eax
.text:00424941                 mov     eax, edx
.text:00424943                 shr     eax, 4
.text:00424946                 add     eax, edx
.text:00424948                 mov     edx, ecx
.text:0042494A                 shr     edx, 4
.text:0042494D                 add     edx, ecx
.text:0042494F                 and     eax, 0F0F0F0Fh
.text:00424954                 and     edx, 0F0F0F0Fh
.text:0042495A                 imul    eax, 1010101h
.text:00424960                 imul    edx, 1010101h
.text:00424966                 shr     eax, 18h
.text:00424969                 shr     edx, 18h
.text:0042496C                 add     eax, edx
.text:0042496E                 cmp     eax, 0Ah
.text:00424971                 jle     short loc_424993
.text:00424973                 push    offset aRookBlack10 ; "rook black > 10"
.text:00424978                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:0042497D                 call    sub_427298
.text:00424982                 call    sub_426EFD
.text:00424987                 add     eax, 20h
.text:0042498A                 push    eax             ; FILE *
.text:0042498B                 call    _fflush
.text:00424990                 add     esp, 0Ch
.text:00424993
.text:00424993 loc_424993:                             ; CODE XREF: sub_424010+961j
.text:00424993                 mov     eax, dword ptr qword_780E80
.text:00424998                 mov     ecx, eax
.text:0042499A                 shr     ecx, 1
.text:0042499C                 and     ecx, 55555555h
.text:004249A2                 sub     eax, ecx
.text:004249A4                 mov     ecx, eax
.text:004249A6                 and     eax, 33333333h
.text:004249AB                 shr     ecx, 2
.text:004249AE                 and     ecx, 33333333h
.text:004249B4                 add     ecx, eax
.text:004249B6                 mov     eax, dword ptr qword_780E80+4
.text:004249BB                 mov     edx, eax
.text:004249BD                 shr     edx, 1
.text:004249BF                 and     edx, 55555555h
.text:004249C5                 sub     eax, edx
.text:004249C7                 mov     edx, eax
.text:004249C9                 shr     edx, 2
.text:004249CC                 and     eax, 33333333h
.text:004249D1                 and     edx, 33333333h
.text:004249D7                 add     edx, eax
.text:004249D9                 mov     eax, edx
.text:004249DB                 shr     eax, 4
.text:004249DE                 add     eax, edx
.text:004249E0                 mov     edx, ecx
.text:004249E2                 shr     edx, 4
.text:004249E5                 add     edx, ecx
.text:004249E7                 and     eax, 0F0F0F0Fh
.text:004249EC                 and     edx, 0F0F0F0Fh
.text:004249F2                 imul    eax, 1010101h
.text:004249F8                 imul    edx, 1010101h
.text:004249FE                 shr     eax, 18h
.text:00424A01                 shr     edx, 18h
.text:00424A04                 add     eax, edx
.text:00424A06                 cmp     eax, 9
.text:00424A09                 jle     short loc_424A2B
.text:00424A0B                 push    offset aChiaroWhite9 ; "chiaro white > 9"
.text:00424A10                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00424A15                 call    sub_427298
.text:00424A1A                 call    sub_426EFD
.text:00424A1F                 add     eax, 20h
.text:00424A22                 push    eax             ; FILE *
.text:00424A23                 call    _fflush
.text:00424A28                 add     esp, 0Ch
.text:00424A2B
.text:00424A2B loc_424A2B:                             ; CODE XREF: sub_424010+9F9j
.text:00424A2B                 mov     eax, dword ptr qword_780EC0
.text:00424A30                 mov     ecx, eax
.text:00424A32                 shr     ecx, 1
.text:00424A34                 and     ecx, 55555555h
.text:00424A3A                 sub     eax, ecx
.text:00424A3C                 mov     ecx, eax
.text:00424A3E                 and     eax, 33333333h
.text:00424A43                 shr     ecx, 2
.text:00424A46                 and     ecx, 33333333h
.text:00424A4C                 add     ecx, eax
.text:00424A4E                 mov     eax, dword ptr qword_780EC0+4
.text:00424A53                 mov     edx, eax
.text:00424A55                 shr     edx, 1
.text:00424A57                 and     edx, 55555555h
.text:00424A5D                 sub     eax, edx
.text:00424A5F                 mov     edx, eax
.text:00424A61                 shr     edx, 2
.text:00424A64                 and     eax, 33333333h
.text:00424A69                 and     edx, 33333333h
.text:00424A6F                 add     edx, eax
.text:00424A71                 mov     eax, edx
.text:00424A73                 shr     eax, 4
.text:00424A76                 add     eax, edx
.text:00424A78                 mov     edx, ecx
.text:00424A7A                 shr     edx, 4
.text:00424A7D                 add     edx, ecx
.text:00424A7F                 and     eax, 0F0F0F0Fh
.text:00424A84                 and     edx, 0F0F0F0Fh
.text:00424A8A                 imul    eax, 1010101h
.text:00424A90                 imul    edx, 1010101h
.text:00424A96                 shr     eax, 18h
.text:00424A99                 shr     edx, 18h
.text:00424A9C                 add     eax, edx
.text:00424A9E                 cmp     eax, 9
.text:00424AA1                 jle     short loc_424AC3
.text:00424AA3                 push    offset aChiaroBlack9 ; "chiaro black > 9"
.text:00424AA8                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00424AAD                 call    sub_427298
.text:00424AB2                 call    sub_426EFD
.text:00424AB7                 add     eax, 20h
.text:00424ABA                 push    eax             ; FILE *
.text:00424ABB                 call    _fflush
.text:00424AC0                 add     esp, 0Ch
.text:00424AC3
.text:00424AC3 loc_424AC3:                             ; CODE XREF: sub_424010+A91j
.text:00424AC3                 mov     eax, dword ptr qword_780E88
.text:00424AC8                 mov     ecx, eax
.text:00424ACA                 shr     ecx, 1
.text:00424ACC                 and     ecx, 55555555h
.text:00424AD2                 sub     eax, ecx
.text:00424AD4                 mov     ecx, eax
.text:00424AD6                 and     eax, 33333333h
.text:00424ADB                 shr     ecx, 2
.text:00424ADE                 and     ecx, 33333333h
.text:00424AE4                 add     ecx, eax
.text:00424AE6                 mov     eax, dword ptr qword_780E88+4
.text:00424AEB                 mov     edx, eax
.text:00424AED                 shr     edx, 1
.text:00424AEF                 and     edx, 55555555h
.text:00424AF5                 sub     eax, edx
.text:00424AF7                 mov     edx, eax
.text:00424AF9                 shr     edx, 2
.text:00424AFC                 and     eax, 33333333h
.text:00424B01                 and     edx, 33333333h
.text:00424B07                 add     edx, eax
.text:00424B09                 mov     eax, edx
.text:00424B0B                 shr     eax, 4
.text:00424B0E                 add     eax, edx
.text:00424B10                 mov     edx, ecx
.text:00424B12                 shr     edx, 4
.text:00424B15                 add     edx, ecx
.text:00424B17                 and     eax, 0F0F0F0Fh
.text:00424B1C                 and     edx, 0F0F0F0Fh
.text:00424B22                 imul    eax, 1010101h
.text:00424B28                 imul    edx, 1010101h
.text:00424B2E                 shr     eax, 18h
.text:00424B31                 shr     edx, 18h
.text:00424B34                 add     eax, edx
.text:00424B36                 cmp     eax, 9
.text:00424B39                 jle     short loc_424B5B
.text:00424B3B                 push    offset aDarkWhite9 ; "dark white > 9"
.text:00424B40                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00424B45                 call    sub_427298
.text:00424B4A                 call    sub_426EFD
.text:00424B4F                 add     eax, 20h
.text:00424B52                 push    eax             ; FILE *
.text:00424B53                 call    _fflush
.text:00424B58                 add     esp, 0Ch
.text:00424B5B
.text:00424B5B loc_424B5B:                             ; CODE XREF: sub_424010+B29j
.text:00424B5B                 mov     eax, dword ptr qword_780EC8
.text:00424B60                 mov     ecx, eax
.text:00424B62                 shr     ecx, 1
.text:00424B64                 and     ecx, 55555555h
.text:00424B6A                 sub     eax, ecx
.text:00424B6C                 mov     ecx, eax
.text:00424B6E                 and     eax, 33333333h
.text:00424B73                 shr     ecx, 2
.text:00424B76                 and     ecx, 33333333h
.text:00424B7C                 add     ecx, eax
.text:00424B7E                 mov     eax, dword ptr qword_780EC8+4
.text:00424B83                 mov     edx, eax
.text:00424B85                 shr     edx, 1
.text:00424B87                 and     edx, 55555555h
.text:00424B8D                 sub     eax, edx
.text:00424B8F                 mov     edx, eax
.text:00424B91                 shr     edx, 2
.text:00424B94                 and     eax, 33333333h
.text:00424B99                 and     edx, 33333333h
.text:00424B9F                 add     edx, eax
.text:00424BA1                 mov     eax, edx
.text:00424BA3                 shr     eax, 4
.text:00424BA6                 add     eax, edx
.text:00424BA8                 mov     edx, ecx
.text:00424BAA                 shr     edx, 4
.text:00424BAD                 add     edx, ecx
.text:00424BAF                 and     eax, 0F0F0F0Fh
.text:00424BB4                 and     edx, 0F0F0F0Fh
.text:00424BBA                 imul    eax, 1010101h
.text:00424BC0                 imul    edx, 1010101h
.text:00424BC6                 shr     eax, 18h
.text:00424BC9                 shr     edx, 18h
.text:00424BCC                 add     eax, edx
.text:00424BCE                 cmp     eax, 9
.text:00424BD1                 jle     short loc_424BF3
.text:00424BD3                 push    offset aDarkBlack9 ; "dark black > 9"
.text:00424BD8                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00424BDD                 call    sub_427298
.text:00424BE2                 call    sub_426EFD
.text:00424BE7                 add     eax, 20h
.text:00424BEA                 push    eax             ; FILE *
.text:00424BEB                 call    _fflush
.text:00424BF0                 add     esp, 0Ch
.text:00424BF3
.text:00424BF3 loc_424BF3:                             ; CODE XREF: sub_424010+BC1j
.text:00424BF3                 mov     eax, dword ptr qword_780E88
.text:00424BF8                 or      eax, dword ptr qword_780E80
.text:00424BFE                 mov     ecx, dword ptr qword_780E88+4
.text:00424C04                 or      ecx, dword ptr qword_780E80+4
.text:00424C0A                 mov     edx, eax
.text:00424C0C                 shr     edx, 1
.text:00424C0E                 and     edx, 55555555h
.text:00424C14                 sub     eax, edx
.text:00424C16                 mov     edx, eax
.text:00424C18                 and     edx, 33333333h
.text:00424C1E                 shr     eax, 2
.text:00424C21                 and     eax, 33333333h
.text:00424C26                 add     eax, edx
.text:00424C28                 mov     edx, ecx
.text:00424C2A                 shr     edx, 1
.text:00424C2C                 and     edx, 55555555h
.text:00424C32                 sub     ecx, edx
.text:00424C34                 mov     edx, ecx
.text:00424C36                 shr     edx, 2
.text:00424C39                 and     ecx, 33333333h
.text:00424C3F                 and     edx, 33333333h
.text:00424C45                 add     edx, ecx
.text:00424C47                 mov     ecx, edx
.text:00424C49                 shr     ecx, 4
.text:00424C4C                 add     ecx, edx
.text:00424C4E                 mov     edx, eax
.text:00424C50                 shr     edx, 4
.text:00424C53                 add     edx, eax
.text:00424C55                 and     ecx, 0F0F0F0Fh
.text:00424C5B                 and     edx, 0F0F0F0Fh
.text:00424C61                 imul    ecx, 1010101h
.text:00424C67                 imul    edx, 1010101h
.text:00424C6D                 shr     ecx, 18h
.text:00424C70                 shr     edx, 18h
.text:00424C73                 add     ecx, edx
.text:00424C75                 cmp     ecx, 0Ah
.text:00424C78                 jle     short loc_424C9A
.text:00424C7A                 push    offset aBishopWhite10 ; "bishop white > 10"
.text:00424C7F                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00424C84                 call    sub_427298
.text:00424C89                 call    sub_426EFD
.text:00424C8E                 add     eax, 20h
.text:00424C91                 push    eax             ; FILE *
.text:00424C92                 call    _fflush
.text:00424C97                 add     esp, 0Ch
.text:00424C9A
.text:00424C9A loc_424C9A:                             ; CODE XREF: sub_424010+C68j
.text:00424C9A                 mov     eax, dword ptr qword_780EC8
.text:00424C9F                 or      eax, dword ptr qword_780EC0
.text:00424CA5                 mov     ecx, dword ptr qword_780EC8+4
.text:00424CAB                 or      ecx, dword ptr qword_780EC0+4
.text:00424CB1                 mov     edx, eax
.text:00424CB3                 shr     edx, 1
.text:00424CB5                 and     edx, 55555555h
.text:00424CBB                 sub     eax, edx
.text:00424CBD                 mov     edx, eax
.text:00424CBF                 and     edx, 33333333h
.text:00424CC5                 shr     eax, 2
.text:00424CC8                 and     eax, 33333333h
.text:00424CCD                 add     eax, edx
.text:00424CCF                 mov     edx, ecx
.text:00424CD1                 shr     edx, 1
.text:00424CD3                 and     edx, 55555555h
.text:00424CD9                 sub     ecx, edx
.text:00424CDB                 mov     edx, ecx
.text:00424CDD                 shr     edx, 2
.text:00424CE0                 and     ecx, 33333333h
.text:00424CE6                 and     edx, 33333333h
.text:00424CEC                 add     edx, ecx
.text:00424CEE                 mov     ecx, edx
.text:00424CF0                 shr     ecx, 4
.text:00424CF3                 add     ecx, edx
.text:00424CF5                 mov     edx, eax
.text:00424CF7                 shr     edx, 4
.text:00424CFA                 add     edx, eax
.text:00424CFC                 and     ecx, 0F0F0F0Fh
.text:00424D02                 and     edx, 0F0F0F0Fh
.text:00424D08                 imul    ecx, 1010101h
.text:00424D0E                 imul    edx, 1010101h
.text:00424D14                 shr     ecx, 18h
.text:00424D17                 shr     edx, 18h
.text:00424D1A                 add     ecx, edx
.text:00424D1C                 cmp     ecx, 0Ah
.text:00424D1F                 jle     short loc_424D41
.text:00424D21                 push    offset aBishopBlack10 ; "bishop black > 10"
.text:00424D26                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00424D2B                 call    sub_427298
.text:00424D30                 call    sub_426EFD
.text:00424D35                 add     eax, 20h
.text:00424D38                 push    eax             ; FILE *
.text:00424D39                 call    _fflush
.text:00424D3E                 add     esp, 0Ch
.text:00424D41
.text:00424D41 loc_424D41:                             ; CODE XREF: sub_424010+D0Fj
.text:00424D41                 mov     eax, dword ptr qword_780E70
.text:00424D46                 mov     ecx, eax
.text:00424D48                 shr     ecx, 1
.text:00424D4A                 and     ecx, 55555555h
.text:00424D50                 sub     eax, ecx
.text:00424D52                 mov     ecx, eax
.text:00424D54                 and     eax, 33333333h
.text:00424D59                 shr     ecx, 2
.text:00424D5C                 and     ecx, 33333333h
.text:00424D62                 add     ecx, eax
.text:00424D64                 mov     eax, dword ptr qword_780E70+4
.text:00424D69                 mov     edx, eax
.text:00424D6B                 shr     edx, 1
.text:00424D6D                 and     edx, 55555555h
.text:00424D73                 sub     eax, edx
.text:00424D75                 mov     edx, eax
.text:00424D77                 shr     edx, 2
.text:00424D7A                 and     eax, 33333333h
.text:00424D7F                 and     edx, 33333333h
.text:00424D85                 add     edx, eax
.text:00424D87                 mov     eax, edx
.text:00424D89                 shr     eax, 4
.text:00424D8C                 add     eax, edx
.text:00424D8E                 mov     edx, ecx
.text:00424D90                 shr     edx, 4
.text:00424D93                 add     edx, ecx
.text:00424D95                 and     eax, 0F0F0F0Fh
.text:00424D9A                 and     edx, 0F0F0F0Fh
.text:00424DA0                 imul    eax, 1010101h
.text:00424DA6                 imul    edx, 1010101h
.text:00424DAC                 shr     eax, 18h
.text:00424DAF                 shr     edx, 18h
.text:00424DB2                 add     eax, edx
.text:00424DB4                 cmp     eax, 0Ah
.text:00424DB7                 jle     short loc_424DD9
.text:00424DB9                 push    offset aKnightWhite10 ; "knight white > 10"
.text:00424DBE                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00424DC3                 call    sub_427298
.text:00424DC8                 call    sub_426EFD
.text:00424DCD                 add     eax, 20h
.text:00424DD0                 push    eax             ; FILE *
.text:00424DD1                 call    _fflush
.text:00424DD6                 add     esp, 0Ch
.text:00424DD9
.text:00424DD9 loc_424DD9:                             ; CODE XREF: sub_424010+DA7j
.text:00424DD9                 mov     eax, dword ptr qword_780EB0
.text:00424DDE                 mov     ecx, eax
.text:00424DE0                 shr     ecx, 1
.text:00424DE2                 and     ecx, 55555555h
.text:00424DE8                 sub     eax, ecx
.text:00424DEA                 mov     ecx, eax
.text:00424DEC                 and     eax, 33333333h
.text:00424DF1                 shr     ecx, 2
.text:00424DF4                 and     ecx, 33333333h
.text:00424DFA                 add     ecx, eax
.text:00424DFC                 mov     eax, dword ptr qword_780EB0+4
.text:00424E01                 mov     edx, eax
.text:00424E03                 shr     edx, 1
.text:00424E05                 and     edx, 55555555h
.text:00424E0B                 sub     eax, edx
.text:00424E0D                 mov     edx, eax
.text:00424E0F                 shr     edx, 2
.text:00424E12                 and     eax, 33333333h
.text:00424E17                 and     edx, 33333333h
.text:00424E1D                 add     edx, eax
.text:00424E1F                 mov     eax, edx
.text:00424E21                 shr     eax, 4
.text:00424E24                 add     eax, edx
.text:00424E26                 mov     edx, ecx
.text:00424E28                 shr     edx, 4
.text:00424E2B                 add     edx, ecx
.text:00424E2D                 and     eax, 0F0F0F0Fh
.text:00424E32                 and     edx, 0F0F0F0Fh
.text:00424E38                 imul    eax, 1010101h
.text:00424E3E                 imul    edx, 1010101h
.text:00424E44                 shr     eax, 18h
.text:00424E47                 shr     edx, 18h
.text:00424E4A                 add     eax, edx
.text:00424E4C                 cmp     eax, 0Ah
.text:00424E4F                 jle     short loc_424E71
.text:00424E51                 push    offset aKnightBlack10 ; "knight black > 10"
.text:00424E56                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00424E5B                 call    sub_427298
.text:00424E60                 call    sub_426EFD
.text:00424E65                 add     eax, 20h
.text:00424E68                 push    eax             ; FILE *
.text:00424E69                 call    _fflush
.text:00424E6E                 add     esp, 0Ch
.text:00424E71
.text:00424E71 loc_424E71:                             ; CODE XREF: sub_424010+E3Fj
.text:00424E71                 mov     eax, dword ptr qword_780E68
.text:00424E76                 mov     ecx, eax
.text:00424E78                 shr     ecx, 1
.text:00424E7A                 and     ecx, 55555555h
.text:00424E80                 sub     eax, ecx
.text:00424E82                 mov     ecx, eax
.text:00424E84                 and     eax, 33333333h
.text:00424E89                 shr     ecx, 2
.text:00424E8C                 and     ecx, 33333333h
.text:00424E92                 add     ecx, eax
.text:00424E94                 mov     eax, dword ptr qword_780E68+4
.text:00424E99                 mov     edx, eax
.text:00424E9B                 shr     edx, 1
.text:00424E9D                 and     edx, 55555555h
.text:00424EA3                 sub     eax, edx
.text:00424EA5                 mov     edx, eax
.text:00424EA7                 shr     edx, 2
.text:00424EAA                 and     eax, 33333333h
.text:00424EAF                 and     edx, 33333333h
.text:00424EB5                 add     edx, eax
.text:00424EB7                 mov     eax, edx
.text:00424EB9                 shr     eax, 4
.text:00424EBC                 add     eax, edx
.text:00424EBE                 mov     edx, ecx
.text:00424EC0                 shr     edx, 4
.text:00424EC3                 add     edx, ecx
.text:00424EC5                 and     eax, 0F0F0F0Fh
.text:00424ECA                 and     edx, 0F0F0F0Fh
.text:00424ED0                 imul    eax, 1010101h
.text:00424ED6                 imul    edx, 1010101h
.text:00424EDC                 shr     eax, 18h
.text:00424EDF                 shr     edx, 18h
.text:00424EE2                 add     eax, edx
.text:00424EE4                 cmp     eax, 8
.text:00424EE7                 jle     short loc_424F09
.text:00424EE9                 push    offset aPawnWhite8 ; "pawn white > 8"
.text:00424EEE                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00424EF3                 call    sub_427298
.text:00424EF8                 call    sub_426EFD
.text:00424EFD                 add     eax, 20h
.text:00424F00                 push    eax             ; FILE *
.text:00424F01                 call    _fflush
.text:00424F06                 add     esp, 0Ch
.text:00424F09
.text:00424F09 loc_424F09:                             ; CODE XREF: sub_424010+ED7j
.text:00424F09                 mov     eax, dword ptr qword_780EA8
.text:00424F0E                 mov     ecx, eax
.text:00424F10                 shr     ecx, 1
.text:00424F12                 and     ecx, 55555555h
.text:00424F18                 sub     eax, ecx
.text:00424F1A                 mov     ecx, eax
.text:00424F1C                 and     eax, 33333333h
.text:00424F21                 shr     ecx, 2
.text:00424F24                 and     ecx, 33333333h
.text:00424F2A                 add     ecx, eax
.text:00424F2C                 mov     eax, dword ptr qword_780EA8+4
.text:00424F31                 mov     edx, eax
.text:00424F33                 shr     edx, 1
.text:00424F35                 and     edx, 55555555h
.text:00424F3B                 sub     eax, edx
.text:00424F3D                 mov     edx, eax
.text:00424F3F                 shr     edx, 2
.text:00424F42                 and     eax, 33333333h
.text:00424F47                 and     edx, 33333333h
.text:00424F4D                 add     edx, eax
.text:00424F4F                 mov     eax, edx
.text:00424F51                 shr     eax, 4
.text:00424F54                 add     eax, edx
.text:00424F56                 mov     edx, ecx
.text:00424F58                 shr     edx, 4
.text:00424F5B                 add     edx, ecx
.text:00424F5D                 and     eax, 0F0F0F0Fh
.text:00424F62                 and     edx, 0F0F0F0Fh
.text:00424F68                 imul    eax, 1010101h
.text:00424F6E                 imul    edx, 1010101h
.text:00424F74                 shr     eax, 18h
.text:00424F77                 shr     edx, 18h
.text:00424F7A                 add     eax, edx
.text:00424F7C                 cmp     eax, 8
.text:00424F7F                 jle     short loc_424FA1
.text:00424F81                 push    offset aPawnBlack8 ; "pawn black > 8"
.text:00424F86                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00424F8B                 call    sub_427298
.text:00424F90                 call    sub_426EFD
.text:00424F95                 add     eax, 20h
.text:00424F98                 push    eax             ; FILE *
.text:00424F99                 call    _fflush
.text:00424F9E                 add     esp, 0Ch
.text:00424FA1
.text:00424FA1 loc_424FA1:                             ; CODE XREF: sub_424010+F6Fj
.text:00424FA1                 mov     eax, dword ptr qword_780E60
.text:00424FA6                 mov     ecx, eax
.text:00424FA8                 shr     ecx, 1
.text:00424FAA                 and     ecx, 55555555h
.text:00424FB0                 sub     eax, ecx
.text:00424FB2                 mov     ecx, eax
.text:00424FB4                 and     eax, 33333333h
.text:00424FB9                 shr     ecx, 2
.text:00424FBC                 and     ecx, 33333333h
.text:00424FC2                 add     ecx, eax
.text:00424FC4                 mov     eax, dword ptr qword_780E60+4
.text:00424FC9                 mov     edx, eax
.text:00424FCB                 shr     edx, 1
.text:00424FCD                 and     edx, 55555555h
.text:00424FD3                 sub     eax, edx
.text:00424FD5                 mov     edx, eax
.text:00424FD7                 shr     edx, 2
.text:00424FDA                 and     eax, 33333333h
.text:00424FDF                 and     edx, 33333333h
.text:00424FE5                 add     edx, eax
.text:00424FE7                 mov     eax, edx
.text:00424FE9                 shr     eax, 4
.text:00424FEC                 add     eax, edx
.text:00424FEE                 mov     edx, ecx
.text:00424FF0                 shr     edx, 4
.text:00424FF3                 add     edx, ecx
.text:00424FF5                 and     eax, 0F0F0F0Fh
.text:00424FFA                 and     edx, 0F0F0F0Fh
.text:00425000                 imul    eax, 1010101h
.text:00425006                 imul    edx, 1010101h
.text:0042500C                 shr     eax, 18h
.text:0042500F                 shr     edx, 18h
.text:00425012                 add     eax, edx
.text:00425014                 cmp     eax, 10h
.text:00425017                 jle     short loc_425039
.text:00425019                 push    offset aPieceWhite16 ; "piece white > 16"
.text:0042501E                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00425023                 call    sub_427298
.text:00425028                 call    sub_426EFD
.text:0042502D                 add     eax, 20h
.text:00425030                 push    eax             ; FILE *
.text:00425031                 call    _fflush
.text:00425036                 add     esp, 0Ch
.text:00425039
.text:00425039 loc_425039:                             ; CODE XREF: sub_424010+1007j
.text:00425039                 mov     eax, dword ptr qword_780EA0
.text:0042503E                 mov     ecx, eax
.text:00425040                 shr     ecx, 1
.text:00425042                 and     ecx, 55555555h
.text:00425048                 sub     eax, ecx
.text:0042504A                 mov     ecx, eax
.text:0042504C                 and     eax, 33333333h
.text:00425051                 shr     ecx, 2
.text:00425054                 and     ecx, 33333333h
.text:0042505A                 add     ecx, eax
.text:0042505C                 mov     eax, dword ptr qword_780EA0+4
.text:00425061                 mov     edx, eax
.text:00425063                 shr     edx, 1
.text:00425065                 and     edx, 55555555h
.text:0042506B                 sub     eax, edx
.text:0042506D                 mov     edx, eax
.text:0042506F                 shr     edx, 2
.text:00425072                 and     eax, 33333333h
.text:00425077                 and     edx, 33333333h
.text:0042507D                 add     edx, eax
.text:0042507F                 mov     eax, edx
.text:00425081                 shr     eax, 4
.text:00425084                 add     eax, edx
.text:00425086                 mov     edx, ecx
.text:00425088                 shr     edx, 4
.text:0042508B                 add     edx, ecx
.text:0042508D                 and     eax, 0F0F0F0Fh
.text:00425092                 and     edx, 0F0F0F0Fh
.text:00425098                 imul    eax, 1010101h
.text:0042509E                 imul    edx, 1010101h
.text:004250A4                 shr     eax, 18h
.text:004250A7                 shr     edx, 18h
.text:004250AA                 add     eax, edx
.text:004250AC                 cmp     eax, 10h
.text:004250AF                 jle     short loc_4250D1
.text:004250B1                 push    offset aPieceBlack16 ; "piece black > 16"
.text:004250B6                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:004250BB                 call    sub_427298
.text:004250C0                 call    sub_426EFD
.text:004250C5                 add     eax, 20h
.text:004250C8                 push    eax             ; FILE *
.text:004250C9                 call    _fflush
.text:004250CE                 add     esp, 0Ch
.text:004250D1
.text:004250D1 loc_4250D1:                             ; CODE XREF: sub_424010+109Fj
.text:004250D1                 mov     eax, dword ptr qword_780EA8
.text:004250D6                 mov     ecx, dword ptr qword_780EA8+4
.text:004250DC                 or      eax, dword ptr qword_780E68
.text:004250E2                 or      ecx, dword ptr qword_780E68+4
.text:004250E8                 and     eax, 0FFh
.text:004250ED                 and     ecx, 0FF000000h
.text:004250F3                 or      eax, ecx
.text:004250F5                 jz      short loc_425117
.text:004250F7                 push    offset aPawnRankOneOrE ; "pawn rank one or eight"
.text:004250FC                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:00425101                 call    sub_427298
.text:00425106                 call    sub_426EFD
.text:0042510B                 add     eax, 20h
.text:0042510E                 push    eax             ; FILE *
.text:0042510F                 call    _fflush
.text:00425114                 add     esp, 0Ch
.text:00425117
.text:00425117 loc_425117:                             ; CODE XREF: sub_424010+10E5j
.text:00425117                 mov     eax, dword ptr [ebp+var_10]
.text:0042511A                 or      eax, dword ptr [ebp+var_10+4]
.text:0042511D                 jz      loc_4251C0
.text:00425123                 mov     edi, dword ptr [ebp+var_10]
.text:00425126                 mov     ebx, dword ptr [ebp+var_10+4]
.text:00425129                 lea     esp, [esp+0]
.text:00425130
.text:00425130 loc_425130:                             ; CODE XREF: sub_424010+11AAj
.text:00425130                 mov     eax, dword ptr [ebp+var_10]
.text:00425133                 test    eax, eax
.text:00425135                 jz      short loc_42513C
.text:00425137                 bsf     eax, eax
.text:0042513A                 jmp     short loc_425143
.text:0042513C ; ---------------------------------------------------------------------------
.text:0042513C
.text:0042513C loc_42513C:                             ; CODE XREF: sub_424010+1125j
.text:0042513C                 bsf     eax, dword ptr [ebp+var_10+4]
.text:00425140                 add     eax, 20h
.text:00425143
.text:00425143 loc_425143:                             ; CODE XREF: sub_424010+112Aj
.text:00425143                 mov     ecx, edi
.text:00425145                 add     ecx, 0FFFFFFFFh
.text:00425148                 mov     edx, ebx
.text:0042514A                 adc     edx, 0FFFFFFFFh
.text:0042514D                 mov     esi, eax
.text:0042514F                 and     edi, ecx
.text:00425151                 movzx   ecx, ds:byte_4364E0[esi]
.text:00425158                 and     ebx, edx
.text:0042515A                 mov     eax, 1
.text:0042515F                 xor     edx, edx
.text:00425161                 mov     dword ptr [ebp+var_10], edi
.text:00425164                 mov     dword ptr [ebp+var_10+4], ebx
.text:00425167                 call    __allshl
.text:0042516C                 or      dword ptr qword_780EE8, eax
.text:00425172                 or      dword ptr qword_780EE8+4, edx
.text:00425178                 movzx   ecx, ds:byte_436520[esi]
.text:0042517F                 mov     eax, 1
.text:00425184                 xor     edx, edx
.text:00425186                 call    __allshl
.text:0042518B                 or      dword ptr qword_780EF0, eax
.text:00425191                 or      dword ptr qword_780EF0+4, edx
.text:00425197                 movzx   ecx, ds:byte_436560[esi]
.text:0042519E                 mov     eax, 1
.text:004251A3                 xor     edx, edx
.text:004251A5                 call    __allshl
.text:004251AA                 or      dword ptr qword_780EF8, eax
.text:004251B0                 or      dword ptr qword_780EF8+4, edx
.text:004251B6                 mov     eax, edi
.text:004251B8                 or      eax, ebx
.text:004251BA                 jnz     loc_425130
.text:004251C0
.text:004251C0 loc_4251C0:                             ; CODE XREF: sub_424010+110Dj
.text:004251C0                 mov     eax, dword ptr qword_780E78
.text:004251C5                 test    eax, eax
.text:004251C7                 jz      short loc_4251CE
.text:004251C9                 bsf     eax, eax
.text:004251CC                 jmp     short loc_4251D8
.text:004251CE ; ---------------------------------------------------------------------------
.text:004251CE
.text:004251CE loc_4251CE:                             ; CODE XREF: sub_424010+11B7j
.text:004251CE                 bsf     eax, dword ptr qword_780E78+4
.text:004251D5                 add     eax, 20h
.text:004251D8
.text:004251D8 loc_4251D8:                             ; CODE XREF: sub_424010+11BCj
.text:004251D8                 mov     byte_780F01, al
.text:004251DD                 mov     eax, dword ptr qword_780EB8
.text:004251E2                 test    eax, eax
.text:004251E4                 jz      short loc_4251EB
.text:004251E6                 bsf     eax, eax
.text:004251E9                 jmp     short loc_4251F5
.text:004251EB ; ---------------------------------------------------------------------------
.text:004251EB
.text:004251EB loc_4251EB:                             ; CODE XREF: sub_424010+11D4j
.text:004251EB                 bsf     eax, dword ptr qword_780EB8+4
.text:004251F2                 add     eax, 20h
.text:004251F5
.text:004251F5 loc_4251F5:                             ; CODE XREF: sub_424010+11D9j
.text:004251F5                 mov     ecx, dword_73E940
.text:004251FB                 mov     edi, dword ptr qword_780E90+4
.text:00425201                 mov     ebx, eax
.text:00425203                 mov     al, [ecx+18h]
.text:00425206                 mov     byte_780F02, bl
.text:0042520C                 test    al, 1
.text:0042520E                 jz      short loc_425235
.text:00425210                 cmp     byte_780F01, 4
.text:00425217                 jnz     loc_4252A1
.text:0042521D                 mov     edx, dword ptr qword_5F5FF8
.text:00425223                 mov     esi, dword ptr qword_5F5FF8+4
.text:00425229                 and     edx, dword ptr qword_780E90
.text:0042522F                 and     esi, edi
.text:00425231                 or      edx, esi
.text:00425233                 jz      short loc_4252A1
.text:00425235
.text:00425235 loc_425235:                             ; CODE XREF: sub_424010+11FEj
.text:00425235                 test    al, 2
.text:00425237                 jz      short loc_42525A
.text:00425239                 cmp     byte_780F01, 4
.text:00425240                 jnz     short loc_4252A1
.text:00425242                 mov     edx, dword ptr qword_5F5FC0
.text:00425248                 mov     esi, dword ptr qword_5F5FC0+4
.text:0042524E                 and     edx, dword ptr qword_780E90
.text:00425254                 and     esi, edi
.text:00425256                 or      edx, esi
.text:00425258                 jz      short loc_4252A1
.text:0042525A
.text:0042525A loc_42525A:                             ; CODE XREF: sub_424010+1227j
.text:0042525A                 mov     edi, dword ptr qword_780ED0+4
.text:00425260                 test    al, 4
.text:00425262                 jz      short loc_425281
.text:00425264                 cmp     bl, 3Ch
.text:00425267                 jnz     short loc_4252A1
.text:00425269                 mov     edx, dword ptr qword_5F61B8
.text:0042526F                 mov     esi, dword ptr qword_5F61B8+4
.text:00425275                 and     edx, dword ptr qword_780ED0
.text:0042527B                 and     esi, edi
.text:0042527D                 or      edx, esi
.text:0042527F                 jz      short loc_4252A1
.text:00425281
.text:00425281 loc_425281:                             ; CODE XREF: sub_424010+1252j
.text:00425281                 test    al, 8
.text:00425283                 jz      short loc_4252C7
.text:00425285                 cmp     bl, 3Ch
.text:00425288                 jnz     short loc_4252A1
.text:0042528A                 mov     eax, dword ptr qword_5F6180
.text:0042528F                 mov     edx, dword ptr qword_5F6180+4
.text:00425295                 and     eax, dword ptr qword_780ED0
.text:0042529B                 and     edx, edi
.text:0042529D                 or      eax, edx
.text:0042529F                 jnz     short loc_4252C7
.text:004252A1
.text:004252A1 loc_4252A1:                             ; CODE XREF: sub_424010+1207j
.text:004252A1                                         ; sub_424010+1223j ...
.text:004252A1                 push    offset aIllegalCastlin ; "illegal castling"
.text:004252A6                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:004252AB                 call    sub_427298
.text:004252B0                 call    sub_426EFD
.text:004252B5                 add     eax, 20h
.text:004252B8                 push    eax             ; FILE *
.text:004252B9                 call    _fflush
.text:004252BE                 mov     ecx, dword_73E940
.text:004252C4                 add     esp, 0Ch
.text:004252C7
.text:004252C7 loc_4252C7:                             ; CODE XREF: sub_424010+1273j
.text:004252C7                                         ; sub_424010+128Fj
.text:004252C7                 movzx   eax, byte ptr [ecx+18h]
.text:004252CB                 mov     edx, dword_5F7280[eax*8]
.text:004252D2                 xor     [ecx], edx
.text:004252D4                 mov     edx, dword_5F7284[eax*8]
.text:004252DB                 xor     [ecx+4], edx
.text:004252DE                 mov     dl, [ecx+1Ah]
.text:004252E1                 pop     ebx
.text:004252E2                 test    dl, dl
.text:004252E4                 jz      short loc_4252FF
.text:004252E6                 movzx   edx, dl
.text:004252E9                 and     edx, 7
.text:004252EC                 mov     esi, dword_73E960[edx*8]
.text:004252F3                 xor     [ecx], esi
.text:004252F5                 mov     edx, dword_73E964[edx*8]
.text:004252FC                 xor     [ecx+4], edx
.text:004252FF
.text:004252FF loc_4252FF:                             ; CODE XREF: sub_424010+12D4j
.text:004252FF                 movzx   esi, byte_780F02
.text:00425306                 mov     edi, dword_71B080[esi*8]
.text:0042530D                 mov     esi, dword_71B084[esi*8]
.text:00425314                 movzx   edx, byte_780F01
.text:0042531B                 xor     edi, dword_71A080[edx*8]
.text:00425322                 xor     esi, dword_71A084[edx*8]
.text:00425329                 xor     edi, dword_5F7280[eax*8]
.text:00425330                 xor     esi, dword_5F7284[eax*8]
.text:00425337                 xor     edi, [ecx+8]
.text:0042533A                 xor     esi, [ecx+0Ch]
.text:0042533D                 xor     edi, 0A8BF965Eh
.text:00425343                 xor     esi, 74D3C012h
.text:00425349                 cmp     byte_780F00, 0
.text:00425350                 mov     [ecx+8], edi
.text:00425353                 pop     edi
.text:00425354                 mov     [ecx+0Ch], esi
.text:00425357                 pop     esi
.text:00425358                 jz      short loc_42536A
.text:0042535A                 mov     eax, dword_6F8780
.text:0042535F                 mov     edx, dword_6F8784
.text:00425365                 xor     [ecx], eax
.text:00425367                 xor     [ecx+4], edx
.text:0042536A
.text:0042536A loc_42536A:                             ; CODE XREF: sub_424010+1348j
.text:0042536A                 push    0
.text:0042536C                 push    7FFF0000h
.text:00425371                 push    80010000h
.text:00425376                 call    sub_402ED0
.text:0042537B                 mov     edx, dword_73E940
.text:00425381                 add     esp, 0Ch
.text:00425384                 cmp     byte_780F00, 0
.text:0042538B                 jz      short loc_4253D2
.text:0042538D                 mov     eax, [edx+20h]
.text:00425390                 mov     ecx, [edx+24h]
.text:00425393                 and     eax, dword ptr qword_780EB8
.text:00425399                 and     ecx, dword ptr qword_780EB8+4
.text:0042539F                 or      eax, ecx
.text:004253A1                 jz      short loc_4253C9
.text:004253A3                 push    offset aWhiteCapturesK ; "white captures king"
.text:004253A8                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:004253AD                 call    sub_427298
.text:004253B2                 call    sub_426EFD
.text:004253B7                 add     eax, 20h
.text:004253BA                 push    eax             ; FILE *
.text:004253BB                 call    _fflush
.text:004253C0                 mov     edx, dword_73E940
.text:004253C6                 add     esp, 0Ch
.text:004253C9
.text:004253C9 loc_4253C9:                             ; CODE XREF: sub_424010+1391j
.text:004253C9                 cmp     byte_780F00, 0
.text:004253D0                 jnz     short loc_425408
.text:004253D2
.text:004253D2 loc_4253D2:                             ; CODE XREF: sub_424010+137Bj
.text:004253D2                 mov     eax, [edx+28h]
.text:004253D5                 mov     ecx, [edx+2Ch]
.text:004253D8                 and     eax, dword ptr qword_780E78
.text:004253DE                 and     ecx, dword ptr qword_780E78+4
.text:004253E4                 or      eax, ecx
.text:004253E6                 jz      short loc_425408
.text:004253E8                 push    offset aBlackCapturesK ; "black captures king"
.text:004253ED                 push    offset aErrorPositiona ; "error positional: %s\n"
.text:004253F2                 call    sub_427298
.text:004253F7                 call    sub_426EFD
.text:004253FC                 add     eax, 20h
.text:004253FF                 push    eax             ; FILE *
.text:00425400                 call    _fflush
.text:00425405                 add     esp, 0Ch
.text:00425408
.text:00425408 loc_425408:                             ; CODE XREF: sub_424010+13C0j
.text:00425408                                         ; sub_424010+13D6j
.text:00425408                 mov     byte_5F7500, 1
.text:0042540F                 mov     esp, ebp
.text:00425411                 pop     ebp
.text:00425412                 retn
.text:00425412 sub_424010      endp
Houdini w32 1_CPU
build 2010-05-15
by Robert Houdart*

Code: Select all

.text:004265A0 ; =============== S U B R O U T I N E =======================================
.text:004265A0
.text:004265A0
.text:004265A0 sub_4265A0      proc near               ; CODE XREF: sub_419750+64Bp
.text:004265A0                                         ; sub_4274B0+D8p
.text:004265A0
.text:004265A0 var_8           = dword ptr -8
.text:004265A0 var_4           = dword ptr -4
.text:004265A0
.text:004265A0                 sub     esp, 0Ch
.text:004265A3                 push    ebx
.text:004265A4                 push    ebp
.text:004265A5                 push    esi
.text:004265A6                 push    edi
.text:004265A7                 xorpd   xmm0, xmm0
.text:004265AB                 movlpd  qword_585460, xmm0
.text:004265B3                 mov     ecx, 1Eh
.text:004265B8                 mov     esi, offset qword_585460
.text:004265BD                 mov     edi, offset qword_585468
.text:004265C2                 rep movsd
.text:004265C4                 mov     eax, dword_5854F0
.text:004265C9                 xor     edi, edi
.text:004265CB                 mov     [eax+8], edi
.text:004265CE                 mov     ecx, dword_5854F0
.text:004265D4                 mov     [ecx+0Ch], edi
.text:004265D7                 mov     edx, dword_5854F0
.text:004265DD                 mov     [edx], edi
.text:004265DF                 mov     eax, dword_5854F0
.text:004265E4                 mov     [eax+4], edi
.text:004265E7                 mov     ecx, dword_5854F0
.text:004265ED                 push    60h
.text:004265EF                 mov     [ecx+10h], edi
.text:004265F2                 mov     edx, dword_5854F0
.text:004265F8                 push    0FFh
.text:004265FD                 push    offset byte_585400
.text:00426602                 mov     byte_8F28CC, 0
.text:00426609                 mov     [edx+14h], edi
.text:0042660C                 call    sub_429D80
.text:00426611                 add     esp, 0Ch
.text:00426614                 xor     edx, edx
.text:00426616                 jmp     short loc_426620
.text:00426616 ; ---------------------------------------------------------------------------
.text:00426618                 align 10h
.text:00426620
.text:00426620 loc_426620:                             ; CODE XREF: sub_4265A0+76j
.text:00426620                                         ; sub_4265A0+14Aj
.text:00426620                 movzx   ecx, byte_585380[edx]
.text:00426627                 cmp     ecx, edi
.text:00426629                 jz      loc_4266E6
.text:0042662F                 mov     esi, dword_5854F0
.text:00426635                 mov     eax, ecx
.text:00426637                 shl     eax, 6
.text:0042663A                 add     eax, edx
.text:0042663C                 mov     ebx, dword_931F90[eax*4]
.text:00426643                 add     [esi+14h], ebx
.text:00426646                 mov     ebx, dword_91C270[eax*8]
.text:0042664D                 mov     esi, dword_5854F0
.text:00426653                 xor     [esi], ebx
.text:00426655                 mov     ebx, dword_91C274[eax*8]
.text:0042665C                 mov     esi, dword_5854F0
.text:00426662                 xor     [esi+4], ebx
.text:00426665                 cmp     ecx, 1
.text:00426668                 jz      short loc_42666F
.text:0042666A                 cmp     ecx, 9
.text:0042666D                 jnz     short loc_426689
.text:0042666F
.text:0042666F loc_42666F:                             ; CODE XREF: sub_4265A0+C8j
.text:0042666F                 mov     ebx, dword_91C270[eax*8]
.text:00426676                 mov     esi, dword_5854F0
.text:0042667C                 xor     [esi+8], ebx
.text:0042667F                 mov     eax, dword_91C274[eax*8]
.text:00426686                 xor     [esi+0Ch], eax
.text:00426689
.text:00426689 loc_426689:                             ; CODE XREF: sub_4265A0+CDj
.text:00426689                 mov     eax, dword_5854F0
.text:0042668E                 mov     esi, ds:dword_438A08[ecx*4]
.text:00426695                 add     [eax+10h], esi
.text:00426698                 movzx   eax, byte_585380[edx]
.text:0042669F                 mov     esi, dword ptr qword_828A78[edx*8]
.text:004266A6                 or      dword ptr qword_585460[eax*8], esi
.text:004266AD                 mov     esi, dword ptr (qword_828A78+4)[edx*8]
.text:004266B4                 or      dword ptr (qword_585460+4)[eax*8], esi
.text:004266BB                 movzx   eax, ds:byte_438AD0[ecx]
.text:004266C2                 cmp     eax, edi
.text:004266C4                 jz      short loc_4266E0
.text:004266C6                 cmp     byte_585400[eax], 0FFh
.text:004266CD                 jz      short loc_4266DA
.text:004266CF                 nop
.text:004266D0
.text:004266D0 loc_4266D0:                             ; CODE XREF: sub_4265A0+138j
.text:004266D0                 inc     eax
.text:004266D1                 cmp     byte_585400[eax], 0FFh
.text:004266D8                 jnz     short loc_4266D0
.text:004266DA
.text:004266DA loc_4266DA:                             ; CODE XREF: sub_4265A0+12Dj
.text:004266DA                 mov     byte_585400[eax], dl
.text:004266E0
.text:004266E0 loc_4266E0:                             ; CODE XREF: sub_4265A0+124j
.text:004266E0                 mov     byte_5853C0[edx], al
.text:004266E6
.text:004266E6 loc_4266E6:                             ; CODE XREF: sub_4265A0+89j
.text:004266E6                 inc     edx
.text:004266E7                 cmp     edx, 3Fh
.text:004266EA                 jle     loc_426620
.text:004266F0                 mov     ebp, dword ptr qword_5854A8+4
.text:004266F6                 or      ebp, dword ptr qword_5854B0+4
.text:004266FC                 mov     ebx, dword ptr qword_5854A8
.text:00426702                 or      ebx, dword ptr qword_5854B0
.text:00426708                 or      ebp, dword ptr qword_5854C8+4
.text:0042670E                 mov     esi, dword ptr qword_585468+4
.text:00426714                 or      esi, dword ptr qword_585470+4
.text:0042671A                 or      ebx, dword ptr qword_5854C8
.text:00426720                 mov     edi, dword ptr qword_585468
.text:00426726                 or      edi, dword ptr qword_585470
.text:0042672C                 or      esi, dword ptr qword_585488+4
.text:00426732                 or      edi, dword ptr qword_585488
.text:00426738                 or      ebp, dword ptr qword_5854C0+4
.text:0042673E                 or      ebx, dword ptr qword_5854C0
.text:00426744                 or      esi, dword ptr qword_585480+4
.text:0042674A                 or      edi, dword ptr qword_585480
.text:00426750                 or      ebp, dword ptr qword_5854D0+4
.text:00426756                 or      ebx, dword ptr qword_5854D0
.text:0042675C                 or      esi, dword ptr qword_585490+4
.text:00426762                 or      edi, dword ptr qword_585490
.text:00426768                 mov     ecx, dword ptr qword_585498+4
.text:0042676E                 or      ebp, dword ptr qword_5854D8+4
.text:00426774                 or      ebx, dword ptr qword_5854D8
.text:0042677A                 or      ebp, dword ptr qword_5854B8+4
.text:00426780                 or      edi, dword ptr qword_585498
.text:00426786                 or      ebx, dword ptr qword_5854B8
.text:0042678C                 or      edi, dword ptr qword_585478
.text:00426792                 or      esi, ecx
.text:00426794                 or      esi, dword ptr qword_585478+4
.text:0042679A                 mov     eax, ebp
.text:0042679C                 or      eax, esi
.text:0042679E                 mov     edx, ebx
.text:004267A0                 or      edx, edi
.text:004267A2                 mov     dword ptr qword_5854E0, edx
.text:004267A8                 mov     dword ptr qword_5854E0+4, eax
.text:004267AD                 mov     eax, dword ptr qword_585498
.text:004267B2                 mov     edx, eax
.text:004267B4                 shr     edx, 1
.text:004267B6                 and     edx, 55555555h
.text:004267BC                 sub     eax, edx
.text:004267BE                 mov     edx, ecx
.text:004267C0                 shr     edx, 1
.text:004267C2                 and     edx, 55555555h
.text:004267C8                 sub     ecx, edx
.text:004267CA                 mov     edx, ecx
.text:004267CC                 mov     [esp+1Ch+var_8], ecx
.text:004267D0                 shr     edx, 2
.text:004267D3                 and     edx, 33333333h
.text:004267D9                 mov     ecx, eax
.text:004267DB                 shr     ecx, 2
.text:004267DE                 and     ecx, 33333333h
.text:004267E4                 add     edx, ecx
.text:004267E6                 mov     ecx, [esp+1Ch+var_8]
.text:004267EA                 and     ecx, 33333333h
.text:004267F0                 add     edx, ecx
.text:004267F2                 and     eax, 33333333h
.text:004267F7                 add     edx, eax
.text:004267F9                 imul    edx, 11111111h
.text:004267FF                 shr     edx, 1Ch
.text:00426802                 mov     dword ptr qword_585460, edi
.text:00426808                 mov     dword ptr qword_585460+4, esi
.text:0042680E                 mov     dword ptr qword_5854A0, ebx
.text:00426814                 mov     dword ptr qword_5854A0+4, ebp
.text:0042681A                 cmp     dl, 1
.text:0042681D                 jg      loc_426B55
.text:00426823                 mov     eax, dword ptr qword_5854D8
.text:00426828                 mov     ecx, dword ptr qword_5854D8+4
.text:0042682E                 mov     edx, eax
.text:00426830                 shr     edx, 1
.text:00426832                 and     edx, 55555555h
.text:00426838                 sub     eax, edx
.text:0042683A                 mov     edx, ecx
.text:0042683C                 shr     edx, 1
.text:0042683E                 and     edx, 55555555h
.text:00426844                 sub     ecx, edx
.text:00426846                 mov     edx, ecx
.text:00426848                 mov     [esp+1Ch+var_8], ecx
.text:0042684C                 shr     edx, 2
.text:0042684F                 and     edx, 33333333h
.text:00426855                 mov     ecx, eax
.text:00426857                 shr     ecx, 2
.text:0042685A                 and     ecx, 33333333h
.text:00426860                 add     edx, ecx
.text:00426862                 mov     ecx, [esp+1Ch+var_8]
.text:00426866                 and     ecx, 33333333h
.text:0042686C                 add     edx, ecx
.text:0042686E                 and     eax, 33333333h
.text:00426873                 add     edx, eax
.text:00426875                 imul    edx, 11111111h
.text:0042687B                 shr     edx, 1Ch
.text:0042687E                 cmp     dl, 1
.text:00426881                 jg      loc_426B55
.text:00426887                 mov     eax, dword ptr qword_585490
.text:0042688C                 mov     ecx, dword ptr qword_585490+4
.text:00426892                 mov     edx, eax
.text:00426894                 shr     edx, 1
.text:00426896                 and     edx, 55555555h
.text:0042689C                 sub     eax, edx
.text:0042689E                 mov     edx, ecx
.text:004268A0                 shr     edx, 1
.text:004268A2                 and     edx, 55555555h
.text:004268A8                 sub     ecx, edx
.text:004268AA                 mov     edx, ecx
.text:004268AC                 mov     [esp+1Ch+var_8], ecx
.text:004268B0                 shr     edx, 2
.text:004268B3                 and     edx, 33333333h
.text:004268B9                 mov     ecx, eax
.text:004268BB                 shr     ecx, 2
.text:004268BE                 and     ecx, 33333333h
.text:004268C4                 add     edx, ecx
.text:004268C6                 mov     ecx, [esp+1Ch+var_8]
.text:004268CA                 and     ecx, 33333333h
.text:004268D0                 add     edx, ecx
.text:004268D2                 and     eax, 33333333h
.text:004268D7                 add     edx, eax
.text:004268D9                 imul    edx, 11111111h
.text:004268DF                 shr     edx, 1Ch
.text:004268E2                 cmp     dl, 2
.text:004268E5                 jg      loc_426B55
.text:004268EB                 mov     eax, dword ptr qword_5854D0
.text:004268F0                 mov     ecx, dword ptr qword_5854D0+4
.text:004268F6                 mov     edx, eax
.text:004268F8                 shr     edx, 1
.text:004268FA                 and     edx, 55555555h
.text:00426900                 sub     eax, edx
.text:00426902                 mov     edx, ecx
.text:00426904                 shr     edx, 1
.text:00426906                 and     edx, 55555555h
.text:0042690C                 sub     ecx, edx
.text:0042690E                 mov     edx, ecx
.text:00426910                 mov     [esp+1Ch+var_8], ecx
.text:00426914                 shr     edx, 2
.text:00426917                 and     edx, 33333333h
.text:0042691D                 mov     ecx, eax
.text:0042691F                 shr     ecx, 2
.text:00426922                 and     ecx, 33333333h
.text:00426928                 add     edx, ecx
.text:0042692A                 mov     ecx, [esp+1Ch+var_8]
.text:0042692E                 and     ecx, 33333333h
.text:00426934                 add     edx, ecx
.text:00426936                 and     eax, 33333333h
.text:0042693B                 add     edx, eax
.text:0042693D                 imul    edx, 11111111h
.text:00426943                 shr     edx, 1Ch
.text:00426946                 cmp     dl, 2
.text:00426949                 jg      loc_426B55
.text:0042694F                 mov     eax, dword ptr qword_585480
.text:00426954                 mov     ecx, dword ptr qword_585480+4
.text:0042695A                 mov     edx, eax
.text:0042695C                 shr     edx, 1
.text:0042695E                 and     edx, 55555555h
.text:00426964                 sub     eax, edx
.text:00426966                 mov     edx, ecx
.text:00426968                 shr     edx, 1
.text:0042696A                 and     edx, 55555555h
.text:00426970                 sub     ecx, edx
.text:00426972                 mov     edx, ecx
.text:00426974                 mov     [esp+1Ch+var_8], ecx
.text:00426978                 shr     edx, 2
.text:0042697B                 and     edx, 33333333h
.text:00426981                 mov     ecx, eax
.text:00426983                 shr     ecx, 2
.text:00426986                 and     ecx, 33333333h
.text:0042698C                 add     edx, ecx
.text:0042698E                 mov     ecx, [esp+1Ch+var_8]
.text:00426992                 and     ecx, 33333333h
.text:00426998                 add     edx, ecx
.text:0042699A                 and     eax, 33333333h
.text:0042699F                 add     edx, eax
.text:004269A1                 imul    edx, 11111111h
.text:004269A7                 shr     edx, 1Ch
.text:004269AA                 cmp     dl, 1
.text:004269AD                 jg      loc_426B55
.text:004269B3                 mov     eax, dword ptr qword_5854C0
.text:004269B8                 mov     ecx, dword ptr qword_5854C0+4
.text:004269BE                 mov     edx, eax
.text:004269C0                 shr     edx, 1
.text:004269C2                 and     edx, 55555555h
.text:004269C8                 sub     eax, edx
.text:004269CA                 mov     edx, ecx
.text:004269CC                 shr     edx, 1
.text:004269CE                 and     edx, 55555555h
.text:004269D4                 sub     ecx, edx
.text:004269D6                 mov     edx, ecx
.text:004269D8                 mov     [esp+1Ch+var_8], ecx
.text:004269DC                 shr     edx, 2
.text:004269DF                 and     edx, 33333333h
.text:004269E5                 mov     ecx, eax
.text:004269E7                 shr     ecx, 2
.text:004269EA                 and     ecx, 33333333h
.text:004269F0                 add     edx, ecx
.text:004269F2                 mov     ecx, [esp+1Ch+var_8]
.text:004269F6                 and     ecx, 33333333h
.text:004269FC                 add     edx, ecx
.text:004269FE                 and     eax, 33333333h
.text:00426A03                 add     edx, eax
.text:00426A05                 imul    edx, 11111111h
.text:00426A0B                 shr     edx, 1Ch
.text:00426A0E                 cmp     dl, 1
.text:00426A11                 jg      loc_426B55
.text:00426A17                 mov     eax, dword ptr qword_585470
.text:00426A1C                 mov     ecx, dword ptr qword_585470+4
.text:00426A22                 mov     edx, eax
.text:00426A24                 shr     edx, 1
.text:00426A26                 and     edx, 55555555h
.text:00426A2C                 sub     eax, edx
.text:00426A2E                 mov     edx, ecx
.text:00426A30                 shr     edx, 1
.text:00426A32                 and     edx, 55555555h
.text:00426A38                 sub     ecx, edx
.text:00426A3A                 mov     edx, ecx
.text:00426A3C                 mov     [esp+1Ch+var_8], ecx
.text:00426A40                 shr     edx, 2
.text:00426A43                 and     edx, 33333333h
.text:00426A49                 mov     ecx, eax
.text:00426A4B                 shr     ecx, 2
.text:00426A4E                 and     ecx, 33333333h
.text:00426A54                 add     edx, ecx
.text:00426A56                 mov     ecx, [esp+1Ch+var_8]
.text:00426A5A                 and     ecx, 33333333h
.text:00426A60                 add     edx, ecx
.text:00426A62                 and     eax, 33333333h
.text:00426A67                 add     edx, eax
.text:00426A69                 imul    edx, 11111111h
.text:00426A6F                 shr     edx, 1Ch
.text:00426A72                 cmp     dl, 2
.text:00426A75                 jg      loc_426B55
.text:00426A7B                 mov     eax, dword ptr qword_5854B0
.text:00426A80                 mov     ecx, dword ptr qword_5854B0+4
.text:00426A86                 mov     edx, eax
.text:00426A88                 shr     edx, 1
.text:00426A8A                 and     edx, 55555555h
.text:00426A90                 sub     eax, edx
.text:00426A92                 mov     edx, ecx
.text:00426A94                 shr     edx, 1
.text:00426A96                 and     edx, 55555555h
.text:00426A9C                 sub     ecx, edx
.text:00426A9E                 mov     edx, ecx
.text:00426AA0                 mov     [esp+1Ch+var_8], ecx
.text:00426AA4                 shr     edx, 2
.text:00426AA7                 and     edx, 33333333h
.text:00426AAD                 mov     ecx, eax
.text:00426AAF                 shr     ecx, 2
.text:00426AB2                 and     ecx, 33333333h
.text:00426AB8                 add     edx, ecx
.text:00426ABA                 mov     ecx, [esp+1Ch+var_8]
.text:00426ABE                 and     ecx, 33333333h
.text:00426AC4                 add     edx, ecx
.text:00426AC6                 and     eax, 33333333h
.text:00426ACB                 add     edx, eax
.text:00426ACD                 imul    edx, 11111111h
.text:00426AD3                 shr     edx, 1Ch
.text:00426AD6                 cmp     dl, 2
.text:00426AD9                 jg      short loc_426B55
.text:00426ADB                 mov     eax, dword ptr qword_585488
.text:00426AE0                 mov     ecx, dword ptr qword_585488+4
.text:00426AE6                 mov     edx, eax
.text:00426AE8                 shr     edx, 1
.text:00426AEA                 and     edx, 55555555h
.text:00426AF0                 sub     eax, edx
.text:00426AF2                 mov     edx, ecx
.text:00426AF4                 shr     edx, 1
.text:00426AF6                 and     edx, 55555555h
.text:00426AFC                 sub     ecx, edx
.text:00426AFE                 mov     edx, ecx
.text:00426B00                 mov     [esp+1Ch+var_8], ecx
.text:00426B04                 shr     edx, 2
.text:00426B07                 and     edx, 33333333h
.text:00426B0D                 mov     ecx, eax
.text:00426B0F                 shr     ecx, 2
.text:00426B12                 and     ecx, 33333333h
.text:00426B18                 add     edx, ecx
.text:00426B1A                 mov     ecx, [esp+1Ch+var_8]
.text:00426B1E                 and     ecx, 33333333h
.text:00426B24                 add     edx, ecx
.text:00426B26                 and     eax, 33333333h
.text:00426B2B                 add     edx, eax
.text:00426B2D                 imul    edx, 11111111h
.text:00426B33                 shr     edx, 1Ch
.text:00426B36                 cmp     dl, 1
.text:00426B39                 jg      short loc_426B55
.text:00426B3B                 mov     edx, dword ptr qword_5854C8+4
.text:00426B41                 mov     eax, dword ptr qword_5854C8
.text:00426B46                 push    edx
.text:00426B47                 push    eax
.text:00426B48                 call    sub_401040
.text:00426B4D                 add     esp, 8
.text:00426B50                 cmp     eax, 1
.text:00426B53                 jle     short loc_426B79
.text:00426B55
.text:00426B55 loc_426B55:                             ; CODE XREF: sub_4265A0+27Dj
.text:00426B55                                         ; sub_4265A0+2E1j ...
.text:00426B55                 mov     eax, dword_5854F0
.text:00426B5A                 or      dword ptr [eax+10h], 80000000h
.text:00426B61                 mov     ebp, dword ptr qword_5854A0+4
.text:00426B67                 mov     ebx, dword ptr qword_5854A0
.text:00426B6D                 mov     esi, dword ptr qword_585460+4
.text:00426B73                 mov     edi, dword ptr qword_585460
.text:00426B79
.text:00426B79 loc_426B79:                             ; CODE XREF: sub_4265A0+5B3j
.text:00426B79                 mov     eax, dword ptr qword_585478
.text:00426B7E                 mov     ecx, dword ptr qword_585478+4
.text:00426B84                 mov     edx, eax
.text:00426B86                 shr     edx, 1
.text:00426B88                 and     edx, 55555555h
.text:00426B8E                 sub     eax, edx
.text:00426B90                 mov     edx, ecx
.text:00426B92                 shr     edx, 1
.text:00426B94                 and     edx, 55555555h
.text:00426B9A                 sub     ecx, edx
.text:00426B9C                 mov     edx, ecx
.text:00426B9E                 mov     [esp+1Ch+var_8], ecx
.text:00426BA2                 shr     edx, 2
.text:00426BA5                 and     edx, 33333333h
.text:00426BAB                 mov     ecx, eax
.text:00426BAD                 shr     ecx, 2
.text:00426BB0                 and     ecx, 33333333h
.text:00426BB6                 add     edx, ecx
.text:00426BB8                 mov     ecx, [esp+1Ch+var_8]
.text:00426BBC                 and     ecx, 33333333h
.text:00426BC2                 add     edx, ecx
.text:00426BC4                 and     eax, 33333333h
.text:00426BC9                 add     edx, eax
.text:00426BCB                 imul    edx, 11111111h
.text:00426BD1                 and     edx, 0F0000000h
.text:00426BD7                 cmp     edx, 10000000h
.text:00426BDD                 jz      short loc_426BE9
.text:00426BDF                 mov     eax, offset aOneWhiteKingRe ; "ONE white king required"
.text:00426BE4                 jmp     loc_4270A6
.text:00426BE9 ; ---------------------------------------------------------------------------
.text:00426BE9
.text:00426BE9 loc_426BE9:                             ; CODE XREF: sub_4265A0+63Dj
.text:00426BE9                 mov     eax, dword ptr qword_5854B8
.text:00426BEE                 mov     ecx, dword ptr qword_5854B8+4
.text:00426BF4                 mov     edx, eax
.text:00426BF6                 shr     edx, 1
.text:00426BF8                 and     edx, 55555555h
.text:00426BFE                 sub     eax, edx
.text:00426C00                 mov     edx, ecx
.text:00426C02                 shr     edx, 1
.text:00426C04                 and     edx, 55555555h
.text:00426C0A                 sub     ecx, edx
.text:00426C0C                 mov     edx, ecx
.text:00426C0E                 mov     [esp+1Ch+var_8], ecx
.text:00426C12                 shr     edx, 2
.text:00426C15                 and     edx, 33333333h
.text:00426C1B                 mov     ecx, eax
.text:00426C1D                 shr     ecx, 2
.text:00426C20                 and     ecx, 33333333h
.text:00426C26                 add     edx, ecx
.text:00426C28                 mov     ecx, [esp+1Ch+var_8]
.text:00426C2C                 and     ecx, 33333333h
.text:00426C32                 add     edx, ecx
.text:00426C34                 and     eax, 33333333h
.text:00426C39                 add     edx, eax
.text:00426C3B                 imul    edx, 11111111h
.text:00426C41                 and     edx, 0F0000000h
.text:00426C47                 cmp     edx, 10000000h
.text:00426C4D                 jz      short loc_426C59
.text:00426C4F                 mov     eax, offset aOneBlackKingRe ; "ONE black king required"
.text:00426C54                 jmp     loc_4270A6
.text:00426C59 ; ---------------------------------------------------------------------------
.text:00426C59
.text:00426C59 loc_426C59:                             ; CODE XREF: sub_4265A0+6ADj
.text:00426C59                 mov     eax, dword ptr qword_585498
.text:00426C5E                 mov     ecx, dword ptr qword_585498+4
.text:00426C64                 mov     edx, eax
.text:00426C66                 shr     edx, 1
.text:00426C68                 and     edx, 55555555h
.text:00426C6E                 sub     eax, edx
.text:00426C70                 mov     edx, ecx
.text:00426C72                 shr     edx, 1
.text:00426C74                 and     edx, 55555555h
.text:00426C7A                 sub     ecx, edx
.text:00426C7C                 mov     edx, ecx
.text:00426C7E                 mov     [esp+1Ch+var_8], ecx
.text:00426C82                 shr     edx, 2
.text:00426C85                 and     edx, 33333333h
.text:00426C8B                 mov     ecx, eax
.text:00426C8D                 shr     ecx, 2
.text:00426C90                 and     ecx, 33333333h
.text:00426C96                 add     edx, ecx
.text:00426C98                 mov     ecx, [esp+1Ch+var_8]
.text:00426C9C                 and     ecx, 33333333h
.text:00426CA2                 add     edx, ecx
.text:00426CA4                 and     eax, 33333333h
.text:00426CA9                 add     edx, eax
.text:00426CAB                 imul    edx, 11111111h
.text:00426CB1                 shr     edx, 1Ch
.text:00426CB4                 cmp     dl, 9
.text:00426CB7                 jle     short loc_426CC3
.text:00426CB9                 mov     eax, offset aTooManyWhiteQu ; "Too many white queens"
.text:00426CBE                 jmp     loc_4270A6
.text:00426CC3 ; ---------------------------------------------------------------------------
.text:00426CC3
.text:00426CC3 loc_426CC3:                             ; CODE XREF: sub_4265A0+717j
.text:00426CC3                 mov     eax, dword ptr qword_5854D8
.text:00426CC8                 mov     ecx, dword ptr qword_5854D8+4
.text:00426CCE                 mov     edx, eax
.text:00426CD0                 shr     edx, 1
.text:00426CD2                 and     edx, 55555555h
.text:00426CD8                 sub     eax, edx
.text:00426CDA                 mov     edx, ecx
.text:00426CDC                 shr     edx, 1
.text:00426CDE                 and     edx, 55555555h
.text:00426CE4                 sub     ecx, edx
.text:00426CE6                 mov     edx, ecx
.text:00426CE8                 mov     [esp+1Ch+var_8], ecx
.text:00426CEC                 shr     edx, 2
.text:00426CEF                 and     edx, 33333333h
.text:00426CF5                 mov     ecx, eax
.text:00426CF7                 shr     ecx, 2
.text:00426CFA                 and     ecx, 33333333h
.text:00426D00                 add     edx, ecx
.text:00426D02                 mov     ecx, [esp+1Ch+var_8]
.text:00426D06                 and     ecx, 33333333h
.text:00426D0C                 add     edx, ecx
.text:00426D0E                 and     eax, 33333333h
.text:00426D13                 add     edx, eax
.text:00426D15                 imul    edx, 11111111h
.text:00426D1B                 shr     edx, 1Ch
.text:00426D1E                 cmp     dl, 9
.text:00426D21                 jle     short loc_426D2D
.text:00426D23                 mov     eax, offset aTooManyBlackQu ; "Too many black queens"
.text:00426D28                 jmp     loc_4270A6
.text:00426D2D ; ---------------------------------------------------------------------------
.text:00426D2D
.text:00426D2D loc_426D2D:                             ; CODE XREF: sub_4265A0+781j
.text:00426D2D                 mov     eax, dword ptr qword_585490
.text:00426D32                 mov     ecx, dword ptr qword_585490+4
.text:00426D38                 mov     edx, eax
.text:00426D3A                 shr     edx, 1
.text:00426D3C                 and     edx, 55555555h
.text:00426D42                 sub     eax, edx
.text:00426D44                 mov     edx, ecx
.text:00426D46                 shr     edx, 1
.text:00426D48                 and     edx, 55555555h
.text:00426D4E                 sub     ecx, edx
.text:00426D50                 mov     edx, ecx
.text:00426D52                 mov     [esp+1Ch+var_8], ecx
.text:00426D56                 shr     edx, 2
.text:00426D59                 and     edx, 33333333h
.text:00426D5F                 mov     ecx, eax
.text:00426D61                 shr     ecx, 2
.text:00426D64                 and     ecx, 33333333h
.text:00426D6A                 add     edx, ecx
.text:00426D6C                 mov     ecx, [esp+1Ch+var_8]
.text:00426D70                 and     ecx, 33333333h
.text:00426D76                 add     edx, ecx
.text:00426D78                 and     eax, 33333333h
.text:00426D7D                 add     edx, eax
.text:00426D7F                 imul    edx, 11111111h
.text:00426D85                 shr     edx, 1Ch
.text:00426D88                 cmp     dl, 0Ah
.text:00426D8B                 jle     short loc_426D97
.text:00426D8D                 mov     eax, offset aTooManyWhiteRo ; "Too many white rooks"
.text:00426D92                 jmp     loc_4270A6
.text:00426D97 ; ---------------------------------------------------------------------------
.text:00426D97
.text:00426D97 loc_426D97:                             ; CODE XREF: sub_4265A0+7EBj
.text:00426D97                 mov     eax, dword ptr qword_5854D0
.text:00426D9C                 mov     ecx, dword ptr qword_5854D0+4
.text:00426DA2                 mov     edx, eax
.text:00426DA4                 shr     edx, 1
.text:00426DA6                 and     edx, 55555555h
.text:00426DAC                 sub     eax, edx
.text:00426DAE                 mov     edx, ecx
.text:00426DB0                 shr     edx, 1
.text:00426DB2                 and     edx, 55555555h
.text:00426DB8                 sub     ecx, edx
.text:00426DBA                 mov     edx, ecx
.text:00426DBC                 mov     [esp+1Ch+var_8], ecx
.text:00426DC0                 shr     edx, 2
.text:00426DC3                 and     edx, 33333333h
.text:00426DC9                 mov     ecx, eax
.text:00426DCB                 shr     ecx, 2
.text:00426DCE                 and     ecx, 33333333h
.text:00426DD4                 add     edx, ecx
.text:00426DD6                 mov     ecx, [esp+1Ch+var_8]
.text:00426DDA                 and     ecx, 33333333h
.text:00426DE0                 add     edx, ecx
.text:00426DE2                 and     eax, 33333333h
.text:00426DE7                 add     edx, eax
.text:00426DE9                 imul    edx, 11111111h
.text:00426DEF                 shr     edx, 1Ch
.text:00426DF2                 cmp     dl, 0Ah
.text:00426DF5                 jle     short loc_426E01
.text:00426DF7                 mov     eax, offset aTooManyBlackRo ; "Too many black rooks"
.text:00426DFC                 jmp     loc_4270A6
.text:00426E01 ; ---------------------------------------------------------------------------
.text:00426E01
.text:00426E01 loc_426E01:                             ; CODE XREF: sub_4265A0+855j
.text:00426E01                 mov     eax, dword ptr qword_585480
.text:00426E06                 mov     ecx, dword ptr qword_585480+4
.text:00426E0C                 mov     edx, eax
.text:00426E0E                 shr     edx, 1
.text:00426E10                 and     edx, 55555555h
.text:00426E16                 sub     eax, edx
.text:00426E18                 mov     edx, ecx
.text:00426E1A                 shr     edx, 1
.text:00426E1C                 and     edx, 55555555h
.text:00426E22                 sub     ecx, edx
.text:00426E24                 mov     edx, ecx
.text:00426E26                 mov     [esp+1Ch+var_8], ecx
.text:00426E2A                 shr     edx, 2
.text:00426E2D                 and     edx, 33333333h
.text:00426E33                 mov     ecx, eax
.text:00426E35                 shr     ecx, 2
.text:00426E38                 and     ecx, 33333333h
.text:00426E3E                 add     edx, ecx
.text:00426E40                 mov     ecx, [esp+1Ch+var_8]
.text:00426E44                 and     ecx, 33333333h
.text:00426E4A                 add     edx, ecx
.text:00426E4C                 and     eax, 33333333h
.text:00426E51                 add     edx, eax
.text:00426E53                 imul    edx, 11111111h
.text:00426E59                 shr     edx, 1Ch
.text:00426E5C                 cmp     dl, 9
.text:00426E5F                 jle     short loc_426E6B
.text:00426E61                 mov     eax, offset aTooManyLightSq ; "Too many light-squared white 

bishops"
.text:00426E66                 jmp     loc_4270A6
.text:00426E6B ; ---------------------------------------------------------------------------
.text:00426E6B
.text:00426E6B loc_426E6B:                             ; CODE XREF: sub_4265A0+8BFj
.text:00426E6B                 mov     eax, dword ptr qword_5854C0
.text:00426E70                 mov     ecx, dword ptr qword_5854C0+4
.text:00426E76                 mov     edx, eax
.text:00426E78                 shr     edx, 1
.text:00426E7A                 and     edx, 55555555h
.text:00426E80                 sub     eax, edx
.text:00426E82                 mov     edx, ecx
.text:00426E84                 shr     edx, 1
.text:00426E86                 and     edx, 55555555h
.text:00426E8C                 sub     ecx, edx
.text:00426E8E                 mov     edx, ecx
.text:00426E90                 mov     [esp+1Ch+var_8], ecx
.text:00426E94                 shr     edx, 2
.text:00426E97                 and     edx, 33333333h
.text:00426E9D                 mov     ecx, eax
.text:00426E9F                 shr     ecx, 2
.text:00426EA2                 and     ecx, 33333333h
.text:00426EA8                 add     edx, ecx
.text:00426EAA                 mov     ecx, [esp+1Ch+var_8]
.text:00426EAE                 and     ecx, 33333333h
.text:00426EB4                 add     edx, ecx
.text:00426EB6                 and     eax, 33333333h
.text:00426EBB                 add     edx, eax
.text:00426EBD                 imul    edx, 11111111h
.text:00426EC3                 shr     edx, 1Ch
.text:00426EC6                 cmp     dl, 9
.text:00426EC9                 jle     short loc_426ED5
.text:00426ECB                 mov     eax, offset aTooManyLight_0 ; "Too many light-squared black 

bishops"
.text:00426ED0                 jmp     loc_4270A6
.text:00426ED5 ; ---------------------------------------------------------------------------
.text:00426ED5
.text:00426ED5 loc_426ED5:                             ; CODE XREF: sub_4265A0+929j
.text:00426ED5                 mov     eax, dword ptr qword_585488
.text:00426EDA                 mov     ecx, dword ptr qword_585488+4
.text:00426EE0                 mov     edx, eax
.text:00426EE2                 shr     edx, 1
.text:00426EE4                 and     edx, 55555555h
.text:00426EEA                 sub     eax, edx
.text:00426EEC                 mov     edx, ecx
.text:00426EEE                 shr     edx, 1
.text:00426EF0                 and     edx, 55555555h
.text:00426EF6                 sub     ecx, edx
.text:00426EF8                 mov     edx, ecx
.text:00426EFA                 mov     [esp+1Ch+var_8], ecx
.text:00426EFE                 shr     edx, 2
.text:00426F01                 and     edx, 33333333h
.text:00426F07                 mov     ecx, eax
.text:00426F09                 shr     ecx, 2
.text:00426F0C                 and     ecx, 33333333h
.text:00426F12                 add     edx, ecx
.text:00426F14                 mov     ecx, [esp+1Ch+var_8]
.text:00426F18                 and     ecx, 33333333h
.text:00426F1E                 add     edx, ecx
.text:00426F20                 and     eax, 33333333h
.text:00426F25                 add     edx, eax
.text:00426F27                 imul    edx, 11111111h
.text:00426F2D                 shr     edx, 1Ch
.text:00426F30                 cmp     dl, 9
.text:00426F33                 jle     short loc_426F3F
.text:00426F35                 mov     eax, offset aTooManyDarkSqu ; "Too many dark-squared white bishops"
.text:00426F3A                 jmp     loc_4270A6
.text:00426F3F ; ---------------------------------------------------------------------------
.text:00426F3F
.text:00426F3F loc_426F3F:                             ; CODE XREF: sub_4265A0+993j
.text:00426F3F                 mov     edx, dword ptr qword_5854C8+4
.text:00426F45                 mov     eax, dword ptr qword_5854C8
.text:00426F4A                 push    edx
.text:00426F4B                 push    eax
.text:00426F4C                 call    sub_401040
.text:00426F51                 add     esp, 8
.text:00426F54                 cmp     eax, 9
.text:00426F57                 jle     short loc_426F63
.text:00426F59                 mov     eax, offset aTooManyDarkS_0 ; "Too many dark-squared black bishops"
.text:00426F5E                 jmp     loc_4270A6
.text:00426F63 ; ---------------------------------------------------------------------------
.text:00426F63
.text:00426F63 loc_426F63:                             ; CODE XREF: sub_4265A0+9B7j
.text:00426F63                 mov     eax, dword ptr qword_585488+4
.text:00426F68                 or      eax, dword ptr qword_585480+4
.text:00426F6E                 mov     ecx, dword ptr qword_585488
.text:00426F74                 or      ecx, dword ptr qword_585480
.text:00426F7A                 push    eax
.text:00426F7B                 push    ecx
.text:00426F7C                 call    sub_401040
.text:00426F81                 add     esp, 8
.text:00426F84                 cmp     eax, 0Ah
.text:00426F87                 jle     short loc_426F93
.text:00426F89                 mov     eax, offset aTooManyWhiteBi ; "Too many white bishops"
.text:00426F8E                 jmp     loc_4270A6
.text:00426F93 ; ---------------------------------------------------------------------------
.text:00426F93
.text:00426F93 loc_426F93:                             ; CODE XREF: sub_4265A0+9E7j
.text:00426F93                 mov     eax, dword ptr qword_5854C8+4
.text:00426F98                 or      eax, dword ptr qword_5854C0+4
.text:00426F9E                 mov     ecx, dword ptr qword_5854C8
.text:00426FA4                 or      ecx, dword ptr qword_5854C0
.text:00426FAA                 push    eax
.text:00426FAB                 push    ecx
.text:00426FAC                 call    sub_401040
.text:00426FB1                 add     esp, 8
.text:00426FB4                 cmp     eax, 0Ah
.text:00426FB7                 jle     short loc_426FC3
.text:00426FB9                 mov     eax, offset aTooManyBlackBi ; "Too many black bishops"
.text:00426FBE                 jmp     loc_4270A6
.text:00426FC3 ; ---------------------------------------------------------------------------
.text:00426FC3
.text:00426FC3 loc_426FC3:                             ; CODE XREF: sub_4265A0+A17j
.text:00426FC3                 mov     ecx, dword ptr qword_585470+4
.text:00426FC9                 mov     edx, dword ptr qword_585470
.text:00426FCF                 push    ecx
.text:00426FD0                 push    edx
.text:00426FD1                 call    sub_401040
.text:00426FD6                 add     esp, 8
.text:00426FD9                 cmp     eax, 0Ah
.text:00426FDC                 jle     short loc_426FE8
.text:00426FDE                 mov     eax, offset aTooManyWhiteKn ; "Too many white knights"
.text:00426FE3                 jmp     loc_4270A6
.text:00426FE8 ; ---------------------------------------------------------------------------
.text:00426FE8
.text:00426FE8 loc_426FE8:                             ; CODE XREF: sub_4265A0+A3Cj
.text:00426FE8                 mov     eax, dword ptr qword_5854B0+4
.text:00426FED                 mov     ecx, dword ptr qword_5854B0
.text:00426FF3                 push    eax
.text:00426FF4                 push    ecx
.text:00426FF5                 call    sub_401040
.text:00426FFA                 add     esp, 8
.text:00426FFD                 cmp     eax, 0Ah
.text:00427000                 jle     short loc_42700C
.text:00427002                 mov     eax, offset aTooManyBlackKn ; "Too many black knights"
.text:00427007                 jmp     loc_4270A6
.text:0042700C ; ---------------------------------------------------------------------------
.text:0042700C
.text:0042700C loc_42700C:                             ; CODE XREF: sub_4265A0+A60j
.text:0042700C                 mov     edx, dword ptr qword_585468+4
.text:00427012                 mov     eax, dword ptr qword_585468
.text:00427017                 push    edx
.text:00427018                 push    eax
.text:00427019                 call    sub_401040
.text:0042701E                 add     esp, 8
.text:00427021                 cmp     eax, 8
.text:00427024                 jle     short loc_42702D
.text:00427026                 mov     eax, offset aTooManyWhitePa ; "Too many white pawns"
.text:0042702B                 jmp     short loc_4270A6
.text:0042702D ; ---------------------------------------------------------------------------
.text:0042702D
.text:0042702D loc_42702D:                             ; CODE XREF: sub_4265A0+A84j
.text:0042702D                 mov     ecx, dword ptr qword_5854A8+4
.text:00427033                 mov     edx, dword ptr qword_5854A8
.text:00427039                 push    ecx
.text:0042703A                 push    edx
.text:0042703B                 call    sub_401040
.text:00427040                 add     esp, 8
.text:00427043                 cmp     eax, 8
.text:00427046                 jle     short loc_42704F
.text:00427048                 mov     eax, offset aTooManyBlackPa ; "Too many black pawns"
.text:0042704D                 jmp     short loc_4270A6
.text:0042704F ; ---------------------------------------------------------------------------
.text:0042704F
.text:0042704F loc_42704F:                             ; CODE XREF: sub_4265A0+AA6j
.text:0042704F                 push    esi
.text:00427050                 push    edi
.text:00427051                 call    sub_401040
.text:00427056                 add     esp, 8
.text:00427059                 cmp     eax, 10h
.text:0042705C                 jle     short loc_427065
.text:0042705E                 mov     eax, offset aTooManyWhitePi ; "Too many white pieces"
.text:00427063                 jmp     short loc_4270A6
.text:00427065 ; ---------------------------------------------------------------------------
.text:00427065
.text:00427065 loc_427065:                             ; CODE XREF: sub_4265A0+ABCj
.text:00427065                 push    ebp
.text:00427066                 push    ebx
.text:00427067                 call    sub_401040
.text:0042706C                 add     esp, 8
.text:0042706F                 cmp     eax, 10h
.text:00427072                 jle     short loc_42707B
.text:00427074                 mov     eax, offset aTooManyBlackPi ; "Too many black pieces"
.text:00427079                 jmp     short loc_4270A6
.text:0042707B ; ---------------------------------------------------------------------------
.text:0042707B
.text:0042707B loc_42707B:                             ; CODE XREF: sub_4265A0+AD2j
.text:0042707B                 mov     eax, dword ptr qword_5854A8
.text:00427080                 mov     ecx, dword ptr qword_5854A8+4
.text:00427086                 or      eax, dword ptr qword_585468
.text:0042708C                 or      ecx, dword ptr qword_585468+4
.text:00427092                 and     eax, 0FFh
.text:00427097                 and     ecx, 0FF000000h
.text:0042709D                 or      eax, ecx
.text:0042709F                 jz      short loc_4270E1
.text:004270A1                 mov     eax, offset aPawnAtRank1Or8 ; "Pawn at rank 1 or 8"
.text:004270A6
.text:004270A6 loc_4270A6:                             ; CODE XREF: sub_4265A0+644j
.text:004270A6                                         ; sub_4265A0+6B4j ...
.text:004270A6                 push    eax
.text:004270A7                 push    offset aErrorInvalidPo ; "ERROR: Invalid position - %s\n"
.text:004270AC                 call    sub_428B5A
.text:004270B1                 push    offset aInternalBoardR ; "Internal board reset to start position

\n"...
.text:004270B6                 call    sub_428B5A
.text:004270BB                 add     esp, 0Ch
.text:004270BE                 call    sub_4287BF
.text:004270C3                 add     eax, 20h
.text:004270C6                 push    eax
.text:004270C7                 call    sub_428AFE
.text:004270CC                 add     esp, 4
.text:004270CF                 push    0
.text:004270D1                 call    sub_4274B0
.text:004270D6                 add     esp, 4
.text:004270D9                 pop     edi
.text:004270DA                 pop     esi
.text:004270DB                 pop     ebp
.text:004270DC                 pop     ebx
.text:004270DD                 add     esp, 0Ch
.text:004270E0                 retn
.text:004270E1 ; ---------------------------------------------------------------------------
.text:004270E1
.text:004270E1 loc_4270E1:                             ; CODE XREF: sub_4265A0+AFFj
.text:004270E1                 bsf     eax, dword ptr qword_585478
.text:004270E8                 jz      short loc_4270F0
.text:004270EA                 mov     [esp+1Ch+var_8], eax
.text:004270EE                 jmp     short loc_427106
.text:004270F0 ; ---------------------------------------------------------------------------
.text:004270F0
.text:004270F0 loc_4270F0:                             ; CODE XREF: sub_4265A0+B48j
.text:004270F0                 bsf     eax, dword ptr qword_585478+4
.text:004270F7                 mov     ecx, eax
.text:004270F9                 add     ecx, 20h
.text:004270FC                 mov     [esp+1Ch+var_8], eax
.text:00427100                 mov     [esp+1Ch+var_8], ecx
.text:00427104                 mov     eax, ecx
.text:00427106
.text:00427106 loc_427106:                             ; CODE XREF: sub_4265A0+B4Ej
.text:00427106                 bsf     ebx, dword ptr qword_5854B8
.text:0042710D                 mov     byte_5854E8, al
.text:00427112                 jnz     short loc_427124
.text:00427114                 bsf     edx, dword ptr qword_5854B8+4
.text:0042711B                 mov     ebx, edx
.text:0042711D                 mov     [esp+1Ch+var_4], edx
.text:00427121                 add     ebx, 20h
.text:00427124
.text:00427124 loc_427124:                             ; CODE XREF: sub_4265A0+B72j
.text:00427124                 mov     esi, dword_5854F0
.text:0042712A                 mov     byte_5854E9, bl
.text:00427130                 mov     dl, [esi+19h]
.text:00427133                 test    dl, 1
.text:00427136                 jz      short loc_42715F
.text:00427138                 cmp     al, 4
.text:0042713A                 jnz     loc_4271CD
.text:00427140                 mov     eax, dword ptr qword_828AB0
.text:00427145                 mov     ecx, dword ptr qword_828AB0+4
.text:0042714B                 and     eax, dword ptr qword_585490
.text:00427151                 and     ecx, dword ptr qword_585490+4
.text:00427157                 or      eax, ecx
.text:00427159                 jz      short loc_4271CD
.text:0042715B                 mov     eax, [esp+1Ch+var_8]
.text:0042715F
.text:0042715F loc_42715F:                             ; CODE XREF: sub_4265A0+B96j
.text:0042715F                 test    dl, 2
.text:00427162                 jz      short loc_427183
.text:00427164                 cmp     al, 4
.text:00427166                 jnz     short loc_4271CD
.text:00427168                 mov     eax, dword ptr qword_828A78
.text:0042716D                 mov     ecx, dword ptr qword_828A78+4
.text:00427173                 and     eax, dword ptr qword_585490
.text:00427179                 and     ecx, dword ptr qword_585490+4
.text:0042717F                 or      eax, ecx
.text:00427181                 jz      short loc_4271CD
.text:00427183
.text:00427183 loc_427183:                             ; CODE XREF: sub_4265A0+BC2j
.text:00427183                 test    dl, 4
.text:00427186                 jz      short loc_4271A8
.text:00427188                 cmp     bl, 3Ch
.text:0042718B                 jnz     short loc_4271CD
.text:0042718D                 mov     eax, dword ptr qword_828C70
.text:00427192                 mov     ecx, dword ptr qword_828C70+4
.text:00427198                 and     eax, dword ptr qword_5854D0
.text:0042719E                 and     ecx, dword ptr qword_5854D0+4
.text:004271A4                 or      eax, ecx
.text:004271A6                 jz      short loc_4271CD
.text:004271A8
.text:004271A8 loc_4271A8:                             ; CODE XREF: sub_4265A0+BE6j
.text:004271A8                 test    dl, 8
.text:004271AB                 jz      short loc_42720A
.text:004271AD                 cmp     bl, 3Ch
.text:004271B0                 jnz     short loc_4271CD
.text:004271B2                 mov     eax, dword ptr qword_828C38
.text:004271B7                 mov     ecx, dword ptr qword_828C38+4
.text:004271BD                 and     eax, dword ptr qword_5854D0
.text:004271C3                 and     ecx, dword ptr qword_5854D0+4
.text:004271C9                 or      eax, ecx
.text:004271CB                 jnz     short loc_42720A
.text:004271CD
.text:004271CD loc_4271CD:                             ; CODE XREF: sub_4265A0+B9Aj
.text:004271CD                                         ; sub_4265A0+BB9j ...
.text:004271CD                 push    offset aIllegalCastlin ; "Illegal castling"
.text:004271D2                 push    offset aErrorInvalidPo ; "ERROR: Invalid position - %s\n"
.text:004271D7                 call    sub_428B5A
.text:004271DC                 push    offset aInternalBoardR ; "Internal board reset to start position

\n"...
.text:004271E1                 call    sub_428B5A
.text:004271E6                 add     esp, 0Ch
.text:004271E9                 call    sub_4287BF
.text:004271EE                 add     eax, 20h
.text:004271F1                 push    eax
.text:004271F2                 call    sub_428AFE
.text:004271F7                 add     esp, 4
.text:004271FA                 push    0
.text:004271FC                 call    sub_4274B0
.text:00427201                 mov     esi, dword_5854F0
.text:00427207                 add     esp, 4
.text:0042720A
.text:0042720A loc_42720A:                             ; CODE XREF: sub_4265A0+C0Bj
.text:0042720A                                         ; sub_4265A0+C2Bj
.text:0042720A                 movzx   eax, byte ptr [esi+19h]
.text:0042720E                 mov     ecx, dword ptr qword_8F1EF8[eax*8]
.text:00427215                 xor     [esi], ecx
.text:00427217                 mov     edx, dword ptr (qword_8F1EF8+4)[eax*8]
.text:0042721E                 mov     eax, dword_5854F0
.text:00427223                 xor     [eax+4], edx
.text:00427226                 mov     ecx, dword_5854F0
.text:0042722C                 mov     al, [ecx+1Ah]
.text:0042722F                 test    al, al
.text:00427231                 jz      short loc_427257
.text:00427233                 movzx   eax, al
.text:00427236                 and     eax, 7
.text:00427239                 mov     edx, dword_926CC0[eax*8]
.text:00427240                 xor     [ecx], edx
.text:00427242                 mov     ecx, dword_926CC4[eax*8]
.text:00427249                 mov     eax, dword_5854F0
.text:0042724E                 xor     [eax+4], ecx
.text:00427251                 mov     ecx, dword_5854F0
.text:00427257
.text:00427257 loc_427257:                             ; CODE XREF: sub_4265A0+C91j
.text:00427257                 movzx   edx, byte_5854E9
.text:0042725E                 lea     eax, [ecx+8]
.text:00427261                 movzx   ecx, byte ptr [ecx+19h]
.text:00427265                 mov     esi, dword ptr qword_8F1EF8[ecx*8]
.text:0042726C                 xor     esi, dword_91D870[edx*8]
.text:00427273                 mov     edi, dword ptr (qword_8F1EF8+4)[ecx*8]
.text:0042727A                 xor     edi, dword_91D874[edx*8]
.text:00427281                 movzx   ecx, byte_5854E8
.text:00427288                 xor     esi, dword_91C870[ecx*8]
.text:0042728F                 xor     edi, dword_91C874[ecx*8]
.text:00427296                 xor     esi, [eax]
.text:00427298                 xor     edi, [eax+4]
.text:0042729B                 xor     esi, 0A8BF965Eh
.text:004272A1                 xor     edi, 74D3C012h
.text:004272A7                 mov     [eax], esi
.text:004272A9                 mov     [eax+4], edi
.text:004272AC                 cmp     byte_5854EA, 0
.text:004272B3                 jz      short loc_4272D0
.text:004272B5                 mov     eax, dword_5854F0
.text:004272BA                 mov     edx, dword_8F3118
.text:004272C0                 xor     [eax], edx
.text:004272C2                 mov     ecx, dword_8F311C
.text:004272C8                 mov     eax, dword_5854F0
.text:004272CD                 xor     [eax+4], ecx
.text:004272D0
.text:004272D0 loc_4272D0:                             ; CODE XREF: sub_4265A0+D13j
.text:004272D0                 push    0
.text:004272D2                 push    0
.text:004272D4                 push    7530h
.text:004272D9                 push    0FFFF8AD0h
.text:004272DE                 call    sub_404AD0
.text:004272E3                 mov     edx, dword_5854F0
.text:004272E9                 add     esp, 10h
.text:004272EC                 cmp     byte_5854EA, 0
.text:004272F3                 jz      short loc_427351
.text:004272F5                 mov     eax, [edx+20h]
.text:004272F8                 mov     ecx, [edx+24h]
.text:004272FB                 and     eax, dword ptr qword_5854B8
.text:00427301                 and     ecx, dword ptr qword_5854B8+4
.text:00427307                 or      eax, ecx
.text:00427309                 jz      short loc_427348
.text:0042730B                 push    offset aBlackKingCanBe ; "Black king can be captured"
.text:00427310                 push    offset aErrorInvalidPo ; "ERROR: Invalid position - %s\n"
.text:00427315                 call    sub_428B5A
.text:0042731A                 push    offset aInternalBoardR ; "Internal board reset to start position

\n"...
.text:0042731F                 call    sub_428B5A
.text:00427324                 add     esp, 0Ch
.text:00427327                 call    sub_4287BF
.text:0042732C                 add     eax, 20h
.text:0042732F                 push    eax
.text:00427330                 call    sub_428AFE
.text:00427335                 add     esp, 4
.text:00427338                 push    0
.text:0042733A                 call    sub_4274B0
.text:0042733F                 mov     edx, dword_5854F0
.text:00427345                 add     esp, 4
.text:00427348
.text:00427348 loc_427348:                             ; CODE XREF: sub_4265A0+D69j
.text:00427348                 cmp     byte_5854EA, 0
.text:0042734F                 jnz     short loc_42739E
.text:00427351
.text:00427351 loc_427351:                             ; CODE XREF: sub_4265A0+D53j
.text:00427351                 mov     eax, [edx+28h]
.text:00427354                 mov     ecx, [edx+2Ch]
.text:00427357                 and     eax, dword ptr qword_585478
.text:0042735D                 and     ecx, dword ptr qword_585478+4
.text:00427363                 or      eax, ecx
.text:00427365                 jz      short loc_42739E
.text:00427367                 push    offset aWhiteKingCanBe ; "White king can be captured"
.text:0042736C                 push    offset aErrorInvalidPo ; "ERROR: Invalid position - %s\n"
.text:00427371                 call    sub_428B5A
.text:00427376                 push    offset aInternalBoardR ; "Internal board reset to start position

\n"...
.text:0042737B                 call    sub_428B5A
.text:00427380                 add     esp, 0Ch
.text:00427383                 call    sub_4287BF
.text:00427388                 add     eax, 20h
.text:0042738B                 push    eax
.text:0042738C                 call    sub_428AFE
.text:00427391                 add     esp, 4
.text:00427394                 push    0
.text:00427396                 call    sub_4274B0
.text:0042739B                 add     esp, 4
.text:0042739E
.text:0042739E loc_42739E:                             ; CODE XREF: sub_4265A0+DAFj
.text:0042739E                                         ; sub_4265A0+DC5j
.text:0042739E                 pop     edi
.text:0042739F                 pop     esi
.text:004273A0                 pop     ebp
.text:004273A1                 mov     byte_8F28CC, 1
.text:004273A8                 pop     ebx
.text:004273A9                 add     esp, 0Ch
.text:004273AC                 retn
.text:004273AC sub_4265A0      endp
utils.c

Code: Select all

void bitboard_initialization()
{
	int i, b, piece;
	uint64 O;
	border_legitimate = FALSE;

	for (i = 0; i < 16; i++)
		POSITION.bitboard[i] = 0;
	DYNAMIC->hash_key = DYNAMIC->pawn_hash_key = 0;
	DYNAMIC->material = 0;
	DYNAMIC->static_value = 0;

	for (i = A1; i <= H8; i++)
	{
		if ((piece = SQUARE[i]))
		{
			DYNAMIC->static_value += static_value[piece][i];
			DYNAMIC->hash_key ^= HASH[piece][i];

			if (piece == enum_pawn_white || piece == enum_pawn_black)
				DYNAMIC->pawn_hash_key ^= HASH[piece][i];
			DYNAMIC->material += value_material_[piece];
			bit_fixed(i, POSITION.bitboard[SQUARE[i]]);
		}
	}
	bitboard_occupied_white =
		bitboard_white_king | bitboard_white_queen | bitboard_white_rook | bitboard_white_bishop | bitboard_white_knight
			| bitboard_white_pawn;
	bitboard_occupied_black =
		bitboard_black_king | bitboard_black_queen | bitboard_black_rook | bitboard_black_bishop | bitboard_black_knight
			| bitboard_black_pawn;
	POSITION.occupied_total = bitboard_occupied_white | bitboard_occupied_black;
	POSITION.occupied_left90 = POSITION.occupied_left45 = POSITION.occupied_right45 = 0;
	O = POSITION.occupied_total;

	if (POPCNT(bitboard_white_queen) > 1 || POPCNT(bitboard_black_queen) > 1 || POPCNT(bitboard_white_rook) > 2
		|| POPCNT(bitboard_black_rook) > 2 || POPCNT(bitboard_white_light) > 1 || POPCNT(bitboard_black_light) > 1
		|| POPCNT(bitboard_white_knight) > 2 || POPCNT(bitboard_black_knight) > 2 || POPCNT(bitboard_white_dark) > 1
		|| POPCNT(bitboard_black_dark) > 1)
		DYNAMIC->material |= 0x80000000;

	if (POPCNT(bitboard_white_king) != 1)
		ERROR_pos("king white != 1");

	if (POPCNT(bitboard_black_king) != 1)
		ERROR_pos("king black != 1");

	if (POPCNT(bitboard_white_queen) > 9)
		ERROR_pos("queen white > 9");

	if (POPCNT(bitboard_black_queen) > 9)
		ERROR_pos("queen black > 9");

	if (POPCNT(bitboard_white_rook) > 10)
		ERROR_pos("rook white > 10");

	if (POPCNT(bitboard_black_rook) > 10)
		ERROR_pos("rook black > 10");

	if (POPCNT(bitboard_white_light) > 9)
		ERROR_pos("chiaro white > 9");

	if (POPCNT(bitboard_black_light) > 9)
		ERROR_pos("chiaro black > 9");

	if (POPCNT(bitboard_white_dark) > 9)
		ERROR_pos("dark white > 9");

	if (POPCNT(bitboard_black_dark) > 9)
		ERROR_pos("dark black > 9");

	if (POPCNT(bitboard_white_light | bitboard_white_dark) > 10)
		ERROR_pos("bishop white > 10");

	if (POPCNT(bitboard_black_light | bitboard_black_dark) > 10)
		ERROR_pos("bishop black > 10");

	if (POPCNT(bitboard_white_knight) > 10)
		ERROR_pos("knight white > 10");

	if (POPCNT(bitboard_black_knight) > 10)
		ERROR_pos("knight black > 10");

	if (POPCNT(bitboard_white_pawn) > 8)
		ERROR_pos("pawn white > 8");

	if (POPCNT(bitboard_black_pawn) > 8)
		ERROR_pos("pawn black > 8");

	if (POPCNT(bitboard_occupied_white) > 16)
		ERROR_pos("piece white > 16");

	if (POPCNT(bitboard_occupied_black) > 16)
		ERROR_pos("piece black > 16");

	if ((bitboard_white_pawn | bitboard_black_pawn) & (RANK1 | RANK8))
		ERROR_pos("pawn rank one or eight");

	while (O)
	{
		b = LSB(O);
		bit_free(b, O);
		bit_fixed(left90[b], POSITION.occupied_left90);
		bit_fixed(left45[b], POSITION.occupied_left45);
		bit_fixed(right45[b], POSITION.occupied_right45);
	}
	POSITION.white_king_square = LSB(bitboard_white_king);
	POSITION.black_king_square = LSB(bitboard_black_king);

	if ((castling_white_oo && (POSITION.white_king_square != E1 || !(bitboard_white_rook &square_fixed[H1])))
		|| (castling_white_ooo && (POSITION.white_king_square != E1 || !(bitboard_white_rook &square_fixed[A1])))
			|| (castling_black_oo && (POSITION.black_king_square != E8 || !(bitboard_black_rook &square_fixed[H8])))
			|| (castling_black_ooo && (POSITION.black_king_square != E8 || !(bitboard_black_rook &square_fixed[A8]))))
		ERROR_pos("illegal castling");
	DYNAMIC->hash_key ^= hash_oo[DYNAMIC->castle];

	if (DYNAMIC->en_passant)
		DYNAMIC->hash_key ^= hash_ep[DYNAMIC->en_passant & 7];
	DYNAMIC->pawn_hash_key ^=
		hash_oo[DYNAMIC->castle] ^ PINCH ^ HASH[enum_king_white][POSITION.white_king_square]
			^ HASH[enum_king_black][POSITION.black_king_square];

	if (POSITION.white_to_move)
		DYNAMIC->hash_key ^= hash_move_white;
	call_value_full(0);

	if (POSITION.white_to_move && DYNAMIC->white_attacks & bitboard_black_king)
		ERROR_pos("white captures king");

	if (!POSITION.white_to_move && DYNAMIC->black_attacks & bitboard_white_king)
		ERROR_pos("black captures king");
	border_legitimate = TRUE;
}
*Modified
Attachments
robbolito.7z
(238.73 KiB) Downloaded 299 times
PAWN : Knight >> Bishop >> Rook >>Queen

Chan Rasjid
Posts: 33
Joined: Thu Jun 10, 2010 4:41 pm
Real Name: Chan Rasjid

Re: Why Is Houdini Not Entered In The WCCC??

Post by Chan Rasjid » Tue Aug 10, 2010 7:36 am

kingliveson wrote:It's actually not that funny. First of all, I have not seen code snippets posted by Lance. Further more, would you be willing to let me examine the source code of the initial release of Houdini? If not me, would you allow BB+, Zach Wegner, or anyone else? I have no dog in the fight, call things as they are, and would glady appologize should the findings exonerate you. More modified code below:
...
In jest, in another thread, I asked to see the full sources of Houdini; it might be rudeness to ask to see the source codes of someone else's chess program.

Robert Houdart already answered your query, the same answer he gave Sean Evans in another thread. The thing is none said his reply was unacceptable or gave reasons why it was unacceptable.

I have a question. In my program I have the same (with some minor changes) pst tables as Fruit's as I can't think of another way of doing it. Robbolito's pst is almost the same as Fruit's. It is very easy to implement these pst without cut_and_paste. If my snailchess's binary is disassembled, would the output and your conclusion be similar to what you said about Houdini ?

Rasjid.

User avatar
kingliveson
Posts: 1388
Joined: Thu Jun 10, 2010 1:22 am
Real Name: Franklin Titus
Location: 28°32'1"N 81°22'33"W

Re: Why Is Houdini Not Entered In The WCCC??

Post by kingliveson » Tue Aug 10, 2010 7:40 am

Robert Houdart wrote: To return to the WCCC topic at hand, let me repeat what I wrote above: the day that Houdini enters the WCCC (hopefully next time it gets organized in Europe), I will duly submit the Houdini source code to the WCCC tournament director, and he or she will have all the liberty and time to compare the source code to Ippolit, Stockfish, Crafty, Robbolito, Ivanhoe etc.

Robert
Perhaps am coming off like a d**k, so my sincere apology if my initial tone seem a bit harsh in language. Since the initial release of Houdini, all who examined it came to conclusion it's an Ippolit derivative. Let us put it to rest once and for all by you releasing Houdini 1.0 source code (build 2010-05-15) for examination. The release does not have to be public. There are several individuals in the chess community (BB+, Dann Corbit, Matthias Gemuh, Hyatt, H.G. Muller, Tord Romstad, Zach Wegner, etc.) whose findings will be respected.

If you decided today to commercialize Houdini, I may even buy it, but what cannot be bought at this point is that it's an original program. If you do accept the offer to release the source code now for examination, and findings come back that am wrong, again, my apologies will be extended immediately. I will leave the matter alone with a final snippet:

RobboLito 0.09 w32
Aug 4 2010 19:40:41
basic windows version by kranium, improved by sentinel

Code: Select all

.text:004267A0 sub_4267A0      proc near               ; CODE XREF: sub_4269A0+158p
.text:004267A0
.text:004267A0 var_4           = dword ptr -4
.text:004267A0 arg_0           = dword ptr  4
.text:004267A0 arg_4           = dword ptr  8
.text:004267A0 arg_8           = dword ptr  0Ch
.text:004267A0 arg_C           = dword ptr  10h
.text:004267A0 arg_10          = dword ptr  14h
.text:004267A0 arg_14          = dword ptr  18h
.text:004267A0 arg_18          = dword ptr  1Ch
.text:004267A0 arg_1C          = dword ptr  20h
.text:004267A0 arg_20          = dword ptr  24h
.text:004267A0 arg_24          = dword ptr  28h
.text:004267A0
.text:004267A0                 sub     esp, 8
.text:004267A3                 mov     eax, [esp+8+arg_8]
.text:004267A7                 push    ebx
.text:004267A8                 mov     ebx, [esp+0Ch+arg_C]
.text:004267AC                 cdq
.text:004267AD                 push    ebp
.text:004267AE                 mov     ebp, [esp+10h+arg_1C]
.text:004267B2                 sub     eax, edx
.text:004267B4                 mov     ecx, eax
.text:004267B6                 mov     eax, ebp
.text:004267B8                 cdq
.text:004267B9                 sub     eax, edx
.text:004267BB                 push    esi
.text:004267BC                 sar     eax, 1
.text:004267BE                 push    edi
.text:004267BF                 sar     ecx, 1
.text:004267C1                 sub     ecx, eax
.text:004267C3                 push    370032h
.text:004267C8                 mov     eax, ecx
.text:004267CA                 cdq
.text:004267CB                 push    280023h
.text:004267D0                 push    edx
.text:004267D1                 push    eax
.text:004267D2                 call    __allmul
.text:004267D7                 mov     esi, eax
.text:004267D9                 mov     eax, [esp+18h+arg_0]
.text:004267DD                 sub     eax, [esp+18h+arg_14]
.text:004267E1                 push    7D006Eh
.text:004267E6                 mov     edi, edx
.text:004267E8                 cdq
.text:004267E9                 push    offset unk_5A0050
.text:004267EE                 push    edx
.text:004267EF                 push    eax
.text:004267F0                 call    __allmul
.text:004267F5                 add     esi, eax
.text:004267F7                 mov     eax, [esp+18h+arg_4]
.text:004267FB                 adc     edi, edx
.text:004267FD                 sub     eax, [esp+18h+arg_18]
.text:00426801                 push    1630140h
.text:00426806                 cdq
.text:00426807                 push    1180109h
.text:0042680C                 push    edx
.text:0042680D                 push    eax
.text:0042680E                 call    __allmul
.text:00426813                 add     esi, eax
.text:00426815                 mov     eax, [esp+18h+arg_8]
.text:00426819                 adc     edi, edx
.text:0042681B                 push    1680145h
.text:00426820                 sub     eax, ebp
.text:00426822                 cdq
.text:00426823                 push    1270118h
.text:00426828                 push    edx
.text:00426829                 push    eax
.text:0042682A                 call    __allmul
.text:0042682F                 add     esi, eax
.text:00426831                 adc     edi, edx
.text:00426833                 mov     eax, ebx
.text:00426835                 sub     eax, [esp+18h+arg_20]
.text:00426839                 push    2620226h
.text:0042683E                 cdq
.text:0042683F                 push    1C20195h
.text:00426844                 push    edx
.text:00426845                 push    eax
.text:00426846                 call    __allmul
.text:0042684B                 add     esi, eax
.text:0042684D                 mov     eax, [esp+18h+arg_10]
.text:00426851                 adc     edi, edx
.text:00426853                 sub     eax, [esp+18h+arg_24]
.text:00426857                 push    47E0401h
.text:0042685C                 cdq
.text:0042685D                 push    36B0320h
.text:00426862                 push    edx
.text:00426863                 push    eax
.text:00426864                 call    __allmul
.text:00426869                 add     esi, eax
.text:0042686B                 adc     edi, edx
.text:0042686D                 mov     [esp+18h+var_4], edi
.text:00426871                 cmp     ebx, 2
.text:00426874                 jnz     short loc_426886
.text:00426876                 add     esi, 0FFEBFFF0h
.text:0042687C                 adc     edi, 0FFDFFFE3h
.text:00426882                 mov     [esp+18h+var_4], edi
.text:00426886
.text:00426886 loc_426886:                             ; CODE XREF: sub_4267A0+D4j
.text:00426886                 mov     eax, [esp+18h+arg_20]
.text:0042688A                 cmp     eax, 2
.text:0042688D                 jnz     short loc_42689F
.text:0042688F                 add     esi, 140010h
.text:00426895                 adc     edi, 20001Ch
.text:0042689B                 mov     [esp+18h+var_4], edi
.text:0042689F
.text:0042689F loc_42689F:                             ; CODE XREF: sub_4267A0+EDj
.text:0042689F                 mov     edx, [esp+18h+arg_10]
.text:004268A3                 add     ebx, edx
.text:004268A5                 cmp     ebx, 2
.text:004268A8                 jl      short loc_4268BA
.text:004268AA                 add     esi, 0FFF5FFF8h
.text:004268B0                 adc     edi, 0FFEFFFF1h
.text:004268B6                 mov     [esp+18h+var_4], edi
.text:004268BA
.text:004268BA loc_4268BA:                             ; CODE XREF: sub_4267A0+108j
.text:004268BA                 mov     ecx, [esp+18h+arg_24]
.text:004268BE                 add     eax, ecx
.text:004268C0                 cmp     eax, 2
.text:004268C3                 jl      short loc_4268D5
.text:004268C5                 add     esi, 0A0008h
.text:004268CB                 adc     edi, 10000Eh
.text:004268D1                 mov     [esp+18h+var_4], edi
.text:004268D5
.text:004268D5 loc_4268D5:                             ; CODE XREF: sub_4267A0+123j
.text:004268D5                 mov     edx, [esp+18h+arg_4]
.text:004268D9                 mov     eax, [esp+18h+arg_8]
.text:004268DD                 mov     ecx, [esp+18h+arg_18]
.text:004268E1                 add     eax, edx
.text:004268E3                 add     ebp, ecx
.text:004268E5                 cmp     ebp, eax
.text:004268E7                 jge     short loc_4268FB
.text:004268E9                 add     esi, 0F0014h
.text:004268EF                 adc     edi, 5000Ah
.text:004268F5                 mov     [esp+18h+var_4], edi
.text:004268F9                 cmp     ebp, eax
.text:004268FB
.text:004268FB loc_4268FB:                             ; CODE XREF: sub_4267A0+147j
.text:004268FB                 jle     short loc_42690D
.text:004268FD                 add     esi, 0FFF0FFECh
.text:00426903                 adc     edi, 0FFFAFFF5h
.text:00426909                 mov     [esp+18h+var_4], edi
.text:0042690D
.text:0042690D loc_42690D:                             ; CODE XREF: sub_4267A0:loc_4268FBj
.text:0042690D                 mov     edi, [esp+18h+arg_0]
.text:00426911                 mov     ebx, [esp+18h+arg_14]
.text:00426915                 add     edi, 0FFFFFFFBh
.text:00426918                 mov     eax, edi
.text:0042691A                 imul    eax, edx
.text:0042691D                 cdq
.text:0042691E                 mov     ebp, eax
.text:00426920                 mov     eax, edx
.text:00426922                 mov     [esp+18h+arg_8], eax
.text:00426926                 add     ebx, 0FFFFFFFBh
.text:00426929                 mov     eax, ebx
.text:0042692B                 imul    eax, ecx
.text:0042692E                 cdq
.text:0042692F                 sub     ebp, eax
.text:00426931                 mov     eax, [esp+18h+arg_8]
.text:00426935                 push    50004h
.text:0042693A                 push    20000h
.text:0042693F                 sbb     eax, edx
.text:00426941                 push    eax
.text:00426942                 push    ebp
.text:00426943                 call    __allmul
.text:00426948                 mov     ebp, eax
.text:0042694A                 mov     eax, edx
.text:0042694C                 mov     [esp+18h+arg_8], eax
.text:00426950                 mov     eax, edi
.text:00426952                 imul    eax, [esp+18h+arg_C]
.text:00426957                 cdq
.text:00426958                 mov     ecx, eax
.text:0042695A                 mov     eax, ebx
.text:0042695C                 imul    eax, [esp+18h+arg_20]
.text:00426961                 mov     edi, edx
.text:00426963                 cdq
.text:00426964                 push    2
.text:00426966                 sub     eax, ecx
.text:00426968                 push    40005h
.text:0042696D                 sbb     edx, edi
.text:0042696F                 push    edx
.text:00426970                 push    eax
.text:00426971                 call    __allmul
.text:00426976                 add     ebp, eax
.text:00426978                 mov     eax, [esp+18h+arg_8]
.text:0042697C                 adc     eax, edx
.text:0042697E                 add     ebp, esi
.text:00426980                 adc     eax, [esp+18h+var_4]
.text:00426984                 pop     edi
.text:00426985                 mov     [esp+14h+arg_8], eax
.text:00426989                 mov     eax, ebp
.text:0042698B                 mov     ebp, [esp+14h+arg_8]
.text:0042698F                 pop     esi
.text:00426990                 mov     edx, ebp
.text:00426992                 pop     ebp
.text:00426993                 pop     ebx
.text:00426994                 add     esp, 8
.text:00426997                 retn
.text:00426997 sub_4267A0      endp
Houdini w32 1_CPU
build 2010-05-15
by Robert Houdart*

Code: Select all

.text:00428150 sub_428150      proc near               ; CODE XREF: sub_428340+172p
.text:00428150
.text:00428150 var_4           = dword ptr -4
.text:00428150 arg_0           = dword ptr  4
.text:00428150 arg_4           = dword ptr  8
.text:00428150 arg_8           = dword ptr  0Ch
.text:00428150 arg_C           = dword ptr  10h
.text:00428150 arg_10          = dword ptr  14h
.text:00428150 arg_14          = dword ptr  18h
.text:00428150 arg_18          = dword ptr  1Ch
.text:00428150 arg_1C          = dword ptr  20h
.text:00428150 arg_20          = dword ptr  24h
.text:00428150 arg_24          = dword ptr  28h
.text:00428150
.text:00428150                 sub     esp, 8
.text:00428153                 mov     eax, [esp+8+arg_4]
.text:00428157                 mov     ecx, [esp+8+arg_18]
.text:0042815B                 push    ebx
.text:0042815C                 mov     ebx, [esp+0Ch+arg_1C]
.text:00428160                 push    ebp
.text:00428161                 mov     ebp, [esp+10h+arg_8]
.text:00428165                 add     eax, ebp
.text:00428167                 mov     [esp+10h+arg_1C], eax
.text:0042816B                 add     ecx, ebx
.text:0042816D                 mov     eax, ebp
.text:0042816F                 cdq
.text:00428170                 sub     eax, edx
.text:00428172                 mov     [esp+10h+arg_8], ecx
.text:00428176                 mov     ecx, eax
.text:00428178                 mov     eax, ebx
.text:0042817A                 cdq
.text:0042817B                 sub     eax, edx
.text:0042817D                 push    esi
.text:0042817E                 sar     eax, 1
.text:00428180                 push    edi
.text:00428181                 sar     ecx, 1
.text:00428183                 sub     ecx, eax
.text:00428185                 push    offset dword_6E0064
.text:0042818A                 mov     eax, ecx
.text:0042818C                 cdq
.text:0042818D                 push    offset word_500046
.text:00428192                 push    edx
.text:00428193                 push    eax
.text:00428194                 call    sub_4305F0
.text:00428199                 mov     esi, eax
.text:0042819B                 mov     eax, [esp+18h+arg_4]
.text:0042819F                 sub     eax, [esp+18h+arg_18]
.text:004281A3                 push    2C60280h
.text:004281A8                 mov     edi, edx
.text:004281AA                 cdq
.text:004281AB                 push    2300212h
.text:004281B0                 push    edx
.text:004281B1                 push    eax
.text:004281B2                 call    sub_4305F0
.text:004281B7                 add     esi, eax
.text:004281B9                 mov     eax, [esp+18h+arg_0]
.text:004281BD                 adc     edi, edx
.text:004281BF                 sub     eax, [esp+18h+arg_14]
.text:004281C3                 push    0FA00DCh
.text:004281C8                 cdq
.text:004281C9                 push    0B400A0h
.text:004281CE                 push    edx
.text:004281CF                 push    eax
.text:004281D0                 call    sub_4305F0
.text:004281D5                 add     esi, eax
.text:004281D7                 adc     edi, edx
.text:004281D9                 mov     eax, ebp
.text:004281DB                 push    2D0028Ah
.text:004281E0                 sub     eax, ebx
.text:004281E2                 cdq
.text:004281E3                 push    24E0230h
.text:004281E8                 push    edx
.text:004281E9                 push    eax
.text:004281EA                 call    sub_4305F0
.text:004281EF                 add     esi, eax
.text:004281F1                 mov     eax, [esp+18h+arg_10]
.text:004281F5                 adc     edi, edx
.text:004281F7                 sub     eax, [esp+18h+arg_24]
.text:004281FB                 push    8FC0802h
.text:00428200                 cdq
.text:00428201                 push    6D60640h
.text:00428206                 push    edx
.text:00428207                 push    eax
.text:00428208                 call    sub_4305F0
.text:0042820D                 mov     ebx, [esp+18h+arg_C]
.text:00428211                 mov     ebp, [esp+18h+arg_20]
.text:00428215                 add     esi, eax
.text:00428217                 adc     edi, edx
.text:00428219                 mov     eax, ebx
.text:0042821B                 push    4C4044Ch
.text:00428220                 sub     eax, ebp
.text:00428222                 cdq
.text:00428223                 push    384032Ah
.text:00428228                 push    edx
.text:00428229                 push    eax
.text:0042822A                 call    sub_4305F0
.text:0042822F                 add     esi, eax
.text:00428231                 adc     edi, edx
.text:00428233                 mov     [esp+18h+var_4], edi
.text:00428237                 cmp     ebx, 2
.text:0042823A                 jnz     short loc_42824C
.text:0042823C                 add     esi, 0FFD7FFE0h
.text:00428242                 adc     edi, 0FFBFFFC7h
.text:00428248                 mov     [esp+18h+var_4], edi
.text:0042824C
.text:0042824C loc_42824C:                             ; CODE XREF: sub_428150+EAj
.text:0042824C                 cmp     ebp, 2
.text:0042824F                 jnz     short loc_428261
.text:00428251                 add     esi, 280020h
.text:00428257                 adc     edi, 400038h
.text:0042825D                 mov     [esp+18h+var_4], edi
.text:00428261
.text:00428261 loc_428261:                             ; CODE XREF: sub_428150+FFj
.text:00428261                 add     ebx, [esp+18h+arg_10]
.text:00428265                 cmp     ebx, 2
.text:00428268                 jl      short loc_42827A
.text:0042826A                 add     esi, 0FFEBFFF0h
.text:00428270                 adc     edi, 0FFDFFFE3h
.text:00428276                 mov     [esp+18h+var_4], edi
.text:0042827A
.text:0042827A loc_42827A:                             ; CODE XREF: sub_428150+118j
.text:0042827A                 add     ebp, [esp+18h+arg_24]
.text:0042827E                 cmp     ebp, 2
.text:00428281                 jl      short loc_428293
.text:00428283                 add     esi, 140010h
.text:00428289                 adc     edi, 20001Ch
.text:0042828F                 mov     [esp+18h+var_4], edi
.text:00428293
.text:00428293 loc_428293:                             ; CODE XREF: sub_428150+131j
.text:00428293                 mov     eax, [esp+18h+arg_1C]
.text:00428297                 mov     ecx, [esp+18h+arg_8]
.text:0042829B                 cmp     ecx, eax
.text:0042829D                 jge     short loc_4282B1
.text:0042829F                 add     esi, 1E0028h
.text:004282A5                 adc     edi, 0A0014h
.text:004282AB                 mov     [esp+18h+var_4], edi
.text:004282AF                 cmp     ecx, eax
.text:004282B1
.text:004282B1 loc_4282B1:                             ; CODE XREF: sub_428150+14Dj
.text:004282B1                 jle     short loc_4282C3
.text:004282B3                 add     esi, 0FFE1FFD8h
.text:004282B9                 adc     edi, 0FFF5FFEBh
.text:004282BF                 mov     [esp+18h+var_4], edi
.text:004282C3
.text:004282C3 loc_4282C3:                             ; CODE XREF: sub_428150:loc_4282B1j
.text:004282C3                 mov     edi, [esp+18h+arg_0]
.text:004282C7                 mov     ebx, [esp+18h+arg_14]
.text:004282CB                 lea     eax, [edi-5]
.text:004282CE                 imul    eax, [esp+18h+arg_4]
.text:004282D3                 cdq
.text:004282D4                 mov     ecx, eax
.text:004282D6                 lea     eax, [ebx-5]
.text:004282D9                 imul    eax, [esp+18h+arg_18]
.text:004282DE                 mov     ebp, edx
.text:004282E0                 cdq
.text:004282E1                 push    0A0008h
.text:004282E6                 sub     ecx, eax
.text:004282E8                 push    40000h
.text:004282ED                 sbb     ebp, edx
.text:004282EF                 push    ebp
.text:004282F0                 push    ecx
.text:004282F1                 call    sub_4305F0
.text:004282F6                 mov     ebp, eax
.text:004282F8                 lea     eax, [edi-5]
.text:004282FB                 imul    eax, [esp+18h+arg_C]
.text:00428300                 mov     [esp+18h+arg_4], edx
.text:00428304                 cdq
.text:00428305                 mov     ecx, eax
.text:00428307                 lea     eax, [ebx-5]
.text:0042830A                 imul    eax, [esp+18h+arg_20]
.text:0042830F                 mov     edi, edx
.text:00428311                 cdq
.text:00428312                 push    4
.text:00428314                 sub     eax, ecx
.text:00428316                 push    8000Ah
.text:0042831B                 sbb     edx, edi
.text:0042831D                 push    edx
.text:0042831E                 push    eax
.text:0042831F                 call    sub_4305F0
.text:00428324                 add     ebp, eax
.text:00428326                 mov     eax, [esp+18h+arg_4]
.text:0042832A                 adc     eax, edx
.text:0042832C                 add     ebp, esi
.text:0042832E                 adc     eax, [esp+18h+var_4]
.text:00428332                 pop     edi
.text:00428333                 mov     edx, eax
.text:00428335                 pop     esi
.text:00428336                 mov     eax, ebp
.text:00428338                 pop     ebp
.text:00428339                 pop     ebx
.text:0042833A                 add     esp, 8
.text:0042833D                 retn
.text:0042833D sub_428150      endp
RobboLito 009 Source Code values.c

Code: Select all

static uint64 value_value(int white_pawn, int white_knight, int white_bishop, int white_light, int white_dark,
	int white_rook, int white_queen, int black_pawn, int black_knight, int black_bishop, int black_light,
	int black_dark, int black_rook, int black_queen)
{
	uint64 va = 0;
	int white_minor;
	int black_minor;

	va += (white_bishop / 2 - black_bishop / 2) * bishop_two;
	va += (white_pawn - black_pawn) * value_pawn;
	va += (white_knight - black_knight) * value_knight;
	va += (white_rook - black_rook) * value_rook;
	va += (white_queen - black_queen) * value_queen;
	va += (white_bishop - black_bishop) * value_bishop;

	if (white_rook == 2)
		va -= VALUE4(16, 20, 28, 32);

	if (black_rook == 2)
		va += VALUE4(16, 20, 28, 32);

	if (white_queen + white_rook >= 2)
		va -= VALUE4(8, 10, 14, 16);

	if (black_queen + black_rook >= 2)
		va += VALUE4(8, 10, 14, 16);
	white_minor = white_knight + white_bishop;
	black_minor = black_knight + black_bishop;

	if (white_minor > black_minor)
		va += VALUE4(20, 15, 10, 5);

	if (black_minor > white_minor)
		va -= VALUE4(20, 15, 10, 5);
	va -= (white_pawn - 5) * white_rook * mix_rook_pawn;
	va += (white_pawn - 5) * white_knight * mix_knight_pawn;
	va += (black_pawn - 5) * black_rook * mix_rook_pawn;
	va -= (black_pawn - 5) * black_knight * mix_knight_pawn;
	return va;
}
*Modified
PAWN : Knight >> Bishop >> Rook >>Queen

User avatar
Dr.Wael Deeb
Posts: 104
Joined: Thu Jun 10, 2010 8:29 pm
Real Name: Dr.Wael Deeb

Re: Why Is Houdini Not Entered In The WCCC??

Post by Dr.Wael Deeb » Tue Aug 10, 2010 9:33 am

kingliveson wrote:
Robert Houdart wrote: To return to the WCCC topic at hand, let me repeat what I wrote above: the day that Houdini enters the WCCC (hopefully next time it gets organized in Europe), I will duly submit the Houdini source code to the WCCC tournament director, and he or she will have all the liberty and time to compare the source code to Ippolit, Stockfish, Crafty, Robbolito, Ivanhoe etc.

Robert
Perhaps am coming off like a d**k, so my sincere apology if my initial tone seem a bit harsh in language. Since the initial release of Houdini, all who examined it came to conclusion it's an Ippolit derivative. Let us put it to rest once and for all by you releasing Houdini 1.0 source code (build 2010-05-15) for examination. The release does not have to be public. There are several individuals in the chess community (BB+, Dann Corbit, Matthias Gemuh, Hyatt, H.G. Muller, Tord Romstad, Zach Wegner, etc.) whose findings will be respected.

If you decided today to commercialize Houdini, I may even buy it, but what cannot be bought at this point is that it's an original program. If you do accept the offer to release the source code now for examination, and findings come back that am wrong, again, my apologies will be extended immediately. I will leave the matter alone with a final snippet:

RobboLito 0.09 w32
Aug 4 2010 19:40:41
basic windows version by kranium, improved by sentinel

Code: Select all

.text:004267A0 sub_4267A0      proc near               ; CODE XREF: sub_4269A0+158p
.text:004267A0
.text:004267A0 var_4           = dword ptr -4
.text:004267A0 arg_0           = dword ptr  4
.text:004267A0 arg_4           = dword ptr  8
.text:004267A0 arg_8           = dword ptr  0Ch
.text:004267A0 arg_C           = dword ptr  10h
.text:004267A0 arg_10          = dword ptr  14h
.text:004267A0 arg_14          = dword ptr  18h
.text:004267A0 arg_18          = dword ptr  1Ch
.text:004267A0 arg_1C          = dword ptr  20h
.text:004267A0 arg_20          = dword ptr  24h
.text:004267A0 arg_24          = dword ptr  28h
.text:004267A0
.text:004267A0                 sub     esp, 8
.text:004267A3                 mov     eax, [esp+8+arg_8]
.text:004267A7                 push    ebx
.text:004267A8                 mov     ebx, [esp+0Ch+arg_C]
.text:004267AC                 cdq
.text:004267AD                 push    ebp
.text:004267AE                 mov     ebp, [esp+10h+arg_1C]
.text:004267B2                 sub     eax, edx
.text:004267B4                 mov     ecx, eax
.text:004267B6                 mov     eax, ebp
.text:004267B8                 cdq
.text:004267B9                 sub     eax, edx
.text:004267BB                 push    esi
.text:004267BC                 sar     eax, 1
.text:004267BE                 push    edi
.text:004267BF                 sar     ecx, 1
.text:004267C1                 sub     ecx, eax
.text:004267C3                 push    370032h
.text:004267C8                 mov     eax, ecx
.text:004267CA                 cdq
.text:004267CB                 push    280023h
.text:004267D0                 push    edx
.text:004267D1                 push    eax
.text:004267D2                 call    __allmul
.text:004267D7                 mov     esi, eax
.text:004267D9                 mov     eax, [esp+18h+arg_0]
.text:004267DD                 sub     eax, [esp+18h+arg_14]
.text:004267E1                 push    7D006Eh
.text:004267E6                 mov     edi, edx
.text:004267E8                 cdq
.text:004267E9                 push    offset unk_5A0050
.text:004267EE                 push    edx
.text:004267EF                 push    eax
.text:004267F0                 call    __allmul
.text:004267F5                 add     esi, eax
.text:004267F7                 mov     eax, [esp+18h+arg_4]
.text:004267FB                 adc     edi, edx
.text:004267FD                 sub     eax, [esp+18h+arg_18]
.text:00426801                 push    1630140h
.text:00426806                 cdq
.text:00426807                 push    1180109h
.text:0042680C                 push    edx
.text:0042680D                 push    eax
.text:0042680E                 call    __allmul
.text:00426813                 add     esi, eax
.text:00426815                 mov     eax, [esp+18h+arg_8]
.text:00426819                 adc     edi, edx
.text:0042681B                 push    1680145h
.text:00426820                 sub     eax, ebp
.text:00426822                 cdq
.text:00426823                 push    1270118h
.text:00426828                 push    edx
.text:00426829                 push    eax
.text:0042682A                 call    __allmul
.text:0042682F                 add     esi, eax
.text:00426831                 adc     edi, edx
.text:00426833                 mov     eax, ebx
.text:00426835                 sub     eax, [esp+18h+arg_20]
.text:00426839                 push    2620226h
.text:0042683E                 cdq
.text:0042683F                 push    1C20195h
.text:00426844                 push    edx
.text:00426845                 push    eax
.text:00426846                 call    __allmul
.text:0042684B                 add     esi, eax
.text:0042684D                 mov     eax, [esp+18h+arg_10]
.text:00426851                 adc     edi, edx
.text:00426853                 sub     eax, [esp+18h+arg_24]
.text:00426857                 push    47E0401h
.text:0042685C                 cdq
.text:0042685D                 push    36B0320h
.text:00426862                 push    edx
.text:00426863                 push    eax
.text:00426864                 call    __allmul
.text:00426869                 add     esi, eax
.text:0042686B                 adc     edi, edx
.text:0042686D                 mov     [esp+18h+var_4], edi
.text:00426871                 cmp     ebx, 2
.text:00426874                 jnz     short loc_426886
.text:00426876                 add     esi, 0FFEBFFF0h
.text:0042687C                 adc     edi, 0FFDFFFE3h
.text:00426882                 mov     [esp+18h+var_4], edi
.text:00426886
.text:00426886 loc_426886:                             ; CODE XREF: sub_4267A0+D4j
.text:00426886                 mov     eax, [esp+18h+arg_20]
.text:0042688A                 cmp     eax, 2
.text:0042688D                 jnz     short loc_42689F
.text:0042688F                 add     esi, 140010h
.text:00426895                 adc     edi, 20001Ch
.text:0042689B                 mov     [esp+18h+var_4], edi
.text:0042689F
.text:0042689F loc_42689F:                             ; CODE XREF: sub_4267A0+EDj
.text:0042689F                 mov     edx, [esp+18h+arg_10]
.text:004268A3                 add     ebx, edx
.text:004268A5                 cmp     ebx, 2
.text:004268A8                 jl      short loc_4268BA
.text:004268AA                 add     esi, 0FFF5FFF8h
.text:004268B0                 adc     edi, 0FFEFFFF1h
.text:004268B6                 mov     [esp+18h+var_4], edi
.text:004268BA
.text:004268BA loc_4268BA:                             ; CODE XREF: sub_4267A0+108j
.text:004268BA                 mov     ecx, [esp+18h+arg_24]
.text:004268BE                 add     eax, ecx
.text:004268C0                 cmp     eax, 2
.text:004268C3                 jl      short loc_4268D5
.text:004268C5                 add     esi, 0A0008h
.text:004268CB                 adc     edi, 10000Eh
.text:004268D1                 mov     [esp+18h+var_4], edi
.text:004268D5
.text:004268D5 loc_4268D5:                             ; CODE XREF: sub_4267A0+123j
.text:004268D5                 mov     edx, [esp+18h+arg_4]
.text:004268D9                 mov     eax, [esp+18h+arg_8]
.text:004268DD                 mov     ecx, [esp+18h+arg_18]
.text:004268E1                 add     eax, edx
.text:004268E3                 add     ebp, ecx
.text:004268E5                 cmp     ebp, eax
.text:004268E7                 jge     short loc_4268FB
.text:004268E9                 add     esi, 0F0014h
.text:004268EF                 adc     edi, 5000Ah
.text:004268F5                 mov     [esp+18h+var_4], edi
.text:004268F9                 cmp     ebp, eax
.text:004268FB
.text:004268FB loc_4268FB:                             ; CODE XREF: sub_4267A0+147j
.text:004268FB                 jle     short loc_42690D
.text:004268FD                 add     esi, 0FFF0FFECh
.text:00426903                 adc     edi, 0FFFAFFF5h
.text:00426909                 mov     [esp+18h+var_4], edi
.text:0042690D
.text:0042690D loc_42690D:                             ; CODE XREF: sub_4267A0:loc_4268FBj
.text:0042690D                 mov     edi, [esp+18h+arg_0]
.text:00426911                 mov     ebx, [esp+18h+arg_14]
.text:00426915                 add     edi, 0FFFFFFFBh
.text:00426918                 mov     eax, edi
.text:0042691A                 imul    eax, edx
.text:0042691D                 cdq
.text:0042691E                 mov     ebp, eax
.text:00426920                 mov     eax, edx
.text:00426922                 mov     [esp+18h+arg_8], eax
.text:00426926                 add     ebx, 0FFFFFFFBh
.text:00426929                 mov     eax, ebx
.text:0042692B                 imul    eax, ecx
.text:0042692E                 cdq
.text:0042692F                 sub     ebp, eax
.text:00426931                 mov     eax, [esp+18h+arg_8]
.text:00426935                 push    50004h
.text:0042693A                 push    20000h
.text:0042693F                 sbb     eax, edx
.text:00426941                 push    eax
.text:00426942                 push    ebp
.text:00426943                 call    __allmul
.text:00426948                 mov     ebp, eax
.text:0042694A                 mov     eax, edx
.text:0042694C                 mov     [esp+18h+arg_8], eax
.text:00426950                 mov     eax, edi
.text:00426952                 imul    eax, [esp+18h+arg_C]
.text:00426957                 cdq
.text:00426958                 mov     ecx, eax
.text:0042695A                 mov     eax, ebx
.text:0042695C                 imul    eax, [esp+18h+arg_20]
.text:00426961                 mov     edi, edx
.text:00426963                 cdq
.text:00426964                 push    2
.text:00426966                 sub     eax, ecx
.text:00426968                 push    40005h
.text:0042696D                 sbb     edx, edi
.text:0042696F                 push    edx
.text:00426970                 push    eax
.text:00426971                 call    __allmul
.text:00426976                 add     ebp, eax
.text:00426978                 mov     eax, [esp+18h+arg_8]
.text:0042697C                 adc     eax, edx
.text:0042697E                 add     ebp, esi
.text:00426980                 adc     eax, [esp+18h+var_4]
.text:00426984                 pop     edi
.text:00426985                 mov     [esp+14h+arg_8], eax
.text:00426989                 mov     eax, ebp
.text:0042698B                 mov     ebp, [esp+14h+arg_8]
.text:0042698F                 pop     esi
.text:00426990                 mov     edx, ebp
.text:00426992                 pop     ebp
.text:00426993                 pop     ebx
.text:00426994                 add     esp, 8
.text:00426997                 retn
.text:00426997 sub_4267A0      endp
Houdini w32 1_CPU
build 2010-05-15
by Robert Houdart*

Code: Select all

.text:00428150 sub_428150      proc near               ; CODE XREF: sub_428340+172p
.text:00428150
.text:00428150 var_4           = dword ptr -4
.text:00428150 arg_0           = dword ptr  4
.text:00428150 arg_4           = dword ptr  8
.text:00428150 arg_8           = dword ptr  0Ch
.text:00428150 arg_C           = dword ptr  10h
.text:00428150 arg_10          = dword ptr  14h
.text:00428150 arg_14          = dword ptr  18h
.text:00428150 arg_18          = dword ptr  1Ch
.text:00428150 arg_1C          = dword ptr  20h
.text:00428150 arg_20          = dword ptr  24h
.text:00428150 arg_24          = dword ptr  28h
.text:00428150
.text:00428150                 sub     esp, 8
.text:00428153                 mov     eax, [esp+8+arg_4]
.text:00428157                 mov     ecx, [esp+8+arg_18]
.text:0042815B                 push    ebx
.text:0042815C                 mov     ebx, [esp+0Ch+arg_1C]
.text:00428160                 push    ebp
.text:00428161                 mov     ebp, [esp+10h+arg_8]
.text:00428165                 add     eax, ebp
.text:00428167                 mov     [esp+10h+arg_1C], eax
.text:0042816B                 add     ecx, ebx
.text:0042816D                 mov     eax, ebp
.text:0042816F                 cdq
.text:00428170                 sub     eax, edx
.text:00428172                 mov     [esp+10h+arg_8], ecx
.text:00428176                 mov     ecx, eax
.text:00428178                 mov     eax, ebx
.text:0042817A                 cdq
.text:0042817B                 sub     eax, edx
.text:0042817D                 push    esi
.text:0042817E                 sar     eax, 1
.text:00428180                 push    edi
.text:00428181                 sar     ecx, 1
.text:00428183                 sub     ecx, eax
.text:00428185                 push    offset dword_6E0064
.text:0042818A                 mov     eax, ecx
.text:0042818C                 cdq
.text:0042818D                 push    offset word_500046
.text:00428192                 push    edx
.text:00428193                 push    eax
.text:00428194                 call    sub_4305F0
.text:00428199                 mov     esi, eax
.text:0042819B                 mov     eax, [esp+18h+arg_4]
.text:0042819F                 sub     eax, [esp+18h+arg_18]
.text:004281A3                 push    2C60280h
.text:004281A8                 mov     edi, edx
.text:004281AA                 cdq
.text:004281AB                 push    2300212h
.text:004281B0                 push    edx
.text:004281B1                 push    eax
.text:004281B2                 call    sub_4305F0
.text:004281B7                 add     esi, eax
.text:004281B9                 mov     eax, [esp+18h+arg_0]
.text:004281BD                 adc     edi, edx
.text:004281BF                 sub     eax, [esp+18h+arg_14]
.text:004281C3                 push    0FA00DCh
.text:004281C8                 cdq
.text:004281C9                 push    0B400A0h
.text:004281CE                 push    edx
.text:004281CF                 push    eax
.text:004281D0                 call    sub_4305F0
.text:004281D5                 add     esi, eax
.text:004281D7                 adc     edi, edx
.text:004281D9                 mov     eax, ebp
.text:004281DB                 push    2D0028Ah
.text:004281E0                 sub     eax, ebx
.text:004281E2                 cdq
.text:004281E3                 push    24E0230h
.text:004281E8                 push    edx
.text:004281E9                 push    eax
.text:004281EA                 call    sub_4305F0
.text:004281EF                 add     esi, eax
.text:004281F1                 mov     eax, [esp+18h+arg_10]
.text:004281F5                 adc     edi, edx
.text:004281F7                 sub     eax, [esp+18h+arg_24]
.text:004281FB                 push    8FC0802h
.text:00428200                 cdq
.text:00428201                 push    6D60640h
.text:00428206                 push    edx
.text:00428207                 push    eax
.text:00428208                 call    sub_4305F0
.text:0042820D                 mov     ebx, [esp+18h+arg_C]
.text:00428211                 mov     ebp, [esp+18h+arg_20]
.text:00428215                 add     esi, eax
.text:00428217                 adc     edi, edx
.text:00428219                 mov     eax, ebx
.text:0042821B                 push    4C4044Ch
.text:00428220                 sub     eax, ebp
.text:00428222                 cdq
.text:00428223                 push    384032Ah
.text:00428228                 push    edx
.text:00428229                 push    eax
.text:0042822A                 call    sub_4305F0
.text:0042822F                 add     esi, eax
.text:00428231                 adc     edi, edx
.text:00428233                 mov     [esp+18h+var_4], edi
.text:00428237                 cmp     ebx, 2
.text:0042823A                 jnz     short loc_42824C
.text:0042823C                 add     esi, 0FFD7FFE0h
.text:00428242                 adc     edi, 0FFBFFFC7h
.text:00428248                 mov     [esp+18h+var_4], edi
.text:0042824C
.text:0042824C loc_42824C:                             ; CODE XREF: sub_428150+EAj
.text:0042824C                 cmp     ebp, 2
.text:0042824F                 jnz     short loc_428261
.text:00428251                 add     esi, 280020h
.text:00428257                 adc     edi, 400038h
.text:0042825D                 mov     [esp+18h+var_4], edi
.text:00428261
.text:00428261 loc_428261:                             ; CODE XREF: sub_428150+FFj
.text:00428261                 add     ebx, [esp+18h+arg_10]
.text:00428265                 cmp     ebx, 2
.text:00428268                 jl      short loc_42827A
.text:0042826A                 add     esi, 0FFEBFFF0h
.text:00428270                 adc     edi, 0FFDFFFE3h
.text:00428276                 mov     [esp+18h+var_4], edi
.text:0042827A
.text:0042827A loc_42827A:                             ; CODE XREF: sub_428150+118j
.text:0042827A                 add     ebp, [esp+18h+arg_24]
.text:0042827E                 cmp     ebp, 2
.text:00428281                 jl      short loc_428293
.text:00428283                 add     esi, 140010h
.text:00428289                 adc     edi, 20001Ch
.text:0042828F                 mov     [esp+18h+var_4], edi
.text:00428293
.text:00428293 loc_428293:                             ; CODE XREF: sub_428150+131j
.text:00428293                 mov     eax, [esp+18h+arg_1C]
.text:00428297                 mov     ecx, [esp+18h+arg_8]
.text:0042829B                 cmp     ecx, eax
.text:0042829D                 jge     short loc_4282B1
.text:0042829F                 add     esi, 1E0028h
.text:004282A5                 adc     edi, 0A0014h
.text:004282AB                 mov     [esp+18h+var_4], edi
.text:004282AF                 cmp     ecx, eax
.text:004282B1
.text:004282B1 loc_4282B1:                             ; CODE XREF: sub_428150+14Dj
.text:004282B1                 jle     short loc_4282C3
.text:004282B3                 add     esi, 0FFE1FFD8h
.text:004282B9                 adc     edi, 0FFF5FFEBh
.text:004282BF                 mov     [esp+18h+var_4], edi
.text:004282C3
.text:004282C3 loc_4282C3:                             ; CODE XREF: sub_428150:loc_4282B1j
.text:004282C3                 mov     edi, [esp+18h+arg_0]
.text:004282C7                 mov     ebx, [esp+18h+arg_14]
.text:004282CB                 lea     eax, [edi-5]
.text:004282CE                 imul    eax, [esp+18h+arg_4]
.text:004282D3                 cdq
.text:004282D4                 mov     ecx, eax
.text:004282D6                 lea     eax, [ebx-5]
.text:004282D9                 imul    eax, [esp+18h+arg_18]
.text:004282DE                 mov     ebp, edx
.text:004282E0                 cdq
.text:004282E1                 push    0A0008h
.text:004282E6                 sub     ecx, eax
.text:004282E8                 push    40000h
.text:004282ED                 sbb     ebp, edx
.text:004282EF                 push    ebp
.text:004282F0                 push    ecx
.text:004282F1                 call    sub_4305F0
.text:004282F6                 mov     ebp, eax
.text:004282F8                 lea     eax, [edi-5]
.text:004282FB                 imul    eax, [esp+18h+arg_C]
.text:00428300                 mov     [esp+18h+arg_4], edx
.text:00428304                 cdq
.text:00428305                 mov     ecx, eax
.text:00428307                 lea     eax, [ebx-5]
.text:0042830A                 imul    eax, [esp+18h+arg_20]
.text:0042830F                 mov     edi, edx
.text:00428311                 cdq
.text:00428312                 push    4
.text:00428314                 sub     eax, ecx
.text:00428316                 push    8000Ah
.text:0042831B                 sbb     edx, edi
.text:0042831D                 push    edx
.text:0042831E                 push    eax
.text:0042831F                 call    sub_4305F0
.text:00428324                 add     ebp, eax
.text:00428326                 mov     eax, [esp+18h+arg_4]
.text:0042832A                 adc     eax, edx
.text:0042832C                 add     ebp, esi
.text:0042832E                 adc     eax, [esp+18h+var_4]
.text:00428332                 pop     edi
.text:00428333                 mov     edx, eax
.text:00428335                 pop     esi
.text:00428336                 mov     eax, ebp
.text:00428338                 pop     ebp
.text:00428339                 pop     ebx
.text:0042833A                 add     esp, 8
.text:0042833D                 retn
.text:0042833D sub_428150      endp
RobboLito 009 Source Code values.c

Code: Select all

static uint64 value_value(int white_pawn, int white_knight, int white_bishop, int white_light, int white_dark,
	int white_rook, int white_queen, int black_pawn, int black_knight, int black_bishop, int black_light,
	int black_dark, int black_rook, int black_queen)
{
	uint64 va = 0;
	int white_minor;
	int black_minor;

	va += (white_bishop / 2 - black_bishop / 2) * bishop_two;
	va += (white_pawn - black_pawn) * value_pawn;
	va += (white_knight - black_knight) * value_knight;
	va += (white_rook - black_rook) * value_rook;
	va += (white_queen - black_queen) * value_queen;
	va += (white_bishop - black_bishop) * value_bishop;

	if (white_rook == 2)
		va -= VALUE4(16, 20, 28, 32);

	if (black_rook == 2)
		va += VALUE4(16, 20, 28, 32);

	if (white_queen + white_rook >= 2)
		va -= VALUE4(8, 10, 14, 16);

	if (black_queen + black_rook >= 2)
		va += VALUE4(8, 10, 14, 16);
	white_minor = white_knight + white_bishop;
	black_minor = black_knight + black_bishop;

	if (white_minor > black_minor)
		va += VALUE4(20, 15, 10, 5);

	if (black_minor > white_minor)
		va -= VALUE4(20, 15, 10, 5);
	va -= (white_pawn - 5) * white_rook * mix_rook_pawn;
	va += (white_pawn - 5) * white_knight * mix_knight_pawn;
	va += (black_pawn - 5) * black_rook * mix_rook_pawn;
	va -= (black_pawn - 5) * black_knight * mix_knight_pawn;
	return va;
}
*Modified
Even a non-programmer like myself can see that it's a modified Robolito chess engine....I mean you must be a plain idiot to refuse to see the truth....
Dr.D

Post Reply