Function at 0x5104b0
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59a29d
mov eax, dword fs:[0]
push eax
sub esp, 0x26c
mov eax, dword [0x61094c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x260], edi
mov dword [ebp - 0x25c], 0
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x24c], eax
mov eax, esi
mov dword [ebp - 0x270], edi
mov dword [ebp - 0x260], esi
cmp edx, 8
jb 0x510517
mov eax, dword [esi]
cmp ecx, 0x16
jne 0x510754
push ecx
push str.CSIDL_PROGRAM_FILESX64
push eax
call fcn.0042f960
add esp, 0xc
test eax, eax
jne 0x51074e
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
mov esi, dword [ebp - 0x24c]
mov dword [ebp - 4], eax
test esi, esi
je 0x5105a0
push dword [0x60c620]
lea ecx, [ebp - 0x248]
call fcn.004246c0
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x248]
mov dword [ebp - 0x25c], 1
push eax
mov ecx, esi
call fcn.00501790
mov byte [ebp - 0x24d], 0
test al, al
jne 0x5105a7
mov byte [ebp - 0x24d], 1
test byte [ebp - 0x25c], 1
mov dword [ebp - 4], 0
je 0x5105c2
lea ecx, [ebp - 0x248]
call fcn.00424580
cmp byte [ebp - 0x24d], 0
je 0x510603
push str.Unable_to_get_the_platform
push 0x38
push str.XMLUpdater::v2::CDirSubstitution::Substitute
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterDirSubstitution.cpp
push 1
call fcn.00500de0
add esp, 0x14
push dword [0x60c61c]
mov ecx, edi
call fcn.004246c0
lea ecx, [ebp - 0x230]
call fcn.00424580
jmp 0x510b2b
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00556180
mov eax, dword [ebp - 0x230]
lea ecx, [ebp - 0x230]
add esp, 0xc
cmp dword [ebp - 0x21c], 8
cmovae ecx, eax
cmp dword [ebp - 0x220], 2
mov dword [ebp - 0x254], ecx
jne 0x510684
movzx ecx, word [ecx]
mov esi, 0x36
mov edx, 2
mov eax, 0x5a3e44
cmp ecx, esi
jb 0x51067e
sub dword [ebp - 0x254], eax
cmp cx, si
ja 0x51067e
cmp edx, 1
je 0x510720
mov ecx, dword [ebp - 0x254]
add eax, 2
dec edx
movzx ecx, word [ecx + eax]
movzx esi, word [eax]
cmp cx, si
jae 0x51065d
mov eax, dword [ebp - 0x230]
cmp dword [ebp - 0x21c], 8
lea ecx, [ebp - 0x230]
cmovae ecx, eax
cmp dword [ebp - 0x220], 5
mov dword [ebp - 0x254], ecx
jne 0x5106df
movzx ecx, word [ecx]
mov esi, 0x41
mov edx, 5
mov eax, str.ARM64
cmp ecx, esi
jb 0x5106df
sub dword [ebp - 0x254], eax
cmp cx, si
ja 0x5106df
cmp edx, 1
je 0x510720
mov ecx, dword [ebp - 0x254]
add eax, 2
dec edx
movzx ecx, word [ecx + eax]
movzx esi, word [eax]
cmp cx, si
jae 0x5106c2
mov eax, str.ProgramFiles
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x510727
cmp eax, 0x104
ja 0x510727
lea eax, [ebp - 0x218]
mov ecx, edi
push eax
call fcn.004246c0
lea ecx, [ebp - 0x230]
call fcn.00424580
jmp 0x510b2b
mov eax, str.ProgramW6432
jmp 0x5106e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetEnvironmentVariable_failed___d_
push 0x41
push str.XMLUpdater::v2::CDirSubstitution::Substitute
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterDirSubstitution.cpp
push 1
call fcn.00500de0
add esp, 0x18
jmp 0x5105e6
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x14]
mov eax, esi
cmp edx, 8
jb 0x51075d
mov eax, dword [esi]
cmp ecx, 0x1d
jne 0x51096c
push ecx
push str.CSIDL_PROGRAM_FILES_COMMONX64
push eax
call fcn.0042f960
add esp, 0xc
test eax, eax
jne 0x51096c
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
mov esi, dword [ebp - 0x24c]
mov dword [ebp - 4], 2
test esi, esi
je 0x5107ea
push dword [0x60c620]
lea ecx, [ebp - 0x248]
call fcn.004246c0
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x248]
mov dword [ebp - 0x25c], 4
push eax
mov ecx, esi
call fcn.00501790
mov byte [ebp - 0x24d], 0
test al, al
jne 0x5107f1
mov byte [ebp - 0x24d], 1
test byte [ebp - 0x25c], 4
mov dword [ebp - 4], 2
je 0x51080c
lea ecx, [ebp - 0x248]
call fcn.00424580
cmp byte [ebp - 0x24d], 0
je 0x510821
push str.Unable_to_get_the_platform
push 0x4e
jmp 0x5105d2
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00556180
mov eax, dword [ebp - 0x230]
lea ecx, [ebp - 0x230]
add esp, 0xc
cmp dword [ebp - 0x21c], 8
cmovae ecx, eax
cmp dword [ebp - 0x220], 2
mov dword [ebp - 0x254], ecx
jne 0x5108a2
movzx ecx, word [ecx]
mov esi, 0x36
mov edx, 2
mov eax, 0x5a3e44
cmp ecx, esi
jb 0x51089c
sub dword [ebp - 0x254], eax
cmp cx, si
ja 0x51089c
cmp edx, 1
je 0x51093e
mov ecx, dword [ebp - 0x254]
add eax, 2
dec edx
movzx ecx, word [eax + ecx]
movzx esi, word [eax]
cmp cx, si
jae 0x51087b
mov eax, dword [ebp - 0x230]
cmp dword [ebp - 0x21c], 8
lea ecx, [ebp - 0x230]
cmovae ecx, eax
cmp dword [ebp - 0x220], 5
mov dword [ebp - 0x254], ecx
jne 0x5108fd
movzx ecx, word [ecx]
mov esi, 0x41
mov edx, 5
mov eax, str.ARM64
cmp ecx, esi
jb 0x5108fd
sub dword [ebp - 0x254], eax
cmp cx, si
ja 0x5108fd
cmp edx, 1
je 0x51093e
mov ecx, dword [ebp - 0x254]
add eax, 2
dec edx
movzx ecx, word [eax + ecx]
movzx esi, word [eax]
cmp cx, si
jae 0x5108e0
mov eax, str.CommonProgramFiles
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x510945
cmp eax, 0x104
ja 0x510945
lea eax, [ebp - 0x218]
mov ecx, edi
push eax
call fcn.004246c0
lea ecx, [ebp - 0x230]
call fcn.00424580
jmp 0x510b2b
mov eax, str.CommonProgramW6432
jmp 0x510902
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetEnvironmentVariable_failed___d_
push 0x57
push str.XMLUpdater::v2::CDirSubstitution::Substitute
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterDirSubstitution.cpp
push 1
call fcn.00500de0
add esp, 0x18
jmp 0x5105e6
push dword [0x60c618]
push esi
call fcn.00437950
add esp, 8
test al, al
je 0x510a6a
lea eax, [ebp - 0x264]
mov dword [ebp - 0x264], 0
push eax
lea eax, [ebp - 0x248]
mov dword [ebp - 0x260], 0x60c5e8
push eax
call fcn.00510f40
add esp, 8
mov ecx, dword [ebp - 0x260]
mov edx, dword [ebp - 0x264]
mov dword [ebp - 4], 4
mov eax, dword [ecx + 4]
cmp eax, dword [0x60c5ec]
jne 0x5109ed
test edx, edx
jne 0x5109ed
lea eax, [ebp - 0x248]
mov ecx, edi
push eax
call fcn.00428970
lea ecx, [ebp - 0x248]
call fcn.00424580
jmp 0x510b2b
mov eax, dword [ecx]
push edx
mov esi, dword [eax + 8]
lea eax, [ebp - 0x230]
push eax
mov ecx, esi
call dword [0x5a0478]
mov ecx, dword [ebp - 0x260]
call esi
cmp dword [ebp - 0x21c], 0x10
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 5
cmovae eax, dword [ebp - 0x230]
push eax
push str.Unable_to_get_temp_directory_path._Error:__hs
push 0x63
push str.XMLUpdater::v2::CDirSubstitution::Substitute
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterDirSubstitution.cpp
push 1
call fcn.00500de0
add esp, 0x18
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x230]
call fcn.00424840
push dword [0x60c61c]
mov ecx, edi
call fcn.004246c0
lea ecx, [ebp - 0x248]
call fcn.00424580
jmp 0x510b2b
mov eax, dword fs:[0x2c]
mov ecx, dword [0x61f218]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x61e9a0]
cmp eax, dword [ecx + 8]
jg 0x510bd8
push esi
lea eax, [ebp - 0x23c]
mov ecx, 0x61e998
push eax
call fcn.0042fae0
mov ecx, dword [ebp - 0x234]
cmp byte [ecx + 0xd], 0
jne 0x510af8
mov eax, dword [ecx + 0x20]
add ecx, 0x10
mov dword [ebp - 0x258], eax
cmp dword [ecx + 0x14], 8
jb 0x510abc
mov ecx, dword [ecx]
cmp dword [esi + 0x14], 8
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x254], esi
jb 0x510ad3
mov eax, dword [esi]
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x258], edx
mov eax, edx
cmovb eax, dword [ebp - 0x258]
push eax
push ecx
push dword [ebp - 0x254]
call fcn.0042f960
add esp, 0xc
test eax, eax
je 0x510b4a
jns 0x510b55
mov eax, dword [esi + 0x14]
cmp eax, 8
jb 0x510b02
mov esi, dword [esi]
push esi
push str.Unknown_folder_identifier:__s
push 0x7a
push str.XMLUpdater::v2::CDirSubstitution::Substitute
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterDirSubstitution.cpp
push 1
call fcn.00500de0
add esp, 0x18
mov ecx, edi
push dword [0x60c61c]
call fcn.004246c0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00553cca
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x258]
cmp dword [esi + 0x10], eax
jb 0x510af8
mov eax, dword [ebp - 0x234]
cmp eax, dword [0x61e998]
je 0x510af8
lea ecx, [ebp - 0x24c]
mov dword [ebp - 0x24c], 0
push ecx
push 0
push 0
add eax, 0x28
push eax
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
je 0x510b9d
cmp dword [esi + 0x14], 8
jb 0x510b8d
mov esi, dword [esi]
push esi
push str.Error_retrieving_directory__s
push 0x81
jmp 0x510b0a
push dword [ebp - 0x24c]
lea ecx, [ebp - 0x230]
call fcn.004246c0
push dword [ebp - 0x24c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
lea eax, [ebp - 0x230]
mov ecx, edi
push eax
call fcn.0042d7b0
lea ecx, [ebp - 0x230]
call fcn.00424580
jmp 0x510b2b
push 0x61e9a0
call fcn.00553e0b
add esp, 4
cmp dword [0x61e9a0], 0xffffffff
jne 0x510a8a
push str.CSIDL_COMMON_APPDATA
lea ecx, [ebp - 0x1f0]
mov dword [ebp - 4], 6
call fcn.004246c0
movups xmm0, xmmword [0x5c2ad8]
movups xmmword [ebp - 0x1d8], xmm0
push str.CSIDL_COMMON_DOCUMENTS
lea ecx, [ebp - 0x1c8]
mov byte [ebp - 4], 7
call fcn.004246c0
movups xmm0, xmmword [0x5c2ac8]
movups xmmword [ebp - 0x1b0], xmm0
push str.CSIDL_COMMON_STARTUP
lea ecx, [ebp - 0x1a0]
mov byte [ebp - 4], 8
call fcn.004246c0
movups xmm0, xmmword [0x5c2ab8]
movups xmmword [ebp - 0x188], xmm0
push str.CSIDL_PROGRAM_FILES
lea ecx, [ebp - 0x178]
mov byte [ebp - 4], 9
call fcn.004246c0
movups xmm0, xmmword [0x5c2aa8]
movups xmmword [ebp - 0x160], xmm0
push str.CSIDL_PROGRAM_FILESX86
lea ecx, [ebp - 0x150]
mov byte [ebp - 4], 0xa
call fcn.004246c0
movups xmm0, xmmword [0x5c2a98]
movups xmmword [ebp - 0x138], xmm0
push str.CSIDL_PROGRAM_FILESX64
lea ecx, [ebp - 0x128]
mov byte [ebp - 4], 0xb
call fcn.004246c0
movups xmm0, xmmword [0x5c2a88]
movups xmmword [ebp - 0x110], xmm0
push str.CSIDL_PROGRAM_FILES_COMMON
lea ecx, [ebp - 0x100]
mov byte [ebp - 4], 0xc
call fcn.004246c0
movups xmm0, xmmword [0x5c2a78]
movups xmmword [ebp - 0xe8], xmm0
push str.CSIDL_PROGRAM_FILES_COMMONX86
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 0xd
call fcn.004246c0
movups xmm0, xmmword [0x5c2ca8]
movups xmmword [ebp - 0xc0], xmm0
push str.CSIDL_PROGRAM_FILES_COMMONX64
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 0xe
call fcn.004246c0
movups xmm0, xmmword [0x5c2ee8]
movups xmmword [ebp - 0x98], xmm0
push str.CSIDL_SYSTEM
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 0xf
call fcn.004246c0
movups xmm0, xmmword [0x5c2a68]
movups xmmword [ebp - 0x70], xmm0
push str.CSIDL_SYSTEMX86
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 0x10
call fcn.004246c0
movups xmm0, xmmword [0x5c2a58]
movups xmmword [ebp - 0x48], xmm0
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x38]
push str.CSIDL_WINDOWS
call fcn.004246c0
movups xmm0, xmmword [0x5c2a48]
movups xmmword [ebp - 0x20], xmm0
lea eax, [ebp - 0x1f0]
mov byte [ebp - 4], 0x12
push 0x38
mov dword [ebp - 0x254], eax
mov dword [0x61e998], 0
mov dword [0x61e99c], 0
call fcn.00553ee1
mov ecx, eax
add esp, 4
mov dword [ebp - 0x26c], ecx
mov dword [ecx], ecx
mov dword [ecx + 4], ecx
mov dword [ecx + 8], ecx
mov word [ecx + 0xc], 0x101
mov dword [0x61e998], ecx
lea eax, [ebp - 0x1f0]
mov byte [ebp - 4], 0x13
lea edx, [ebp - 0x10]
cmp eax, edx
je 0x510ef9
lea esi, [eax + 0x18]
mov dword [ebp - 0x258], esi
jmp 0x510de8
push eax
push ecx
lea eax, [ebp - 0x224]
mov ecx, 0x61e998
push eax
call fcn.00434b00
movq xmm0, qword [eax]
mov eax, dword [eax + 8]
movq qword [ebp - 0x23c], xmm0
mov dword [ebp - 0x234], eax
test al, al
jne 0x510ebe
cmp dword [0x61e99c], 0x4924924
je 0x510ee8
mov eax, dword [0x61e998]
mov dword [ebp - 0x268], eax
mov dword [ebp - 0x278], 0x61e998
push 0x38
mov byte [ebp - 4], 0x14
mov dword [ebp - 0x274], 0
call fcn.00553ee1
mov edi, eax
add esp, 4
mov dword [ebp - 0x274], edi
mov eax, dword [ebp - 0x254]
lea ecx, [edi + 0x10]
push eax
mov byte [ebp - 4], 0x15
call fcn.00428970
mov eax, dword [ebp - 0x258]
mov ecx, 0x61e998
push edi
push dword [ebp - 0x238]
mov byte [ebp - 4], 0x13
movups xmm0, xmmword [eax]
mov eax, dword [ebp - 0x268]
push dword [ebp - 0x23c]
movups xmmword [edi + 0x28], xmm0
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov word [edi + 0xc], 0
mov dword [ebp - 0x274], 0
call fcn.0042f750
mov esi, dword [ebp - 0x258]
jmp 0x510ebe
mov eax, dword [ebp - 0x254]
lea ecx, [ebp - 0x10]
add eax, 0x28
add esi, 0x28
mov dword [ebp - 0x254], eax
mov dword [ebp - 0x258], esi
cmp eax, ecx
je 0x510eed
mov ecx, dword [ebp - 0x26c]
jmp 0x510de8
call fcn.0042ff90
mov edi, dword [ebp - 0x270]
mov esi, dword [ebp - 0x260]
push fcn.00424580
push 0xc
push 0x28
lea eax, [ebp - 0x1f0]
mov byte [ebp - 4], 6
push eax
call fcn.0055443c
push 0x59f650
call fcn.0055414d
push 0x61e9a0
mov dword [ebp - 4], 0xffffffff
call fcn.00553dc1
add esp, 8
jmp 0x510a8a