Function at 0x40c980
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xac
and ecx, 0x40
mov dword [ebp - 0x5c], edx
je 0x40c9a8
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [0x414dec], 1
mov esi, edx
mov edi, eax
mov dword [esp + 4], 0x7f02
mov dword [esp], 0
call dword [0x4156b8]
sub esp, 8
mov dword [esp], eax
mov eax, dword [0x415714]
mov dword [ebp - 0x68], eax
call eax
mov dword [ebp - 0x64], eax
mov eax, dword [0x415704]
sub esp, 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xb
mov dword [esp], edi
mov dword [ebp - 0x6c], eax
call eax
lea eax, [ebp - 0x50]
sub esp, 0x10
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.0040c8d0
mov dword [ebp - 0x60], eax
test eax, eax
je 0x40caa8
mov ecx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x50]
cmp word [ecx], 0
jne 0x40cce0
mov dword [ebp - 0x4c], eax
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
lea edx, [ebp - 0x54]
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x58]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [ebp - 0x70], eax
call eax
sub esp, 0x30
test eax, eax
je 0x40cb40
mov ebx, dword [sym.imp.ucrtbase.dll_free]
lea ecx, [ebp - 0x40]
mov eax, dword [ebp - 0x5c]
mov edx, 0x40
mov dword [ebp - 0x40], 8
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x3c], eax
mov eax, 0x40
mov dword [ebp - 0x38], eax
mov dword [esp + 0xc], ecx
mov dword [esp], edi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x113f
mov esi, dword [ebp - 0x6c]
mov eax, esi
call eax
mov eax, esi
sub esp, 0x10
mov dword [esp], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0xb
call eax
mov eax, dword [ebp - 0x64]
sub esp, 0x10
mov dword [esp], eax
mov eax, dword [ebp - 0x68]
call eax
mov eax, dword [ebp - 0x60]
mov dword [0x414dec], 0
sub esp, 4
mov dword [esp], eax
call ebx
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x54]
lea edx, [eax + 1]
lea eax, [edx + edx]
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x74], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x58]
mov esi, eax
test edx, edx
mov edx, dword [ebp - 0x74]
je 0x40cd20
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
lea ecx, [ebp - 0x40]
xor ebx, ebx
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x74], eax
jmp 0x40cbaf
mov dword [ebp - 0x40], 0
xor eax, eax
mov dword [esp + 4], eax
mov ecx, esi
mov eax, edi
mov dword [esp], 0
mov edx, dword [ebp - 0x5c]
call fcn.0040c3c0
add ebx, 1
cmp ebx, dword [ebp - 0x58]
jae 0x40ccb0
mov edx, dword [ebp - 0x54]
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
jne 0x40cba0
lea eax, [ebp - 0x48]
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
jne 0x40cb80
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov eax, dword [ebp - 0x78]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
mov eax, dword [ebp - 0x70]
call eax
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x48]
sub esp, 0x30
mov dword [esp], eax
mov ecx, dword [ebp - 0x74]
call ecx
mov eax, dword [ebp - 0x7c]
sub esp, 4
test eax, eax
jne 0x40cb80
mov eax, dword [ebp - 0x40]
jmp 0x40cb89
mov ecx, dword [ebp - 0x78]
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x70], ecx
mov dword [esp], edx
mov eax, dword [ebp - 0x74]
call eax
mov ebx, dword [sym.imp.ucrtbase.dll_free]
sub esp, 4
mov dword [esp], esi
call ebx
mov ecx, dword [ebp - 0x70]
jmp 0x40cab1
lea edx, [ebp - 0x4c]
mov dword [esp + 0xc], 0x20019
mov dword [esp + 0x10], edx
mov dword [esp + 8], 0
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
jne 0x40caa8
mov eax, dword [ebp - 0x4c]
jmp 0x40ca3a
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x74], eax
jmp 0x40ccb3