1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
| int __fastcall sub_14149E(int a1) { const void *v2; void *v3; int v4; int v5; void *v6; int v7; int v8; int v9; int v10; int v11; int v12; int v13; int v14; int *v15; int *v16; int v17; int v18; int v19; int v20; int v21; int v22; void *v23; int v24; int v25; int v26; char v27; int v28; char v29; char v30; int v31; int v33; void *v34; int v35; void *v36; int v37; char v38[24]; const char *v39[2]; char v40; const char *v41[2]; char v42; int v43[2]; char v44; int v45[2]; char v46; char v47[24]; char v48[24]; _DWORD v49[6]; int v50[32];
v50[0] = 0; v2 = (const void *)sub_4D68E4( "UserManager", &Dahua::Component::ClassID::local, &Dahua::Component::ServerInfo::none, v50); if ( v2 && (v3 = _dynamic_cast( v2, (const struct __class_type_info *)&`typeinfo for'Dahua::Component::IFactoryUnknown, (const struct __class_type_info *)&`typeinfo for'Dahua::Manager::IUserManager::IFactory, 0)) != 0 ) { v4 = (*(int (__fastcall **)(void *))(*(_DWORD *)v3 + 12))(v3); v5 = v50[0]; v6 = (void *)sub_4D7DF4(v4); if ( v6 ) v6 = _dynamic_cast( v6, (const struct __class_type_info *)&`typeinfo for'Dahua::Component::IUnknown, (const struct __class_type_info *)&`typeinfo for'Dahua::Manager::IUserManager, 0); v34 = v6; v35 = v5; } else { v34 = 0; v35 = 0; } if ( !v34 ) { return_f( 2, "libDVRIP-404300", "%s::%s:%d Failed to get user manager component!\n", "Src/Cmds_NetKeyBoard.cpp", "NetKeyBoardLogin", 747); v8 = -1; goto LABEL_39; } if ( *(unsigned __int8 *)(*(_DWORD *)(a1 + 16) + 20) != 255 ) { memset((void *)(a1 + 20), 0, 0x20u); *(_BYTE *)(a1 + 23) = 104; *(_BYTE *)(a1 + 20) = -104; *(_BYTE *)(a1 + 35) = -112; *(_BYTE *)(a1 + 36) = -1; *(_BYTE *)(a1 + 37) = -2; v39[0] = &v40; v40 = 0; v42 = 0; v44 = 0; v46 = 0; v39[1] = 0; v41[1] = 0; v43[1] = 0; v45[1] = 0; v16 = *(int **)(a1 + 8); v41[0] = &v42; v43[0] = (int)&v44; v17 = *v16; v45[0] = (int)&v46; v18 = sub_F3442(a1, v17); v19 = v18; if ( v18 ) { std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_assign(v39, v18 + 8); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(v47, v19 + 32); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_assign(v41, v47); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_dispose(v47); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(v48, v19 + 84); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_assign(v43, v48); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_dispose(v48); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(v49, v19 + 108); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_assign(v45, v49); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_dispose(v49); } return_f( 5, "libDVRIP-404300", "%s::%s:%d name = %s, password = %s \n", "Src/Cmds_NetKeyBoard.cpp", "NetKeyBoardLogin", 918, v39[0], v41[0]); memset(v50, 0, sizeof(v50)); v50[0] = (int)"127.0.0.1"; v50[2] = (int)v39[0]; v50[3] = (int)v41[0]; HIWORD(v50[5]) = 5000; v50[6] = (int)"NetKeyBoard"; v50[7] = *(_DWORD *)(a1 + 4) + 132596; v50[11] = v43[0]; v50[8] = v45[0]; if ( !*(_DWORD *)(a1 + 56) ) { v33 = 0; v20 = sub_141E80(&Dahua::Component::ClassID::local, &Dahua::Component::ServerInfo::none, &v33); if ( v20 ) { v21 = (*(int (__fastcall **)(int, int *))(*(_DWORD *)v20 + 12))(v20, v50); v22 = v33; v23 = (void *)sub_4D7DC4(v21); if ( v23 ) v23 = _dynamic_cast( v23, (const struct __class_type_info *)&`typeinfo for'Dahua::Component::IUnknown, (const struct __class_type_info *)&`typeinfo for'Dahua::Component::IClient, 0); v36 = v23; v37 = v22; } else { v36 = 0; v37 = 0; } sub_141DE8(a1 + 56, &v36); sub_F30C0(&v36); } v24 = *(_DWORD *)(a1 + 56); if ( v24 ) { v25 = sub_12FCE4(a1 + 56); if ( (*(int (__fastcall **)(int))(*(_DWORD *)v25 + 24))(v25) ) { v26 = sub_12FCE4(a1 + 56); v24 = (*(int (__fastcall **)(int))(*(_DWORD *)v26 + 28))(v26); } else { v24 = 1; } } return_f( 5, "libDVRIP-404300", "%s::%s:%d loginSuccess = %d \n", "Src/Cmds_NetKeyBoard.cpp", "NetKeyBoardLogin", 950, v24); if ( v24 ) { *(_BYTE *)(a1 + 38) = 1; v27 = *(_BYTE *)(*(_DWORD *)(a1 + 16) + 20); } else { return_f(5, "libDVRIP-404300", "CmdsNetKeyBoard::NetKeyBoardLogin>>>>>login user failed\n"); *(_BYTE *)(a1 + 38) = 0; v27 = 2; } *(_BYTE *)(a1 + 40) = v27; v28 = a1 + 34; v29 = 0; do { v30 = *(_BYTE *)++v28; v29 += v30; } while ( v28 != a1 + 41 ); *(_BYTE *)(a1 + 42) = v29; v31 = sub_F3512(a1, **(_DWORD **)(a1 + 8), a1 + 20, 0, 500000); if ( v31 < 0 ) { return_f(5, "libDVRIP-404300", "%s(%d)--", "Src/Cmds_NetKeyBoard.cpp", 979); return_f(5, "libDVRIP-404300", "SBM Error(%d).\n", v31); } std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_dispose(v45); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_dispose(v43); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_dispose(v41); v15 = (int *)v39; goto LABEL_34; } v7 = sub_F3442(a1, **(_DWORD **)(a1 + 8)); v8 = v7; if ( v7 ) { v50[0] = (int)&v50[2]; v50[1] = 0; LOBYTE(v50[2]) = 0; std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_assign(v50, v7 + 8); sub_F30D4(v8); sub_5D774C(v49, 0); v9 = sub_64324(&v34); (*(void (__fastcall **)(int, int *, _DWORD *))(*(_DWORD *)v9 + 72))(v9, v50, v49); v10 = sub_5D88E0((int)v49, (int)"Group"); sub_5D7918(v38, v10); v11 = std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(v38, "admin"); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_dispose(v38); if ( !v11 ) { v13 = sub_64324(&v34); (*(void (__fastcall **)(int, int *))(*(_DWORD *)v13 + 60))(v13, v50); } if ( *(_DWORD *)(a1 + 56) ) { v14 = sub_12FCE4(a1 + 56); (*(void (__fastcall **)(int))(*(_DWORD *)v14 + 32))(v14); } sub_5D7EF2(v49, v12); v15 = v50; LABEL_34: std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::_M_dispose(v15); v8 = 0; } LABEL_39: sub_64310(&v34); return v8; }
|