Function at 0x408ce0
Capabilities:
Delete registry key
Get file version info
Query or enumerate registry value
Set registry value

Disassembly:
mov r11, rsp
sub rsp, 0x618
mov rax, qword [0x0045c120]
xor rax, rsp
mov qword [rsp + 0x5f0], rax
mov qword [r11 + 0x18], rbx
mov qword [r11 - 8], rsi
mov rsi, rcx
mov rbx, rdx
lea rcx, [r11 - 0x358]
mov r8d, 0x104
xor edx, edx
mov qword [r11 - 0x18], r12
mov dword [rsp + 0x78], 0xffffffff
mov dword [rsp + 0x80], 0xffffffff
mov dword [rsp + 0x7c], 0xffffffff
mov dword [rsp + 0x68], 0x104
mov dword [rsp + 0x54], 0x104
call fcn.00425320
lea rdx, [rsp + 0x90]
mov qword [rsp + 0x40], rdx
lea rax, [rsp + 0x58]
xor r12d, r12d
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
lea rdx, str.SOFTWAREHonor_technologiesCurrHandSetWinDriver
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x408daa
lea rcx, str.INFO:_DriverInfo_Open_Key_error._n
call fcn.00405500
xor eax, eax
jmp 0x4094e9
cmp dword [rsp + 0x90], 2
mov qword [rsp + 0x608], rdi
jne 0x408f36
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x54]
lea r9, [rsp + 0x68]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x2c0]
lea r8, [rsp + 0x1b0]
mov qword [rsp + 0x30], rax
xor edx, edx
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
mov edi, r12d
call qword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x408f36
nop
nop
nop
lea rdx, str.MajorVersion
lea rcx, [rsp + 0x1b0]
add edi, 1
call fcn.00424c70
test rax, rax
je 0x408e43
mov r8d, dword [rsp + 0x54]
lea rdx, [rsp + 0x2c0]
lea rcx, [rsp + 0x78]
call fcn.00425700
lea rdx, str.MinorVersion
lea rcx, [rsp + 0x1b0]
call fcn.00424c70
test rax, rax
je 0x408e76
mov r8d, dword [rsp + 0x54]
lea rdx, [rsp + 0x2c0]
lea rcx, [rsp + 0x80]
call fcn.00425700
lea rdx, str.Customization
lea rcx, [rsp + 0x1b0]
call fcn.00424c70
test rax, rax
je 0x408ea6
mov r8d, dword [rsp + 0x54]
lea rdx, [rsp + 0x2c0]
lea rcx, [rsp + 0x7c]
call fcn.00425700
lea rdx, [0x00440ed4]
lea rcx, [rsp + 0x1b0]
call fcn.00424c70
lea rdx, str.DualDriver
lea rcx, [rsp + 0x1b0]
call fcn.00424c70
lea rcx, [rsp + 0x2c0]
xor edx, edx
mov r8d, 0x104
mov dword [rsp + 0x68], 0x104
mov dword [rsp + 0x54], 0x104
call fcn.00425320
mov rcx, qword [rsp + 0x58]
lea r11, [rsp + 0x54]
mov qword [rsp + 0x38], r11
lea rax, [rsp + 0x2c0]
lea r9, [rsp + 0x68]
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x1b0]
mov edx, edi
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
je 0x408e10
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x0045db95], r12b
jne 0x408f9d
mov eax, dword [rbx + 0x28]
cmp dword [rsp + 0x7c], eax
jne 0x408f9d
mov eax, dword [rbx + 0x20]
mov ecx, dword [rsp + 0x78]
cmp eax, ecx
jb 0x408f70
cmp eax, ecx
jne 0x408f9d
mov eax, dword [rbx + 0x24]
mov ecx, dword [rsp + 0x80]
cmp eax, ecx
jae 0x408f7a
mov eax, 0x4e2a
jmp 0x4094e1
cmp eax, ecx
jne 0x408f9d
cmp byte [0x0045db9e], r12b
je 0x408f9d
lea rcx, str.CheckUpdateDriverInfo_same_Version_not_installed_for_HiSuit_n
call fcn.00405500
mov eax, 0x4e30
jmp 0x4094e1
lea rdx, str.SOFTWAREHonor_technologiesCurrHandSetWinDriver
mov rcx, 0xffffffff80000002
call qword [sym.imp.SHLWAPI.dll_SHDeleteKeyA]
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
lea rdx, str.SOFTWAREHonor_technologiesCurrHandSetWinDriver
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x409001
lea rcx, str.INFO:_DriverInfo_Open_Key_error_for_update._n
call fcn.00405500
jmp 0x4094df
mov eax, dword [rbx + 0x20]
mov rcx, qword [rsp + 0x58]
lea rdx, str.MajorVersion
mov dword [rsp + 0x50], eax
lea rax, [rsp + 0x50]
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [rbx + 0x24]
mov rcx, qword [rsp + 0x58]
mov dword [rsp + 0x50], edx
lea rax, [rsp + 0x50]
lea rdx, str.MinorVersion
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [rbx + 0x28]
mov dword [rsp + 0x50], ecx
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.Customization
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea rcx, [rsp + 0x4e0]
mov rdx, rsi
call fcn.00427d80
lea rdx, [0x00440e40]
lea rcx, [rsp + 0xa0]
call fcn.00427d80
xor eax, eax
lea rdi, [rsp + 0x4e0]
mov rcx, 0xffffffffffffffff
lea rdx, [rsp + 0xa0]
repne scasb al, byte [rdi]
xor ecx, ecx
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x4090e0
lea rcx, [rsp + 0x4e0]
xor edx, edx
mov qword [rsp + 0x638], rbp
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov ecx, eax
mov ebx, eax
call fcn.0041859c
mov r8, rbx
xor edx, edx
mov rcx, rax
mov rbp, rax
call fcn.00425320
lea rcx, [rsp + 0x4e0]
mov r9, rbp
mov r8d, ebx
xor edx, edx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x409146
mov rcx, rbp
call fcn.004185a4
jmp 0x4094cc
lea r9, [rsp + 0x94]
lea r8, [rsp + 0x98]
lea rdx, [0x00440e0c]
mov rcx, rbp
mov qword [rsp + 0x98], r12
mov dword [rsp + 0x94], r12d
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x409139
mov rax, qword [rsp + 0x98]
mov ecx, dword [rax + 8]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rsp + 0x88], eax
mov rax, qword [rsp + 0x98]
mov ecx, dword [rax + 0xc]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rsp + 0x8c], eax
shr eax, 0x10
movzx ecx, ax
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rsp + 0x8c]
movzx esi, ax
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rsp + 0x8a]
movzx ebx, ax
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rsp + 0x88]
movzx edi, ax
call qword [sym.imp.WS2_32.dll_htons]
lea rdx, str._d_d_d_d
lea rcx, [rsp + 0x3d0]
mov r9d, edi
movzx r8d, ax
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], ebx
call fcn.00427d80
mov rcx, rbp
call fcn.004185a4
xor eax, eax
lea rdi, [rsp + 0x3d0]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
not rcx
sub rcx, 1
cmp ecx, 4
mov rdi, rcx
jle 0x4092aa
lea r8, [rcx - 2]
lea rdx, [rsp + 0x3d0]
lea rcx, [rsp + 0xa0]
call fcn.00425700
lea rcx, [rsp + 0xa0]
mov byte [rsp + rdi + 0x9e], r12b
call qword [sym.imp.SHLWAPI.dll_StrToIntA]
lea rdx, [rsp + 0x3d0]
lea rdi, [rsp + 0x3d0]
mov ebx, eax
xor eax, eax
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
not rcx
movzx ecx, word [rcx + rdx - 3]
mov byte [rsp + 0xa2], al
mov word [rsp + 0xa0], cx
lea rcx, [rsp + 0xa0]
call qword [sym.imp.SHLWAPI.dll_StrToIntA]
mov edi, eax
jmp 0x4092e0
movsxd rdi, ecx
lea rdx, [rsp + 0x3d0]
lea rcx, [rsp + 0xa0]
mov r8, rdi
call fcn.00425700
lea rcx, [rsp + 0xa0]
mov byte [rsp + rdi + 0xa0], r12b
call qword [sym.imp.SHLWAPI.dll_StrToIntA]
mov edi, r12d
mov ebx, eax
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
lea rdx, str.SysInfo
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4093d6
mov rcx, qword [rsp + 0x70]
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
lea rdx, [0x00440e28]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4093cb
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x50]
lea rdx, str.MajorVersion
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], ebx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x50]
lea rdx, str.MinorVersion
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], edi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
lea rdx, str.InfInfo
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4094cc
mov rcx, qword [rsp + 0x70]
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
lea rdx, [0x00440e10]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4094c1
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x50]
lea rdx, str.MajorVersion
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], ebx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x50]
lea rdx, str.MinorVersion
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], edi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rbp, qword [rsp + 0x638]
xor eax, eax
mov rdi, qword [rsp + 0x608]
mov r12, qword [rsp + 0x600]
mov rsi, qword [rsp + 0x610]
mov rbx, qword [rsp + 0x630]
mov rcx, qword [rsp + 0x5f0]
xor rcx, rsp
call fcn.004252f0
add rsp, 0x618
ret