<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>断点社区-专业的老牌游戏安全技术交流社区 - C/C++基础</title>
    <link>https://www.bpsend.net/forum-2-1.html</link>
    <description>Latest 20 threads of C/C++基础</description>
    <copyright>Copyright(C) 断点社区-专业的老牌游戏安全技术交流社区</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Wed, 08 Apr 2026 21:47:40 +0000</lastBuildDate>
    <ttl>180</ttl>
    <image>
      <url>https://www.bpsend.net/static/image/common/logo_88_31.gif</url>
      <title>断点社区-专业的老牌游戏安全技术交流社区</title>
      <link>https://www.bpsend.net/</link>
    </image>
    <item>
      <title>X86C++反汇编14.结构体与返回值</title>
      <link>https://www.bpsend.net/thread-530-1-1.html</link>
      <description><![CDATA[[md]## 结构体

首先要考虑对齐值问题,但是在逆向角度是不关心的,因为结构体大小在代码中会体现

ida 如果读不到pbd,可以自动从微软服务器下载  pbd (系统api的pbd)

### 结构体成员2个整形

看不出是结构体,很像定义2个 变量,没啥区别

```
struct Point {
    int x;
 ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Sat, 16 Aug 2025 11:49:35 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编13.函数</title>
      <link>https://www.bpsend.net/thread-528-1-1.html</link>
      <description><![CDATA[[md]### 函数的调用约定

1. 栈参数传递(传递方向)
2. 返回值
3. 栈平衡(参数平衡 由谁平衡)

函数的调用约定系统说了算

系统的api是标准调用约定,由此编译器也不得不提供这种调用约定

在**非window系统**上,当我们把函数调用约定用 stdcall 时,,并不代表编译过后还是 ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Fri, 01 Aug 2025 15:26:24 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编12.浮点指令和多媒体指令</title>
      <link>https://www.bpsend.net/thread-503-1-1.html</link>
      <description><![CDATA[[md]浮点寄存器有时候会用在其他优化地方,例如 数组的初始化

__asm cpuid   通过 这条指令可以拿到cpu 的信息

### 浮点协处理器

```
定点数:      早期计算机是不能做浮点运算的,只支持正数的运算,因此发明了定点数,2个浮点数转成整数在 除以 10 的小数点次数的幂,获 ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Sat, 07 Jun 2025 14:05:57 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编11.作用域</title>
      <link>https://www.bpsend.net/thread-496-1-1.html</link>
      <description><![CDATA[[md]### 全局变量

可以通过寻址和存储地方可以分辨出来

全局变量有一个特点:他的地址肯定命中在 PE结构中 节表所以描述的区域中

未初始化数据地址有几种形态:

1. 在未初始化节,不同的编译器,对未初始化节的命名不一样
2. 在已初始化节,但是在文件对应的文件大小对应 ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Wed, 04 Jun 2025 15:30:36 +0000</pubDate>
    </item>
    <item>
      <title>手搓Nt*或Zw*函数，避免被hook 支持x86_x64</title>
      <link>https://www.bpsend.net/thread-493-1-1.html</link>
      <description><![CDATA[[md]在加壳软件中，ntdll.dll里的有些API会被加壳软件hook，导致我们在做补丁无法正常执行
如：有的程序会hook NtGetContextThread和NtSetContextThread，导致无法下硬件断点，也有的会hook NtProtectVirtualMemory，无法修改内存属性，就不能修改汇编代码等……
Nt或Zw ...]]></description>
      <category>C/C++基础</category>
      <author>天道酬勤</author>
      <pubDate>Sun, 25 May 2025 08:59:23 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编10.数组</title>
      <link>https://www.bpsend.net/thread-489-1-1.html</link>
      <description><![CDATA[[md]数组改低版本有差异,高版本差异是从2013开始的

### 什么是数组

数组是一组连续且一致的元素的集合

数组的特性:   连续     一致(业务功能)

结构体(成员都是整形)不是数组是因为成员的业务功能不一致

证明一致的方法:

1. 循环,在一个循环中,跑同一块代码的变量 ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Mon, 19 May 2025 15:39:27 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编09.switch case语句</title>
      <link>https://www.bpsend.net/thread-487-1-1.html</link>
      <description><![CDATA[[md]### case 分支不超过3个

当 case 分支少于3个,不会怎么优化,直接3个跳转,这种很像  if esle ,但是跟if esle 有区别,它跳转和跳转之间没有实质性代码,只有影响标志位代码

其次 它的代码结构分2部分

![img](./notesimg/1657939310023-3fb0c50d-65e9-43a4-bb13-cdd5 ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Sun, 18 May 2025 08:04:29 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编08.补充内容</title>
      <link>https://www.bpsend.net/thread-484-1-1.html</link>
      <description><![CDATA[[md]3种移位:

逻辑右移  &gt;&gt;

逻辑左移  &gt;      (针对有符号数,高位补符号)

计算机中的除法是整除 ,整除带来的问题就是取整

对于正数来说:  向下取整

对于负数来说:  向上取整

因此计算机除法是 **向0取整**

0011   2   &gt;&gt; 1   0001  =&gt; 1     向下取整

1101  -3  ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Wed, 07 May 2025 14:22:12 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编07.循环</title>
      <link>https://www.bpsend.net/thread-475-1-1.html</link>
      <description><![CDATA[[md]循环在 release 和 debug  版有重大区别

循环的难点在于处理代码外提和代码内联

## DEBUG版

### do   while

do  while 是3种循环中 仅跳一次的,而且判断条件是正向的

**定式:**

**DO_BEGIN :**

```
```

**..........**

```
```

**jxx   DO_BEGIN**

**DO_ ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Mon, 05 May 2025 03:53:52 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编06.条件分支</title>
      <link>https://www.bpsend.net/thread-472-1-1.html</link>
      <description><![CDATA[[md]## 单分支

当常量为条件的时候会直接折叠,真条件会转为顺序语句,假条件整个if 全部删除

#### 单条件

```
int main(int argc, char* argv[])
{
      if(argc %  2== 0)
      {
         printf(\&quot;偶数\\r\\n\&quot;);
     }
      return 0;
}

反汇编代码:
mov     eax ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Fri, 02 May 2025 06:18:20 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编05.除法优化-取模 和三目运算</title>
      <link>https://www.bpsend.net/thread-470-1-1.html</link>
      <description><![CDATA[[md]高低版本区别比较大

### 取模

### **取模 就是 jns 或者 有 a-qb 的  或者有  绝对值了  3种情况**

#### 当模值(除数)为变量时,无优化

```
int main(int argc, char* argv[])
{
   printf(\&quot;%d\\r\\n\&quot;,3 % argc );
   return 0;
}
反汇编代码:
mov     eax, 3
cdq
 ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Tue, 29 Apr 2025 14:39:24 +0000</pubDate>
    </item>
    <item>
      <title>现代C++核心技术详解（C++98/C++11/C++14/C++17）</title>
      <link>https://www.bpsend.net/thread-467-1-1.html</link>
      <description><![CDATA[[md]## Part1：课程体系架构

### 一、课程设计初衷

当前主流C++教程普遍停留在C++98标准，内容局限于基础语法的重复堆砌，导致学习者产生\&quot;已掌握C++开发能力\&quot;的认知偏差。事实上，C++的核心竞争力在于其复合编程范式：

- **面向过程**：作为C语言的超集，需从内存模 ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Sat, 19 Apr 2025 14:28:01 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编04.除法的优化2</title>
      <link>https://www.bpsend.net/thread-465-1-1.html</link>
      <description><![CDATA[[md]edx 传递结果高位

ecx传递成员对象指针

### 除数是负数 2的整数次幂

```
int main(int argc, char* argv[])
{
      printf(\&quot;%d\\r\\n\&quot;,argc / -4);
      return 0;
}
反汇编代码
mov     eax, [esp+argc]
 cdq
and     edx, 3
add     eax, edx
sar     eax, 2
n ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Tue, 08 Apr 2025 15:01:34 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编03.除法的优化</title>
      <link>https://www.bpsend.net/thread-458-1-1.html</link>
      <description><![CDATA[[md]1. **理解并掌握数学模型,这样换个编译器优化,数学模型是不变的**
2. **同一模型,描述的代码序列可能会有变化**

### **无符号数除法,且除数非2的整数次幂 的正数**

**令   M =  2^n / C **

**A / C   =&gt;   A *  1 / C   =&gt;  A *  2^n /C   *  1 / 2^n  =&gt;  A * 2 ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Wed, 02 Apr 2025 14:21:52 +0000</pubDate>
    </item>
    <item>
      <title>这里是定制课程的吗?</title>
      <link>https://www.bpsend.net/thread-452-1-1.html</link>
      <description><![CDATA[重楼老师在这个论坛?]]></description>
      <category>C/C++基础</category>
      <author>WansanDGG</author>
      <pubDate>Sat, 29 Mar 2025 12:48:03 +0000</pubDate>
    </item>
    <item>
      <title>IDAPRO插件开发-注册菜单</title>
      <link>https://www.bpsend.net/thread-448-1-1.html</link>
      <description><![CDATA[[md]# 注册菜单

注册菜单相关的函数位于`kernwin.hpp`中。

在IDA中，菜单的功能和界面是分离的。比如说我们想创建一个菜单，在点击该菜单后便会执行某个动作，那么我们首先得分别创建好菜单和这个动作，然后再将动作附加到对应的菜单上。

创建菜单的函数为**create_m ...]]></description>
      <category>C/C++基础</category>
      <author>天行健</author>
      <pubDate>Tue, 25 Mar 2025 14:24:56 +0000</pubDate>
    </item>
    <item>
      <title>IDA自动分析器</title>
      <link>https://www.bpsend.net/thread-447-1-1.html</link>
      <description><![CDATA[[md]# IDA自动分析器

在auto.hpp中，包含了关于IDA自动分析引擎相关的一些函数。

当加载一个新的二进制文件的时候，IDA的自动分析引擎便会开始工作。

IDA的自动分析器包含多个分析队列，每个队列有各自的优先级。当所有的分析队列都为空的时候IDA就会结束自动分析。
 ...]]></description>
      <category>C/C++基础</category>
      <author>天行健</author>
      <pubDate>Tue, 25 Mar 2025 14:24:30 +0000</pubDate>
    </item>
    <item>
      <title>X86C++反汇编02.算术指令</title>
      <link>https://www.bpsend.net/thread-446-1-1.html</link>
      <description><![CDATA[[md]逆向一个序列号有3种层次

1. 打个补丁,改一下跳转(暴力破解)
2. 推导出一组可以用的账号密码
3. 还原算法,并写出例算法(注册机,彻底破解)

彻底破解的难点是还原算法,和 写出例算法(可能变成解题问题)

### 优化

优化方向

1. 体积优化

- 内存优化    例如:大数 ...]]></description>
      <category>C/C++基础</category>
      <author>大理寺少卿</author>
      <pubDate>Mon, 24 Mar 2025 15:22:22 +0000</pubDate>
    </item>
    <item>
      <title>C++内核模式远程Call源码</title>
      <link>https://www.bpsend.net/thread-444-1-1.html</link>
      <description><![CDATA[]]></description>
      <category>C/C++基础</category>
      <author>admin</author>
      <pubDate>Mon, 24 Mar 2025 15:12:11 +0000</pubDate>
    </item>
    <item>
      <title>C++ Ansi转Unicode - Unicode转Ansi源码</title>
      <link>https://www.bpsend.net/thread-443-1-1.html</link>
      <description><![CDATA[[md]C++ Ansi转Unicode - Unicode转Ansi源码

ANSI转unicode

```cpp
 //ANSI转unicode
wchar_t* AnsiToUnicode(char *str)
{
        DWORD dwNum = MultiByteToWideChar (CP_ACP, 0, str, -1, NULL, 0);
        wchar_t *pwText;
        pwText = new wchar_t[dwNum]]></description>
      <category>C/C++基础</category>
      <author>admin</author>
      <pubDate>Mon, 24 Mar 2025 15:06:02 +0000</pubDate>
    </item>
  </channel>
</rss>