Function at 0x401630
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
mov eax, dword [0x431bb8]
xor eax, ebp
mov dword [ebp - 0x20], eax
lea eax, [ebp - 4]
push eax
push 2
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupOpenInfFileA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x401927
lea edx, [ebp - 0x18]
push edx
push 0
push str.NvStUSB.Param
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
test eax, eax
je 0x40191d
mov byte [ebp - 0x134], 0
xor ecx, ecx
mov dword [ebp - 0x133], ecx
mov dword [ebp - 0x12f], ecx
mov dword [ebp - 0x12b], ecx
mov dword [ebp - 0x127], ecx
mov dword [ebp - 0x123], ecx
mov dword [ebp - 0x11f], ecx
mov dword [ebp - 0x11b], ecx
mov byte [ebp - 0x117], cl
push 0
push 0x1000
push 0x433058
push 0
push 0
mov edx, dword [ebp - 8]
push edx
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetLineTextA]
test eax, eax
jne 0x4016df
jmp 0x401907
mov dword [ebp - 0x114], 0x433058
mov ecx, dword [ebp - 0x114]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x114]
movsx eax, byte [edx]
test eax, eax
je 0x401753
mov ecx, dword [ebp - 0x114]
movsx edx, byte [ecx]
cmp edx, 0x20
je 0x40171b
mov eax, dword [ebp - 0x114]
movsx ecx, byte [eax]
cmp ecx, 9
jne 0x40172c
mov edx, dword [ebp - 0x114]
add edx, 1
mov dword [ebp - 0x114], edx
jmp 0x4016f2
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x114]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x114]
add eax, 1
mov dword [ebp - 0x114], eax
mov ecx, dword [ebp - 0x1c]
add ecx, 1
mov dword [ebp - 0x1c], ecx
jmp 0x4016f2
mov edx, dword [ebp - 0x1c]
mov byte [edx], 0
push 5
push str.HKLM_
push 0x433058
call fcn.00403340
add esp, 0xc
test eax, eax
jne 0x401907
mov dword [ebp - 0x1c], 0x43305d
push 0x2c
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00403360
add esp, 8
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0
je 0x401907
mov ecx, dword [ebp - 0x114]
mov byte [ecx], 0
mov edx, dword [ebp - 0x1c]
push edx
lea eax, [ebp - 0x110]
push eax
call fcn.00411970
add esp, 8
mov ecx, dword [ebp - 0x114]
add ecx, 1
mov dword [ebp - 0x1c], ecx
push 0x2c
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00403360
add esp, 8
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0
je 0x401907
mov eax, dword [ebp - 0x114]
mov byte [eax], 0
mov ecx, dword [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x98]
push edx
call fcn.00411970
add esp, 8
mov eax, dword [ebp - 0x114]
add eax, 1
mov dword [ebp - 0x1c], eax
push 2
push 0x428740
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00403340
add esp, 0xc
test eax, eax
jne 0x401907
mov byte [ebp - 0x135], 0
mov edx, dword [ebp - 0x1c]
add edx, 2
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x13c], 0
jmp 0x401854
mov eax, dword [ebp - 0x13c]
add eax, 1
mov dword [ebp - 0x13c], eax
cmp dword [ebp - 0x13c], 0x14
jge 0x4018ab
lea ecx, [ebp - 0x140]
push ecx
push 0x428744
mov edx, dword [ebp - 0x1c]
add edx, 2
push edx
call fcn.00411858
add esp, 0xc
cmp eax, 1
jne 0x401897
mov eax, dword [ebp - 0x140]
and eax, 0xff
mov ecx, dword [ebp - 0x13c]
mov byte [ebp + ecx - 0x134], al
jmp 0x4018a0
mov byte [ebp - 0x135], 1
jmp 0x4018ab
mov edx, dword [ebp - 0x1c]
add edx, 5
mov dword [ebp - 0x1c], edx
jmp 0x401845
movzx eax, byte [ebp - 0x135]
test eax, eax
jne 0x401907
lea ecx, [ebp - 0x144]
push ecx
lea edx, [ebp - 0x110]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x401907
push 0x14
lea eax, [ebp - 0x134]
push eax
push 3
push 0
lea ecx, [ebp - 0x98]
push ecx
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [ebp - 0x148], eax
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x18]
push edx
call dword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
test eax, eax
jne 0x4016b8
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.004116a1
mov esp, ebp
pop ebp
ret