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

Disassembly:
push 0x138
mov eax, 0x52be87
call fcn.004fa53d
cmp dword [ebp + 8], 0
je 0x41db55
call fcn.0041fa30
and dword [ebp - 0x124], 0
mov ebx, str._windows_
push ebx
xor ecx, ecx
mov esi, edi
call fcn.00414d7b
cmp eax, 0xffffffff
je 0x41db84
push 0x104
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x41dba8
mov ebx, str._system_
push ebx
xor ecx, ecx
call fcn.00414d7b
cmp eax, 0xffffffff
je 0x41dbc9
push 0x104
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jbe 0x41e56d
lea eax, [ebp - 0x118]
push eax
push ebx
push edi
call fcn.0040c4c4
mov dword [ebp - 0x124], eax
jmp 0x41e56d
mov ebx, str._temp_
push ebx
xor ecx, ecx
call fcn.00414d7b
cmp eax, 0xffffffff
je 0x41dbfe
lea esi, [ebp - 0x120]
call fcn.00412172
and dword [ebp - 4], 0
push dword [eax]
push ebx
push edi
call fcn.0040c4c4
mov dword [ebp - 0x124], eax
jmp 0x41e55e
mov ebx, str._programfiles_
push ebx
xor ecx, ecx
call fcn.00414d7b
cmp eax, 0xffffffff
je 0x41dcc8
push 0x544ba8
lea ecx, [ebp - 0x120]
call fcn.00401769
xor esi, esi
inc esi
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x11c]
call fcn.00404433
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 0x41dc58
lea eax, [ebp - 0x118]
jmp 0x41dcb1
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.004217be
add esp, 0x14
test eax, eax
je 0x41dcbf
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], 0
je 0x41dcbf
push eax
push ebx
push edi
call fcn.0040c4c4
mov dword [ebp - 0x124], eax
mov byte [ebp - 4], 1
jmp 0x41e553
mov ebx, str._local_appdata_
push ebx
xor ecx, ecx
call fcn.00414d7b
cmp eax, 0xffffffff
jne 0x41e469
push str._localappdata_
xor ecx, ecx
call fcn.00414d7b
cmp eax, 0xffffffff
jne 0x41e469
mov ebx, str._appdata_
push ebx
xor ecx, ecx
call fcn.00414d7b
cmp eax, 0xffffffff
je 0x41ddbe
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea ecx, [ebp - 0x120]
call fcn.00401769
mov dword [ebp - 4], 9
lea ecx, [ebp - 0x11c]
call fcn.00404433
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 0x41dd4e
lea eax, [ebp - 0x118]
jmp 0x41dda7
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.004217be
add esp, 0x14
cmp eax, esi
je 0x41ddb5
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], esi
je 0x41ddb5
push eax
push ebx
push edi
call fcn.0040c4c4
mov dword [ebp - 0x124], eax
mov byte [ebp - 4], 9
jmp 0x41e553
push str._programdata_
xor ecx, ecx
call fcn.00414d7b
cmp eax, 0xffffffff
je 0x41de8c
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea ecx, [ebp - 0x120]
call fcn.00401769
mov dword [ebp - 4], 0xd
lea ecx, [ebp - 0x11c]
call fcn.00404433
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 0x41de18
lea eax, [ebp - 0x118]
jmp 0x41de71
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.004217be
add esp, 0x14
cmp eax, esi
je 0x41de83
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], esi
je 0x41de83
push eax
push str._programdata_
push edi
call fcn.0040c4c4
mov dword [ebp - 0x124], eax
mov byte [ebp - 4], 0xd
jmp 0x41e553
push str._mydocuments_
xor ecx, ecx
call fcn.00414d7b
cmp eax, 0xffffffff
je 0x41df5c
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea ecx, [ebp - 0x120]
call fcn.00401769
mov dword [ebp - 4], 0x11
lea ecx, [ebp - 0x11c]
call fcn.00404433
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 0x41deec
lea eax, [ebp - 0x118]
push eax
push str._mydocuments_
jmp 0x41df47
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.004217be
add esp, 0x14
cmp eax, esi
je 0x41df53
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], esi
je 0x41df53
push eax
push ebx
push edi
call fcn.0040c4c4
mov dword [ebp - 0x124], eax
mov byte [ebp - 4], 0x11
jmp 0x41e553
push str._desktop_
xor ecx, ecx
call fcn.00414d7b
mov ebx, str._desktopdir_
cmp eax, 0xffffffff
jne 0x41e37a
push ebx
xor ecx, ecx
call fcn.00414d7b
cmp eax, 0xffffffff
jne 0x41e37a
mov ebx, str._userprofile_
push ebx
xor ecx, ecx
call fcn.00414d7b
cmp eax, 0xffffffff
je 0x41e063
mov esi, 0x53e9ff
push esi
lea ecx, [ebp - 0x128]
call fcn.00401769
mov dword [ebp - 4], 0x19
cmp dword [ebp + 8], 0
je 0x41e005
call fcn.0041d8d5
cmp eax, 6
jl 0x41e005
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.0041efb5
pop ecx
mov byte [ebp - 4], 0x1b
push eax
lea ecx, [ebp - 0x128]
call fcn.004044ef
mov byte [ebp - 4], 0x19
mov ecx, esi
call fcn.00401898
jmp 0x41e031
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 0x41e025
push esi
jmp 0x41e02c
lea eax, [ebp - 0x118]
push eax
call fcn.00401732
mov eax, dword [ebp - 0x128]
cmp dword [eax - 0xc], 0
jne 0x41e046
and dword [ebp - 0x124], 0
jmp 0x41e054
push eax
push ebx
push edi
call fcn.0040c4c4
mov dword [ebp - 0x124], eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
jmp 0x41e568
mov ebx, str._reg:
push ebx
xor ecx, ecx
call fcn.00414d7b
cmp eax, 0xffffffff
je 0x41e56d
push ebx
xor ecx, ecx
call fcn.00414d7b
lea ebx, [eax + 5]
push 0x544cdc
mov ecx, ebx
mov dword [ebp - 0x138], eax
call fcn.00414d7b
mov dword [ebp - 0x130], eax
test eax, eax
jge 0x41e0fd
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.00411585
jmp 0x41e56d
sub eax, ebx
push eax
push ebx
lea eax, [ebp - 0x128]
push eax
mov ecx, edi
call fcn.00408063
mov dword [ebp - 4], 0x1f
lea eax, [ebp - 0x120]
push eax
lea esi, [ebp - 0x128]
call fcn.0041ed62
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.00412138
mov byte [ebp - 4], 0x21
push eax
mov ecx, esi
call fcn.004044ef
mov byte [ebp - 4], 0x20
lea ecx, [ebp - 0x12c]
call fcn.00401898
push 0x5c
mov ecx, esi
call fcn.00414da9
mov esi, eax
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x134]
push eax
lea ecx, [ebp - 0x128]
call fcn.00412138
mov byte [ebp - 4], 0x22
push 0x544d28
lea ecx, [ebp - 0x134]
call fcn.0040412c
test eax, eax
jne 0x41e1a9
push 0x53e9ff
lea ecx, [ebp - 0x134]
call fcn.00401732
push esi
lea eax, [ebp - 0x12c]
push eax
lea ecx, [ebp - 0x128]
call fcn.00414481
mov byte [ebp - 4], 0x23
push eax
lea ecx, [ebp - 0x128]
call fcn.004044ef
mov byte [ebp - 4], 0x22
lea ecx, [ebp - 0x12c]
call fcn.00401898
lea ecx, [ebp - 0x11c]
call fcn.00404433
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.00421725
add esp, 0x14
test eax, eax
je 0x41e292
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], 0
je 0x41e292
mov eax, dword [ebp - 0x130]
sub eax, dword [ebp - 0x138]
push dword [ebp - 0x138]
inc eax
push edi
call fcn.00415456
push dword [ebp - 0x11c]
mov eax, dword [ebp - 0x138]
push edi
call fcn.004154cc
mov dword [ebp - 0x124], esi
jmp 0x41e348
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.00404236
add esp, 0xc
mov byte [ebp - 4], 0x2a
push 0x544d34
push eax
lea eax, [ebp - 0x130]
push eax
call fcn.004041d2
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.0040417b
add esp, 0xc
mov byte [ebp - 4], 0x2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov byte [ebp - 4], 0x2e
call fcn.00411585
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 0x41e054
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea ecx, [ebp - 0x120]
call fcn.00401769
mov dword [ebp - 4], 0x15
lea ecx, [ebp - 0x11c]
call fcn.00404433
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 0x41e3d6
lea eax, [ebp - 0x118]
push eax
push ebx
push edi
call fcn.0040c4c4
test eax, eax
jne 0x41e456
lea eax, [ebp - 0x118]
push eax
jmp 0x41e441
push 1
lea eax, [ebp - 0x11c]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x140], esp
push 0x544cbc
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.004217be
add esp, 0x14
cmp eax, esi
je 0x41e460
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], esi
je 0x41e460
push eax
push ebx
push edi
call fcn.0040c4c4
test eax, eax
jne 0x41e456
push dword [ebp - 0x11c]
push str._desktop_
push edi
call fcn.0040c4c4
mov dword [ebp - 0x124], esi
test eax, eax
je 0x41e460
mov dword [ebp - 0x124], 1
mov byte [ebp - 4], 0x15
jmp 0x41e553
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea ecx, [ebp - 0x120]
call fcn.00401769
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x11c]
call fcn.00404433
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 0x41e4c5
lea eax, [ebp - 0x118]
push eax
push ebx
push edi
call fcn.0040c4c4
test eax, eax
jne 0x41e545
lea eax, [ebp - 0x118]
push eax
jmp 0x41e530
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.004217be
add esp, 0x14
cmp eax, esi
je 0x41e54f
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], esi
je 0x41e54f
push eax
push ebx
push edi
call fcn.0040c4c4
test eax, eax
jne 0x41e545
push dword [ebp - 0x11c]
push str._localappdata_
push edi
call fcn.0040c4c4
mov dword [ebp - 0x124], esi
test eax, eax
je 0x41e54f
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 0x41e578
call fcn.0040e2de
mov eax, dword [ebp - 0x124]
call fcn.004fa5c0
ret