Function at 0x10004180
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1000ecac
mov eax, dword fs:[0]
push eax
sub esp, 0x830
mov eax, dword [0x10014034]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x830], esi
mov dword [ebp - 0x82c], esi
mov dword [ebp - 0x828], esi
lea eax, [ebp - 0x818]
push eax
mov dword [ebp - 4], esi
mov dword [ebp - 0x824], esi
call fcn.10005f30
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x818]
mov edi, dword [ecx - 0xc]
cmp edi, esi
jge 0x100041f5
push 0x80070057
call fcn.10009030
mov eax, dword [ecx - 8]
mov edx, 1
sub edx, dword [ecx - 4]
sub eax, edi
or eax, edx
jge 0x10004219
mov eax, edi
lea ecx, [ebp - 0x818]
call fcn.10007280
mov ecx, dword [ebp - 0x818]
lea edx, [edi + 1]
push edx
push ecx
call dword [sym.imp.MSVCR100.dll__wcsupr_s]
mov eax, dword [ebp - 0x818]
add esp, 8
cmp edi, dword [eax - 8]
jg 0x100041eb
mov dword [eax - 0xc], edi
mov ecx, dword [ebp - 0x818]
xor eax, eax
mov word [ecx + edi*2], ax
mov eax, dword [ebp - 0x818]
lea edi, [eax - 0x10]
cmp edi, edi
je 0x10004296
cmp dword [edi + 0xc], esi
lea ebx, [edi + 0xc]
jl 0x10004286
mov edx, dword [edi]
cmp edx, edx
jne 0x10004286
mov eax, edi
call fcn.100072e0
mov esi, eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x1000427b
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
add esi, 0x10
mov dword [ebp - 0x818], esi
jmp 0x10004296
mov ebx, dword [eax - 0xc]
push eax
lea ecx, [ebp - 0x818]
push ecx
call fcn.100071c0
lea edx, [ebp - 0x820]
push edx
push 0x20019
push 0
push str.SYSTEMCurrentControlSetEnumUSB
push closesocket
mov dword [ebp - 0x820], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1000453f
mov eax, dword [ebp - 0x820]
mov dword [ebp - 0x830], eax
mov dword [ebp - 0x82c], 0
xor ecx, ecx
push 0x7fe
push ecx
lea edx, [ebp - 0x812]
push edx
mov word [ebp - 0x814], cx
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0x83c]
push eax
mov eax, dword [ebp - 0x824]
push 0
push 0
push 0
lea ecx, [ebp - 0x834]
push ecx
mov ecx, dword [ebp - 0x820]
lea edx, [ebp - 0x814]
push edx
push eax
push ecx
mov dword [ebp - 0x834], 0x400
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x1000453f
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x81c], edi
lea ecx, [ebp - 0x814]
mov byte [ebp - 4], 2
test ecx, 0xffff0000
jne 0x10004388
mov edx, ecx
movzx esi, dx
push esi
call fcn.10008da0
add esp, 4
test eax, eax
je 0x100043bb
push eax
mov eax, esi
lea edi, [ebp - 0x81c]
call fcn.10006d50
jmp 0x100043b5
lea eax, [ebp - 0x814]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10004391
sub eax, edx
lea ecx, [ebp - 0x814]
sar eax, 1
push ecx
lea edx, [ebp - 0x81c]
push edx
mov ebx, eax
call fcn.100071c0
mov edi, dword [ebp - 0x81c]
mov byte [ebp - 4], 3
mov ebx, dword [edi - 0xc]
test ebx, ebx
js 0x100041eb
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, ebx
or eax, ecx
jge 0x100043ee
mov eax, ebx
lea ecx, [ebp - 0x81c]
call fcn.10007280
mov edi, dword [ebp - 0x81c]
lea eax, [ebx + 1]
push eax
push edi
call dword [sym.imp.MSVCR100.dll__wcsupr_s]
add esp, 8
cmp ebx, dword [edi - 8]
jg 0x100041eb
xor ecx, ecx
mov dword [edi - 0xc], ebx
mov word [edi + ebx*2], cx
lea ebx, [edi - 0x10]
cmp ebx, ebx
je 0x10004463
cmp dword [ebx + 0xc], ecx
lea esi, [ebx + 0xc]
jl 0x1000444d
mov edx, dword [ebx]
cmp edx, edx
jne 0x1000444d
mov eax, ebx
call fcn.100072e0
mov edi, eax
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x10004442
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
add edi, 0x10
mov dword [ebp - 0x81c], edi
jmp 0x10004463
mov ebx, dword [edi - 0xc]
push edi
lea ecx, [ebp - 0x81c]
push ecx
call fcn.100071c0
mov edi, dword [ebp - 0x81c]
mov eax, dword [ebp - 0x818]
test eax, eax
je 0x100044ab
cmp dword [edi - 0xc], 0
jl 0x100044ab
push eax
push edi
call dword [sym.imp.MSVCR100.dll_wcsstr]
add esp, 8
test eax, eax
je 0x100044ab
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x100044ab
mov eax, dword [ebp - 0x818]
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x100044da
push eax
push edi
call dword [sym.imp.MSVCR100.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x100044e4
inc dword [ebp - 0x824]
add edi, 0xfffffff0
mov byte [ebp - 4], 1
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x100042dc
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
jmp 0x100042dc
push 0x80004005
call fcn.10009030
add edi, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10004504
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x818]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x1000452a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x820]
test eax, eax
je 0x1000453b
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
jmp 0x10004578
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x818]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10004565
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x830]
test eax, eax
je 0x10004576
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1000d9d2
mov esp, ebp
pop ebp
ret 4