Function at 0x401210
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov eax, dword [0x41aa04]
sub esp, 0x520
cmp eax, 0x1f4
push ebx
push ebp
push esi
push edi
je 0x401430
cmp eax, 0x1f5
je 0x401430
cmp eax, 0x1f6
je 0x401430
mov eax, dword [esp + 0x534]
or ecx, 0xffffffff
lea edx, [esp + 0x130]
mov dword [esp + 0x18], 0
lea edi, [eax + 5]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 0x100
and ecx, 3
mov dword [esp + 0x14], eax
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x28], eax
mov edi, str.Config_ManagerEnum
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push edx
push 0x80000006
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
lea edx, [esp + 0x340]
push ecx
push edx
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x401418
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
or ecx, 0xffffffff
mov edi, str.Config_ManagerEnum
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x415108
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x30]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x330]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x2c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 1
lea ecx, [esp + 0x38]
push 0
push ecx
push 0x80000006
call ebx
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x28]
lea eax, [esp + 0x430]
push edx
push eax
push 0
push 0
push str.HardWareKey
push ecx
call ebp
mov edx, dword [esp + 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x130]
lea ecx, [esp + 0x430]
push eax
push ecx
call fcn.00410930
add esp, 8
test eax, eax
je 0x40175e
lea edx, [esp + 0x1c]
mov eax, 0x100
push edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
push 0
push 0
lea ecx, [esp + 0x20]
push 0
lea edx, [esp + 0x340]
inc eax
push ecx
push edx
mov dword [esp + 0x30], eax
push eax
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x4012f7
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x520
ret
mov edi, dword [esp + 0x534]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push edx
push 0x80000002
call ebp
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x4016ed
mov eax, dword [esp + 0x10]
push eax
call ebx
lea ecx, [esp + 0x230]
lea edx, [esp + 0x30]
push ecx
push str.Service
push edx
push 0x80000002
call fcn.00401040
add esp, 0x10
test eax, eax
je 0x4016ed
lea eax, [esp + 0x230]
push eax
push str.UsbC
call fcn.00410930
add esp, 8
test eax, eax
jne 0x4015ad
mov edi, str.Control
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x30]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
push 0x80000002
call ebp
test eax, eax
jne 0x401423
mov edx, dword [esp + 0x10]
push edx
call ebx
cmp dword [0x41aa04], 0x1f4
jne 0x40155e
lea eax, [esp + 0x130]
lea ecx, [esp + 0x30]
push eax
push str.DeviceReference
push ecx
push 0x80000002
call fcn.00401040
add esp, 0x10
test eax, eax
je 0x401423
pop edi
pop esi
pop ebp
mov dword [0x41aa00], 1
xor eax, eax
pop ebx
add esp, 0x520
ret
lea edx, [esp + 0x18]
mov dword [esp + 0x18], 0
push edx
push str.Count
push str.SYSTEMCurrentControlSetServicesUsbCEnum
push 0x80000002
call fcn.00401040
add esp, 0x10
test eax, eax
je 0x401423
mov eax, dword [esp + 0x18]
test eax, eax
jbe 0x401423
pop edi
pop esi
pop ebp
mov dword [0x41aa00], 1
xor eax, eax
pop ebx
add esp, 0x520
ret
lea eax, [esp + 0x230]
push eax
push str.usbhub
call fcn.00410930
add esp, 8
test eax, eax
jne 0x4016d5
mov eax, dword [0x41aa04]
cmp eax, 0x1f5
je 0x4015e1
cmp eax, 0x1f6
jne 0x4016d5
lea edx, [esp + 0x14]
xor ecx, ecx
push edx
push str.Count
xor ebx, ebx
mov dword [esp + 0x26], ecx
push str.SYSTEMCurrentControlSetServicesusbhubEnum
push 0x80000002
mov dword [esp + 0x24], ebx
mov byte [esp + 0x2c], 0x30
mov byte [esp + 0x2d], bl
mov dword [esp + 0x32], ecx
call fcn.00401040
add esp, 0x10
test eax, eax
je 0x401423
mov eax, dword [esp + 0x14]
cmp eax, ebx
jbe 0x401423
jle 0x401423
mov dl, byte [esp + 0x1c]
lea eax, [esp + 0x130]
lea ecx, [esp + 0x1c]
push eax
push ecx
add dl, bl
push str.SYSTEMCurrentControlSetServicesusbhubEnum
push 0x80000002
mov byte [esp + 0x2c], dl
call fcn.00401040
add esp, 0x10
test eax, eax
je 0x4016bb
lea edx, [esp + 0x4e]
lea eax, [esp + 0x130]
push edx
push eax
call fcn.00410930
add esp, 8
test eax, eax
jne 0x4016bb
mov edi, str.Control
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x30]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
push 0x80000002
call ebp
test eax, eax
je 0x4017c8
mov eax, dword [esp + 0x14]
inc ebx
cmp ebx, eax
jl 0x401630
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x520
ret
lea edx, [esp + 0x230]
push edx
call section..text
add esp, 4
test eax, eax
je 0x401423
mov edi, str.Control
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
push 0x80000002
call ebp
test eax, eax
jne 0x401423
mov edx, dword [esp + 0x10]
push edx
call ebx
lea eax, [esp + 0x130]
lea ecx, [esp + 0x30]
push eax
push str.ActiveService
push ecx
push 0x80000002
call fcn.00401040
add esp, 0x10
test eax, eax
je 0x40176e
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x520
ret
lea edx, [esp + 0x130]
lea eax, [esp + 0x30]
push edx
push str.DeviceReference
push eax
push 0x80000002
call fcn.00401040
add esp, 0x10
test eax, eax
je 0x4017a1
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x520
ret
lea ecx, [esp + 0x130]
lea edx, [esp + 0x30]
push ecx
push str.AllocConfig
push edx
push 0x80000002
call fcn.00401040
add esp, 0x10
test eax, eax
je 0x401423
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x520
ret