Function at 0x40b370
Capabilities:
Check if file exists
Create process on windows
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x427b43
mov eax, dword fs:[0]
push eax
sub esp, 0xd4
mov eax, dword [0x438070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
lea eax, [ebp - 0x64]
mov dword [ebp - 4], 0
push eax
push 0x2001f
push 0
push str.SoftwareKuGouUpgrade
push SysReAllocString
mov dword [ebp - 0x64], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40b794
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x60], eax
xor eax, eax
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
push str.NewUpKugoo
lea ecx, [ebp - 0x60]
call fcn.0040bf60
mov esi, dword [ebp - 0x60]
test eax, eax
jne 0x40b718
cmp dword [ebp - 0x18], 0
je 0x40b701
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40b701
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
sub esp, 0x18
mov byte [ebp - 4], 2
mov ecx, esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], eax
cmp dword [ecx + 0x14], 8
jb 0x40b475
mov eax, dword [ecx]
jmp 0x40b477
mov eax, ecx
xor edx, edx
push 0xffffffffffffffff
mov word [eax], dx
lea eax, [ebp - 0x28]
push edx
push eax
call fcn.00404f44
lea ecx, [ebp - 0xdc]
call fcn.0040c740
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 3
push ecx
mov ecx, eax
call fcn.0040c890
lea ecx, [ebp - 0xdc]
mov byte [ebp - 4], 2
mov esi, eax
call fcn.0040c7a0
cmp esi, 2
mov esi, dword [ebp - 0x60]
jne 0x40b67e
mov ecx, edi
call fcn.0040b070
lea ecx, [ebp - 0x28]
mov edi, eax
call fcn.0040b070
mov ebx, eax
lea ecx, [ebp - 0x60]
cmp edi, ebx
jge 0x40b681
lea eax, [ebp - 0x64]
mov dword [ebp - 0x64], 0
push eax
push str.FromVersion
call fcn.0040bef0
lea ecx, [ebp - 0x60]
test eax, eax
jne 0x40b681
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x68]
push eax
push str.ToVersion
call fcn.0040bef0
test eax, eax
jne 0x40b67e
cmp edi, dword [ebp - 0x64]
jne 0x40b67e
mov edi, dword [ebp - 0x68]
cmp ebx, edi
jne 0x40b67e
push 0x38
push eax
lea eax, [ebp - 0xa4]
push eax
call fcn.004129f0
add esp, 0xc
mov dword [ebp - 0xa8], 0x3c
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov dword [ebp - 0x8c], 1
cmovae eax, dword [ebp - 0x28]
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0xa8]
push eax
mov dword [ebp - 0xa4], 0x800140
mov dword [ebp - 0x9c], str.open
mov dword [ebp - 0x94], str._NoFinishPage
mov dword [ebp - 0x6c], 0xfffffff6
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
push 0x434940
push str.NewUpKugoo
lea ecx, [ebp - 0x60]
mov ebx, eax
call fcn.0040c130
mov ecx, dword [ebp - 0x70]
test ecx, ecx
je 0x40b5cd
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x64]
lea ecx, [ebp - 0x40]
push edi
call fcn.0040b120
mov eax, dword [ebp - 0x6c]
lea ecx, [ebp - 0x40]
add esp, 4
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x68]
cmovae ecx, dword [ebp - 0x40]
push 4
push eax
push 4
push 0
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test ebx, ebx
je 0x40b60d
cmp dword [ebp - 0x6c], 0
jne 0x40b60d
mov bl, 1
jmp 0x40b60f
xor bl, bl
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x40b668
mov ecx, dword [ebp - 0x40]
inc eax
cmp eax, 0x7fffffff
jbe 0x40b627
call fcn.00418d3b
add eax, eax
cmp eax, 0x1000
jb 0x40b65f
test byte [ebp - 0x40], 0x1f
je 0x40b63b
call fcn.00418d3b
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x40b647
call fcn.00418d3b
sub ecx, eax
cmp ecx, 4
jae 0x40b653
call fcn.00418d3b
cmp ecx, 0x23
jbe 0x40b65d
call fcn.00418d3b
mov ecx, eax
push ecx
call fcn.0040fd8e
add esp, 4
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jmp 0x40b692
lea ecx, [ebp - 0x60]
push 0x434940
push str.NewUpKugoo
call fcn.0040c130
xor bl, bl
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x40b6eb
mov ecx, dword [ebp - 0x58]
inc eax
cmp eax, 0x7fffffff
jbe 0x40b6aa
call fcn.00418d3b
add eax, eax
cmp eax, 0x1000
jb 0x40b6e2
test byte [ebp - 0x58], 0x1f
je 0x40b6be
call fcn.00418d3b
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x40b6ca
call fcn.00418d3b
sub ecx, eax
cmp ecx, 4
jae 0x40b6d6
call fcn.00418d3b
cmp ecx, 0x23
jbe 0x40b6e0
call fcn.00418d3b
mov ecx, eax
push ecx
call fcn.0040fd8e
add esp, 4
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
jmp 0x40b71a
push 2
push 0x434940
push 1
push 0
push str.NewUpKugoo
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor bl, bl
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40b773
mov ecx, dword [ebp - 0x28]
inc eax
cmp eax, 0x7fffffff
jbe 0x40b732
call fcn.00418d3b
add eax, eax
cmp eax, 0x1000
jb 0x40b76a
test byte [ebp - 0x28], 0x1f
je 0x40b746
call fcn.00418d3b
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x40b752
call fcn.00418d3b
sub ecx, eax
cmp ecx, 4
jae 0x40b75e
call fcn.00418d3b
cmp ecx, 0x23
jbe 0x40b768
call fcn.00418d3b
mov ecx, eax
push ecx
call fcn.0040fd8e
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
test esi, esi
je 0x40b796
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40b796
xor bl, bl
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040f8a1
mov esp, ebp
pop ebp
ret