Function at 0x405680
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push ebp
xor edx, edx
mov ecx, str.Recent_file_list
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x698]
push ebx
sub esp, 0x6cc
call sym.unk_52
test eax, eax
je 0x4056b0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, eax
xor eax, eax
mov dword [ebp - 0x68e], 0x250026
lea esi, [ebp - 0x226]
mov word [ebp - 0x686], ax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x68a], 0x200064
mov dword [esp], eax
mov dword [ebp - 0x678], 0x418b40
mov dword [ebp - 0x674], 0x418920
mov dword [ebp - 0x670], 0x418700
mov dword [ebp - 0x66c], 0x4184e0
mov dword [ebp - 0x694], 0x208
call sub.user32.dll_GetMenu
mov dword [ebp - 0x644], esi
lea esi, [ebp - 0x636]
sub esp, 4
mov dword [ebp - 0x6a0], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x3f1
mov dword [esp], eax
mov dword [ebp - 0x668], 0x30
mov dword [ebp - 0x664], 0x162
mov dword [ebp - 0x660], 0
mov dword [ebp - 0x658], 0x3ed
call sub.user32.dll_RemoveMenu
sub esp, 0xc
lea edi, [ebx + 1]
lea eax, [ebp - 0x684]
mov dword [esp + 4], str.File_d
add ebx, 0x3ed
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [ebp - 0x69c], edi
call sub.user32.dll_wsprintfW
mov eax, dword [ebp - 0x6a0]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0
mov dword [esp], eax
call sub.user32.dll_RemoveMenu
lea eax, [ebp - 0x694]
mov ebx, dword [ebp + edi*4 - 0x67c]
sub esp, 0xc
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x684]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x698]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call sub.advapi32.dll_RegQueryValueExW
sub esp, 0x18
test eax, eax
jne 0x40593d
mov eax, dword [ebp - 0x69c]
mov dword [ebp - 0x648], ebx
mov dword [esp + 8], eax
lea eax, [ebp - 0x68e]
mov dword [esp + 4], eax
lea eax, [ebp - 0x226]
mov dword [esp], eax
call sub.user32.dll_wsprintfW
xor eax, eax
movzx edx, word [ebx + eax]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x405822
lea edi, [ebp - 0x42e]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], edi
mov dword [esp + 8], 0
mov dword [esp + 4], 5
mov dword [esp], 0
call sub.shell32.dll_SHGetFolderPathW
sub esp, 0x14
mov dword [esp], esi
call sym.unk_105
mov ebx, eax
xor eax, eax
mov word [ebx - 2], ax
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.kernel32.dll_lstrcmpiW
movzx ecx, word [ebx]
sub esp, 8
test eax, eax
je 0x4058a8
test cx, cx
je 0x405995
mov eax, ebx
add eax, 2
cmp word [eax], 0
jne 0x405894
sub eax, ebx
cmp eax, 0x42
jle 0x405995
mov eax, 0x5c
mov word [ebx - 2], ax
cmp word [ebp - 0x226], 0
lea eax, [ebp - 0x226]
je 0x4058e3
add eax, 2
cmp word [eax], 0
jne 0x4058c1
add eax, 2
add ebx, 2
mov word [eax - 2], cx
test cx, cx
je 0x4058f2
lea esi, [esi]
movzx ecx, word [ebx]
add eax, 2
add ebx, 2
mov word [eax - 2], cx
test cx, cx
jne 0x4058e0
lea eax, [ebp - 0x668]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x6a0]
mov dword [esp + 4], 0x3e8
mov dword [esp], eax
call sub.user32.dll_InsertMenuItemW
mov ebx, dword [ebp - 0x69c]
add dword [ebp - 0x658], 1
mov dword [ebp - 0x694], 0x208
sub esp, 0x10
cmp ebx, 4
jne 0x40576a
lea eax, [ebp - 0x668]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x6a0]
mov dword [esp + 4], 0x3e8
mov dword [esp], eax
mov dword [ebp - 0x660], 0x800
mov dword [ebp - 0x664], 0x102
call sub.user32.dll_InsertMenuItemW
mov eax, dword [ebp - 0x698]
sub esp, 0x10
mov dword [esp], eax
call sub.advapi32.dll_RegCloseKey
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, 0x5c
mov word [ebx - 2], di
cmp ebx, esi
jbe 0x405a45
xor edi, edi
mov edx, esi
mov word [ebp - 0x6a4], cx
jmp 0x4059c0
cmp ax, 0x2f
je 0x4059c9
add edx, 2
cmp ebx, edx
jbe 0x4059fe
movzx eax, word [edx]
cmp ax, 0x5c
jne 0x4059b3
mov ecx, edx
sub ecx, esi
sar ecx, 1
mov eax, ecx
test edi, edi
jne 0x405a4e
cmp word [ebp - 0x6a4], 0
je 0x4059f0
mov eax, ebx
add eax, 2
cmp word [eax], 0
jne 0x4059e1
sub eax, ebx
sar eax, 1
add eax, ecx
cmp eax, 0x21
jg 0x405a45
mov edi, edx
add edx, 2
cmp ebx, edx
ja 0x4059c0
movzx ecx, word [ebp - 0x6a4]
movzx eax, word [ebp - 0x226]
cmp ebx, edi
je 0x4058b1
lea edx, [ebp - 0x226]
test ax, ax
je 0x405a29
nop
add edx, 2
cmp word [edx], 0
jne 0x405a20
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [esi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405a30
jmp 0x4058f2
movzx eax, word [ebp - 0x226]
jmp 0x405a14
mov dword [ebp - 0x6a8], ecx
movzx ecx, word [ebp - 0x6a4]
test cx, cx
je 0x405bc0
mov eax, ebx
lea esi, [esi]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x405a70
sub eax, ebx
sar eax, 1
add eax, dword [ebp - 0x6a8]
cmp eax, 0x21
jg 0x405a05
mov eax, ecx
mov dword [ebp - 0x6ac], ebx
xor edi, edi
cmp edx, ebx
ja 0x405a45
mov dword [ebp - 0x6a4], edi
mov edi, dword [ebp - 0x6ac]
jmp 0x405ac0
cmp ax, 0x2f
je 0x405ac6
sub edi, 2
cmp edx, edi
ja 0x405af6
movzx eax, word [edi]
cmp ax, 0x5c
jne 0x405ab0
test cx, cx
je 0x405bb5
mov eax, ebx
add eax, 2
cmp word [eax], 0
jne 0x405ad1
sub eax, ebx
sar eax, 1
add eax, dword [ebp - 0x6a8]
lea eax, [ebx + eax*2]
sub eax, edi
cmp eax, 0x42
jg 0x405af6
mov dword [ebp - 0x6a4], edi
jmp 0x405ab6
mov edi, dword [ebp - 0x6a4]
cmp edx, ebx
je 0x4058b1
movzx eax, word [ebp - 0x226]
test edi, edi
je 0x405a14
cmp edx, edi
je 0x405a14
xor ecx, ecx
mov word [edx + 2], cx
lea edx, [ebp - 0x226]
test ax, ax
je 0x405b39
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x405b30
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [esi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405b40
cmp word [ebp - 0x226], 0
lea edx, [ebp - 0x226]
je 0x405b69
add edx, 2
cmp word [edx], 0
jne 0x405b60
xor eax, eax
mov ecx, 0x2e
jmp 0x405b79
movzx ecx, word [eax + 0x411520]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405b72
cmp word [ebp - 0x226], 0
lea edx, [ebp - 0x226]
je 0x405b9e
add edx, 2
cmp word [edx], 0
jne 0x405b95
xor eax, eax
movzx ecx, word [edi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405ba0
jmp 0x4058f2
mov eax, dword [ebp - 0x6a8]
jmp 0x405ae4
mov eax, dword [ebp - 0x6a8]
jmp 0x405a83