Function at 0x405d80
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 [0x43e6bc]
xor eax, esp
mov dword [esp + 0x578], eax
mov eax, dword [esp + 0x580]
push esi
push edi
mov ecx, 0xb
lea esi, [esp + 0x58c]
lea edi, [esp + 0x40]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
mov edi, 0x104
push edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x6c]
lea ecx, [esp + 0x278]
push 0
push ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], edi
call fcn.00416150
add esp, 0xc
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x10]
push eax
push 0
push 0x2001f
push 0
push 0
push 0
push str.SOFTWAREHuawei_technologiesCurrentDriver
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x405e54
mov cl, byte [0x43fbf2]
mov dl, byte [0x434005]
push str.INFO:_DriverInfo_Open_Key_error._n
mov byte [0x43fbf3], cl
mov byte [0x43fbf4], dl
call fcn.00403d60
add esp, 4
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x578]
xor ecx, esp
call fcn.0041613d
add esp, 0x57c
ret
cmp dword [esp + 0x30], 2
push ebp
jne 0x405fc5
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x27c]
push ecx
mov ecx, dword [esp + 0x18]
xor esi, esi
push esi
push esi
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x188]
push eax
push esi
push ecx
call ebp
test eax, eax
jne 0x405fc5
jmp 0x405ea0
lea edx, [esp + 0x174]
push str.MajorVersion
push edx
add esi, 1
call fcn.00415c20
add esp, 8
test eax, eax
je 0x405ed6
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x27c]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.00417890
add esp, 0xc
lea eax, [esp + 0x174]
push str.MinorVersion
push eax
call fcn.00415c20
add esp, 8
test eax, eax
je 0x405f09
mov ecx, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x27c]
push edx
lea eax, [esp + 0x30]
push eax
call fcn.00417890
add esp, 0xc
lea ecx, [esp + 0x174]
push str.Customization
push ecx
call fcn.00415c20
add esp, 8
test eax, eax
je 0x405f3c
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x27c]
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00417890
add esp, 0xc
lea edx, [esp + 0x174]
push 0x42b4dc
push edx
call fcn.00415c20
add esp, 8
test eax, eax
je 0x405f5c
mov byte [0x43fbf3], 1
lea eax, [esp + 0x174]
push str.DualDriver
push eax
call fcn.00415c20
add esp, 8
test eax, eax
je 0x405f7c
mov byte [0x43fbf4], 1
push edi
lea ecx, [esp + 0x27c]
push 0
push ecx
mov dword [esp + 0x30], edi
mov dword [esp + 0x24], edi
call fcn.00416150
add esp, 0xc
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x27c]
push eax
mov eax, dword [esp + 0x18]
push 0
push 0
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x188]
push edx
push esi
push eax
call ebp
test eax, eax
je 0x405ea0
mov ecx, dword [esp + 0x10]
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x43fbf1], 0
mov dl, byte [0x43fbf2]
jne 0x40604f
mov al, byte [0x434005]
cmp al, 1
mov bl, byte [0x43fbf3]
mov cl, byte [0x43fbf4]
jne 0x405ff9
test cl, cl
je 0x40600a
cmp dl, 1
jne 0x406023
test bl, bl
jne 0x406023
cmp al, dl
jne 0x40601a
test cl, cl
jne 0x40601a
cmp dl, 1
mov byte [0x43fbf4], 1
jne 0x406061
test bl, bl
jne 0x406061
mov byte [0x43fbf3], 1
jmp 0x406061
mov edx, dword [esp + 0x70]
cmp dword [esp + 0x34], edx
jne 0x406061
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x68]
cmp ecx, eax
jb 0x406045
jne 0x406061
mov eax, dword [esp + 0x6c]
cmp eax, dword [esp + 0x2c]
jae 0x406061
mov eax, 0x4e2a
jmp 0x406452
mov cl, byte [0x434005]
mov byte [0x43fbf4], cl
mov byte [0x43fbf3], dl
push str.SOFTWAREHuawei_technologiesCurrentDriver
push 0x80000002
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyA]
xor ebx, ebx
push ebx
lea eax, [esp + 0x18]
push eax
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push str.SOFTWAREHuawei_technologiesCurrentDriver
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x4060a8
push str.INFO:_DriverInfo_Open_Key_error_for_update._n
call fcn.00403d60
add esp, 4
jmp 0x406450
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x68]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 4
lea edx, [esp + 0x14]
push edx
push 4
push ebx
push str.MajorVersion
push eax
mov dword [esp + 0x28], ecx
call ebp
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x6c]
push 4
lea edx, [esp + 0x14]
push edx
push 4
push ebx
push str.MinorVersion
push eax
mov dword [esp + 0x28], ecx
call ebp
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x70]
push 4
lea edx, [esp + 0x14]
push edx
push 4
push ebx
push str.Customization
push eax
mov dword [esp + 0x28], ecx
call ebp
cmp byte [0x43fbf4], 1
jne 0x40612f
mov edx, dword [esp + 0x14]
push 4
lea ecx, [esp + 0x14]
push ecx
push 4
push ebx
push str.DualDriver
push edx
mov dword [esp + 0x28], 1
call ebp
cmp byte [0x43fbf3], 1
jne 0x406156
mov ecx, dword [esp + 0x14]
push 4
lea eax, [esp + 0x14]
push eax
push 4
push ebx
push 0x42b4dc
push ecx
mov dword [esp + 0x28], 1
call ebp
mov edx, dword [esp + 0x20]
push edx
lea eax, [esp + 0x488]
push eax
call fcn.00416ae4
lea ecx, [esp + 0x7c]
push 0x42b490
push ecx
call fcn.00416ae4
lea eax, [esp + 0x84]
add esp, 0x10
mov edx, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x406183
lea edi, [esp + 0x484]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x406198
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
lea edx, [esp + 0x488]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov edi, eax
push edi
call fcn.0040d16f
push edi
mov esi, eax
push ebx
push esi
call fcn.00416150
add esp, 0x10
push esi
push edi
push ebx
lea eax, [esp + 0x490]
push eax
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x4061f7
push esi
call fcn.0040d16a
add esp, 4
jmp 0x406445
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x24]
push edx
push 0x42b460
push esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x4c], ebx
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x4061e9
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 8]
mov edi, dword [sym.imp.WS2_32.dll_htonl]
push ecx
call edi
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], eax
mov eax, dword [edx + 0xc]
push eax
call edi
mov edi, dword [sym.imp.WS2_32.dll_htons]
mov ebx, eax
mov ecx, ebx
shr ecx, 0x10
push ecx
mov dword [esp + 0x48], ebx
call edi
movzx edx, ax
push edx
push ebx
call edi
mov ecx, dword [esp + 0x46]
movzx eax, ax
push eax
push ecx
call edi
movzx edx, ax
mov eax, dword [esp + 0x48]
push edx
push eax
call edi
movzx ecx, ax
push ecx
lea edx, [esp + 0x390]
push str._d_d_d_d
push edx
call fcn.00416ae4
push esi
call fcn.0040d16a
lea eax, [esp + 0x39c]
add esp, 0x1c
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x406290
sub eax, edx
add eax, 0xfffffffe
push eax
lea eax, [esp + 0x384]
push eax
lea ecx, [esp + 0x7c]
push ecx
call fcn.00417c00
lea eax, [esp + 0x38c]
add esp, 0xc
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4062c0
mov esi, dword [sym.imp.SHLWAPI.dll_StrToIntA]
sub eax, edx
lea edx, [esp + 0x74]
push edx
mov byte [esp + eax + 0x76], cl
call esi
mov ebx, eax
lea eax, [esp + 0x380]
lea ecx, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4062e8
sub eax, ecx
mov ax, word [esp + eax + 0x37e]
lea ecx, [esp + 0x74]
push ecx
mov word [esp + 0x78], ax
mov byte [esp + 0x7a], dl
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push 0
lea edx, [esp + 0x28]
push edx
push 0
push 0x2001f
push 0
push 0
push 0
mov esi, eax
mov eax, dword [esp + 0x30]
push str.SysInfo
push eax
call edi
test eax, eax
jne 0x4063b1
mov edx, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x1c]
push ecx
push eax
push 0x2001f
push eax
push eax
push eax
push 0x42b478
push edx
call edi
test eax, eax
jne 0x4063a2
mov ecx, dword [esp + 0x18]
push 4
lea eax, [esp + 0x14]
push eax
push 4
push 0
push str.MajorVersion
push ecx
mov dword [esp + 0x28], ebx
call ebp
mov eax, dword [esp + 0x18]
push 4
lea edx, [esp + 0x14]
push edx
push 4
push 0
push str.MinorVersion
push eax
mov dword [esp + 0x28], esi
call ebp
mov ecx, dword [esp + 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call edi
mov edx, dword [esp + 0x24]
push edx
call edi
jmp 0x4063b7
mov edx, dword [esp + 0x24]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call edi
jmp 0x4063b7
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x28]
push eax
push 0
push 0x2001f
push 0
push 0
push 0
push str.InfInfo
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x406445
push eax
lea edx, [esp + 0x1c]
push edx
push eax
push 0x2001f
push eax
push eax
push eax
mov eax, dword [esp + 0x40]
push 0x42b464
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40643e
mov edx, dword [esp + 0x18]
push 4
lea ecx, [esp + 0x14]
push ecx
push 4
push eax
push str.MajorVersion
push edx
mov dword [esp + 0x28], ebx
call ebp
mov ecx, dword [esp + 0x18]
push 4
lea eax, [esp + 0x14]
push eax
push 4
push 0
push str.MinorVersion
push ecx
mov dword [esp + 0x28], esi
call ebp
mov edx, dword [esp + 0x18]
push edx
call edi
mov eax, dword [esp + 0x24]
push eax
call edi
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, dword [esp + 0x588]
pop ebx
pop ebp
pop edi
pop esi
xor ecx, esp
call fcn.0041613d
add esp, 0x57c
ret