Function at 0x41da15
Capabilities:
Get common file path
Get program files directory
Persist via run registry key
Query environment variable

Disassembly:
push 0x138
mov eax, 0x5289e6
call fcn.004f81fd
cmp dword [ebp + 8], 0
je 0x41da2f
call fcn.0041f8eb
and dword [ebp - 0x124], 0
mov ebx, str._windows_
push ebx
xor ecx, ecx
mov esi, edi
call fcn.00414c6c
cmp eax, 0xffffffff
je 0x41da5e
push 0x104
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x41da82
mov ebx, str._system_
push ebx
xor ecx, ecx
call fcn.00414c6c
cmp eax, 0xffffffff
je 0x41daa3
push 0x104
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jbe 0x41e447
lea eax, [ebp - 0x118]
push eax
push ebx
push edi
call fcn.0040c445
mov dword [ebp - 0x124], eax
jmp 0x41e447
mov ebx, str._temp_
push ebx
xor ecx, ecx
call fcn.00414c6c
cmp eax, 0xffffffff
je 0x41dad8
lea esi, [ebp - 0x120]
call fcn.00412092
and dword [ebp - 4], 0
push dword [eax]
push ebx
push edi
call fcn.0040c445
mov dword [ebp - 0x124], eax
jmp 0x41e438
mov ebx, str._programfiles_
push ebx
xor ecx, ecx
call fcn.00414c6c
cmp eax, 0xffffffff
je 0x41dba2
push 0x541b98
lea ecx, [ebp - 0x120]
call fcn.00401769
xor esi, esi
inc esi
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x11c]
call fcn.00404402
mov byte [ebp - 4], 2
push 0
push 0x26
lea eax, [ebp - 0x118]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x41db32
lea eax, [ebp - 0x118]
jmp 0x41db8b
push esi
lea eax, [ebp - 0x11c]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x130], esp
push str.ProgramFilesDir
call fcn.00401769
mov byte [ebp - 4], 3
push ecx
lea eax, [ebp - 0x120]
mov ecx, esp
mov dword [ebp - 0x12c], esp
push eax
call fcn.0040184e
mov byte [ebp - 4], 4
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [ebp - 4], 2
call fcn.004216e8
add esp, 0x14
test eax, eax
je 0x41db99
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], 0
je 0x41db99
push eax
push ebx
push edi
call fcn.0040c445
mov dword [ebp - 0x124], eax
mov byte [ebp - 4], 1
jmp 0x41e42d
mov ebx, str._local_appdata_
push ebx
xor ecx, ecx
call fcn.00414c6c
cmp eax, 0xffffffff
jne 0x41e343
push str._localappdata_
xor ecx, ecx
call fcn.00414c6c
cmp eax, 0xffffffff
jne 0x41e343
mov ebx, str._appdata_
push ebx
xor ecx, ecx
call fcn.00414c6c
cmp eax, 0xffffffff
je 0x41dc98
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea ecx, [ebp - 0x120]
call fcn.00401769
mov dword [ebp - 4], 9
lea ecx, [ebp - 0x11c]
call fcn.00404402
mov byte [ebp - 4], 0xa
xor esi, esi
push esi
push 0x1a
lea eax, [ebp - 0x118]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x41dc28
lea eax, [ebp - 0x118]
jmp 0x41dc81
push 1
lea eax, [ebp - 0x11c]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x130], esp
push str.AppData
call fcn.00401769
mov byte [ebp - 4], 0xb
push ecx
lea eax, [ebp - 0x120]
mov ecx, esp
mov dword [ebp - 0x12c], esp
push eax
call fcn.0040184e
mov byte [ebp - 4], 0xc
push SysReAllocStringLen
mov byte [ebp - 4], 0xa
call fcn.004216e8
add esp, 0x14
cmp eax, esi
je 0x41dc8f
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], esi
je 0x41dc8f
push eax
push ebx
push edi
call fcn.0040c445
mov dword [ebp - 0x124], eax
mov byte [ebp - 4], 9
jmp 0x41e42d
push str._programdata_
xor ecx, ecx
call fcn.00414c6c
cmp eax, 0xffffffff
je 0x41dd66
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea ecx, [ebp - 0x120]
call fcn.00401769
mov dword [ebp - 4], 0xd
lea ecx, [ebp - 0x11c]
call fcn.00404402
mov byte [ebp - 4], 0xe
xor esi, esi
push esi
push 0x23
lea eax, [ebp - 0x118]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x41dcf2
lea eax, [ebp - 0x118]
jmp 0x41dd4b
push 1
lea eax, [ebp - 0x11c]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x130], esp
push str.Common_AppData
call fcn.00401769
mov byte [ebp - 4], 0xf
push ecx
lea eax, [ebp - 0x120]
mov ecx, esp
mov dword [ebp - 0x12c], esp
push eax
call fcn.0040184e
mov byte [ebp - 4], 0x10
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [ebp - 4], 0xe
call fcn.004216e8
add esp, 0x14
cmp eax, esi
je 0x41dd5d
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], esi
je 0x41dd5d
push eax
push str._programdata_
push edi
call fcn.0040c445
mov dword [ebp - 0x124], eax
mov byte [ebp - 4], 0xd
jmp 0x41e42d
push str._mydocuments_
xor ecx, ecx
call fcn.00414c6c
cmp eax, 0xffffffff
je 0x41de36
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea ecx, [ebp - 0x120]
call fcn.00401769
mov dword [ebp - 4], 0x11
lea ecx, [ebp - 0x11c]
call fcn.00404402
mov byte [ebp - 4], 0x12
xor esi, esi
push esi
push 5
lea eax, [ebp - 0x118]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x41ddc6
lea eax, [ebp - 0x118]
push eax
push str._mydocuments_
jmp 0x41de21
push 1
lea eax, [ebp - 0x11c]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x130], esp
push str.Personal
call fcn.00401769
mov byte [ebp - 4], 0x13
push ecx
lea eax, [ebp - 0x120]
mov ecx, esp
mov dword [ebp - 0x12c], esp
push eax
call fcn.0040184e
mov byte [ebp - 4], 0x14
push SysReAllocStringLen
mov byte [ebp - 4], 0x12
call fcn.004216e8
add esp, 0x14
cmp eax, esi
je 0x41de2d
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], esi
je 0x41de2d
push eax
push ebx
push edi
call fcn.0040c445
mov dword [ebp - 0x124], eax
mov byte [ebp - 4], 0x11
jmp 0x41e42d
push str._desktop_
xor ecx, ecx
call fcn.00414c6c
mov ebx, str._desktopdir_
cmp eax, 0xffffffff
jne 0x41e254
push ebx
xor ecx, ecx
call fcn.00414c6c
cmp eax, 0xffffffff
jne 0x41e254
mov ebx, str._userprofile_
push ebx
xor ecx, ecx
call fcn.00414c6c
cmp eax, 0xffffffff
je 0x41df3d
mov esi, 0x53b9e7
push esi
lea ecx, [ebp - 0x128]
call fcn.00401769
mov dword [ebp - 4], 0x19
cmp dword [ebp + 8], 0
je 0x41dedf
call fcn.0041d7af
cmp eax, 6
jl 0x41dedf
push ecx
mov ecx, esp
mov dword [ebp - 0x130], esp
push ebx
call fcn.00401769
mov byte [ebp - 4], 0x1a
mov byte [ebp - 4], 0x19
lea esi, [ebp - 0x120]
call fcn.0041ee70
pop ecx
mov byte [ebp - 4], 0x1b
push eax
lea ecx, [ebp - 0x128]
call fcn.004044be
mov byte [ebp - 4], 0x19
mov ecx, esi
call fcn.00401898
jmp 0x41df0b
push 0x104
lea eax, [ebp - 0x118]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea ecx, [ebp - 0x128]
test eax, eax
jne 0x41deff
push esi
jmp 0x41df06
lea eax, [ebp - 0x118]
push eax
call fcn.00401732
mov eax, dword [ebp - 0x128]
cmp dword [eax - 0xc], 0
jne 0x41df20
and dword [ebp - 0x124], 0
jmp 0x41df2e
push eax
push ebx
push edi
call fcn.0040c445
mov dword [ebp - 0x124], eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
jmp 0x41e442
mov ebx, str._reg:
push ebx
xor ecx, ecx
call fcn.00414c6c
cmp eax, 0xffffffff
je 0x41e447
push ebx
xor ecx, ecx
call fcn.00414c6c
lea ebx, [eax + 5]
push 0x541ccc
mov ecx, ebx
mov dword [ebp - 0x138], eax
call fcn.00414c6c
mov dword [ebp - 0x130], eax
test eax, eax
jge 0x41dfd7
push ecx
mov ecx, esp
mov dword [ebp - 0x130], esp
push str.CCoreSystem::ReplaceSystemVars
call fcn.00401769
mov dword [ebp - 4], 0x1c
push 0x116
push ecx
mov ecx, esp
mov dword [ebp - 0x12c], esp
push str..CoreSystem.cpp
call fcn.00401769
mov byte [ebp - 4], 0x1d
push ecx
mov ecx, esp
mov dword [ebp - 0x120], esp
push str.Ending___not_found_
call fcn.00401769
mov byte [ebp - 4], 0x1e
push 1
or dword [ebp - 4], 0xffffffff
call fcn.004114a5
jmp 0x41e447
sub eax, ebx
push eax
push ebx
lea eax, [ebp - 0x128]
push eax
mov ecx, edi
call fcn.00408067
mov dword [ebp - 4], 0x1f
lea eax, [ebp - 0x120]
push eax
lea esi, [ebp - 0x128]
call fcn.0041ec3c
mov byte [ebp - 4], 0x20
mov eax, dword [ebp - 0x120]
mov eax, dword [eax - 0xc]
inc eax
push eax
lea eax, [ebp - 0x12c]
push eax
mov ecx, esi
call fcn.00412058
mov byte [ebp - 4], 0x21
push eax
mov ecx, esi
call fcn.004044be
mov byte [ebp - 4], 0x20
lea ecx, [ebp - 0x12c]
call fcn.00401898
push 0x5c
mov ecx, esi
call fcn.00414c9a
mov esi, eax
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x134]
push eax
lea ecx, [ebp - 0x128]
call fcn.00412058
mov byte [ebp - 4], 0x22
push 0x541d18
lea ecx, [ebp - 0x134]
call fcn.004040fb
test eax, eax
jne 0x41e083
push 0x53b9e7
lea ecx, [ebp - 0x134]
call fcn.00401732
push esi
lea eax, [ebp - 0x12c]
push eax
lea ecx, [ebp - 0x128]
call fcn.00414372
mov byte [ebp - 4], 0x23
push eax
lea ecx, [ebp - 0x128]
call fcn.004044be
mov byte [ebp - 4], 0x22
lea ecx, [ebp - 0x12c]
call fcn.00401898
lea ecx, [ebp - 0x11c]
call fcn.00404402
mov byte [ebp - 4], 0x24
xor esi, esi
inc esi
push esi
lea eax, [ebp - 0x11c]
push eax
push ecx
lea eax, [ebp - 0x134]
mov ecx, esp
mov dword [ebp - 0x12c], esp
push eax
call fcn.0040184e
mov byte [ebp - 4], 0x25
push ecx
lea eax, [ebp - 0x128]
mov ecx, esp
mov dword [ebp - 0x13c], esp
push eax
call fcn.0040184e
mov byte [ebp - 4], 0x26
push ecx
lea eax, [ebp - 0x120]
mov ecx, esp
mov dword [ebp - 0x140], esp
push eax
call fcn.0040184e
mov byte [ebp - 4], 0x27
mov byte [ebp - 4], 0x24
call fcn.0042164f
add esp, 0x14
test eax, eax
je 0x41e16c
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], 0
je 0x41e16c
mov eax, dword [ebp - 0x130]
sub eax, dword [ebp - 0x138]
push dword [ebp - 0x138]
inc eax
push edi
call fcn.00415347
push dword [ebp - 0x11c]
mov eax, dword [ebp - 0x138]
push edi
call fcn.004153bd
mov dword [ebp - 0x124], esi
jmp 0x41e222
push ecx
mov ecx, esp
mov dword [ebp - 0x140], esp
push str.CCoreSystem::ReplaceSystemVars
call fcn.00401769
mov byte [ebp - 4], 0x28
push 0x130
push ecx
mov ecx, esp
mov dword [ebp - 0x13c], esp
push str..CoreSystem.cpp
call fcn.00401769
mov byte [ebp - 4], 0x29
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x12c]
push str.Failed_to_read_value_from
push eax
call fcn.00404205
add esp, 0xc
mov byte [ebp - 4], 0x2a
push 0x541d24
push eax
lea eax, [ebp - 0x130]
push eax
call fcn.004041a1
mov byte [ebp - 4], 0x2b
add esp, 8
mov ecx, esp
mov dword [ebp - 0x138], esp
lea edx, [ebp - 0x134]
push edx
push eax
push ecx
call fcn.0040414a
add esp, 0xc
mov byte [ebp - 4], 0x2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov byte [ebp - 4], 0x2e
call fcn.004114a5
mov byte [ebp - 4], 0x2d
lea ecx, [ebp - 0x130]
call fcn.00401898
mov byte [ebp - 4], 0x24
lea ecx, [ebp - 0x12c]
call fcn.00401898
mov byte [ebp - 4], 0x22
lea ecx, [ebp - 0x11c]
call fcn.00401898
mov byte [ebp - 4], 0x20
lea ecx, [ebp - 0x134]
call fcn.00401898
mov byte [ebp - 4], 0x1f
lea ecx, [ebp - 0x120]
call fcn.00401898
jmp 0x41df2e
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea ecx, [ebp - 0x120]
call fcn.00401769
mov dword [ebp - 4], 0x15
lea ecx, [ebp - 0x11c]
call fcn.00404402
mov byte [ebp - 4], 0x16
xor esi, esi
push esi
push 0x10
lea eax, [ebp - 0x118]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x41e2b0
lea eax, [ebp - 0x118]
push eax
push ebx
push edi
call fcn.0040c445
test eax, eax
jne 0x41e330
lea eax, [ebp - 0x118]
push eax
jmp 0x41e31b
push 1
lea eax, [ebp - 0x11c]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x140], esp
push 0x541cac
call fcn.00401769
mov byte [ebp - 4], 0x17
push ecx
lea eax, [ebp - 0x120]
mov ecx, esp
mov dword [ebp - 0x13c], esp
push eax
call fcn.0040184e
mov byte [ebp - 4], 0x18
push SysReAllocStringLen
mov byte [ebp - 4], 0x16
call fcn.004216e8
add esp, 0x14
cmp eax, esi
je 0x41e33a
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], esi
je 0x41e33a
push eax
push ebx
push edi
call fcn.0040c445
test eax, eax
jne 0x41e330
push dword [ebp - 0x11c]
push str._desktop_
push edi
call fcn.0040c445
mov dword [ebp - 0x124], esi
test eax, eax
je 0x41e33a
mov dword [ebp - 0x124], 1
mov byte [ebp - 4], 0x15
jmp 0x41e42d
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea ecx, [ebp - 0x120]
call fcn.00401769
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x11c]
call fcn.00404402
mov byte [ebp - 4], 6
xor esi, esi
push esi
push 0x1c
lea eax, [ebp - 0x118]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x41e39f
lea eax, [ebp - 0x118]
push eax
push ebx
push edi
call fcn.0040c445
test eax, eax
jne 0x41e41f
lea eax, [ebp - 0x118]
push eax
jmp 0x41e40a
push 1
lea eax, [ebp - 0x11c]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x140], esp
push str.Local_AppData
call fcn.00401769
mov byte [ebp - 4], 7
push ecx
lea eax, [ebp - 0x120]
mov ecx, esp
mov dword [ebp - 0x13c], esp
push eax
call fcn.0040184e
mov byte [ebp - 4], 8
push SysReAllocStringLen
mov byte [ebp - 4], 6
call fcn.004216e8
add esp, 0x14
cmp eax, esi
je 0x41e429
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], esi
je 0x41e429
push eax
push ebx
push edi
call fcn.0040c445
test eax, eax
jne 0x41e41f
push dword [ebp - 0x11c]
push str._localappdata_
push edi
call fcn.0040c445
mov dword [ebp - 0x124], esi
test eax, eax
je 0x41e429
mov dword [ebp - 0x124], 1
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x11c]
call fcn.00401898
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x120]
call fcn.00401898
cmp dword [ebp + 8], 0
je 0x41e452
call fcn.0040e1fe
mov eax, dword [ebp - 0x124]
call fcn.004f8280
ret