Function at 0x140004d00
Capabilities:
Check if file exists
Get file attributes
Query environment variable
Query or enumerate registry value
Read .ini file

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x9a8]
sub rsp, 0xa90
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x14003f2f0]
xor rax, rsp
mov qword [rbp + 0x980], rax
xor r14d, r14d
mov dword [rbp + 0x880], r14d
xor edx, edx
lea r8d, [r14 + 0x7c]
lea rcx, [rbp + 0x884]
call fcn.1400166f0
mov dword [rbp + 0x800], r14d
xor edx, edx
lea r8d, [r14 + 0x7c]
lea rcx, [rbp + 0x804]
call fcn.1400166f0
mov dword [rbp + 0x900], r14d
xor edx, edx
lea r8d, [r14 + 0x7c]
lea rcx, [rbp + 0x904]
call fcn.1400166f0
mov esi, r14d
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x40], r14d
mov qword [rsp + 0x48], r14
cmp dword [0x1400419c4], 6
jb 0x140005299
lea r8d, [r14 + 0x40]
lea rdx, [rbp + 0x900]
lea rcx, str.PostUser
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
movzx eax, word [0x14002d8e4]
or rbx, 0xffffffffffffffff
lea r15, [0x140043220]
cmp ax, word [rbp + 0x900]
jne 0x140004ff8
movzx eax, word [0x14002d8e6]
cmp ax, word [rbp + 0x902]
jne 0x140004ff8
mov r9d, 0x20019
lea r8, [0x14002d8e8]
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x38]
call fcn.140010850
mov rsi, qword [rsp + 0x38]
test eax, eax
jne 0x140005150
mov dword [rsp + 0x30], 0x80
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdi, [0x1400432a0]
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x34]
xor r8d, r8d
lea rdx, str.productname
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140004e73
mov eax, dword [rsp + 0x34]
dec eax
cmp eax, 1
ja 0x140004e73
cmp dword [rsp + 0x30], r14d
jne 0x140004e73
mov word [0x1400432a0], r14w
mov rcx, r14
nop word [rax + rax]
movzx eax, word [rcx + rdi]
mov word [rbp + rcx + 0x880], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x140004e80
mov dword [rsp + 0x30], 0x80
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, [0x1400431a0]
mov qword [rsp + 0x20], rdx
lea r9, [rsp + 0x34]
xor r8d, r8d
lea rdx, str.serialnumber
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140004ee9
mov eax, dword [rsp + 0x34]
dec eax
cmp eax, 1
ja 0x140004ee9
cmp dword [rsp + 0x30], 0
jne 0x140004ee9
mov word [0x1400431a0], r14w
mov dword [rsp + 0x30], 0x80
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x34]
xor r8d, r8d
lea rdx, str.productnumber
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140004f36
mov eax, dword [rsp + 0x34]
dec eax
cmp eax, 1
ja 0x140004f36
cmp dword [rsp + 0x30], 0
jne 0x140004f36
mov word [0x140043220], r14w
mov dword [rsp + 0x30], 0x80
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rcx, [0x1400418e0]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x34]
xor r8d, r8d
lea rdx, str.UUID
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140004f8a
mov eax, dword [rsp + 0x34]
dec eax
cmp eax, 1
ja 0x140004f8a
cmp dword [rsp + 0x30], 0
jne 0x140004f8a
mov word [0x1400418e0], r14w
mov dword [rsp + 0x30], 0x80
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, [0x140043420]
mov qword [rsp + 0x20], rdx
lea r9, [rsp + 0x34]
xor r8d, r8d
lea rdx, str.systemboardproductid
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140004fde
mov eax, dword [rsp + 0x34]
dec eax
cmp eax, 1
ja 0x140004fde
cmp dword [rsp + 0x30], 0
jne 0x140004fde
mov word [0x140043420], r14w
test rsi, rsi
je 0x140005150
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rsi, r14
jmp 0x140005150
lea rcx, [0x140043508]
call fcn.140003060
test eax, eax
je 0x14000502c
lea rdx, [rbp + 0x7a0]
lea rcx, [0x140043508]
call fcn.140003400
lea rdx, [rsp + 0x60]
lea rcx, [0x140043508]
call fcn.1400036d0
cmp byte [rbp + 0x7a5], 0
je 0x140005090
mov rcx, qword [rbp + 0x7c8]
call fcn.140004ba0
lea rdi, [0x1400432a0]
sub rdi, rax
nop dword [rax + rax]
movzx ecx, word [rax]
mov word [rax + rdi], cx
lea rax, [rax + 2]
test cx, cx
jne 0x140005050
mov rcx, qword [rbp + 0x7c8]
call fcn.140004ba0
lea rdx, [rbp + 0x880]
sub rdx, rax
nop word [rax + rax]
movzx ecx, word [rax]
mov word [rax + rdx], cx
lea rax, [rax + 2]
test cx, cx
jne 0x140005080
cmp byte [rbp + 0x7a7], 0
je 0x1400050c0
mov rcx, qword [rbp + 0x7d8]
call fcn.140004ba0
lea rdx, [0x1400431a0]
sub rdx, rax
nop
movzx ecx, word [rax]
mov word [rax + rdx], cx
lea rax, [rax + 2]
test cx, cx
jne 0x1400050b0
cmp byte [rbp + 0x7ba], 0
je 0x1400050f0
mov rcx, qword [rbp + 0x7e8]
call fcn.140004ba0
mov rdx, r15
sub rdx, rax
nop dword [rax + rax]
movzx ecx, word [rax]
mov word [rax + rdx], cx
lea rax, [rax + 2]
test cx, cx
jne 0x1400050e0
mov rcx, qword [rbp + 0x7e0]
test rcx, rcx
je 0x140005123
mov rax, rbx
nop
inc rax
cmp byte [rcx + rax], 0
jne 0x140005100
test rax, rax
je 0x140005123
call fcn.140004ba0
mov rdx, rax
lea rcx, [0x1400418e0]
call qword [sym.imp.SHLWAPI.dll_StrCpyW]
cmp byte [rsp + 0x65], 0
je 0x140005150
mov rcx, qword [rbp + 0x770]
call fcn.140004ba0
lea rdx, [0x140043420]
sub rdx, rax
movzx ecx, word [rax]
mov word [rax + rdx], cx
lea rax, [rax + 2]
test cx, cx
jne 0x140005140
xor edx, edx
lea r8d, [rdx + 0x23]
mov rcx, r15
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
mov rdi, rax
test rax, rax
jne 0x1400051ec
xor edx, edx
lea r8d, [rax + 0x2d]
mov rcx, r15
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
mov rdi, rax
test rax, rax
jne 0x1400051ec
lea rdi, [0x14002d9c0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400051c6
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], pe_nt_image_headers64
lea r9, [0x140043460]
lea r8, [0x14002ce18]
lea rdx, str.SKUOptionConfig
lea rcx, str.BIOS_Strings
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov rdx, r15
lea rcx, [rbp + 0x800]
call qword [sym.imp.SHLWAPI.dll_StrCpyW]
lea rax, [rbp + 0x800]
nop dword [rax]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x1400051e0
jmp 0x14000522b
mov r8, rdi
sub r8, r15
sar r8, 1
inc r8d
mov rdx, r15
lea rcx, [rbp + 0x800]
call qword [sym.imp.SHLWAPI.dll_StrCpyNW]
lea rax, [rbp + 0x800]
nop
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140005210
lea rdx, [rdi + 2]
lea rcx, [0x140043460]
call qword [sym.imp.SHLWAPI.dll_StrCpyW]
lea rdx, [0x14002da2c]
lea rcx, [rbp + 0x880]
call qword [sym.imp.SHLWAPI.dll_StrTrimW]
lea rcx, [rbp + 0x880]
mov edx, 0x20
call fcn.1400149d0
test rax, rax
mov rdi, rax
je 0x140005299
lea rdx, [0x14002da30]
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_StrPBrkW]
test rax, rax
je 0x140005284
mov r8d, ebx
mov rdx, rdi
lea rcx, [rbp + 0x800]
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x140005288
xor ecx, ecx
jmp 0x140005246
mov rdx, rdi
lea rcx, [0x1400433a0]
call qword [sym.imp.SHLWAPI.dll_StrCpyW]
nop
test rsi, rsi
je 0x1400052a7
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 0x980]
xor rcx, rsp
call fcn.1400161c0
lea r11, [rsp + 0xa90]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret