Function at 0x40d510
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x29c
mov eax, dword [0x5b3890]
xor eax, esp
mov dword [esp + 0x298], eax
mov edx, dword [esp + 0x2a4]
push ebp
mov eax, 0x56da4c
push esi
mov esi, dword [esp + 0x2a8]
mov dword [esp + 0x18], edx
sub edx, eax
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40d540
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [esp + 8]
push eax
push 9
push 0
push str.SoftwareMicrosoftOffice
push esi
call ebp
test eax, eax
je 0x40d583
pop esi
xor al, al
pop ebp
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.0051916c
add esp, 0x29c
ret
mov eax, dword [esp + 8]
push ebx
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x38]
push edx
push ebx
push eax
mov dword [esp + 0x34], 0x80
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x40d7a3
push edi
xor eax, eax
jmp 0x40d5c0
movzx ecx, word [esp + eax + 0x28]
mov word [esp + eax + 0x1a8], cx
add eax, 2
test cx, cx
jne 0x40d5c0
lea edi, [esp + 0x28]
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40d5e0
mov eax, dword [esp + 0x10]
mov ecx, 8
mov esi, str.CommonGeneral
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x14]
push ecx
push 1
push 0
lea edx, [esp + 0x34]
push edx
push eax
call ebp
test eax, eax
jne 0x40d76a
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x12c]
push edx
lea eax, [esp + 0x24]
push eax
push 0
push str.RecentFiles
push ecx
mov dword [esp + 0x3c], 0x80
call fcn.004b42b0
mov edx, dword [esp + 0x2c]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0x18
push edx
mov esi, eax
call edi
test esi, esi
jne 0x40d76a
cmp dword [esp + 0x1c], 1
jne 0x40d76a
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x128]
mov ecx, eax
sub edx, ecx
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40d674
xor eax, eax
jmp 0x40d690
movzx ecx, word [esp + eax + 0x1a8]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x40d690
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x40d6b0
mov edx, dword [str.Word]
mov ecx, dword [0x56da0c]
mov dword [eax], edx
mov edx, dword [0x56da10]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push 1
push 0
lea ecx, [esp + 0x34]
push ecx
push edx
call ebp
test eax, eax
je 0x40d79b
xor eax, eax
jmp 0x40d700
movzx ecx, word [esp + eax + 0x1a8]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x40d700
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x40d720
mov ecx, dword [str.Excel]
mov edx, dword [0x56d9fc]
mov dword [eax], ecx
mov ecx, dword [0x56da00]
mov dword [eax + 4], edx
mov dx, word [0x56da04]
mov dword [eax + 8], ecx
mov word [eax + 0xc], dx
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push 1
push 0
lea ecx, [esp + 0x34]
push ecx
push edx
call ebp
test eax, eax
je 0x40d79b
mov edx, dword [esp + 0x10]
push 0
push 0
push 0
push 0
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x3c]
push ecx
inc ebx
push ebx
push edx
mov dword [esp + 0x38], 0x80
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x40d5b1
jmp 0x40d7a2
mov eax, dword [esp + 0x14]
push eax
call edi
pop edi
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x2a4]
pop ebx
pop esi
pop ebp
xor ecx, esp
mov al, 1
call fcn.0051916c
add esp, 0x29c
ret