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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x434040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x48], 7
lea esi, [edi + 0x34]
mov eax, esi
jbe 0x407a72
mov eax, dword [esi]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x2c], 0
push ecx
lea ecx, [ebp - 0x2c]
push ecx
push 0
push 0x20006
push 0
push 0
push 0
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x407ad0
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x407ad0
push 4
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x24], 3
push ecx
push 4
push 0
push str.Status
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x28]
call ebx
mov eax, dword [edi + 0x7c]
inc eax
cmp dword [esi + 0x14], 7
mov dword [ebp - 0x24], eax
jbe 0x407adf
mov esi, dword [esi]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x2c], 0
push eax
lea eax, [ebp - 0x2c]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push esi
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x407b31
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x407b31
mov eax, dword [ebp - 0x24]
push 4
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push 4
push 0
push str.AlreadyRunCount
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push esi
call ebx
mov ecx, edi
call fcn.00407d80
cmp dword [edi + 0x48], 7
lea eax, [edi + 0x34]
jbe 0x407b43
mov eax, dword [eax]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
push ecx
push 0x20019
push 0
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407cf9
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x407cf9
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x30], 4
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x28], 4
push eax
push 0
push str.Status
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407cf6
mov eax, dword [ebp - 0x30]
cmp eax, 4
je 0x407bb8
cmp eax, 3
jne 0x407cf6
cmp dword [ebp - 0x28], 4
jne 0x407cf6
cmp dword [ebp - 0x24], 2
jne 0x407cf6
push esi
call ebx
mov edx, dword [edi + 0x90]
lea ecx, [edi + 0x80]
mov eax, 0x7ffffffe
mov byte [ebp - 0x1d], 1
sub eax, edx
cmp eax, 0x15
jb 0x407d6f
cmp dword [ecx + 0x14], 7
jbe 0x407bf7
mov ecx, dword [ecx]
push edx
push ecx
push 0x15
push str.SoftwareKugouPatch_
push ecx
push dword [ebp - 0x24]
lea ecx, [ebp - 0x1c]
call fcn.00409840
cmp dword [ebp - 8], 7
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x24], 0
push ecx
push 0
push 0x20006
push 0
push 0
lea eax, [ebp - 0x1c]
cmova eax, dword [ebp - 0x1c]
push 0
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x407c8c
mov esi, dword [ebp - 0x24]
test esi, esi
je 0x407c8c
cmp dword [edi + 0x78], 7
lea edx, [edi + 0x64]
jbe 0x407c55
mov edx, dword [edx]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x28], eax
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407c60
sub ecx, dword [ebp - 0x28]
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push str.CurrPatchVersion
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push esi
call ebx
mov ecx, dword [ebp - 8]
cmp ecx, 7
jbe 0x407cc6
mov edx, dword [ebp - 0x1c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x407cbc
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407d74
push ecx
push edx
call fcn.0040f14c
add esp, 8
cmp dword [edi + 0x2c], 0
je 0x407d5b
add edi, 0x1c
cmp dword [edi + 0x14], 7
jbe 0x407cdb
mov edi, dword [edi]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov al, byte [ebp - 0x1d]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040f104
mov esp, ebp
pop ebp
ret
push esi
call ebx
add edi, 0x34
mov byte [ebp - 0x1d], 0
cmp dword [edi + 0x14], 7
jbe 0x407d08
mov edi, dword [edi]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x24], 0
push eax
lea eax, [ebp - 0x24]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push edi
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x407d5b
mov esi, dword [ebp - 0x24]
test esi, esi
je 0x407d5b
push 4
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 1
push eax
push 4
push 0
push str.Status
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push esi
call ebx
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x1d]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0040f104
mov esp, ebp
pop ebp
ret
call fcn.0040118c
call fcn.00417f31
int3