Function at 0x406e20
Capabilities:
Delete registry key
Get file version info
Query or enumerate registry value
Resolve function by parsing pe exports
Set registry value

Disassembly:
sub esp, 0x57c
mov eax, dword [0x4424ac]
xor eax, esp
mov dword [esp + 0x578], eax
mov eax, dword [esp + 0x580]
push ebx
push esi
push edi
xor ebx, ebx
mov ecx, 0xb
lea esi, [esp + 0x590]
lea edi, [esp + 0x44]
rep movsd dword es:[edi], dword [esi]
push 0x103
mov dword [esp + 0x2c], eax
or eax, 0xffffffff
lea ecx, [esp + 0x485]
mov edi, 0x104
push ebx
push ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x24], edi
mov byte [esp + 0x48c], bl
call fcn.00418350
push edi
lea edx, [esp + 0x38c]
push ebx
push edx
call fcn.00418350
add esp, 0x18
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x14]
push ecx
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push str.SOFTWAREHuawei_technologiesCurrHandSetWinDriver
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x406efc
push str.INFO:_DriverInfo_Open_Key_error._n
call fcn.00404950
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x578]
xor ecx, esp
call fcn.00417b3b
add esp, 0x57c
ret
cmp dword [esp + 0x38], 2
push ebp
jne 0x407022
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x384]
push eax
mov eax, dword [esp + 0x1c]
push ebx
push ebx
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x498]
push edx
push ebx
push eax
xor esi, esi
call ebp
test eax, eax
jne 0x407022
lea esp, [esp]
lea ecx, [esp + 0x484]
push str.MajorVersion
push ecx
add esi, 1
call fcn.00417550
add esp, 8
test eax, eax
je 0x406f76
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x384]
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00419ce0
add esp, 0xc
lea edx, [esp + 0x484]
push str.MinorVersion
push edx
call fcn.00417550
add esp, 8
test eax, eax
je 0x406fa9
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x384]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.00419ce0
add esp, 0xc
lea eax, [esp + 0x484]
push str.Customization
push eax
call fcn.00417550
add esp, 8
test eax, eax
je 0x406fdc
mov ecx, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x384]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00419ce0
add esp, 0xc
push edi
lea ecx, [esp + 0x384]
push ebx
push ecx
mov dword [esp + 0x34], edi
mov dword [esp + 0x28], edi
call fcn.00418350
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x384]
push eax
mov eax, dword [esp + 0x1c]
push ebx
push ebx
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x498]
push edx
push esi
push eax
call ebp
test eax, eax
je 0x406f40
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x4439d1], bl
mov edi, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
mov ebp, dword [esp + 0x70]
jne 0x407084
cmp dword [esp + 0x38], ebp
jne 0x407084
mov eax, dword [esp + 0x30]
cmp esi, eax
jb 0x407059
jne 0x407084
mov eax, dword [esp + 0x34]
cmp edi, eax
jae 0x407063
mov eax, 0x4e2a
jmp 0x40757a
jne 0x407084
cmp byte [0x4439da], bl
je 0x407084
push str.CheckUpdateDriverInfo_same_Version_not_installed_for_HiSuit_n
call fcn.00404950
add esp, 4
mov eax, 0x4e31
jmp 0x40757a
push str.SOFTWAREHuawei_technologiesCurrHandSetWinDriver
push 0x80000002
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyA]
push ebx
lea edx, [esp + 0x18]
push edx
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push str.SOFTWAREHuawei_technologiesCurrHandSetWinDriver
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x4070c9
push str.INFO:_DriverInfo_Open_Key_error_for_update._n
call fcn.00404950
add esp, 4
jmp 0x407578
mov ecx, dword [esp + 0x14]
push 4
lea eax, [esp + 0x14]
push eax
push 4
push ebx
push str.MajorVersion
mov dword [esp + 0x24], esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push ecx
call esi
mov eax, dword [esp + 0x14]
push 4
lea edx, [esp + 0x14]
push edx
push 4
push ebx
push str.MinorVersion
push eax
mov dword [esp + 0x28], edi
call esi
mov edx, dword [esp + 0x14]
push 4
lea ecx, [esp + 0x14]
push ecx
push 4
push ebx
push str.Customization
push edx
mov dword [esp + 0x28], ebp
call esi
push 0x103
lea eax, [esp + 0x281]
push ebx
push eax
mov byte [esp + 0x288], bl
call fcn.00418350
push 0x103
lea ecx, [esp + 0x189]
push ebx
push ecx
mov byte [esp + 0x190], bl
call fcn.00418350
push 0x103
lea edx, [esp + 0x91]
push ebx
push edx
mov byte [esp + 0x98], bl
call fcn.00418350
mov esi, dword [esp + 0x50]
add esp, 0x24
cmp esi, ebx
mov dword [esp + 0x20], ebx
je 0x407194
lea edi, [esp + 0x20]
mov ecx, 0x104
mov edx, esi
call fcn.00401c40
cmp eax, ebx
jl 0x407199
mov ecx, dword [esp + 0x20]
jmp 0x40719b
mov eax, 0x80070057
xor ecx, ecx
cmp eax, ebx
jne 0x40727a
cmp ecx, 0x102
jae 0x40727a
lea eax, [ecx + 1]
cmp eax, 0x7ffffffe
jbe 0x4071c2
mov byte [esp + 0x27c], bl
jmp 0x4071db
push eax
push ebx
mov eax, esi
mov ecx, 0x104
lea edx, [esp + 0x284]
call fcn.00401c80
cmp eax, ebx
je 0x4071ed
push str.CheckUpdateDriverInfo
push str._s_string_copy_driverpath_err_n
call fcn.00404950
add esp, 8
push 0x11
push ebx
mov eax, 0x42e4bc
mov ecx, 0x104
lea edx, [esp + 0x7c]
call fcn.00401c80
cmp eax, ebx
je 0x407219
push str.CheckUpdateDriverInfo
push str._s_string_copy_driverpath2_err_n
call fcn.00404950
add esp, 8
mov ecx, 0x104
lea eax, [esp + 0x27c]
xor esi, esi
cmp byte [eax], bl
je 0x407235
add eax, 1
sub ecx, 1
jne 0x407227
jmp 0x40723d
cmp ecx, ebx
jne 0x4072bf
mov esi, 0x80070057
xor edx, edx
cmp esi, ebx
mov eax, esi
jl 0x407264
push 0xe
mov ecx, 0x104
sub ecx, edx
push ebx
lea edx, [esp + edx + 0x284]
lea eax, [esp + 0x7c]
call fcn.00401c80
cmp eax, ebx
je 0x40727a
push str.CheckUpdateDriverInfo
push str._s_string_copy_driverpath3_err_n
call fcn.00404950
add esp, 8
push ebx
lea eax, [esp + 0x280]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
push esi
call fcn.0040eecd
push esi
mov ebp, eax
push ebx
push ebp
call fcn.00418350
add esp, 0x10
push ebp
push esi
push ebx
lea ecx, [esp + 0x288]
push ecx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x4072cb
push ebp
call fcn.0040eec8
add esp, 4
jmp 0x40756d
mov edx, 0x104
sub edx, ecx
jmp 0x407244
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x24]
push eax
push 0x42e478
push ebp
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3c], ebx
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x4072b1
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 8]
mov esi, dword [sym.imp.WS2_32.dll_htonl]
push edx
call esi
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 0xc]
push ecx
call esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
mov edi, eax
mov edx, edi
shr edx, 0x10
push edx
mov dword [esp + 0x48], edi
call esi
movzx eax, ax
push eax
push edi
call esi
mov edx, dword [esp + 0x46]
movzx ecx, ax
push ecx
push edx
call esi
mov ecx, dword [esp + 0x48]
movzx eax, ax
push eax
push ecx
call esi
movzx edx, ax
push edx
push str._d_d_d_d
lea eax, [esp + 0x18c]
push 0x104
push eax
call fcn.00402520
add esp, 0x1c
test eax, eax
je 0x40736f
push str.CheckUpdateDriverInfo
push str._s_StringCbPrintf_FileVersion_err_n
call fcn.00404950
add esp, 8
push ebp
call fcn.0040eec8
lea eax, [esp + 0x17c]
add esp, 4
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x407382
sub eax, edx
mov esi, eax
cmp esi, 4
lea eax, [esp + 0x178]
jle 0x40741f
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4073a2
sub eax, edx
add eax, 0xfffffffe
push eax
lea ecx, [esp + 0x17c]
push ecx
lea edx, [esp + 0x7c]
push edx
call fcn.00419570
lea eax, [esp + 0x184]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4073d0
mov esi, dword [sym.imp.SHLWAPI.dll_StrToIntA]
sub eax, edx
mov byte [esp + eax + 0x72], bl
lea eax, [esp + 0x74]
push eax
call esi
mov edi, eax
lea eax, [esp + 0x178]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4073f8
sub eax, edx
mov cx, word [esp + eax + 0x176]
lea edx, [esp + 0x74]
push edx
mov word [esp + 0x78], cx
mov byte [esp + 0x7a], bl
call esi
mov esi, eax
jmp 0x407441
push esi
push eax
lea ecx, [esp + 0x7c]
push ecx
call fcn.00419570
add esp, 0xc
lea edx, [esp + 0x74]
push edx
mov byte [esp + esi + 0x78], bl
call dword [sym.imp.SHLWAPI.dll_StrToIntA]
mov edi, eax
xor esi, esi
mov ecx, dword [esp + 0x14]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push ebx
lea eax, [esp + 0x28]
push eax
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push str.SysInfo
push ecx
call ebp
test eax, eax
jne 0x4074d7
mov eax, dword [esp + 0x24]
push ebx
lea edx, [esp + 0x1c]
push edx
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push 0x42e430
push eax
call ebp
test eax, eax
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jne 0x4074ca
mov edx, dword [esp + 0x18]
push 4
lea ecx, [esp + 0x14]
push ecx
push 4
push ebx
push str.MajorVersion
push edx
mov dword [esp + 0x28], edi
call ebp
mov ecx, dword [esp + 0x18]
push 4
lea eax, [esp + 0x14]
push eax
push 4
push ebx
push str.MinorVersion
push ecx
mov dword [esp + 0x28], esi
call ebp
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4074dd
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x14]
push ebx
lea ecx, [esp + 0x28]
push ecx
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push str.InfInfo
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40756d
mov ecx, dword [esp + 0x24]
push ebx
lea eax, [esp + 0x1c]
push eax
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push 0x42e418
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x407562
mov eax, dword [esp + 0x18]
push 4
lea edx, [esp + 0x14]
push edx
push 4
push ebx
push str.MajorVersion
push eax
mov dword [esp + 0x28], edi
call ebp
mov edx, dword [esp + 0x18]
push 4
lea ecx, [esp + 0x14]
push ecx
push 4
push ebx
push str.MinorVersion
push edx
mov dword [esp + 0x28], esi
call ebp
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, dword [esp + 0x588]
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00417b3b
add esp, 0x57c
ret