Function at 0x10009039
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
push ecx
push edi
push esi
mov al, 0
mov byte [ebp - 0x31], al
push 0
pop dword [ebp - 0xc]
push 0
pop dword [ebp - 0x10]
push 0
pop dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.10008ce8
or eax, eax
je 0x10009262
mov dword [ebp - 0xc], eax
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push str.SYSTEMCurrentControlSetEnumUSBSTOR
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
or eax, eax
jne 0x10009262
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 0
push dword [ebp - 4]
call sub.advapi32.dll_RegQueryInfoKeyA
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x20], 0
jne 0x100090be
push 0x3fff
pop dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
push dword [ebp - 0x20]
push 0x40
call sub.kernel32.dll_GlobalAlloc
or eax, eax
je 0x1000925a
mov dword [ebp - 0x18], eax
mov ecx, 0
cmp dword [ebp - 0x28], 0
jne 0x100090f6
cmp ecx, dword [ebp - 0x1c]
jae 0x100090f6
cmp dword [ebp - 0x10], 0
jne 0x100090f6
cmp dword [ebp - 0xc], 0
jne 0x100090fb
jmp 0x10009252
push dword [ebp - 0x20]
push dword [ebp - 0x18]
call fcn.10001a2c
push ecx
push dword [ebp - 0x20]
lea eax, [ebp - 0x30]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x18]
push ecx
push dword [ebp - 4]
call sub.advapi32.dll_RegEnumKeyExA
mov dword [ebp - 0x28], eax
or eax, eax
jne 0x10009248
push dword [ebp - 0x18]
call fcn.100021b2
mov dword [ebp - 0x20], eax
lea eax, [ebp - 8]
push eax
push 0x20019
push 0
push dword [ebp - 0x18]
push dword [ebp - 4]
call sub.advapi32.dll_RegOpenKeyExA
or eax, eax
jne 0x10009248
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
call fcn.10008ee4
cmp edx, 2
jne 0x10009229
push dword [ebp - 0xc]
pop dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
push 1
lea eax, [ebp - 0x31]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.10003776
lea eax, [ebp - 0xc]
push eax
call fcn.10003856
mov edx, eax
push str.USBSTOR_s_s
call fcn.100021b2
add edx, eax
add edx, dword [ebp - 0x20]
add edx, 0x14
push edx
push 0x40
call sub.kernel32.dll_GlobalAlloc
or eax, eax
je 0x1000921e
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0xc]
push eax
call fcn.10003856
push edx
push dword [ebp - 0x18]
push str.USBSTOR_s_s
push dword [ebp - 0x24]
call sub.user32.dll_wsprintfA
add esp, 0x10
lea eax, [ebp - 0xc]
push eax
call fcn.10004239
push dword [ebp - 0x24]
call fcn.10008c8d
push eax
push str.7_x0RM
push dword [ebp - 0x24]
call sub.user32.dll_wsprintfA
add esp, 0xc
push dword [ebp - 0x24]
call fcn.100021b2
push eax
push dword [ebp - 0x24]
lea eax, [ebp - 0xc]
push eax
call fcn.10003776
push dword [ebp - 0x24]
call sub.kernel32.dll_GlobalFree
push dword [ebp - 0x20]
push dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push eax
call fcn.10003776
jmp 0x10009240
lea eax, [ebp - 0xc]
push eax
call fcn.10004239
jmp 0x10009240
cmp edx, 1
jne 0x10009240
mov dword [ebp - 0x10], eax
push dword [ebp - 0x20]
push dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push eax
call fcn.10003776
push dword [ebp - 8]
call sub.advapi32.dll_RegCloseKey
pop dword [ebp - 0x20]
pop ecx
inc ecx
jmp 0x100090df
push dword [ebp - 0x18]
call sub.kernel32.dll_GlobalFree
push dword [ebp - 4]
call sub.advapi32.dll_RegCloseKey
cmp dword [ebp - 0xc], 0
je 0x10009274
cmp dword [ebp - 0x10], 0
je 0x10009274
cmp dword [ebp - 0x14], 0
jne 0x1000928f
lea eax, [ebp - 0xc]
push eax
call fcn.10004239
lea eax, [ebp - 0x10]
push eax
call fcn.10004239
lea eax, [ebp - 0x14]
push eax
call fcn.10004239
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x14]
pop esi
pop edi
pop ecx
leave
ret 4