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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x220]
sub rsp, 0x320
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rsp + 0x360], rbx
mov rax, qword [0x1403ddfb8]
xor rax, rsp
mov qword [rbp + 0x210], rax
mov r10, r9
mov qword [rsp + 0x40], r9
mov r14, r8
mov rdi, rdx
xor ebx, ebx
mov r13d, ebx
mov dword [rsp + 0x50], ebx
mov r11, qword [r8 + 0x18]
cmp r11, 8
jb 0x140213193
mov rcx, qword [r8]
jmp 0x140213196
mov rcx, r14
mov r9, qword [r8 + 0x10]
mov r8d, reloc.WS2_32.dll_shutdown
cmp r9, r8
cmovb r8, r9
or rsi, 0xffffffffffffffff
test r8, r8
je 0x1402131de
lea rdx, str.CSIDL_PROGRAM_FILESX64
movzx eax, word [rdx]
cmp word [rcx], ax
jne 0x1402131cf
add rcx, 2
add rdx, 2
sub r8, 1
jne 0x1402131b7
jmp 0x1402131de
mov r8d, 1
cmp word [rcx], ax
cmovb r8d, esi
jmp 0x1402131e1
mov r8d, ebx
test r8d, r8d
jne 0x14021346f
cmp r9, 0x16
jne 0x14021346f
mov qword [rbp - 0x80], 7
mov r14, rbx
mov qword [rsp + 0x78], rbx
mov word [rsp + 0x68], bx
test r10, r10
je 0x140213274
mov qword [rbp - 0x60], 7
mov qword [rbp - 0x68], rbx
mov word [rbp - 0x78], bx
mov rdx, qword [str.plat]
cmp word [rdx], r8w
jne 0x140213230
mov r8, rbx
jmp 0x14021323e
mov r8, rsi
inc r8
cmp word [rdx + r8*2], 0
jne 0x140213233
lea rcx, [rbp - 0x78]
call fcn.14002c3d0
nop
mov r13d, 1
mov dword [rsp + 0x50], r13d
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x78]
mov rcx, qword [rsp + 0x40]
call fcn.1401fd950
mov r14, qword [rsp + 0x78]
test al, al
je 0x140213274
xor r15b, r15b
jmp 0x140213277
mov r15b, 1
test r13b, 1
je 0x14021329c
mov r8, qword [rbp - 0x60]
cmp r8, 8
jb 0x14021329c
inc r8
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp - 0x78]
call fcn.14002e610
mov r14, qword [rsp + 0x78]
test r15b, r15b
je 0x14021332b
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.DirSubstitution.cpp
lea ecx, [r9 - 0x37]
call fcn.1401fc9c0
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], rbx
mov word [rdi], bx
mov rdx, qword [str._UNKNOWN]
cmp word [rdx], 0
je 0x1402132fa
mov rbx, rsi
nop dword [rax]
inc rbx
cmp word [rdx + rbx*2], 0
jne 0x1402132f0
mov r8, rbx
mov rcx, rdi
call fcn.14002c3d0
nop
mov r8, qword [rbp - 0x80]
cmp r8, 8
jb 0x140213c68
mov rdx, qword [rsp + 0x68]
lea rcx, [rsp + 0x68]
inc r8
call fcn.14002e610
jmp 0x140213c68
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x30]
call fcn.14028e7e0
lea rdx, [rsp + 0x68]
cmp qword [rbp - 0x80], 8
cmovae rdx, qword [rsp + 0x68]
mov ecx, 2
cmp r14, rcx
cmovb rcx, r14
test rcx, rcx
je 0x14021338c
lea r8, [0x14030324c]
movzx eax, word [r8]
cmp word [rdx], ax
jne 0x14021337d
add rdx, 2
add r8, 2
sub rcx, 1
jne 0x140213364
jmp 0x14021338c
mov r9d, 1
cmp word [rdx], ax
cmovb r9d, esi
jmp 0x14021338f
mov r9d, ebx
test r9d, r9d
jne 0x1402133aa
cmp r14, 2
jae 0x14021339f
mov r9d, esi
jmp 0x1402133aa
mov r9d, ebx
cmp r14, 2
seta r9b
lea rax, str.ProgramW6432
lea rcx, str.ProgramFiles
test r9d, r9d
cmove rcx, rax
mov r8d, 0x104
lea rdx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0x103
ja 0x140213408
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], rbx
mov word [rdi], bx
cmp word [rbp - 0x30], 0
je 0x1402133ff
lea rax, [rbp - 0x30]
mov rbx, rsi
inc rbx
cmp word [rax + rbx*2], 0
jne 0x1402133f5
lea rdx, [rbp - 0x30]
jmp 0x1402132fa
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.DirSubstitution.cpp
lea ecx, [r9 - 0x40]
call fcn.1401fc9c0
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], rbx
mov word [rdi], bx
mov rdx, qword [str._UNKNOWN]
cmp word [rdx], 0
je 0x1402132fa
mov rbx, rsi
nop
inc rbx
cmp word [rdx + rbx*2], 0
jne 0x140213460
jmp 0x1402132fa
cmp r11, 8
jb 0x14021347a
mov rcx, qword [r14]
jmp 0x14021347d
mov rcx, r14
mov r8d, 0x1d
cmp r9, r8
cmovb r8, r9
test r8, r8
je 0x1402134bd
lea rdx, str.CSIDL_PROGRAM_FILES_COMMONX64
movzx eax, word [rdx]
cmp word [rcx], ax
jne 0x1402134ae
add rcx, 2
add rdx, 2
sub r8, 1
jne 0x140213496
jmp 0x1402134bd
mov r8d, 1
cmp word [rcx], ax
cmovb r8d, esi
jmp 0x1402134c0
mov r8d, ebx
test r8d, r8d
jne 0x1402136fe
cmp r9, 0x1d
jne 0x1402136fe
mov r15d, 7
mov qword [rbp - 0x80], r15
mov r12, rbx
mov qword [rsp + 0x78], rbx
mov word [rsp + 0x68], bx
test r10, r10
je 0x140213555
mov qword [rbp - 0x60], r15
mov qword [rbp - 0x68], rbx
mov word [rbp - 0x78], bx
mov rdx, qword [str.plat]
cmp word [rdx], r8w
jne 0x14021350d
mov r8, rbx
jmp 0x14021351b
mov r8, rsi
inc r8
cmp word [rdx + r8*2], 0
jne 0x140213510
lea rcx, [rbp - 0x78]
call fcn.14002c3d0
nop
mov r13d, 4
mov dword [rsp + 0x50], r13d
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x78]
mov rcx, qword [rsp + 0x40]
call fcn.1401fd950
mov r15, qword [rbp - 0x80]
mov r12, qword [rsp + 0x78]
test al, al
mov byte [rsp + 0x30], 0
jne 0x14021355a
mov byte [rsp + 0x30], 1
test r13b, 4
je 0x140213583
mov r8, qword [rbp - 0x60]
cmp r8, 8
jb 0x140213583
inc r8
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp - 0x78]
call fcn.14002e610
mov r15, qword [rbp - 0x80]
mov r12, qword [rsp + 0x78]
cmp byte [rsp + 0x30], 0
je 0x1402135c8
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.DirSubstitution.cpp
lea ecx, [r9 - 0x4d]
call fcn.1401fc9c0
mov rdx, qword [str._UNKNOWN]
mov rcx, rdi
call fcn.14002c170
nop
jmp 0x140213306
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x30]
call fcn.14028e7e0
lea rdx, [rsp + 0x68]
mov r9, qword [rsp + 0x68]
cmp r15, 8
cmovae rdx, r9
mov ecx, 2
cmp r12, rcx
cmovb rcx, r12
test rcx, rcx
je 0x140213629
lea r8, [0x140308374]
movzx eax, word [r8]
cmp word [rdx], ax
jne 0x14021361c
add rdx, 2
add r8, 2
sub rcx, 1
jne 0x140213603
jmp 0x140213629
mov ecx, 1
cmp word [rdx], ax
cmovb ecx, esi
jmp 0x14021362b
mov ecx, ebx
test ecx, ecx
jne 0x1402136e7
cmp r12, 2
jne 0x1402136e7
mov r8d, 0x104
lea rdx, [rbp - 0x30]
lea rcx, str.COMMONPROGRAMFILES
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0x103
ja 0x14021369f
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], rbx
mov word [rdi], bx
cmp word [rbp - 0x30], 0
je 0x14021368a
lea rax, [rbp - 0x30]
mov rbx, rsi
nop word [rax + rax]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140213680
mov r8, rbx
lea rdx, [rbp - 0x30]
mov rcx, rdi
call fcn.14002c3d0
nop
jmp 0x140213306
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, 0x59
lea r8, str.XMLUpdater::v2::CDirSubstitution::Substitute
lea rdx, str.DirSubstitution.cpp
lea ecx, [r9 - 0x58]
call fcn.1401fc9c0
mov rdx, qword [str._UNKNOWN]
mov rcx, rdi
call fcn.14002c170
nop
jmp 0x140213306
cmp r15, 8
jb 0x1402136fe
lea r8, [r15 + 1]
mov rdx, r9
lea rcx, [rsp + 0x68]
call fcn.14002e610
mov r8, qword [str.TEMP_DIR]
cmp word [r8], 0
jne 0x140213711
mov rsi, rbx
jmp 0x14021371c
inc rsi
cmp word [r8 + rsi*2], 0
jne 0x140213711
cmp qword [r14 + 0x18], 8
jb 0x140213728
mov rcx, qword [r14]
jmp 0x14021372b
mov rcx, r14
mov r9, rsi
mov rdx, qword [r14 + 0x10]
call fcn.140027800
test eax, eax
jne 0x14021380a
xor eax, eax
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x40], ebx
call fcn.1400e1650
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x78]
call fcn.1402143d0
nop
call fcn.1400e1650
mov rcx, qword [rax + 8]
mov rax, qword [rsp + 0x48]
cmp qword [rax + 8], rcx
jne 0x1402137a6
cmp dword [rsp + 0x40], 0
jne 0x1402137a6
mov rdx, rdi
lea rcx, [rbp - 0x78]
call fcn.1402695e0
nop
mov r8, qword [rbp - 0x60]
cmp r8, 8
jb 0x140213c68
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp - 0x78]
jmp 0x14021331e
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x40]
call fcn.14002d520
nop
cmp qword [rax + 0x18], 0x10
jb 0x1402137c0
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
lea rax, str.Unable_to_get_temp_directory_path._Error:__hs
mov qword [rsp + 0x20], rax
mov r9d, 0x66
lea r8, str.XMLUpdater::v2::CDirSubstitution::Substitute
lea rdx, str.DirSubstitution.cpp
lea ecx, [r9 - 0x65]
call fcn.1401fc9c0
nop
lea rcx, [rsp + 0x68]
call fcn.14002dfa0
mov rdx, qword [str._UNKNOWN]
mov rcx, rdi
call fcn.14002c170
jmp 0x14021378b
mov ecx, dword [0x1403f0e4c]
mov rax, qword gs:[0x58]
mov edx, 4
mov rcx, qword [rax + rcx*8]
mov eax, dword [rdx + rcx]
cmp dword [0x1403f0800], eax
jle 0x140213b83
lea rcx, [0x1403f0800]
call fcn.14026dad4
cmp dword [0x1403f0800], 0xffffffff
jne 0x140213b83
xor eax, eax
mov qword [0x1403f07f0], rax
mov qword [0x1403f07f8], rax
mov qword [rbp - 0x18], 7
mov qword [rbp - 0x20], rbx
mov word [rbp - 0x30], bx
lea r8d, [rax + 0x14]
lea rdx, str.CSIDL_COMMON_APPDATA
lea rcx, [rbp - 0x30]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b6b8]
movaps xmmword [rbp - 0x10], xmm0
mov qword [rbp + 0x18], 7
mov qword [rbp + 0x10], rbx
mov word [rbp], bx
mov r8d, reloc.WS2_32.dll_shutdown
lea rdx, str.CSIDL_COMMON_DOCUMENTS
lea rcx, [rbp]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b6a8]
movaps xmmword [rbp + 0x20], xmm0
mov qword [rbp + 0x48], 7
mov qword [rbp + 0x40], rbx
mov word [rbp + 0x30], bx
mov r8d, reloc.WS2_32.dll_sendto
lea rdx, str.CSIDL_COMMON_STARTUP
lea rcx, [rbp + 0x30]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b6c8]
movaps xmmword [rbp + 0x50], xmm0
mov qword [rbp + 0x78], 7
mov qword [rbp + 0x70], rbx
mov word [rbp + 0x60], bx
mov r8d, reloc.WS2_32.dll_send
lea rdx, str.CSIDL_PROGRAM_FILES
lea rcx, [rbp + 0x60]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b5e8]
movaps xmmword [rbp + 0x80], xmm0
mov qword [rbp + 0xa8], 7
mov qword [rbp + 0xa0], rbx
mov word [rbp + 0x90], bx
mov r8d, reloc.WS2_32.dll_shutdown
lea rdx, str.CSIDL_PROGRAM_FILESX86
lea rcx, [rbp + 0x90]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b628]
movaps xmmword [rbp + 0xb0], xmm0
mov qword [rbp + 0xd8], 7
mov qword [rbp + 0xd0], rbx
mov word [rbp + 0xc0], bx
mov r8d, reloc.WS2_32.dll_shutdown
lea rdx, str.CSIDL_PROGRAM_FILESX64
lea rcx, [rbp + 0xc0]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b608]
movaps xmmword [rbp + 0xe0], xmm0
mov qword [rbp + 0x108], 7
mov qword [rbp + 0x100], rbx
mov word [rbp + 0xf0], bx
mov r8d, 0x1a
lea rdx, str.CSIDL_PROGRAM_FILES_COMMON
lea rcx, [rbp + 0xf0]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b5d8]
movaps xmmword [rbp + 0x110], xmm0
mov qword [rbp + 0x138], 7
mov qword [rbp + 0x130], rbx
mov word [rbp + 0x120], bx
mov r8d, 0x1d
lea rdx, str.CSIDL_PROGRAM_FILES_COMMONX86
lea rcx, [rbp + 0x120]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b618]
movaps xmmword [rbp + 0x140], xmm0
mov qword [rbp + 0x168], 7
mov qword [rbp + 0x160], rbx
mov word [rbp + 0x150], bx
mov r8d, 0x1d
lea rdx, str.CSIDL_PROGRAM_FILES_COMMONX64
lea rcx, [rbp + 0x150]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b5f8]
movaps xmmword [rbp + 0x170], xmm0
mov qword [rbp + 0x198], 7
mov qword [rbp + 0x190], rbx
mov word [rbp + 0x180], bx
mov r8d, recv
lea rdx, str.CSIDL_SYSTEM
lea rcx, [rbp + 0x180]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b668]
movaps xmmword [rbp + 0x1a0], xmm0
mov qword [rbp + 0x1c8], 7
mov qword [rbp + 0x1c0], rbx
mov word [rbp + 0x1b0], bx
mov r8d, sendto
lea rdx, str.CSIDL_SYSTEMX86
lea rcx, [rbp + 0x1b0]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b658]
movaps xmmword [rbp + 0x1d0], xmm0
mov qword [rbp + 0x1f8], 7
mov qword [rbp + 0x1f0], rbx
mov word [rbp + 0x1e0], bx
mov r8d, reloc.WS2_32.dll_listen
lea rdx, str.CSIDL_WINDOWS
lea rcx, [rbp + 0x1e0]
call fcn.14002c3d0
movups xmm0, xmmword [0x14032b648]
movaps xmmword [rbp + 0x200], xmm0
lea rax, [rbp - 0x30]
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x210]
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rdx, [rsp + 0x40]
lea rcx, [0x1403f07f0]
call fcn.140213070
nop
lea r9, [fcn.14002e550]
mov edx, 0x30
lea r8d, [rdx - 0x24]
lea rcx, [rbp - 0x30]
call fcn.14026e250
lea rcx, [0x1402e0e20]
call fcn.14026dec0
nop
lea rcx, [0x1403f0800]
call fcn.14026da74
xor eax, eax
mov qword [rsp + 0x40], rax
mov r8, r14
lea rdx, [rsp + 0x40]
lea rcx, [0x1403f07f0]
call fcn.140214350
mov rcx, qword [rsp + 0x40]
cmp rcx, qword [0x1403f07f0]
jne 0x140213bf6
cmp qword [r14 + 0x18], 8
jb 0x140213bb6
mov r14, qword [r14]
lea rax, str.Unknown_folder_identifier:__s
mov r9d, 0x7d
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rax
lea r8, str.XMLUpdater::v2::CDirSubstitution::Substitute
lea rdx, str.DirSubstitution.cpp
mov ecx, 1
call fcn.1401fc9c0
mov rdx, qword [str._UNKNOWN]
mov rcx, rdi
call fcn.14002c170
jmp 0x140213c68
mov qword [rsp + 0x60], rbx
add rcx, 0x40
lea r9, [rsp + 0x60]
xor r8d, r8d
xor edx, edx
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
je 0x140213c2b
cmp qword [r14 + 0x18], 8
jb 0x140213c1c
mov r14, qword [r14]
lea rax, str.Error_retrieving_directory__s
mov r9d, 0x84
jmp 0x140213bc3
mov rdx, qword [rsp + 0x60]
lea rcx, [rbp - 0x58]
call fcn.14002c170
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], rbx
mov word [rdi], bx
lea rdx, [rbp - 0x58]
mov rcx, rdi
call fcn.14002df10
lea rcx, [rbp - 0x58]
call fcn.14002e550
mov rax, rdi
mov rcx, qword [rbp + 0x210]
xor rcx, rsp
call fcn.14026d870
mov rbx, qword [rsp + 0x360]
add rsp, 0x320
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret