Function at 0x41d130
Capabilities:
Check if file exists
Get common file path
Persist via run registry key
Query environment variable
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x490c2c
mov eax, dword fs:[0]
push eax
sub esp, 0x638
mov eax, dword [0x4b3c40]
xor eax, esp
mov dword [esp + 0x634], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b3c40]
xor eax, esp
push eax
lea eax, [esp + 0x64c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x660]
mov esi, dword [esp + 0x65c]
push 0x206
xor ebx, ebx
mov edi, ecx
lea edx, [esp + 0x36]
xor ecx, ecx
push ebx
push edx
mov dword [esp + 0x2c], eax
mov word [esp + 0x3c], cx
call fcn.004453c0
push 0x206
lea ecx, [esp + 0x24a]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x250], ax
call fcn.004453c0
push 0x25
mov ebp, 1
push esi
mov dword [esp + 0x48], ebp
mov dword [esp + 0x44], 0x208
call fcn.004455fb
add esp, 0x20
test eax, eax
jne 0x41d20f
cmp esi, ebx
jne 0x41d1e9
mov ecx, dword [esp + 0x20]
push eax
push esi
call fcn.0040e110
jmp 0x41d836
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x41d1f0
mov ecx, dword [esp + 0x20]
sub eax, edx
sar eax, 1
push eax
push esi
call fcn.0040e110
jmp 0x41d836
push 9
push str._install_
push esi
call fcn.00447334
add esp, 0xc
test eax, eax
jne 0x41d27d
add esi, 0x12
push esi
add edi, 8
lea edx, [esp + 0x20]
push edi
push edx
call fcn.0041c7b0
add esp, 0xc
mov ecx, dword [esp + 0x20]
push eax
mov dword [esp + 0x658], ebx
call fcn.0040e410
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x654], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d836
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x41d836
push 8
push str._360safe
push esi
call fcn.00447334
add esp, 0xc
test eax, eax
jne 0x41d3d1
push 0x25
push esi
call fcn.004470e5
push 0x103
lea ecx, [esp + 0x244]
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_
push ecx
mov edi, eax
call fcn.00446642
mov edx, edi
sub edx, esi
sar edx, 1
sub edx, ebp
push edx
add esi, 2
lea eax, [esp + 0x250]
push esi
push eax
call fcn.00446602
add esp, 0x20
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push ebx
lea edx, [esp + 0x244]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x41d3ca
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x30]
push edx
push ebx
push 0x494820
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x30]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x41d330
sub eax, edx
sar eax, 1
je 0x41d3ca
lea ecx, [esp + 0x14]
call fcn.0040da20
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x658], ebp
push str._s360Safe.exe
lea eax, [esp + 0x1c]
push eax
call fcn.0040ebe0
mov esi, dword [esp + 0x20]
add esp, 0xc
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41d3c1
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x20]
push edx
push esi
mov dword [esp + 0x28], ebx
call fcn.0041aa80
add esp, 0xc
cmp dword [esp + 0x1c], ebx
je 0x41d3c1
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.0040eda0
add edi, 2
push edi
mov ecx, esi
call fcn.0040ec80
lea ecx, [esp + 0x14]
call fcn.0040da40
jmp 0x41d836
lea ecx, [esp + 0x14]
call fcn.0040da40
xor al, al
jmp 0x41d838
push 0xb
push str._360AP.exe_
push esi
call fcn.00447334
add esp, 0xc
test eax, eax
jne 0x41d4bb
push 0x25
push esi
call fcn.004470e5
push 0x103
lea ecx, [esp + 0x244]
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_
push ecx
mov edi, eax
call fcn.00446642
mov edx, edi
sub edx, esi
sar edx, 1
sub edx, ebp
push edx
add esi, 2
lea eax, [esp + 0x250]
push esi
push eax
call fcn.00446602
add esp, 0x20
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push ebx
lea edx, [esp + 0x244]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x41d3ca
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x30]
push edx
push ebx
push 0x494820
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x30]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x41d483
sub eax, edx
sar eax, 1
je 0x41d3ca
lea ecx, [esp + 0x14]
call fcn.0040da20
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x658], 2
push str._s360AP.exe
jmp 0x41d35f
push 8
push str._Common
push esi
call fcn.00447334
add esp, 0xc
test eax, eax
je 0x41d693
push 6
push str._User
push esi
call fcn.00447334
add esp, 0xc
test eax, eax
je 0x41d693
push 7
push str._Group_
push esi
call fcn.00447334
add esp, 0xc
test eax, eax
jne 0x41d591
lea ecx, [esp + 0x14]
push ecx
push 0x17
push ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
cmp eax, ebx
jne 0x41d58a
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x30]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x41d57f
mov esi, dword [esp + 0x20]
lea ecx, [esp + 0x30]
push ecx
mov ecx, esi
call fcn.0040eda0
add edi, 0x28
push edi
lea edx, [esp + 0x20]
push 0x4947e4
push edx
call fcn.0040e880
add esp, 0xc
push eax
mov ecx, esi
mov dword [esp + 0x658], 3
call fcn.0041d110
lea ecx, [esp + 0x1c]
call fcn.0040da40
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x41d836
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor al, al
jmp 0x41d838
push 0xb
push str._SMPROGRAMS
push esi
call fcn.00447334
add esp, 0xc
test eax, eax
jne 0x41d658
push 0x25
push esi
call fcn.004470e5
mov edi, eax
mov edx, 0x25
sub dx, word [esi + 0x16]
add esp, 8
movzx eax, dx
neg eax
sbb eax, eax
and eax, 0xffffffeb
lea ecx, [esp + 0x18]
push ecx
add eax, 0x17
push eax
push ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x41d651
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x30]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x41d646
lea eax, [esp + 0x30]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x41d600
sub eax, edx
sar eax, 1
mov ecx, 0x104
sub ecx, eax
push ecx
add edi, 2
lea edx, [esp + 0x34]
push edi
push edx
call fcn.00446602
mov ecx, dword [esp + 0x2c]
add esp, 0xc
lea eax, [esp + 0x30]
push eax
call fcn.0040eda0
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x41d836
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor al, al
jmp 0x41d838
push 0x104
lea eax, [esp + 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [esp + 0x24], eax
cmp eax, ebx
je 0x41d3ca
cmp word [esp + 0x30], bx
je 0x41d3ca
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x24]
call fcn.0040eda0
jmp 0x41d836
push 0x25
push esi
xor bl, bl
call fcn.004470e5
xor edx, edx
push 0x206
mov ebp, eax
push edx
lea eax, [esp + 0x452]
push eax
mov word [esp + 0x454], dx
call fcn.004453c0
push 6
push str._User
push esi
call fcn.00447334
mov edi, ebp
sub edi, esi
add esp, 0x20
sar edi, 1
lea ecx, [esp + 0x238]
test eax, eax
jne 0x41d71c
sub edi, 6
push edi
add esi, 0xc
push esi
push ecx
mov bl, 1
call fcn.00446642
push 7
lea edx, [esp + 0x450]
push str.Common
push edx
call fcn.00446642
push edi
lea eax, [esp + 0x254]
push eax
lea ecx, [esp + 0x460]
push ecx
call fcn.00446602
add esp, 0x24
jmp 0x41d742
lea edx, [edi - 1]
push edx
lea eax, [esi + 2]
push eax
push ecx
call fcn.00446642
add edi, 0xfffffff8
push edi
add esi, 0x10
lea edx, [esp + 0x450]
push esi
push edx
call fcn.00446642
add esp, 0x18
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor ecx, ecx
test bl, bl
lea eax, [esp + 0x14]
push eax
sete cl
push 0x20019
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
mov dword [esp + 0x24], 0
add ecx, 0x80000001
push ecx
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x41d7a6
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x30]
push ecx
push 0
lea edx, [esp + 0x248]
push edx
push eax
call edi
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edx, edx
cmp dx, word [esp + 0x30]
jne 0x41d81b
xor ecx, ecx
test bl, bl
lea eax, [esp + 0x14]
push eax
setne cl
push 0x20019
push edx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
add ecx, 0x80000001
push ecx
call esi
test eax, eax
jne 0x41d80e
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x30]
push ecx
push 0
lea edx, [esp + 0x450]
push edx
push eax
mov dword [esp + 0x40], 1
mov dword [esp + 0x3c], 0x208
call edi
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edx, edx
cmp dx, word [esp + 0x30]
je 0x41d3ca
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.0040eda0
add ebp, 2
push ebp
mov ecx, esi
call fcn.0040ec80
mov al, 1
mov ecx, dword [esp + 0x64c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x634]
xor ecx, esp
call fcn.004453a3
add esp, 0x644
ret 8