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

Disassembly:
push 0xffffffffffffffff
push 0x449ab6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x110
push ebp
push esi
push edi
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1c]
mov dword [esp + 0x14], 1
rep stosd dword es:[edi], eax
mov eax, dword [0x455050]
mov ecx, str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths360Desktop.exe
test ecx, ecx
mov dword [esp + 0x18], 0x80
mov dword [esp + 0x10], eax
je 0x4010e8
mov edx, ecx
shr edx, 0x10
jne 0x4010ab
xor eax, eax
mov ax, cx
lea ecx, [esp + 0x10]
push eax
call fcn.004015b0
jmp 0x4010e8
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths360Desktop.exe
call ebp
mov esi, eax
test esi, esi
je 0x4010e8
push esi
lea ecx, [esp + 0x14]
call fcn.00401820
test eax, eax
je 0x4010e8
lea ecx, [esi + esi]
lea edx, [esi + esi + 2]
cmp edx, ecx
jb 0x4010e8
mov edi, dword [esp + 0x10]
mov eax, ecx
mov esi, str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths360Desktop.exe
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x455050]
mov edx, 0x45b334
test edx, edx
mov dword [esp + 0x124], 0
mov dword [esp + 0xc], ecx
je 0x40115d
mov eax, edx
shr eax, 0x10
jne 0x401120
xor eax, eax
mov ecx, edx
mov ax, cx
lea ecx, [esp + 0xc]
push eax
call fcn.004015b0
jmp 0x40115d
push 0x45b334
call ebp
mov esi, eax
test esi, esi
je 0x40115d
push esi
lea ecx, [esp + 0x10]
call fcn.00401820
test eax, eax
je 0x40115d
lea ecx, [esi + esi]
lea edx, [esi + esi + 2]
cmp edx, ecx
jb 0x40115d
mov edi, dword [esp + 0xc]
mov eax, ecx
mov esi, 0x45b334
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push edx
mov edx, dword [esp + 0x18]
push eax
push ecx
push edx
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [esp + 0x13c], 1
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
cmp dword [esp + 0x14], 1
jne 0x401280
cmp word [esp + 0x1c], 0
je 0x401280
mov eax, dword [esp + 0x18]
test eax, eax
jbe 0x401280
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401232
lea ecx, [esp + 0x1c]
push ecx
call fcn.004014d0
add esp, 4
test eax, eax
je 0x401232
mov eax, dword [esp + 0xc]
mov ecx, dword [0x455054]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4011fd
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4011fd
mov eax, dword [esp + 0xc]
add eax, 0xfffffff4
push eax
call fcn.0042ac06
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x455054]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x401228
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x401228
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.0042ac06
add esp, 4
mov eax, 1
jmp 0x4012de
mov eax, dword [esp + 0xc]
mov edx, dword [0x455054]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x401263
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x401263
mov edx, dword [esp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.0042ac06
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x455054]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4012dc
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4012dc
jmp 0x4012cc
mov eax, dword [esp + 0xc]
mov edx, dword [0x455054]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4012b1
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4012b1
mov edx, dword [esp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.0042ac06
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x455054]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4012dc
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4012dc
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.0042ac06
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x11c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x11c
ret