Function at 0x4f6fa0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53a32f
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push esi
push edi
mov eax, dword [0x59a0a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x9a4]
sub eax, dword [esi + 0x9a0]
sar eax, 2
test eax, eax
jne 0x4f6fed
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x9a0]
xor edx, edx
mov dword [ebp - 0x14], edx
cmp eax, dword [esi + 0x9a4]
je 0x4f7012
mov ecx, dword [esi + 0x9a4]
add edx, dword [eax]
add eax, 4
mov dword [ebp - 0x14], edx
cmp eax, ecx
jne 0x4f7006
mov ecx, dword [esi + 0x9a4]
mov eax, edx
sub ecx, dword [esi + 0x9a0]
xor edx, edx
sar ecx, 2
div ecx
push str.SoftwareTencentMobileGamePCGameDownload
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], eax
call fcn.00401ff0
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 0
push eax
push 0x20006
push 0
push dword [ebp - 0x10]
mov dword [ebp - 0x18], 0
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
je 0x4f70f1
mov esi, dword [ebp - 0x10]
cmp dword [esi - 4], 1
jle 0x4f707f
push dword [esi - 0xc]
lea ecx, [ebp - 0x10]
call fcn.00402b70
mov esi, dword [ebp - 0x10]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x59fee8]
cmp eax, dword [ecx + 4]
jle 0x4f70d1
push 0x59fee8
call fcn.0049af28
add esp, 4
cmp dword [0x59fee8], 0xffffffff
jne 0x4f70d1
mov byte [ebp - 4], 1
call fcn.004e7150
push 0x53eaa0
call fcn.0049b282
add esp, 4
mov byte [ebp - 4], 0
push 0x59fee8
call fcn.0049aee9
add esp, 4
push edi
push esi
push 0x56ea48
push str.__s__Open_Reg__s__Failed_Error_Code__d_
push 0x59feec
call fcn.004e76a0
add esp, 0x14
xor esi, esi
jmp 0x4f717c
push 4
lea eax, [ebp - 0x14]
push eax
push 4
push 0
push str.DownloadSpeed
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
test esi, esi
je 0x4f7144
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 4], 1
jle 0x4f7126
push dword [ecx - 0xc]
lea ecx, [ebp - 0x10]
call fcn.00402b70
mov ecx, dword [ebp - 0x10]
push esi
push ecx
push 0x56e9e8
push str.__s__Set_Reg__s__Value_Failed_Error_Code__d_
call fcn.004e78a0
push eax
call fcn.004e76a0
add esp, 0x14
xor esi, esi
jmp 0x4f717c
mov eax, dword [ebp - 0x10]
cmp dword [eax - 4], 1
jle 0x4f715b
push dword [eax - 0xc]
lea ecx, [ebp - 0x10]
call fcn.00402b70
mov eax, dword [ebp - 0x10]
push dword [ebp - 0x14]
push eax
push str.GameDownload::CMainUI::RecordAverageSpeed
push str.__s__Set_Reg__s__AverageSpeed___d__Successs.
call fcn.004e78a0
push eax
call fcn.004e76a0
add esp, 0x14
mov esi, 1
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4f71ca
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4f71c6
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, edx
call edi
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret