63 lines
1.6 KiB
C
63 lines
1.6 KiB
C
/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
|
|
* Ghidra 12.1.2 decompiler output for 0x14016f940 FUN_14016f940
|
|
* Pseudocode, not original source. */
|
|
|
|
/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */
|
|
|
|
undefined8 FUN_14016f940(char param_1)
|
|
|
|
{
|
|
HKEY hKey;
|
|
LSTATUS LVar1;
|
|
undefined8 uVar2;
|
|
undefined1 auStackY_118 [32];
|
|
uint local_c8 [2];
|
|
HKEY local_c0;
|
|
DWORD local_b8 [2];
|
|
wchar_t local_b0 [20];
|
|
wchar_t local_88 [56];
|
|
ulonglong local_18;
|
|
|
|
local_18 = DAT_1403463c0 ^ (ulonglong)auStackY_118;
|
|
builtin_wcsncpy(local_88,L"SYSTEM\\CurrentControlSet\\services\\Tcpip\\Parameters",0x33);
|
|
builtin_wcsncpy(local_b0,L"DisableTaskOffload",0x13);
|
|
local_c0 = (HKEY)0x0;
|
|
LVar1 = RegCreateKeyExW((HKEY)0xffffffff80000002,local_88,0,(LPWSTR)0x0,0,0x20006,
|
|
(LPSECURITY_ATTRIBUTES)0x0,&local_c0,local_b8);
|
|
hKey = local_c0;
|
|
if (LVar1 == 0) {
|
|
local_c8[0] = (uint)(param_1 != '\x01');
|
|
LVar1 = RegSetValueExW(local_c0,local_b0,0,4,(BYTE *)local_c8,4);
|
|
if (LVar1 == 0) {
|
|
if ((hKey == (HKEY)0x0) || (LVar1 = RegCloseKey(hKey), LVar1 == 0)) {
|
|
uVar2 = 0;
|
|
}
|
|
else {
|
|
uVar2 = 1;
|
|
if (LVar1 == 5) {
|
|
uVar2 = 0x12;
|
|
}
|
|
}
|
|
}
|
|
else if (LVar1 == 5) {
|
|
if (hKey != (HKEY)0x0) {
|
|
RegCloseKey(hKey);
|
|
}
|
|
uVar2 = 0x12;
|
|
}
|
|
else {
|
|
if (hKey != (HKEY)0x0) {
|
|
RegCloseKey(hKey);
|
|
}
|
|
uVar2 = 1;
|
|
}
|
|
}
|
|
else {
|
|
uVar2 = 1;
|
|
if (LVar1 == 5) {
|
|
uVar2 = 0x12;
|
|
}
|
|
}
|
|
return uVar2;
|
|
}
|
|
|