Function at 0x140067c50
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x200]
sub rsp, 0x300
mov qword [rbp - 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x340], rbx
mov rax, qword [0x14011d8d0]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
mov qword [rbp - 0x70], r9
mov r14, r8
mov qword [rsp + 0x78], r8
mov rsi, rdx
mov qword [rsp + 0x70], rdx
mov qword [rbp - 0x30], rdx
lea rcx, [0x14011d880]
mov rax, qword [0x14011d880]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x50], rdi
mov rcx, qword [rsi]
mov ebx, dword [rcx - 0x10]
mov edx, Ordinal_49
call qword [sym.imp.MSVCR100.dll_wcsrchr]
or r12, 0xffffffffffffffff
test rax, rax
jne 0x140067cdd
mov eax, r12d
jmp 0x140067ce3
sub rax, qword [rsi]
sar rax, 1
sub ebx, eax
mov r8d, ebx
lea rdx, [rbp - 0x40]
mov rcx, rsi
call fcn.140001c80
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
cmp rcx, rdi
je 0x140067d4f
cmp dword [rdi + 0x10], 0
jl 0x140067d40
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x140067d40
call fcn.140001b90
mov rbx, rax
mov ecx, r12d
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140067d35
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + 8]
lea rax, [rbx + 0x18]
mov qword [rsp + 0x50], rax
jmp 0x140067d4f
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x50]
call fcn.140001e80
nop
mov rdx, qword [rbp - 0x40]
add rdx, 0xffffffffffffffe8
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140067d6e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
xor r13d, r13d
mov qword [rsp + 0x58], r13
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x68], r13
lea rcx, [0x14011d880]
mov rax, qword [0x14011d880]
call qword [rax + 0x18]
lea rsi, [rax + 0x18]
mov qword [rsp + 0x40], rsi
lea rcx, [0x14011d880]
mov rax, qword [0x14011d880]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x30], rdi
mov r9d, 0x20019
mov r8, qword [rsp + 0x50]
mov rdx, 0xffffffff80000000
lea rcx, [rsp + 0x58]
call fcn.140008440
lea r15d, [r13 + 1]
test eax, eax
jne 0x140067f91
lea rcx, [0x14011d880]
mov rax, qword [0x14011d880]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rbp - 0x58], rbx
mov dword [rsp + 0x4c], r13d
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x74]
xor r8d, r8d
mov rdx, rbx
mov r14, qword [rsp + 0x58]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140067f54
mov eax, dword [rbp - 0x74]
cmp eax, r15d
je 0x140067e3a
cmp eax, 2
jne 0x140067f54
mov r13d, dword [rsp + 0x4c]
shr r13d, 1
jns 0x140067e4f
mov ecx, 0x80070057
call fcn.140001000
int3
mov ecx, r15d
sub ecx, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
sub eax, r13d
or eax, ecx
jge 0x140067e71
mov edx, r13d
lea rcx, [rsp + 0x30]
call fcn.140001c20
mov rdi, qword [rsp + 0x30]
lea eax, [r13 + r13]
mov dword [rsp + 0x3c], eax
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x78]
xor r8d, r8d
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140067ec2
mov eax, dword [rbp - 0x78]
cmp eax, 1
je 0x140067ead
cmp eax, 2
jne 0x140067ec2
xor r13d, r13d
test rdi, rdi
je 0x140067ec5
cmp dword [rsp + 0x3c], r13d
jne 0x140067ec5
mov word [rdi], r13w
jmp 0x140067ec5
xor r13d, r13d
movsxd rdx, dword [rdi - 0xc]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_wcsnlen]
test eax, eax
js 0x140067f49
cmp eax, dword [rdi - 0xc]
jg 0x140067f49
mov dword [rdi - 0x10], eax
cdqe
mov word [rdi + rax*2], r13w
lea rcx, [rdi - 0x18]
add rsi, 0xffffffffffffffe8
cmp rcx, rsi
je 0x140067f54
cmp dword [rsi + 0x10], 0
jl 0x140067f36
mov rax, qword [rsi]
cmp qword [rcx], rax
jne 0x140067f36
call fcn.140001b90
mov rdi, rax
mov ecx, r12d
lock xadd dword [rsi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140067f22
mov rcx, qword [rsi]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 8]
lea rax, [rdi + 0x18]
mov qword [rsp + 0x40], rax
mov r14, qword [rsp + 0x58]
mov rbx, qword [rbp - 0x58]
jmp 0x140067f54
mov r8d, dword [rdi - 0x10]
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.140001e80
jmp 0x140067f54
mov ecx, 0x80070057
call fcn.140001000
int3
test r14, r14
je 0x140067f67
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x58], r13
mov dword [rsp + 0x60], r13d
lea rdx, [rbx - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140067f87
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov r14, qword [rsp + 0x78]
mov rdi, qword [rsp + 0x30]
mov r8d, Ordinal_20
lea rdx, str._shellopencommand
lea rcx, [rsp + 0x40]
call fcn.140003c10
mov r9d, 0x20019
mov r8, qword [rsp + 0x40]
mov rdx, 0xffffffff80000000
lea rcx, [rsp + 0x58]
call fcn.140008440
test eax, eax
jne 0x140068112
lea rcx, [0x14011d880]
mov rax, qword [0x14011d880]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rbp - 0x28], rbx
mov dword [rsp + 0x48], r13d
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x7c]
xor r8d, r8d
mov rdx, rbx
mov r13, qword [rsp + 0x58]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400680d7
mov eax, dword [rbp - 0x7c]
cmp eax, 1
je 0x14006802a
cmp eax, 2
jne 0x1400680d7
mov esi, dword [rsp + 0x48]
shr esi, 1
jns 0x14006803d
mov ecx, 0x80070057
call fcn.140001000
int3
mov ecx, r15d
sub ecx, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
sub eax, esi
or eax, ecx
jge 0x14006805d
mov edx, esi
lea rcx, [rsp + 0x30]
call fcn.140001c20
mov rdi, qword [rsp + 0x30]
lea eax, [rsi + rsi]
mov dword [rsp + 0x38], eax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x80]
xor r8d, r8d
mov rdx, rbx
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400680a9
mov eax, dword [rbp - 0x80]
cmp eax, 1
je 0x140068097
cmp eax, 2
jne 0x1400680a9
xor esi, esi
test rdi, rdi
je 0x1400680ab
cmp dword [rsp + 0x38], esi
jne 0x1400680ab
mov word [rdi], si
jmp 0x1400680ab
xor esi, esi
movsxd rdx, dword [rdi - 0xc]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_wcsnlen]
test eax, eax
js 0x1400680cc
cmp eax, dword [rdi - 0xc]
jg 0x1400680cc
mov dword [rdi - 0x10], eax
cdqe
mov word [rdi + rax*2], si
jmp 0x1400680d7
mov ecx, 0x80070057
call fcn.140001000
int3
test r13, r13
je 0x1400680ed
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor r13d, r13d
mov qword [rsp + 0x58], r13
mov dword [rsp + 0x60], r13d
lea rdx, [rbx - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14006810d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdi, qword [rsp + 0x30]
cmp dword [rdi - 0x10], 0
jl 0x1400681bb
lea rdx, str.__1_
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_wcsstr]
test rax, rax
je 0x1400681b5
sub rax, rdi
sar rax, 1
cmp eax, 0xffffffff
je 0x1400681b5
mov r8d, eax
lea rdx, [rbp - 0x68]
lea rcx, [rsp + 0x30]
call fcn.140001d30
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
cmp rcx, rdi
je 0x1400681ac
cmp dword [rdi + 0x10], 0
jl 0x14006819d
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x14006819d
call fcn.140001b90
mov rbx, rax
mov ecx, r12d
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140068192
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + 8]
lea rax, [rbx + 0x18]
mov qword [rsp + 0x30], rax
jmp 0x1400681ac
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.140001e80
nop
mov rdx, qword [rbp - 0x68]
jmp 0x140068250
cmp dword [rdi - 0x10], 0
jge 0x1400681c0
mov eax, r12d
jmp 0x1400681e0
lea rdx, [0x1400e7598]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_wcsstr]
test rax, rax
jne 0x1400681da
mov eax, r12d
jmp 0x1400681e0
sub rax, rdi
sar rax, 1
mov r8d, eax
lea rdx, [rbp - 0x48]
lea rcx, [rsp + 0x30]
call fcn.140001d30
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
cmp rcx, rdi
je 0x14006824c
cmp dword [rdi + 0x10], 0
jl 0x14006823d
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x14006823d
call fcn.140001b90
mov rbx, rax
mov ecx, r12d
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140068232
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + 8]
lea rax, [rbx + 0x18]
mov qword [rsp + 0x30], rax
jmp 0x14006824c
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.140001e80
nop
mov rdx, qword [rbp - 0x48]
add rdx, 0xffffffffffffffe8
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14006826b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rsp + 0x30]
cmp dword [rbx - 0x10], 0
jne 0x14006828b
mov r13, qword [rsp + 0x70]
mov rdx, r13
mov rcx, r14
call fcn.140002250
jmp 0x1400685be
mov rsi, rbx
mov rdi, r13
cmp word [rbx], 0
je 0x140068323
nop dword [rax + rax]
movzx edx, word [rsi]
lea rcx, reloc.ATL100.DLL_Ordinal_32
call qword [sym.imp.MSVCR100.dll_wcschr]
test rax, rax
je 0x1400682bf
test rdi, rdi
jne 0x1400682c2
mov rdi, rsi
jmp 0x1400682c2
mov rdi, r13
add rsi, 2
cmp word [rsi], 0
jne 0x1400682a0
test rdi, rdi
je 0x140068323
sub rdi, rbx
sar rdi, 1
test edi, edi
jns 0x1400682e6
mov ecx, 0x80070057
call fcn.140001000
int3
mov ecx, r15d
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140068306
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.140001c20
mov rbx, qword [rsp + 0x30]
cmp edi, dword [rbx - 0xc]
jg 0x140068318
mov dword [rbx - 0x10], edi
movsxd rax, edi
mov word [rbx + rax*2], r13w
jmp 0x140068323
mov ecx, 0x80070057
call fcn.140001000
int3
lea rdx, reloc.ATL100.DLL_Ordinal_32
lea rcx, [rsp + 0x30]
call fcn.140002ac0
mov rbx, qword [rsp + 0x30]
cmp dword [rbx - 0x10], 0
jl 0x14006852a
lea rdx, [0x1400e4478]
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_wcsstr]
mov rdi, rax
test rax, rax
je 0x14006852a
sub rdi, rbx
sar rdi, 1
cmp edi, 0xffffffff
je 0x14006852a
mov r8d, dword [rbx - 0x10]
sub r8d, edi
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x30]
call fcn.140001c80
nop
mov rdx, rax
mov rbx, qword [rbp - 0x70]
mov rcx, rbx
call fcn.140002250
nop
mov rdx, qword [rbp - 0x60]
add rdx, 0xffffffffffffffe8
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400683b3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rdx, [0x1400e7594]
mov rcx, rbx
call fcn.14000dbf0
mov r13, qword [rsp + 0x70]
mov rdx, qword [r13]
mov r8d, dword [rdx - 0x10]
mov rcx, rbx
call fcn.140003c10
lea rdx, [0x1400e7590]
mov rcx, rbx
call fcn.14000dbf0
mov r8d, edi
lea rdx, [rbp - 0x50]
lea rcx, [rsp + 0x30]
call fcn.140001d30
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
mov rdi, qword [rsp + 0x30]
add rdi, 0xffffffffffffffe8
cmp rcx, rdi
je 0x140068457
cmp dword [rdi + 0x10], 0
jl 0x140068448
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x140068448
call fcn.140001b90
mov rbx, rax
mov ecx, r12d
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x14006843d
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + 8]
lea rax, [rbx + 0x18]
mov qword [rsp + 0x30], rax
jmp 0x140068457
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.140001e80
nop
mov rdx, qword [rbp - 0x50]
add rdx, 0xffffffffffffffe8
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140068476
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rsp + 0x30]
mov rsi, rbx
xor ecx, ecx
mov edi, ecx
cmp word [rbx], cx
je 0x140068518
xor r14d, r14d
nop
movzx edx, word [rsi]
lea rcx, reloc.ATL100.DLL_Ordinal_32
call qword [sym.imp.MSVCR100.dll_wcschr]
test rax, rax
je 0x1400684af
test rdi, rdi
jne 0x1400684b2
mov rdi, rsi
jmp 0x1400684b2
mov rdi, r14
add rsi, 2
cmp word [rsi], r14w
jne 0x140068490
test rdi, rdi
mov r14, qword [rsp + 0x78]
je 0x140068518
sub rdi, rbx
sar rdi, 1
test edi, edi
jns 0x1400684db
mov ecx, 0x80070057
call fcn.140001000
int3
sub r15d, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, r15d
jge 0x1400684fa
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.140001c20
mov rbx, qword [rsp + 0x30]
cmp edi, dword [rbx - 0xc]
jg 0x14006850d
mov dword [rbx - 0x10], edi
movsxd rax, edi
xor ecx, ecx
mov word [rbx + rax*2], cx
jmp 0x140068518
mov ecx, 0x80070057
call fcn.140001000
int3
lea rdx, [rsp + 0x30]
mov rcx, r14
call fcn.140002250
jmp 0x1400685be
lea rcx, [rbx - 0x18]
mov rdi, qword [r14]
sub rdi, 0x18
cmp rcx, rdi
je 0x140068587
cmp dword [rdi + 0x10], 0
jl 0x140068578
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x140068578
call fcn.140001b90
mov rbx, rax
mov ecx, r12d
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x14006856a
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + 8]
lea rax, [rbx + 0x18]
mov qword [r14], rax
mov rbx, qword [rsp + 0x30]
jmp 0x140068587
mov r8d, dword [rbx - 0x10]
mov rdx, rbx
mov rcx, r14
call fcn.140001e80
lea rdx, [0x1400e7590]
mov rdi, qword [rbp - 0x70]
mov rcx, rdi
call fcn.14000dbf0
mov r13, qword [rsp + 0x70]
mov rdx, qword [r13]
mov r8d, dword [rdx - 0x10]
mov rcx, rdi
call fcn.140003c10
lea rdx, [0x1400e7590]
mov rcx, rdi
call fcn.14000dbf0
xor eax, eax
mov dword [rbp - 0x20], eax
xor edx, edx
mov r8d, 0x204
lea rcx, [rbp - 0x1c]
call sub.MSVCR100.dll_memset
mov r8d, 0x104
lea rdx, [rbp - 0x20]
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor eax, eax
mov rcx, r12
lea rdi, [rbp - 0x20]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rbp - 0x20]
mov rcx, r14
call fcn.140001e80
nop
lea rdx, [rbx - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140068623
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140068644
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140068655
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140068676
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [r13]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], r12d
dec r12d
test r12d, r12d
jg 0x140068695
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [rbp + 0x1f0]
xor rcx, rsp
call fcn.1400cafa0
mov rbx, qword [rsp + 0x340]
add rsp, 0x300
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret