Function at 0x405580
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 dbg.registry_get_handle
test eax, eax
je 0x4055b0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, eax
xor eax, eax
mov dword [ebp - 0x690], 0x250026
lea ebx, [ebp - 0x226]
mov word [ebp - 0x688], ax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x68c], 0x200064
mov dword [ebp - 0x678], global_file1
mov dword [ebp - 0x674], global_file2
mov dword [ebp - 0x670], global_file3
mov dword [ebp - 0x66c], global_file4
mov dword [ebp - 0x694], 0x208
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetMenu]
mov dword [ebp - 0x644], ebx
sub esp, 4
mov dword [ebp - 0x69c], eax
mov dword [ebp - 0x668], 0x30
mov dword [ebp - 0x664], 0x162
mov dword [ebp - 0x660], 0
mov dword [ebp - 0x658], 0x3ed
mov dword [esp], eax
mov eax, dword [sym.imp.user32.dll_RemoveMenu]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x3f1
mov dword [ebp - 0x6a4], eax
call eax
sub esp, 0xc
mov ebx, edi
lea eax, [ebp - 0x684]
add edi, 1
mov dword [esp + 4], str.File_d
add ebx, 0x3ed
mov dword [esp + 8], edi
mov dword [esp], eax
call dword [sym.imp.user32.dll_wsprintfW]
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x69c]
mov dword [esp], eax
mov eax, dword [ebp - 0x6a4]
call eax
mov esi, dword [ebp + edi*4 - 0x67c]
lea eax, [ebp - 0x694]
sub esp, 0xc
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x684]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x698]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
jne 0x405856
lea eax, [ebp - 0x690]
mov dword [ebp - 0x648], esi
lea ebx, [ebp - 0x636]
mov dword [esp + 4], eax
lea eax, [ebp - 0x226]
mov dword [esp + 8], edi
mov dword [esp], eax
call dword [sym.imp.user32.dll_wsprintfW]
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [esi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x405730
lea edx, [ebp - 0x42e]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 5
mov dword [esp], 0
call dword [sym.imp.shell32.dll_SHGetFolderPathW]
sub esp, 0x14
mov dword [esp], ebx
call sym._file_basename
lea edx, [ebp - 0x42e]
mov esi, eax
xor eax, eax
mov word [esi - 2], ax
mov dword [esp + 4], edx
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
je 0x4057cc
movzx eax, word [esi]
mov word [ebp - 0x69e], ax
test ax, ax
je 0x4058b0
mov eax, esi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4057b8
sub eax, esi
cmp eax, 0x42
jle 0x4058b0
mov eax, 0x5c
mov word [esi - 2], ax
cmp word [ebp - 0x226], 0
lea edx, [ebp - 0x226]
je 0x4057f1
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4057e8
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [esi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4057f8
lea esi, [esi]
nop
lea eax, [ebp - 0x668]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x3e8
mov eax, dword [ebp - 0x69c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_InsertMenuItemW]
add dword [ebp - 0x658], 1
mov dword [ebp - 0x694], 0x208
sub esp, 0x10
cmp edi, 4
jne 0x40566d
mov dword [ebp - 0x660], 0x800
lea eax, [ebp - 0x668]
mov dword [ebp - 0x664], 0x102
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x3e8
mov eax, dword [ebp - 0x69c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_InsertMenuItemW]
mov eax, dword [ebp - 0x698]
sub esp, 0x10
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x5c
mov word [esi - 2], ax
cmp ebx, esi
jae 0x40592f
mov dword [ebp - 0x6a8], edi
xor ecx, ecx
mov eax, ebx
jmp 0x4058dd
cmp dx, 0x2f
je 0x4058e6
add eax, 2
cmp eax, esi
jae 0x405921
movzx edx, word [eax]
cmp dx, 0x5c
jne 0x4058d0
mov edi, eax
sub edi, ebx
sar edi, 1
mov edx, edi
test ecx, ecx
jne 0x405965
cmp word [ebp - 0x69e], 0
je 0x40590f
mov edx, esi
nop
add edx, 2
cmp word [edx], 0
jne 0x405900
sub edx, esi
sar edx, 1
add edx, edi
cmp edx, 0x21
jg 0x405b10
mov ecx, eax
add eax, 2
cmp eax, esi
jb 0x4058dd
mov edi, dword [ebp - 0x6a8]
cmp esi, ecx
je 0x4057d5
cmp word [ebp - 0x226], 0
lea edx, [ebp - 0x226]
je 0x405949
nop
add edx, 2
cmp word [edx], 0
jne 0x405940
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [ebx + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405950
jmp 0x405810
cmp word [ebp - 0x69e], 0
mov dword [ebp - 0x6ac], edi
mov dword [ebp - 0x6b0], ecx
mov edi, dword [ebp - 0x6a8]
je 0x405b2e
mov edx, esi
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x405990
mov dword [ebp - 0x6b0], ecx
sub edx, esi
mov ecx, dword [ebp - 0x6ac]
sar edx, 1
add edx, ecx
cmp edx, 0x21
jg 0x405b1b
mov dword [ebp - 0x6a8], 0
mov ecx, esi
cmp esi, eax
jb 0x40592f
mov dword [ebp - 0x6b0], edi
jmp 0x4059dd
cmp dx, 0x2f
je 0x4059e6
sub ecx, 2
cmp ecx, eax
jb 0x405a30
movzx edx, word [ecx]
cmp dx, 0x5c
jne 0x4059d0
movzx edi, word [ebp - 0x69e]
test di, di
je 0x405b05
mov edx, esi
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x405a00
mov word [ebp - 0x69e], di
sub edx, esi
mov edi, dword [ebp - 0x6ac]
sar edx, 1
add edx, edi
lea edx, [esi + edx*2]
sub edx, ecx
cmp edx, 0x42
jg 0x405a30
mov dword [ebp - 0x6a8], ecx
jmp 0x4059d6
mov edi, dword [ebp - 0x6b0]
movzx edx, word [ebp - 0x226]
cmp esi, eax
je 0x4057d5
mov esi, dword [ebp - 0x6a8]
cmp esi, eax
je 0x40592f
test esi, esi
je 0x40592f
xor ecx, ecx
test dx, dx
lea edx, [ebp - 0x226]
mov word [eax + 2], cx
je 0x405a79
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x405a70
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [ebx + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405a80
cmp word [ebp - 0x226], 0
lea edx, [ebp - 0x226]
je 0x405aa9
add edx, 2
cmp word [edx], 0
jne 0x405aa0
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + 0x411520]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405ab0
cmp word [ebp - 0x226], 0
lea edx, [ebp - 0x226]
je 0x405ae1
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x405ad8
mov ebx, dword [ebp - 0x6a8]
xor eax, eax
lea esi, [esi]
movzx ecx, word [ebx + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405af0
jmp 0x405810
mov edx, dword [ebp - 0x6ac]
jmp 0x405a1c
mov edi, dword [ebp - 0x6a8]
jmp 0x40592f
mov eax, dword [ebp - 0x6b0]
cmp esi, eax
jne 0x40592f
jmp 0x4057d5
mov edx, dword [ebp - 0x6ac]
jmp 0x4059ab