Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char __thiscall CWispHexWnd_OnUpdateClient_sub_B2414(CWispHexWnd *this, WISP_MSG *pMsg)
- {
- int OffsetMode_v3; // eax@1
- bool __v4; // zf@1
- int m_ShowLength_v5; // ecx@2
- int v6; // eax@2
- int __v7; // ebx@2
- int XPos___v8; // ebx@2
- CWispDC *m_ClientDC_v9; // edi@2
- int v10; // edx@2
- int v11; // ecx@2
- unsigned int Addr_v12; // eax@14
- bool v13; // sf@16
- int Address_v14; // eax@18
- int m_AddressMode_v15; // ecx@18
- int m_ItemSpace_0_v16; // ebx@18
- int v17; // eax@20
- int LEN_v18; // eax@26
- int ______v19; // edx@26
- int LEN_v20; // ST0C_4@26
- int ____________v21; // ecx@26
- int v22; // ecx@26
- int __v23; // ST04_4@26
- int v24; // eax@26
- unsigned int m_nByte_Line_v25; // eax@26
- int _v26; // ecx@26
- unsigned int AsciiLen; // ebx@26
- int m_ShowLength_v28; // ecx@28
- int i; // eax@34
- char v30; // dl@35
- int v31; // ecx@35
- int v32; // eax@36
- unsigned __int32 Selv33; // eax@37
- int Selv34; // eax@38
- int color_v35; // eax@40
- int v36; // eax@41
- int color_v37; // eax@43
- unsigned __int32 Sel_v38; // eax@52
- int m_BSelColor_v39; // eax@54
- int __v40; // eax@54
- CWispBase *m_pWispBase_v41; // eax@55
- int __v42; // eax@55
- __int16 Buffer[512]; // [esp+Ch] [ebp-414h]@6
- __int16 szSpace[32]; // [esp+40Ch] [ebp-14h]@28
- char DataBuffer[32]; // [esp+44Ch] [ebp+2Ch]@16
- int OffsetMode_v47; // [esp+46Ch] [ebp+4Ch]@1
- int YLine; // [esp+470h] [ebp+50h]@26
- int GroupLen; // [esp+474h] [ebp+54h]@2
- int GroupX; // [esp+478h] [ebp+58h]@31
- int HexIt; // [esp+47Ch] [ebp+5Ch]@30
- int Address___v52; // [esp+480h] [ebp+60h]@3
- int nLine; // [esp+484h] [ebp+64h]@16
- int HexLen; // [esp+488h] [ebp+68h]@3
- int *AR_v55; // [esp+48Ch] [ebp+6Ch]@3
- int XStart; // [esp+490h] [ebp+70h]@6
- int _n_; // [esp+49Ch] [ebp+7Ch]@4
- unsigned int AsciiIt; // [esp+49Ch] [ebp+7Ch]@48
- char bSame; // [esp+49Fh] [ebp+7Fh]@32
- CWispWnd_OnUpdateClient_sub_A13A4(&this->_, pMsg);
- OffsetMode_v3 = this->_._.vtbl->GetOffsetMode(this);
- this->m_Size1 = 0;
- __v4 = this->m_bShowOffset == 0;
- OffsetMode_v47 = OffsetMode_v3;
- if ( !__v4 )
- {
- m_ShowLength_v5 = this->m_ShowLength;
- v6 = this->m_nByte_Line / m_ShowLength_v5;
- __v7 = this->m_ItemSpace[1];
- this->_.m_ClientDC.m_TextStyle = 0;
- XPos___v8 = this->m_ItemSpace[0] + __v7;
- m_ClientDC_v9 = &this->_.m_ClientDC;
- v10 = this->_.m_ClientDC.m_TextColor;
- GroupLen = 3 * m_ShowLength_v5;
- v11 = this->m_ItemColor[1];
- m_ClientDC_v9->m_OldTextColor = v10;
- m_ClientDC_v9->m_TextColor = v11;
- if ( v6 > 0 )
- {
- HexLen = 0;
- AR_v55 = 1;
- Address___v52 = v6;
- do
- {
- _n_ = 0;
- if ( this->m_ShowOffset )
- {
- if ( this->m_ShowLength > 0 )
- {
- XStart = Buffer;
- do
- {
- TSPrintf_2_sub_1B9A8(XStart, L"+%X", AR_v55 * this->m_ShowLength - _n_ - 1);
- XStart += 4;
- ++_n_;
- }
- while ( _n_ < this->m_ShowLength );
- }
- }
- else if ( this->m_ShowLength > 0 )
- {
- XStart = Buffer;
- do
- {
- TSPrintf_2_sub_1B9A8(
- XStart,
- L"%X ",
- (AR_v55 * this->m_ShowLength - _n_ + this->m_CurAddr - 1) % this->m_nByte_Line);
- XStart += 4;
- ++_n_;
- }
- while ( _n_ < this->m_ShowLength );
- }
- CWispDC_DrawString_CLIP_dw_sub_A57D0(
- &this->_.m_ClientDC,
- this->m_CharWidth * (XPos___v8 + HexLen - this->m_CharXPos),
- 0,
- Buffer,
- 2 * this->m_ShowLength,
- 0,
- 0);
- AR_v55 = (AR_v55 + 1);
- HexLen += GroupLen;
- --Address___v52;
- }
- while ( Address___v52 );
- }
- }
- if ( this->m_bFloatMode )
- {
- Addr_v12 = this->_._.vtbl->GetAddress(this, &this->m_StringAddr);
- if ( Addr_v12 != this->m_CurAddr )
- CWispHexWnd_ViewAddressMsg_sub_B16C6(this, Addr_v12, 0);
- }
- nLine = 0;
- memset(this->m_LenArray, 0, sizeof(this->m_LenArray));
- __v4 = this->m_nLines_Page == 0;
- v13 = this->m_nLines_Page < 0;
- memset(DataBuffer, 0, sizeof(DataBuffer));
- if ( !v13 && !__v4 )
- {
- AR_v55 = this->m_LenArray[2].field_0;
- while ( 1 )
- {
- Address_v14 = this->m_CurAddr + nLine * this->m_nByte_Line;
- m_AddressMode_v15 = this->m_AddressMode;
- m_ItemSpace_0_v16 = this->m_ItemSpace[0];
- Address___v52 = this->m_CurAddr + nLine * this->m_nByte_Line;
- if ( m_AddressMode_v15 )
- {
- if ( m_AddressMode_v15 == 1 )
- {
- v17 = Address_v14 - this->m_AddressModeOffs;
- if ( v17 <= 0 )
- {
- if ( v17 )
- TSPrintf_2_sub_1B9A8(Buffer, L"$-%X", -v17);
- else
- STR_TStrCpy_sub_13840(Buffer, "$ ==>");
- }
- else
- {
- TSPrintf_2_sub_1B9A8(Buffer, L"$+%X", v17);
- }
- }
- }
- else
- {
- TSPrintf_2_sub_1B9A8(Buffer, L"%08X:", Address_v14);
- }
- LEN_v18 = STR_TStrLen_2_sub_110B0(Buffer);
- AR_v55[-0x100u] = LEN_v18;
- this->_.m_ClientDC.m_TextStyle = 0;
- ______v19 = this->_.m_ClientDC.m_TextColor;
- LEN_v20 = LEN_v18;
- this->_.m_ClientDC.m_TextColor = this->m_ItemColor[1];
- ____________v21 = nLine;
- this->_.m_ClientDC.m_OldTextColor = ______v19;
- v22 = OffsetMode_v47 + ____________v21;
- __v23 = v22 * this->m_LineHeight;
- v24 = m_ItemSpace_0_v16 - this->m_CharXPos;
- YLine = v22;
- CWispDC_DrawString_CLIP_dw_sub_A57D0(&this->_.m_ClientDC, this->m_CharWidth * v24, __v23, Buffer, LEN_v20, 0, 0);
- m_nByte_Line_v25 = this->m_nByte_Line;
- _v26 = nLine * this->m_nByte_Line;
- XStart = this->m_ItemSpace[1] + m_ItemSpace_0_v16;
- AsciiLen = this->m_ImageBase + this->m_ImageSize - _v26 - this->m_CurAddr;
- if ( AsciiLen > m_nByte_Line_v25 )
- AsciiLen = m_nByte_Line_v25;
- STR_TStrCpy_2_2_sub_1389E(szSpace, CWispHexWnd::m_Spaces);
- m_ShowLength_v28 = this->m_ShowLength;
- szSpace[m_ShowLength_v28] = 0;
- HexLen = AsciiLen / m_ShowLength_v28;
- if ( AsciiLen % m_ShowLength_v28 )
- ++HexLen;
- GroupLen = 3 * m_ShowLength_v28;
- *AR_v55 = HexLen * 3 * m_ShowLength_v28;
- HexIt = 0;
- if ( HexLen > 0 )
- {
- GroupX = 0;
- while ( 1 )
- {
- bSame = 0;
- if ( this->_._.vtbl->ReadMemory(
- this,
- Address___v52 + HexIt * this->m_ShowLength,
- DataBuffer,
- this->m_ShowLength) )
- {
- STR_THexBytesToStr_sub_23530(DataBuffer, Buffer, AsciiLen, this->m_ShowLength, szSpace);
- for ( i = 0; i < this->m_ShowLength; this->m_Array1[v31] = v30 )
- {
- v30 = DataBuffer[i];
- v31 = i++ + this->m_Size1;
- }
- v32 = this->m_ShowLength;
- this->m_Size1 += v32;
- bSame = CWispHexWnd_Same_sub_B1212(this, Address___v52 + HexIt * v32, DataBuffer);
- }
- else
- {
- STR_TStrCpy_2_2_sub_1389E(Buffer, CWispHexWnd::m_UnReadable[0]);
- }
- Selv33 = this->_._.vtbl->GetHexByteAttribute(
- this,
- this->m_CurAddr + nLine * this->m_nByte_Line + HexIt * this->m_ShowLength);
- if ( !Selv33 )
- break;
- Selv34 = Selv33 - 1;
- if ( !Selv34 )
- {
- v36 = this->m_BSelColor;
- this->_.m_ClientDC.m_TextStyle = 1;
- this->_.m_ClientDC.m_OldTextBKColor = this->_.m_ClientDC.m_TextBKColor;
- this->_.m_ClientDC.m_TextBKColor = v36;
- if ( !bSame )
- {
- color_v37 = this->m_TSelColor;
- goto LABEL_46;
- }
- goto LABEL_42;
- }
- if ( Selv34 == 1 )
- {
- color_v35 = this->m_BBPXColor;
- this->_.m_ClientDC.m_TextStyle = 1;
- this->_.m_ClientDC.m_OldTextBKColor = this->_.m_ClientDC.m_TextBKColor;
- this->_.m_ClientDC.m_TextBKColor = color_v35;
- LABEL_45:
- color_v37 = this->m_ItemColor[2];
- LABEL_46:
- this->_.m_ClientDC.m_OldTextColor = this->_.m_ClientDC.m_TextColor;
- this->_.m_ClientDC.m_TextColor = color_v37;
- }
- LABEL_47:
- CWispDC_DrawString_CLIP_dw_sub_A57D0(
- &this->_.m_ClientDC,
- this->m_CharWidth * (XStart + GroupX - this->m_CharXPos),
- YLine * this->m_LineHeight,
- Buffer,
- 2 * this->m_ShowLength,
- 0,
- 0);
- ++HexIt;
- GroupX += GroupLen;
- if ( HexIt >= HexLen )
- goto START_ASCII_LOOP_LABEL_48;
- }
- this->_.m_ClientDC.m_TextStyle = 0;
- if ( !bSame )
- goto LABEL_45;
- LABEL_42:
- this->_.m_ClientDC.m_OldTextColor = this->_.m_ClientDC.m_TextColor;
- this->_.m_ClientDC.m_TextColor = 0xFFFF00;
- goto LABEL_47;
- }
- START_ASCII_LOOP_LABEL_48:
- XStart += this->m_ItemSpace[2];
- AsciiIt = 0;
- AR_v55[0x100] = this->m_nByte_Line;
- if ( AsciiLen )
- break;
- LOOP_LABEL_58:
- ++nLine;
- ++AR_v55;
- if ( nLine >= this->m_nLines_Page )
- goto RETURN_LABEL_59;
- }
- while ( 1 )
- {
- if ( this->_._.vtbl->ReadMemory(this, Address___v52 + AsciiIt, DataBuffer, 1) )
- STR_THexBytesToASCII_sub_5B446(DataBuffer, Buffer, 1);
- else
- STR_TStrCpy_2_2_sub_1389E(Buffer, CWispHexWnd::m_UnReadableASCII[0]);
- Sel_v38 = this->_._.vtbl->GetHexByteAttribute(this, AsciiIt + this->m_CurAddr + nLine * this->m_nByte_Line);
- if ( !Sel_v38 )
- break;
- if ( Sel_v38 == 1 )
- {
- m_BSelColor_v39 = this->m_BSelColor;
- this->_.m_ClientDC.m_TextStyle = 1;
- this->_.m_ClientDC.m_OldTextBKColor = this->_.m_ClientDC.m_TextBKColor;
- this->_.m_ClientDC.m_TextBKColor = m_BSelColor_v39;
- __v40 = this->m_TSelColor;
- LABEL_56:
- this->_.m_ClientDC.m_OldTextColor = this->_.m_ClientDC.m_TextColor;
- this->_.m_ClientDC.m_TextColor = __v40;
- }
- CWispDC_DrawString_CLIP_dw_sub_A57D0(
- &this->_.m_ClientDC,
- this->m_CharWidth * (XStart + AsciiIt++ - this->m_CharXPos),
- YLine * this->m_LineHeight,
- Buffer,
- 1,
- 0,
- 0);
- if ( AsciiIt >= AsciiLen )
- goto LOOP_LABEL_58;
- }
- m_pWispBase_v41 = this->_._.m_pWispBase;
- this->_.m_ClientDC.m_TextStyle = 0;
- __v42 = m_pWispBase_v41->m_pWispDrawObj->m_crSystem[20];
- this->_.m_ClientDC.m_OldTextBKColor = this->_.m_ClientDC.m_TextBKColor;
- this->_.m_ClientDC.m_TextBKColor = __v42;
- __v40 = this->m_ItemColor[3];
- goto LABEL_56;
- }
- RETURN_LABEL_59:
- __v4 = this->m_Size2 == 0;
- this->m_Offset1 = this->m_CurAddr;
- if ( __v4 )
- CWispHexWnd_SyncBuffer_sub_B1406(this);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement