Function at 0x53f110
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x3324
call fcn.0054cd40
push ebx
push ebp
push esi
lea eax, [esp + 0x930]
push edi
mov ebx, ecx
xor ebp, ebp
push eax
push 0x5758a0
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x28], 0xff
call fcn.0053e7c0
mov edi, eax
xor esi, esi
cmp edi, ebp
mov dword [esp + 0x30], edi
mov dword [esp + 0x28], esi
jle 0x53f578
lea ecx, [ebx + 0x7774]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x534]
lea ebp, [esp + edx + 0x934]
push ebp
push esi
push str.szUSBDevicePath__d____s_r_n
push eax
call fcn.0054c45b
add esp, 0x10
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x2c], eax
je 0x53f541
mov ecx, dword [esp + 0x14]
cmp dword [ecx], 0
je 0x53f1c2
mov eax, dword [ebx + 0x7b74]
test eax, eax
jne 0x53f541
push ebp
push esi
lea edx, [esp + 0x53c]
push str.hOut___INVALID_HANDLE_VALUE:_szUSBDevicePath__d____s_r_n
push edx
call fcn.0054c45b
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x234]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x734]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 1
rep movsb byte es:[edi], byte [esi]
mov edi, str.SYSTEMCurrentControlSetEnum_
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x23
mov eax, ecx
mov esi, edi
mov edi, edx
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 + 0x23c]
push ecx
mov ecx, ebx
call fcn.0053ec40
push 1
lea edx, [esp + 0x238]
push 0x23
push edx
mov ecx, ebx
mov byte [esp + eax + 0x240], 0x5c
call fcn.0053ec40
mov byte [esp + eax + 0x234], 0x5c
push 1
lea eax, [esp + 0x238]
push 0x23
push eax
mov ecx, ebx
call fcn.0053ec40
mov byte [esp + eax + 0x234], 0
lea edi, [esp + 0x238]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x734]
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 + 0x734]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x5b90c4
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 + 0x24]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0x20019
lea ecx, [esp + 0x73c]
push 0
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x53f51b
mov ecx, 0x40
lea edi, [esp + 0x134]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x20]
lea eax, [esp + 0x134]
push edx
push eax
push 0
push 0
push str.ParentIdPrefix
push ecx
mov dword [esp + 0x38], 0xff
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x134]
push edx
push eax
lea ecx, [esp + 0x53c]
push str.hOut___INVALID_HANDLE_VALUE:_szUSBParentIdPrefix__d____s_r_n
push ecx
call fcn.0054c45b
add esp, 0x10
mov ecx, ebx
push 3
push 0x23
push ebp
call fcn.0053ec40
mov esi, dword [esp + 0x1c]
push 2
push 0x23
push ebp
mov ecx, esi
mov ebx, eax
call fcn.0053ec40
sub ebx, eax
mov ecx, 0x40
or eax, 0xffffffff
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
push 2
push 0x23
push ebp
mov ecx, esi
dec ebx
call fcn.0053ec40
mov ecx, dword [esp + 0x18]
lea edi, [esp + 0x34]
add eax, ecx
mov ecx, ebx
mov edx, ecx
lea esi, [esp + eax + 0x935]
mov eax, dword [esp + 0x3344]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [esp + ebx + 0x34], 0
mov ebx, dword [esp + 0x3338]
test eax, eax
je 0x53f3dc
push ebx
push ebp
call fcn.0054ccc0
add esp, 8
test eax, eax
jne 0x53f437
lea esi, [esp + 0x134]
mov eax, ebx
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x53f409
test cl, cl
je 0x53f405
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x53f409
add eax, 2
add esi, 2
test cl, cl
jne 0x53f3e5
xor eax, eax
jmp 0x53f40e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x53f437
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x34]
push ecx
push eax
push ebx
call fcn.0054d620
add esp, 0xc
test eax, eax
jne 0x53f517
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x20], 0xff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x333c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x24]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x40
lea edi, [esp + 0x434]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
lea ecx, [esp + 0x434]
push eax
push ecx
push 0
push 0
push str.Driver
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, dword [esp + 0x3340]
mov esi, eax
push ebx
lea eax, [esp + 0x538]
push str.szUSBDriver_try___s_r_n
push eax
call fcn.0054c45b
add esp, 0xc
test esi, esi
jne 0x53f501
lea edi, [esp + 0x434]
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x18]
mov edx, ecx
mov esi, edi
mov edi, ebx
push str.szUSBDriver_find___s_r_n
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x18], 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x53c]
mov dword [eax], 1
push ecx
call fcn.0054c45b
add esp, 0xc
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0x5718]
test eax, eax
je 0x53f517
mov dword [esp + 0x10], 1
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x53f567
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
inc esi
add edx, 4
add ecx, 0x100
cmp esi, edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
jl 0x53f166
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3324
ret 0x10
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x3324
ret 0x10