Function at 0x140046030
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x5a0]
sub rsp, 0x6a0
mov rax, qword [0x140164030]
xor rax, rsp
mov qword [rbp + 0x590], rax
mov rsi, r8
xor r14b, r14b
xor ebx, ebx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x3c], ebx
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x180]
call fcn.1400c5120
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp + 0x390]
call fcn.1400c5120
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], 7
mov word [rsp + 0x40], bx
mov qword [rsi + 0x10], rbx
mov rax, rsi
cmp qword [rsi + 0x18], 8
jb 0x1400460c4
mov rax, qword [rsi]
mov word [rax], bx
lea r9, str.AsusLinkNearExt
lea r8, str.SYSTEMCurrentControlSetServices
lea rdx, str._s_s
lea rcx, [rbp + 0x390]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, [rbp + 0x390]
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400463ac
mov dword [rsp + 0x3c], 2
mov dword [rsp + 0x38], 0x208
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x180]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x3c]
xor r8d, r8d
lea rdx, str.ImagePath
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
setne bl
test eax, eax
je 0x140046174
mov edx, ebx
lea rcx, str._AsusSync_CommMgr__GetServicePath___RegQueryValueEx_fail:_d_n
call fcn.140095ab0
jmp 0x14004639a
lea rdx, [rbp + 0x180]
lea rcx, str._AsusSync_CommMgr__GetServicePath___Path:_s_n
call fcn.140095ab0
lea rax, [rbp + 0x180]
mov rdi, 0xffffffffffffffff
mov r8, rdi
nop dword [rax + rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x1400461a0
lea rdx, [rbp + 0x180]
lea rcx, [rsp + 0x40]
call fcn.140017c00
lea r9, [rsp + 0x40]
cmp qword [rsp + 0x58], 8
cmovae r9, qword [rsp + 0x40]
mov r8, qword [rsp + 0x50]
cmp r8, 0xc
jb 0x140046242
lea r10, [r8 - 0xb]
lea r10, [r9 + r10*2]
mov rbx, r9
lea r11, str._SystemRoot_
nop word [rax + rax]
mov rax, r10
sub rax, rbx
sar rax, 1
je 0x140046242
cmp word [rbx], 0x25
je 0x14004620b
add rbx, 2
sub rax, 1
jmp 0x1400461f9
mov edx, reloc.WS2_32.dll_inet_ntoa
mov rcx, r11
mov r8, rbx
sub r8, r11
nop dword [rax]
movzx eax, word [rcx]
cmp word [r8 + rcx], ax
jne 0x14004623c
add rcx, 2
sub rdx, 1
jne 0x140046220
sub rbx, r9
sar rbx, 1
jmp 0x140046245
add rbx, 2
jmp 0x1400461f0
mov rbx, rdi
cmp ebx, edi
je 0x14004636a
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x70]
call fcn.1400c5120
lea r9, str.SystemRoot
mov r8d, 0x104
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x60]
call fcn.1400d9490
test eax, eax
jne 0x1400462e4
lea rdx, [rsp + 0x70]
lea rcx, str._AsusSync_CommMgr__GetServicePath____wgetenv_s:_s_n
call fcn.140095ab0
lea rax, [rsp + 0x70]
inc rdi
cmp word [rax + rdi*2], 0
jne 0x140046295
movsxd rdx, ebx
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x70]
lea rcx, [rsp + 0x40]
call fcn.14004cfd0
lea rcx, [rsp + 0x40]
cmp rcx, rax
je 0x14004636a
mov rdx, rax
cmp qword [rax + 0x18], 8
jb 0x1400462d1
mov rdx, qword [rax]
mov r8, qword [rax + 0x10]
lea rcx, [rsp + 0x40]
call fcn.140017c00
jmp 0x14004636a
mov edx, 0x104
lea rcx, [rsp + 0x70]
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x14004630e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str._AsusSync_CommMgr__GetServicePath___GetWindowsDirectory__Error:_d_n
call fcn.140095ab0
jmp 0x14004636a
lea rax, [rsp + 0x70]
inc rdi
cmp word [rax + rdi*2], 0
jne 0x140046313
movsxd rdx, ebx
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x70]
lea rcx, [rsp + 0x40]
call fcn.14004cfd0
lea rcx, [rsp + 0x40]
cmp rcx, rax
je 0x140046359
mov rdx, rax
cmp qword [rax + 0x18], 8
jb 0x14004634b
mov rdx, qword [rax]
mov r8, qword [rax + 0x10]
lea rcx, [rsp + 0x40]
call fcn.140017c00
lea rdx, [rsp + 0x70]
lea rcx, str._AsusSync_CommMgr__GetServicePath___GetWindowsDirectory:_s_n
call fcn.140095ab0
mov r8, qword [rsp + 0x50]
test r8, r8
je 0x14004639a
lea rax, [rsp + 0x40]
cmp rsi, rax
je 0x140046397
lea rdx, [rsp + 0x40]
cmp qword [rsp + 0x58], 8
cmovae rdx, qword [rsp + 0x40]
mov rcx, rsi
call fcn.140017c00
mov r14b, 1
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400463bb
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
jmp 0x1400463bb
mov edx, eax
lea rcx, str._AsusSync_CommMgr__GetServicePath___RegOpenKeyEx_fail:_d_n
call fcn.140095ab0
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 8
jb 0x1400463f9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400463f4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140046424
call fcn.1400c2470
movzx eax, r14b
mov rcx, qword [rbp + 0x590]
xor rcx, rsp
call fcn.1400c2450
lea r11, [rsp + 0x6a0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
call fcn.1400c8b64
int3