Function at 0x4067c0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x468
mov eax, dword [0x57f970]
xor eax, esp
mov dword [esp + 0x464], eax
mov eax, dword [edi]
push ebx
push esi
test eax, eax
jg 0x406bf4
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x26a]
push ecx
mov dword [esp + 0x20], 0
mov word [esp + 0x26c], ax
call fcn.00508a80
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x62]
push eax
mov word [esp + 0x64], dx
call fcn.00508a80
add esp, 0xc
xor eax, eax
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push eax
push 0x55b8f8
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [esp + 0x38], 0
mov dword [esp + 0x39], eax
mov dword [esp + 0x3d], eax
mov dword [esp + 0x41], eax
mov dword [esp + 0x45], eax
mov byte [esp + 0x49], al
mov dword [esp + 0x24], eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x406bf2
mov ecx, dword [esp + 0x14]
xor esi, esi
push esi
push esi
push esi
push esi
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x274]
push eax
push esi
push ecx
mov dword [esp + 0x38], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x406be3
lea eax, [esp + 0x260]
push eax
lea ecx, [esp + 0x5c]
mov edx, 0x104
push 0x55b974
inc esi
push ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], edx
call fcn.004017a0
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 3
push 0x80
lea edx, [esp + 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x406bb6
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x28]
push ecx
push 4
lea edx, [esp + 0x20]
push edx
push 0x170002
push esi
mov dword [esp + 0x2c], 0x10114
call ebx
test eax, eax
je 0x406bab
cmp dword [esp + 0x1c], 0
jne 0x406bab
mov eax, dword [edi]
add eax, 0xc2
shl eax, 4
add eax, edi
push eax
lea ecx, [esp + 0x264]
push ecx
call dword [sym.imp.ole32.dll_CLSIDFromString]
lea edx, [esp + 0x24]
push edx
lea edx, [esp + 0x264]
mov ecx, edi
call fcn.00406350
test eax, eax
jne 0x406992
push eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov word [esp + 0x38], ax
lea eax, [esp + 0x14]
push eax
push 0x12
lea ecx, [esp + 0x30]
push ecx
push 4
lea edx, [esp + 0x20]
push edx
push 0x170002
push esi
mov dword [esp + 0x2c], 0x10205
call ebx
movzx eax, byte [esp + 0x29]
movzx ecx, byte [esp + 0x28]
movzx edx, byte [esp + 0x27]
push eax
movzx eax, byte [esp + 0x2a]
push ecx
movzx ecx, byte [esp + 0x2d]
push edx
movzx edx, byte [esp + 0x30]
push eax
push ecx
push edx
lea eax, [esp + 0x50]
push 0x55b984
push eax
call fcn.005075f6
mov eax, dword [edi]
mov edx, dword [esp + 0x58]
lea ecx, [eax + eax*8]
lea eax, [edi + ecx*2 + 0x16c]
mov dword [eax], edx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x60]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x64]
add esp, 0x20
mov dword [eax + 0xc], ecx
mov dl, byte [esp + 0x48]
push 0
mov byte [eax + 0x10], dl
lea eax, [esp + 0x14]
push eax
push 0x12
lea ecx, [esp + 0x30]
push ecx
push 4
lea edx, [esp + 0x20]
push edx
push 0x170002
push esi
mov dword [esp + 0x2c], 0x1010101
call ebx
test eax, eax
je 0x406a80
movzx eax, byte [esp + 0x29]
movzx ecx, byte [esp + 0x28]
movzx edx, byte [esp + 0x27]
push eax
movzx eax, byte [esp + 0x2a]
push ecx
movzx ecx, byte [esp + 0x2d]
push edx
movzx edx, byte [esp + 0x30]
push eax
push ecx
push edx
lea eax, [esp + 0x50]
push 0x55b9a4
push eax
call fcn.005075f6
mov eax, dword [edi]
mov edx, dword [esp + 0x58]
lea ecx, [eax + eax*8]
lea eax, [edi + ecx*2 + 4]
mov dword [eax], edx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x60]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x64]
mov dword [eax + 0xc], ecx
mov dl, byte [esp + 0x68]
add esp, 0x20
mov byte [eax + 0x10], dl
xor eax, eax
push eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov word [esp + 0x38], ax
lea eax, [esp + 0x14]
push eax
push 0x12
lea ecx, [esp + 0x30]
push ecx
push 4
lea edx, [esp + 0x20]
push edx
push 0x170002
push esi
mov dword [esp + 0x2c], 0x1010102
call ebx
test eax, eax
je 0x406b23
movzx eax, byte [esp + 0x29]
movzx ecx, byte [esp + 0x28]
movzx edx, byte [esp + 0x27]
push eax
movzx eax, byte [esp + 0x2a]
push ecx
movzx ecx, byte [esp + 0x2d]
push edx
movzx edx, byte [esp + 0x30]
push eax
push ecx
push edx
lea eax, [esp + 0x50]
push 0x55b9c4
push eax
call fcn.005075f6
mov eax, dword [edi]
mov edx, dword [esp + 0x58]
lea ecx, [eax + eax*8]
lea eax, [edi + ecx*2 + 0xb8]
mov dword [eax], edx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x60]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x64]
mov dword [eax + 0xc], ecx
mov dl, byte [esp + 0x68]
add esp, 0x20
mov byte [eax + 0x10], dl
push 0x208
lea eax, [esp + 0x5c]
push 0
push eax
mov dword [esp + 0x18], 0x1010d
call fcn.00508a80
add esp, 0xc
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x208
lea edx, [esp + 0x64]
push edx
push 4
lea eax, [esp + 0x20]
push eax
push 0x170002
push esi
call ebx
test eax, eax
je 0x406ba0
cmp dword [esp + 0x10], 0
jbe 0x406ba0
lea ebx, [esp + 0x58]
call fcn.004017e0
mov ebx, eax
test ebx, ebx
je 0x406ba0
mov ecx, dword [esp + 0x10]
mov eax, dword [edi]
lea edx, [ecx + ecx]
push edx
shl eax, 8
lea ecx, [eax + edi + 0x220]
push ebx
push ecx
call fcn.0050b020
add esp, 0xc
push ebx
call fcn.00408cec
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [edi]
jmp 0x406bb6
test esi, esi
je 0x406bb6
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0
push 0
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x274]
push eax
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x406899
mov eax, dword [esp + 0x14]
test eax, eax
je 0x406bf2
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [edi]
mov ecx, dword [esp + 0x46c]
pop esi
pop ebx
xor ecx, esp
call fcn.005072ec
mov esp, ebp
pop ebp
ret