Function at 0x402d80
Capabilities:
Check if file exists
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x422977
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc58
mov eax, dword [ecx + 0x2c]
push ebx
push ebp
lea ebp, [ecx + 0x24]
push esi
push edi
mov ecx, dword [ebp + 4]
push eax
push ecx
mov ecx, ebp
call fcn.004036a0
xor ebx, ebx
mov dword [esp + 0x1c], ebx
lea eax, [esp + 0x18]
mov dword [esp + 0xc70], ebx
push eax
push 0x20019
push ebx
push str.Software360safemenuext
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x403026
lea ecx, [esp + 0x1c]
call fcn.00404060
mov ecx, dword [esp + 0x18]
cmp eax, ebx
mov dword [esp + 0x1c], ecx
jne 0x403026
lea edx, [esp + 0x38]
push 0x104
push edx
mov esi, 1
push ebx
push ecx
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x403026
cmp esi, 0x64
jge 0x403026
xor esi, esi
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x10]
push eax
push 0x20019
lea ecx, [esp + 0x40]
push ebx
push ecx
push edx
mov byte [esp + 0xc84], 1
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x402feb
mov esi, dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x448]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
push ebx
push str.Application
push esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x28], 0x410
mov dword [esp + 0x2c], ebx
call edi
cmp eax, ebx
jne 0x402ed1
lea eax, [esp + 0x448]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402ed1
lea ecx, [esp + 0x10]
lea edx, [esp + 0x240]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
push ebx
push 0x42f1ac
push esi
mov dword [esp + 0x28], 0x208
mov dword [esp + 0x2c], ebx
call edi
cmp eax, ebx
je 0x402ee5
cmp esi, ebx
mov byte [esp + 0xc70], bl
je 0x402ffd
jmp 0x402ff6
mov ecx, 0x104
xor eax, eax
lea edi, [esp + 0x858]
lea edx, [esp + 0x858]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [esp + 0x10]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
push ebx
push str.Parameters
push esi
mov dword [esp + 0x28], 0x410
mov dword [esp + 0x2c], ebx
call edi
lea ecx, [esp + 0x14]
lea edx, [esp + 0x20]
push ecx
lea eax, [esp + 0x34]
push edx
push eax
push ebx
push str.flags
push esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x2c], 4
call edi
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x240]
lea edx, [edi + 0x64]
push ecx
mov ecx, dword [esp + 0xc7c]
push edx
push eax
push ecx
call dword [sym.imp.USER32.dll_AppendMenuW]
lea ecx, [esp + 0x28]
call sub.MFC42u.DLL_CString::CString_4
lea ecx, [esp + 0x2c]
mov byte [esp + 0xc70], 2
call sub.MFC42u.DLL_CString::CString_4
lea edx, [esp + 0x448]
lea ecx, [esp + 0x28]
push edx
mov byte [esp + 0xc74], 3
mov dword [esp + 0x28], edi
call sub.MFC42u.DLL_CString::operator_2
lea eax, [esp + 0x858]
lea ecx, [esp + 0x2c]
push eax
call sub.MFC42u.DLL_CString::operator_2
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x24]
push ecx
push eax
mov ecx, ebp
call fcn.004034a0
lea ecx, [esp + 0x2c]
mov byte [esp + 0xc70], 4
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x28]
mov byte [esp + 0xc70], 1
call sub.MFC42u.DLL_CString::CString
mov esi, dword [esp + 0x34]
cmp esi, ebx
mov byte [esp + 0xc70], bl
je 0x402ffd
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x38]
mov eax, esi
push 0x104
push edx
push eax
mov eax, dword [esp + 0x28]
inc esi
push eax
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x402e21
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x403059
mov ebp, dword [ebp + 8]
sub ebp, eax
mov eax, 0x2aaaaaab
imul ebp
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
je 0x403059
mov edx, dword [esp + 0xc78]
push ebx
push ebx
push 0x800
push edx
call dword [sym.imp.USER32.dll_AppendMenuW]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
cmp eax, ebx
pop ebx
je 0x40306c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0xc58]
mov dword fs:[0], ecx
add esp, 0xc64
ret 4