Function at 0x401610
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
mov eax, dword [0x435b3c]
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 0x401907
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 0x4018fd
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 0x436f98
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 0x4016bf
jmp 0x4018e7
mov dword [ebp - 0x114], 0x436f98
mov ecx, dword [ebp - 0x114]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x114]
movsx eax, byte [edx]
test eax, eax
je 0x401733
mov ecx, dword [ebp - 0x114]
movsx edx, byte [ecx]
cmp edx, 0x20
je 0x4016fb
mov eax, dword [ebp - 0x114]
movsx ecx, byte [eax]
cmp ecx, 9
jne 0x40170c
mov edx, dword [ebp - 0x114]
add edx, 1
mov dword [ebp - 0x114], edx
jmp 0x4016d2
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 0x4016d2
mov edx, dword [ebp - 0x1c]
mov byte [edx], 0
push 5
push str.HKLM_
push 0x436f98
call fcn.004063b0
add esp, 0xc
test eax, eax
jne 0x4018e7
mov dword [ebp - 0x1c], 0x436f9d
push 0x2c
mov eax, dword [ebp - 0x1c]
push eax
call fcn.004063d0
add esp, 8
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0
je 0x4018e7
mov ecx, dword [ebp - 0x114]
mov byte [ecx], 0
mov edx, dword [ebp - 0x1c]
push edx
lea eax, [ebp - 0x110]
push eax
call fcn.00414360
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.004063d0
add esp, 8
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0
je 0x4018e7
mov eax, dword [ebp - 0x114]
mov byte [eax], 0
mov ecx, dword [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x98]
push edx
call fcn.00414360
add esp, 8
mov eax, dword [ebp - 0x114]
add eax, 1
mov dword [ebp - 0x1c], eax
push 2
push 0x42c63c
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.004063b0
add esp, 0xc
test eax, eax
jne 0x4018e7
mov byte [ebp - 0x135], 0
mov edx, dword [ebp - 0x1c]
add edx, 2
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x13c], 0
jmp 0x401834
mov eax, dword [ebp - 0x13c]
add eax, 1
mov dword [ebp - 0x13c], eax
cmp dword [ebp - 0x13c], 0x14
jge 0x40188b
lea ecx, [ebp - 0x140]
push ecx
push 0x42c640
mov edx, dword [ebp - 0x1c]
add edx, 2
push edx
call fcn.0041424d
add esp, 0xc
cmp eax, 1
jne 0x401877
mov eax, dword [ebp - 0x140]
and eax, 0xff
mov ecx, dword [ebp - 0x13c]
mov byte [ebp + ecx - 0x134], al
jmp 0x401880
mov byte [ebp - 0x135], 1
jmp 0x40188b
mov edx, dword [ebp - 0x1c]
add edx, 5
mov dword [ebp - 0x1c], edx
jmp 0x401825
movzx eax, byte [ebp - 0x135]
test eax, eax
jne 0x4018e7
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 0x4018e7
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 0x401698
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.00413d9d
mov esp, ebp
pop ebp
ret