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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x210]
sub rsp, 0x310
mov rax, qword [0x1403ceac0]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov rbx, r9
mov r12, r8
mov r13, rdx
mov qword [rsp + 0x38], rdx
xor r14d, r14d
mov dword [rsp + 0x30], r14d
mov r11, qword [r8 + 0x10]
mov r10, r8
mov rdi, qword [r8 + 0x18]
cmp rdi, 8
jb 0x14022a72a
mov r10, qword [r8]
lea r15, str.CSIDL_PROGRAM_FILESX64
mov edx, 0x43
cmp r11, 0x16
jne 0x14022a777
mov r8, r11
mov rax, r15
movzx ecx, word [r10]
mov r9d, edx
cmp cx, dx
jb 0x14022a777
sub r10, r15
cmp cx, r9w
ja 0x14022a777
cmp r8, 1
je 0x14022a83c
dec r8
add rax, 2
movzx ecx, word [rax + r10]
movzx r9d, word [rax]
cmp cx, r9w
jae 0x14022a755
mov r9, r12
cmp rdi, 8
jb 0x14022a784
mov r9, qword [r12]
lea rdi, str.CSIDL_PROGRAM_FILES_COMMONX64
cmp r11, 0x1d
jne 0x14022a7c6
mov r8, r11
mov rax, rdi
movzx ecx, word [r9]
cmp cx, dx
jb 0x14022a7c6
sub r9, rdi
cmp cx, dx
ja 0x14022a7c6
cmp r8, 1
je 0x14022aa8a
dec r8
add rax, 2
movzx ecx, word [rax + r9]
movzx edx, word [rax]
cmp cx, dx
jae 0x14022a7a6
mov rdx, qword [str.TEMP_DIR]
mov rcx, r12
call fcn.14003d440
test al, al
je 0x14022ad92
mov dword [rsp + 0x38], r14d
lea rax, [0x1403cfa88]
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x38]
lea rcx, [rbp - 0x68]
call fcn.14022b1e0
nop
mov r8d, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
mov rax, qword [reloc.OLEAUT32.dll_VariantInit]
cmp qword [rcx + 8], rax
jne 0x14022acdc
test r8d, r8d
jne 0x14022acdc
lea rdx, [rbp - 0x68]
mov rcx, r13
call fcn.14002db20
nop
lea rcx, [rbp - 0x68]
call fcn.14002ced0
jmp 0x14022aea9
mov qword [rbp - 0x78], r14
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], r14w
test rbx, rbx
je 0x14022a888
mov rdx, qword [str.plat]
lea rcx, [rbp - 0x68]
call fcn.14002b3a0
nop
mov r14d, 1
mov dword [rsp + 0x30], r14d
lea r8, [rsp + 0x78]
lea rdx, [rbp - 0x68]
mov rcx, rbx
call fcn.140213c20
test al, al
je 0x14022a888
xor bl, bl
jmp 0x14022a88a
mov bl, 1
test r14b, 1
je 0x14022a8d0
mov rdx, qword [rbp - 0x50]
cmp rdx, 8
jb 0x14022a8d0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14022a8cb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14022af19
call fcn.140296f94
test bl, bl
je 0x14022a95b
lea rax, str.Unable_to_get_the_platform
mov qword [rsp + 0x20], rax
mov r9d, reloc.WS2_32.dll_getservbyport
lea r8, str.XMLUpdater::v2::CDirSubstitution::Substitute
lea rdx, str.E:BT0a209782_47a3_49ff_a189_59d4c06152f0WebAdvisor_XmlUpdater_srcXmlUpdaterDirSubstitution.cpp
lea ecx, [r9 - 0x37]
call fcn.140213350
mov rdx, qword [str._UNKNOWN]
mov rcx, r13
call fcn.14002b3a0
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x14022aea9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14022a951
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14022af0d
call fcn.140296f94
jmp 0x14022aea9
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x40]
call fcn.1402b60e0
lea r9, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae r9, qword [rsp + 0x78]
cmp qword [rbp - 0x78], 2
jne 0x14022a9c2
mov ecx, 2
lea rax, [0x14032669c]
movzx r8d, word [r9]
mov edx, reloc.WS2_32.dll_getprotobynumber
cmp r8w, dx
jb 0x14022a9c2
sub r9, rax
cmp r8w, dx
ja 0x14022a9c2
cmp rcx, 1
je 0x14022a9fa
dec rcx
add rax, 2
movzx r8d, word [rax + r9]
movzx edx, word [rax]
cmp r8w, dx
jae 0x14022a9a5
xor al, al
lea rdx, str.ProgramW6432
lea rcx, str.ProgramFiles
test al, al
cmovne rcx, rdx
mov r8d, 0x104
lea rdx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0x103
ja 0x14022a9fe
lea rdx, [rbp - 0x40]
jmp 0x14022a908
mov al, 1
jmp 0x14022a9c4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x28], eax
lea rax, str.GetEnvironmentVariable_failed___d_
mov qword [rsp + 0x20], rax
mov r9d, 0x41
lea r8, str.XMLUpdater::v2::CDirSubstitution::Substitute
lea rdx, str.E:BT0a209782_47a3_49ff_a189_59d4c06152f0WebAdvisor_XmlUpdater_srcXmlUpdaterDirSubstitution.cpp
lea ecx, [r9 - 0x40]
call fcn.140213350
mov rdx, qword [str._UNKNOWN]
mov rcx, r13
call fcn.14002b3a0
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x14022aea9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14022a951
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14022af0d
jmp 0x14022a951
mov qword [rbp - 0x78], r14
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], r14w
test rbx, rbx
je 0x14022aad6
mov rdx, qword [str.plat]
lea rcx, [rbp - 0x68]
call fcn.14002b3a0
nop
mov r14d, 4
mov dword [rsp + 0x30], r14d
lea r8, [rsp + 0x78]
lea rdx, [rbp - 0x68]
mov rcx, rbx
call fcn.140213c20
test al, al
je 0x14022aad6
xor bl, bl
jmp 0x14022aad8
mov bl, 1
test r14b, 4
je 0x14022ab1e
mov rdx, qword [rbp - 0x50]
cmp rdx, 8
jb 0x14022ab1e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14022ab19
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14022af1f
call fcn.140296f94
test bl, bl
je 0x14022abad
lea rax, str.Unable_to_get_the_platform
mov qword [rsp + 0x20], rax
mov r9d, 0x4e
lea r8, str.XMLUpdater::v2::CDirSubstitution::Substitute
lea rdx, str.E:BT0a209782_47a3_49ff_a189_59d4c06152f0WebAdvisor_XmlUpdater_srcXmlUpdaterDirSubstitution.cpp
lea ecx, [r9 - 0x4d]
call fcn.140213350
mov rdx, qword [str._UNKNOWN]
mov rcx, r13
call fcn.14002b3a0
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x14022aea9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14022a951
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14022af13
call fcn.140296f94
jmp 0x14022aea9
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x40]
call fcn.1402b60e0
lea r9, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae r9, qword [rsp + 0x78]
cmp qword [rbp - 0x78], 2
jne 0x14022ac14
mov ecx, 2
lea rax, [0x14032669c]
movzx r8d, word [r9]
mov edx, reloc.WS2_32.dll_getprotobynumber
cmp r8w, dx
jb 0x14022ac14
sub r9, rax
cmp r8w, dx
ja 0x14022ac14
cmp rcx, 1
je 0x14022ac4c
dec rcx
add rax, 2
movzx r8d, word [r9 + rax]
movzx edx, word [rax]
cmp r8w, dx
jae 0x14022abf7
xor al, al
lea rdx, str.CommonProgramW6432
lea rcx, str.CommonProgramFiles
test al, al
cmovne rcx, rdx
mov r8d, 0x104
lea rdx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0x103
ja 0x14022ac50
lea rdx, [rbp - 0x40]
jmp 0x14022ab56
mov al, 1
jmp 0x14022ac16
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x28], eax
lea rax, str.GetEnvironmentVariable_failed___d_
mov qword [rsp + 0x20], rax
mov r9d, 0x57
lea r8, str.XMLUpdater::v2::CDirSubstitution::Substitute
lea rdx, str.E:BT0a209782_47a3_49ff_a189_59d4c06152f0WebAdvisor_XmlUpdater_srcXmlUpdaterDirSubstitution.cpp
lea ecx, [r9 - 0x56]
call fcn.140213350
mov rdx, qword [str._UNKNOWN]
mov rcx, r13
call fcn.14002b3a0
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x14022aea9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14022a951
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14022af13
jmp 0x14022a951
mov rax, qword [rcx]
lea rdx, [rsp + 0x78]
call qword [rax + reloc.WS2_32.dll_recv]
nop
lea rax, [rsp + 0x78]
cmp qword [rbp - 0x70], 0x10
cmovae rax, qword [rsp + 0x78]
mov qword [rsp + 0x28], rax
lea rax, str.Unable_to_get_temp_directory_path._Error:__hs
mov qword [rsp + 0x20], rax
mov r9d, 0x63
lea r8, str.XMLUpdater::v2::CDirSubstitution::Substitute
lea rdx, str.E:BT0a209782_47a3_49ff_a189_59d4c06152f0WebAdvisor_XmlUpdater_srcXmlUpdaterDirSubstitution.cpp
lea ecx, [r9 - 0x62]
call fcn.140213350
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x14022ad63
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14022ad5e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14022af25
call fcn.140296f94
mov qword [rbp - 0x78], r14
mov qword [rbp - 0x70], setsockopt
mov byte [rsp + 0x78], 0
mov rdx, qword [str._UNKNOWN]
mov rcx, r13
call fcn.14002b3a0
nop
lea rcx, [rbp - 0x68]
call fcn.14002ced0
jmp 0x14022aea9
mov ecx, dword [0x1403e17e8]
mov rax, qword gs:[0x58]
mov edx, 4
mov rcx, qword [rax + rcx*8]
lea rsi, [0x1403e1240]
mov eax, dword [rdx + rcx]
cmp dword [0x1403e1250], eax
jg 0x14022af2b
mov r8, r12
lea rdx, [rbp - 0x68]
mov rcx, rsi
call fcn.14004bb70
mov rbx, qword [rbp - 0x58]
cmp byte [rbx + 0x19], 0
jne 0x14022ae5f
lea r8, [rbx + 0x20]
mov rdx, r12
mov rcx, rsi
call fcn.14004bd80
test al, al
jne 0x14022ae5f
cmp rbx, qword [0x1403e1240]
je 0x14022ae5f
mov qword [rsp + 0x70], r14
lea rcx, [rbx + 0x40]
lea r9, [rsp + 0x70]
xor r8d, r8d
xor edx, edx
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
je 0x14022ae30
cmp qword [r12 + 0x18], 8
jb 0x14022ae21
mov r12, qword [r12]
lea rax, str.Error_retrieving_directory__s
mov r9d, 0x81
jmp 0x14022ae78
mov rdx, qword [rsp + 0x70]
lea rcx, [rsp + 0x78]
call fcn.14002b3a0
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
movups xmm0, xmmword [rsp + 0x78]
movups xmmword [r13], xmm0
movups xmm1, xmmword [rbp - 0x78]
movups xmmword [r13 + 0x10], xmm1
jmp 0x14022aea9
cmp qword [r12 + 0x18], 8
jb 0x14022ae6b
mov r12, qword [r12]
lea rax, str.Unknown_folder_identifier:__s
mov r9d, 0x7a
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rax
lea r8, str.XMLUpdater::v2::CDirSubstitution::Substitute
lea rdx, str.E:BT0a209782_47a3_49ff_a189_59d4c06152f0WebAdvisor_XmlUpdater_srcXmlUpdaterDirSubstitution.cpp
mov ecx, 1
call fcn.140213350
mov rdx, qword [str._UNKNOWN]
mov rcx, r13
call fcn.14002b3a0
mov rax, r13
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.140296f70
mov rbx, qword [rsp + 0x350]
add rsp, 0x310
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r9, [0x14022a6c0]
mov edx, 0x30
lea r8d, [rdx - 0x24]
lea rcx, [rbp - 0x40]
call fcn.140297864
lea rcx, [0x140308bc0]
call fcn.1402974d4
nop
lea rcx, [0x1403e1250]
call fcn.14029712c
jmp 0x14022adc0
call fcn.1402ba3ec
int3
call fcn.1402ba3ec
nop
call fcn.1402ba3ec
nop
call fcn.1402ba3ec
nop
call fcn.1402ba3ec
nop
lea rcx, [0x1403e1250]
call fcn.14029718c
cmp dword [0x1403e1250], 0xffffffff
jne 0x14022adc0
lea rdx, str.CSIDL_COMMON_APPDATA
lea rcx, [rbp - 0x40]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030b970]
movaps xmmword [rbp - 0x20], xmm0
lea rdx, str.CSIDL_COMMON_DOCUMENTS
lea rcx, [rbp - 0x10]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030b980]
movaps xmmword [rbp + 0x10], xmm0
lea rdx, str.CSIDL_COMMON_STARTUP
lea rcx, [rbp + 0x20]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030b960]
movaps xmmword [rbp + 0x40], xmm0
lea rdx, str.CSIDL_PROGRAM_FILES
lea rcx, [rbp + 0x50]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030ba40]
movaps xmmword [rbp + 0x70], xmm0
lea rdx, str.CSIDL_PROGRAM_FILESX86
lea rcx, [rbp + 0x80]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030ba00]
movaps xmmword [rbp + 0xa0], xmm0
mov rdx, r15
lea rcx, [rbp + 0xb0]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030ba20]
movaps xmmword [rbp + 0xd0], xmm0
lea rdx, str.CSIDL_PROGRAM_FILES_COMMON
lea rcx, [rbp + 0xe0]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030ba50]
movaps xmmword [rbp + 0x100], xmm0
lea rdx, str.CSIDL_PROGRAM_FILES_COMMONX86
lea rcx, [rbp + 0x110]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030ba10]
movaps xmmword [rbp + 0x130], xmm0
mov rdx, rdi
lea rcx, [rbp + 0x140]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030ba30]
movaps xmmword [rbp + 0x160], xmm0
lea rdx, str.CSIDL_SYSTEM
lea rcx, [rbp + 0x170]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030b9c0]
movaps xmmword [rbp + 0x190], xmm0
lea rdx, str.CSIDL_SYSTEMX86
lea rcx, [rbp + 0x1a0]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030b9d0]
movaps xmmword [rbp + 0x1c0], xmm0
lea rdx, str.CSIDL_WINDOWS
lea rcx, [rbp + 0x1d0]
call fcn.14002b3a0
movups xmm0, xmmword [0x14030b9e0]
movaps xmmword [rbp + 0x1f0], xmm0
mov qword [0x1403e1240], r14
mov qword [0x1403e1248], r14
mov ecx, 0x50
call fcn.140296fc8
mov qword [rsp + 0x38], rax
mov qword [rax], rax
mov qword [rax + 8], rax
mov qword [rax + 0x10], rax
mov word [rax + 0x18], 0x101
mov qword [0x1403e1240], rax
lea r15, [rbp - 0x40]
movabs rbx, 0x333333333333333
nop dword [rax]
nop word [rax + rax]
mov r9, r15
mov r8, rax
lea rdx, [rsp + 0x78]
mov rcx, rsi
call fcn.14022a3e0
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x60], xmm0
movsd xmm0, qword [rax + 0x10]
movsd qword [rbp - 0x58], xmm0
cmp byte [rbp - 0x58], 0
jne 0x14022b1b5
cmp qword [0x1403e1248], rbx
je 0x14022b1d3
mov rdi, qword [0x1403e1240]
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], r14
mov ecx, 0x50
call fcn.140296fc8
mov rsi, rax
mov qword [rsp + 0x50], rax
mov rdx, r15
lea rcx, [rax + 0x20]
call fcn.14002db20
movups xmm0, xmmword [r15 + 0x20]
movups xmmword [rsi + 0x40], xmm0
mov qword [rsi], rdi
mov qword [rsi + 8], rdi
mov qword [rsi + 0x10], rdi
mov word [rsi + 0x18], 0
mov qword [rsp + 0x50], r14
movups xmm0, xmmword [rsp + 0x60]
movaps xmmword [rsp + 0x60], xmm0
mov r8, rsi
lea rdx, [rsp + 0x60]
lea rsi, [0x1403e1240]
mov rcx, rsi
call fcn.14004b8d0
movabs rbx, 0x333333333333333
add r15, 0x30
lea rax, [rbp + 0x200]
cmp r15, rax
je 0x14022aed6
mov rax, qword [rsp + 0x38]
jmp 0x14022b100
call fcn.140049b20
int3