Function at 0x40a690
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 [0x0045f6c0]
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.004255a0
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.SOFTWAREHuawei_technologiesCurrentHandSetProductLineDriver
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 0x40a75a
lea rcx, str.INFO:_DriverInfo_Open_Key_error._n
call fcn.00404a90
xor eax, eax
jmp 0x40ae99
cmp dword [rsp + 0x90], 2
mov qword [rsp + 0x608], rdi
jne 0x40a8e6
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 0x40a8e6
nop
nop
nop
lea rdx, str.MajorVersion
lea rcx, [rsp + 0x1b0]
add edi, 1
call fcn.00424e10
test rax, rax
je 0x40a7f3
mov r8d, dword [rsp + 0x54]
lea rdx, [rsp + 0x2c0]
lea rcx, [rsp + 0x78]
call fcn.00425980
lea rdx, str.MinorVersion
lea rcx, [rsp + 0x1b0]
call fcn.00424e10
test rax, rax
je 0x40a826
mov r8d, dword [rsp + 0x54]
lea rdx, [rsp + 0x2c0]
lea rcx, [rsp + 0x80]
call fcn.00425980
lea rdx, str.Customization
lea rcx, [rsp + 0x1b0]
call fcn.00424e10
test rax, rax
je 0x40a856
mov r8d, dword [rsp + 0x54]
lea rdx, [rsp + 0x2c0]
lea rcx, [rsp + 0x7c]
call fcn.00425980
lea rdx, [0x00442514]
lea rcx, [rsp + 0x1b0]
call fcn.00424e10
lea rdx, str.DualDriver
lea rcx, [rsp + 0x1b0]
call fcn.00424e10
lea rcx, [rsp + 0x2c0]
xor edx, edx
mov r8d, 0x104
mov dword [rsp + 0x68], 0x104
mov dword [rsp + 0x54], 0x104
call fcn.004255a0
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 0x40a7c0
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x00461135], r12b
jne 0x40a94d
mov eax, dword [rbx + 0x28]
cmp dword [rsp + 0x7c], eax
jne 0x40a94d
mov eax, dword [rbx + 0x20]
mov ecx, dword [rsp + 0x78]
cmp eax, ecx
jb 0x40a920
cmp eax, ecx
jne 0x40a94d
mov eax, dword [rbx + 0x24]
mov ecx, dword [rsp + 0x80]
cmp eax, ecx
jae 0x40a92a
mov eax, 0x4e2a
jmp 0x40ae91
cmp eax, ecx
jne 0x40a94d
cmp byte [0x0046113e], r12b
je 0x40a94d
lea rcx, str.CheckUpdateDriverInfo_same_Version_not_installed_for_HiSuit_n
call fcn.00404a90
mov eax, 0x4e30
jmp 0x40ae91
lea rdx, str.SOFTWAREHuawei_technologiesCurrentHandSetProductLineDriver
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.SOFTWAREHuawei_technologiesCurrentHandSetProductLineDriver
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 0x40a9b1
lea rcx, str.INFO:_DriverInfo_Open_Key_error_for_update._n
call fcn.00404a90
jmp 0x40ae8f
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.00427fd0
lea rdx, [0x00442480]
lea rcx, [rsp + 0xa0]
call fcn.00427fd0
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 0x40aa90
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.00418744
mov r8, rbx
xor edx, edx
mov rcx, rax
mov rbp, rax
call fcn.004255a0
lea rcx, [rsp + 0x4e0]
mov r9, rbp
mov r8d, ebx
xor edx, edx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x40aaf6
mov rcx, rbp
call fcn.0041873c
jmp 0x40ae7c
lea r9, [rsp + 0x94]
lea r8, [rsp + 0x98]
lea rdx, [0x0044244c]
mov rcx, rbp
mov qword [rsp + 0x98], r12
mov dword [rsp + 0x94], r12d
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x40aae9
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.00427fd0
mov rcx, rbp
call fcn.0041873c
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 0x40ac5a
lea r8, [rcx - 2]
lea rdx, [rsp + 0x3d0]
lea rcx, [rsp + 0xa0]
call fcn.00425980
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 0x40ac90
movsxd rdi, ecx
lea rdx, [rsp + 0x3d0]
lea rcx, [rsp + 0xa0]
mov r8, rdi
call fcn.00425980
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 0x40ad86
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, [0x00442468]
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 0x40ad7b
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 0x40ae7c
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, [0x00442450]
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 0x40ae71
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.00425570
add rsp, 0x618
ret