Function at 0x4cf770
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x563f80
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2a0
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x30], esi
mov eax, dword [esi + 0x2c]
mov edi, dword [esi + 0x1c]
test eax, eax
mov dword [ebp - 4], 0
je 0x4cf8ed
mov dword [ebp - 0x1c], 0x10
mov eax, dword [edi + 0x24]
push eax
lea ecx, [ebp - 0x18]
push 0x5a3e38
push ecx
call fcn.00527718
add esp, 0xc
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [ebp - 0x1c]
lea eax, [ebp - 0x2c]
push edx
mov edx, dword [esi + 0x2c]
push eax
push 0
lea ecx, [ebp - 0x18]
push 0
push ecx
push edx
call ebx
test eax, eax
je 0x4cf80d
push eax
lea eax, [ebp - 0x168]
push str.Error_reading_registry__errCode___d._n
push eax
call fcn.00527718
add esp, 0xc
lea ecx, [ebp - 0x168]
push ecx
mov ecx, esi
call fcn.004cf450
mov ecx, dword [esi + 0x2c]
mov edx, dword [ebp - 0x28]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x34], edx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x168]
push edx
push str.Deleting_record_with_num__s_n
push eax
call fcn.00527718
add esp, 0xc
lea ecx, [ebp - 0x168]
push ecx
mov ecx, esi
call fcn.004cf450
mov edx, dword [esi + 0x24]
lea eax, [ebp - 0x18]
push edx
push 0x5a3e38
push eax
call fcn.00527718
add esp, 0xc
lea ecx, [ebp - 0x1c]
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x18]
push ecx
mov ecx, dword [esi + 0x2c]
push edx
push 0
push 0
push eax
push ecx
call ebx
test eax, eax
je 0x4cf899
push eax
lea edx, [ebp - 0x168]
push str.Error_reading_registry__errCode___d._n
push edx
call fcn.00527718
add esp, 0xc
lea eax, [ebp - 0x168]
mov ecx, esi
push eax
call fcn.004cf450
mov ecx, dword [ebp - 0x34]
lea edx, [ebp - 0x2c]
push 0x10
push edx
mov dword [ebp - 0x28], ecx
mov ecx, dword [esi + 0x2c]
push 0
lea eax, [ebp - 0x18]
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
push edx
mov edx, dword [ebp - 0x2c]
push eax
push ecx
lea eax, [ebp - 0x18]
push edx
push eax
lea ecx, [ebp - 0x168]
push str.Updating_record_with_num__s:_set_ID__d__startPos__I64d__nextID__d_n
push ecx
call fcn.00527718
add esp, 0x1c
lea edx, [ebp - 0x168]
mov ecx, esi
push edx
call fcn.004cf450
mov eax, dword [edi]
mov ecx, dword [esi]
mov edx, dword [eax + 0x30]
mov dword [ecx + 0x30], edx
mov eax, dword [eax + 0x34]
mov dword [ecx + 0x34], eax
mov ecx, dword [edi]
add ecx, 0x10
call fcn.004d2050
mov ecx, dword [edi + 0x10]
push ecx
call fcn.005284b2
add esp, 4
cmp eax, 0xffffffff
jne 0x4cf93e
mov edx, dword [edi + 0x10]
lea eax, [ebp - 0x2ac]
push edx
push str.Could_not_delete_temp_file__s_n
push eax
call fcn.00527718
add esp, 0xc
lea ecx, [ebp - 0x2ac]
push ecx
mov ecx, esi
call fcn.004cf450
mov edx, dword [edi + 0x1c]
test edi, edi
mov dword [esi + 0x1c], edx
je 0x4cf958
mov ecx, edi
call fcn.004cf3f0
push edi
call fcn.00542796
add esp, 4
mov ecx, dword [esi]
call fcn.004d17d0
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret