Function at 0x401620
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
mov eax, dword [0x433b34]
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 0x401917
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 0x40190d
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 0x434fb8
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 0x4016cf
jmp 0x4018f7
mov dword [ebp - 0x114], 0x434fb8
mov ecx, dword [ebp - 0x114]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x114]
movsx eax, byte [edx]
test eax, eax
je 0x401743
mov ecx, dword [ebp - 0x114]
movsx edx, byte [ecx]
cmp edx, 0x20
je 0x40170b
mov eax, dword [ebp - 0x114]
movsx ecx, byte [eax]
cmp ecx, 9
jne 0x40171c
mov edx, dword [ebp - 0x114]
add edx, 1
mov dword [ebp - 0x114], edx
jmp 0x4016e2
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 0x4016e2
mov edx, dword [ebp - 0x1c]
mov byte [edx], 0
push 5
push str.HKLM_
push 0x434fb8
call fcn.00405b80
add esp, 0xc
test eax, eax
jne 0x4018f7
mov dword [ebp - 0x1c], 0x434fbd
push 0x2c
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00405ba0
add esp, 8
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0
je 0x4018f7
mov ecx, dword [ebp - 0x114]
mov byte [ecx], 0
mov edx, dword [ebp - 0x1c]
push edx
lea eax, [ebp - 0x110]
push eax
call fcn.00413b00
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.00405ba0
add esp, 8
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0
je 0x4018f7
mov eax, dword [ebp - 0x114]
mov byte [eax], 0
mov ecx, dword [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x98]
push edx
call fcn.00413b00
add esp, 8
mov eax, dword [ebp - 0x114]
add eax, 1
mov dword [ebp - 0x1c], eax
push 2
push 0x42a63c
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00405b80
add esp, 0xc
test eax, eax
jne 0x4018f7
mov byte [ebp - 0x135], 0
mov edx, dword [ebp - 0x1c]
add edx, 2
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x13c], 0
jmp 0x401844
mov eax, dword [ebp - 0x13c]
add eax, 1
mov dword [ebp - 0x13c], eax
cmp dword [ebp - 0x13c], 0x14
jge 0x40189b
lea ecx, [ebp - 0x140]
push ecx
push 0x42a640
mov edx, dword [ebp - 0x1c]
add edx, 2
push edx
call fcn.00413a22
add esp, 0xc
cmp eax, 1
jne 0x401887
mov eax, dword [ebp - 0x140]
and eax, 0xff
mov ecx, dword [ebp - 0x13c]
mov byte [ebp + ecx - 0x134], al
jmp 0x401890
mov byte [ebp - 0x135], 1
jmp 0x40189b
mov edx, dword [ebp - 0x1c]
add edx, 5
mov dword [ebp - 0x1c], edx
jmp 0x401835
movzx eax, byte [ebp - 0x135]
test eax, eax
jne 0x4018f7
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 0x4018f7
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 0x4016a8
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.00413572
mov esp, ebp
pop ebp
ret