Function at 0x405230
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x7a5c
call fcn.00412c90
push ebx
push esi
mov eax, 0x400
mov esi, 1
push edi
mov dword [esp + 0xc], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
call fcn.00404840
mov eax, dword [ebp + 8]
push eax
call fcn.004046b0
mov ecx, dword [0x441758]
push ecx
lea edx, [esp + 0x170]
push 0x431dcc
push edx
call fcn.00412ec5
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
add esp, 0x10
lea eax, [esp + 0x168]
push eax
push 0x100
lea ecx, [esp + 0x70]
push ecx
push 0x431dc8
push 0x431dbc
push 0x431dac
call ebx
test eax, eax
jne 0x4052bf
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x68]
push 0x431da4
push edx
call fcn.00412972
add esp, 8
test eax, eax
jne 0x4055b3
mov dword [0x441770], esi
mov ecx, 0x1900
lea edi, [esp + 0x1668]
rep stosd dword es:[edi], eax
mov ecx, 8
mov esi, str.SystemCurrentControlSetEnumUSB
lea edi, [esp + 0x268]
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x24]
push eax
push 0x20019
push 0
lea ecx, [esp + 0x274]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
movsw word es:[edi], word [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40556f
lea edx, [esp + 0x1768]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
jmp 0x405340
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0x668]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x60]
push eax
mov eax, dword [esp + 0x1c]
push 0
push 0
push 0
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0x67c]
push edx
push eax
push ecx
call esi
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x10], ebx
jne 0x405552
lea edx, [esp + 0x668]
push edx
lea eax, [esp + 0x26c]
push str.SystemCurrentControlSetEnumUSB_s
push eax
call fcn.00412ec5
add esp, 0xc
lea ecx, [esp + 0x28]
push ecx
push 0x20019
push ebx
lea edx, [esp + 0x274]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405547
mov ecx, 0x100
lea edi, [esp + 0xe68]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x60]
push eax
mov eax, dword [esp + 0x2c]
push ebx
push ebx
push ebx
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0xe7c]
push edx
push ebx
push eax
call esi
test eax, eax
jne 0x40553f
mov ecx, 0x100
lea edi, [esp + 0xa68]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xe68]
push ecx
lea edx, [esp + 0x26c]
push edx
mov dword [esp + 0x40], eax
lea eax, [esp + 0x1270]
push str._s_s
push eax
mov dword [esp + 0x44], 0x400
call fcn.00412ec5
add esp, 0x10
lea ecx, [esp + 0x30]
push ecx
push 0x20019
push ebx
lea edx, [esp + 0x1274]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405530
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0xa6c]
push ecx
lea edx, [esp + 0x40]
push edx
push ebx
push str.CompatibleIDs
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405530
push 0x20
lea ecx, [esp + 0xa6c]
push str.USBClass_08SubClass_06Prot_50
push ecx
call fcn.00412e46
add esp, 0xc
test eax, eax
jne 0x405530
lea edx, [esp + 0x268]
push 0x431d18
push edx
call fcn.00412dc0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x405530
xor edi, edi
lea esi, [esp + 0x1668]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4054d6
sub eax, edx
mov dword [esp + 0x5c], eax
je 0x4054f3
push ebx
push esi
call fcn.00412972
add esp, 8
test eax, eax
je 0x405530
inc edi
add esi, 0x100
cmp edi, 0x64
jl 0x4054d1
mov edx, dword [esp + 0x1c]
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405507
mov eax, dword [esp + 0xc]
cmp eax, 0x400
jge 0x405530
mov ecx, eax
mov eax, dword [esp + 0x1c]
inc ecx
add eax, 0x100
mov dword [esp + 0xc], ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x2c], 0x400
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x18]
inc ecx
cmp ebx, 0x103
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], 0x400
jne 0x405340
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esp + 0xc]
test edi, edi
jle 0x405654
cmp edi, 1
jl 0x405654
lea esi, [esp + 0x1768]
push esi
call fcn.004046b0
add esp, 4
add esi, 0x100
dec edi
mov dword [esp + 0x14], eax
jne 0x405596
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x68]
push eax
call fcn.00412dbb
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
jle 0x405654
cmp eax, esi
jl 0x405654
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
push 0xa
lea edx, [esp + 0x40]
mov dword [esp + 0x54], ecx
push edx
mov dword [esp + 0x5c], ecx
push esi
mov dword [esp + 0x64], ecx
call fcn.00414c77
add esp, 0xc
lea eax, [esp + 0x168]
push eax
push 0x100
lea ecx, [esp + 0x70]
push ecx
push 0x431dc8
lea edx, [esp + 0x4c]
push edx
push 0x431dac
call ebx
test eax, eax
je 0x40564b
lea eax, [esp + 0x68]
push eax
call fcn.004046b0
add esp, 4
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
inc esi
cmp esi, eax
jle 0x4055d4
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret