Function at 0x40d2c0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
lea eax, [ebp - 0x50]
sub esp, 0x8c
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x50], 0
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.0040c960
test eax, eax
je 0x40d3d0
mov esi, eax
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x40d3d0
cmp word [esi], 0
jne 0x40d3e0
mov dword [ebp - 0x4c], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], esi
mov dword [ebp - 0x60], eax
call eax
lea eax, [ebp - 0x40]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x44]
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], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
mov dword [ebp - 0x64], eax
call eax
sub esp, 0x30
test eax, eax
jne 0x40d3d0
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x34], 0x40
mov edi, dword [ebp - 0x5c]
mov esi, dword [0x4166fc]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x30], edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x113f
mov dword [esp], ebx
call esi
sub esp, 0x10
test eax, eax
jne 0x40d450
lea esi, cs:[esi]
nop
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [ebp - 0x4c]
mov dword [esp + 0xc], 0x20019
mov dword [esp + 0x10], edx
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
je 0x40d30d
test byte [0x4102e4], 8
je 0x40d3d0
mov eax, esi
call fcn.0040c670
mov dword [esp + 0xc], str.RegOpenKeyEx_failed___s_was_probably_removed._n
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0x412ef8
mov dword [esp + 4], 0x4102e4
mov dword [esp], 3
call fcn.0040c900
jmp 0x40d3d0
mov dword [esp + 0xc], 0x20
mov dword [esp + 8], edi
mov dword [esp + 4], 0x1127
mov dword [esp], ebx
call esi
sub esp, 0x10
test eax, eax
je 0x40d6f0
mov eax, dword [ebp - 0x40]
mov edx, dword [sym.imp.ucrtbase.dll_malloc]
lea edi, [eax + 1]
lea ecx, [edi + edi]
mov dword [ebp - 0x40], edi
mov dword [esp], ecx
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x58], edx
call edx
mov ecx, dword [ebp - 0x68]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x54], eax
mov dword [esp], ecx
mov edx, dword [ebp - 0x58]
call edx
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x24], eax
test edx, edx
je 0x40d713
mov dword [ebp - 0x58], 0
mov eax, edi
jmp 0x40d4d3
add dword [ebp - 0x58], 1
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x44]
jae 0x40d710
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
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 eax, dword [ebp - 0x54]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
jne 0x40d4c0
lea eax, [ebp - 0x48]
mov dword [ebp - 0x38], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x54]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
je 0x40d630
mov eax, dword [ebp - 0x5c]
mov dword [esp + 8], 4
mov dword [esp + 0xc], eax
jmp 0x40d5c7
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 1
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x113e
mov dword [esp], ebx
call esi
mov ecx, dword [ebp - 0x24]
sub esp, 0x10
test eax, eax
je 0x40d610
mov eax, dword [ebp - 0x54]
mov dword [esp], ecx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
je 0x40d4c0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], 0x110a
mov dword [esp], ebx
call esi
sub esp, 0x10
mov edi, eax
test eax, eax
jne 0x40d570
test byte [0x4102e4], 8
jne 0x40d6b8
mov eax, dword [ebp - 0x38]
mov dword [esp], 0
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x54]
mov eax, ebx
mov edx, dword [ebp - 0x5c]
call fcn.0040c450
jmp 0x40d4c0
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x58], ecx
mov dword [esp], eax
mov ebx, dword [ebp - 0x60]
call ebx
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call ebx
jmp 0x40d3d0
lea eax, [ebp - 0x38]
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 dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
mov eax, dword [ebp - 0x64]
call eax
sub esp, 0x30
test eax, eax
je 0x40d6a0
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x40d55a
mov eax, dword [ebp - 0x54]
call fcn.0040c670
mov dword [esp + 0xc], str.New_subkey__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0x412ef8
mov dword [esp + 4], 0x4102e4
mov dword [esp], 3
call fcn.0040c900
jmp 0x40d5ea
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
mov eax, 1
jmp 0x40d3d2
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
mov edi, dword [ebp - 0x60]
call edi
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, dword [ebp - 0x5c]
sub esp, 4
mov dword [esp + 8], 4
mov dword [esp + 4], 0x110a
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call esi
sub esp, 0x10
mov edi, eax
test eax, eax
je 0x40d6ff
mov dword [ebp - 0x54], esi
mov esi, ebx
mov dword [esp + 0xc], edi
mov ebx, edi
mov dword [esp + 8], 1
mov dword [esp + 4], 0x110a
mov dword [esp], esi
mov eax, dword [ebp - 0x54]
call eax
mov edx, ebx
sub esp, 0x10
mov edi, eax
mov eax, esi
call fcn.0040d2c0
test eax, eax
je 0x40d7a0
test edi, edi
jne 0x40d762
jmp 0x40d6ff
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1101
mov dword [esp], esi
mov eax, dword [ebp - 0x54]
call eax
sub esp, 0x10
jmp 0x40d792