rendered paste bodyint __thiscall sub_4056A0(int this, void *Src, rsize_t Dst){ unsigned int v3; // ecx@1 int v4; // ebx@1 int v5; // esi@1 int v6; // eax@2 void *v7; // ebp@4 int v8; // eax@6 int result; // eax@11 rsize_t v10; // edi@12 unsigned int v11; // eax@14 char v12; // cf@15 unsigned __int8 v13; // zf@15 void *v14; // eax@18 char v15; // cf@24 v5 = this; v3 = *(_DWORD *)(this + 24); v4 = v5 + 4; if ( v3 < 0x10 ) v6 = v5 + 4; else v6 = *(_DWORD *)v4; v7 = Src; if ( (unsigned int)Src >= v6 ) { if ( v3 < 0x10 ) v8 = v5 + 4; else v8 = *(_DWORD *)v4; if ( v8 + *(_DWORD *)(v5 + 20) > (unsigned int)Src ) { if ( v3 >= 0x10 ) v4 = *(_DWORD *)v4; return sub_4055C0(v5, (char *)Src - v4, Dst); } } v10 = Dst; if ( Dst > 0xFFFFFFFE ) sub_55D4AF(); v11 = *(_DWORD *)(v5 + 24); if ( v11 < v10 ) { sub_403BD0((void *)v10, *(_DWORD *)(v5 + 20)); v12 = 0; v13 = v10 == 0;LABEL_16: if ( !(v12 | v13) ) { if ( *(_DWORD *)(v5 + 24) < 0x10u ) v14 = (void *)(v5 + 4); else v14 = *(void **)v4; memcpy_s(v14, *(_DWORD *)(v5 + 24), v7, v10); v15 = *(_DWORD *)(v5 + 24) < 0x10u; *(_DWORD *)(v5 + 20) = v10; if ( !v15 ) v4 = *(_DWORD *)v4; *(_BYTE *)(v4 + v10) = 0; } return v5; } v12 = 0; v13 = v10 == 0; if ( v10 ) goto LABEL_16; *(_DWORD *)(v5 + 20) = v10; if ( v11 >= 0x10 ) v4 = *(_DWORD *)v4; result = v5; *(_BYTE *)v4 = 0; return result;}