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

Disassembly:
push ebp
mov ecx, str.Recent_file_list
xor edx, edx
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x698]
push ebx
sub esp, 0x6cc
call dbg.registry_get_handle
mov dword [ebp - 0x69c], eax
test eax, eax
je 0x405410
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
lea edi, [ebp - 0x226]
mov dword [ebp - 0x68e], 0x250026
mov word [ebp - 0x686], ax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x68a], 0x200064
mov dword [esp], eax
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
call sym._GetMenu_4
mov dword [ebp - 0x644], edi
lea edi, [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 sym._RemoveMenu_12
sub esp, 0xc
mov esi, dword [ebp - 0x69c]
lea eax, [ebp - 0x684]
mov dword [esp + 4], str.File_d
mov dword [esp], eax
mov ebx, esi
add esi, 1
mov dword [esp + 8], esi
add ebx, 0x3ed
mov dword [ebp - 0x69c], esi
call sym._wsprintfW
mov eax, dword [ebp - 0x6a0]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0
mov dword [esp], eax
call sym._RemoveMenu_12
lea eax, [ebp - 0x694]
mov ebx, dword [ebp + esi*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 sym._RegQueryValueExW_24
sub esp, 0x18
test eax, eax
jne 0x4056b1
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 sym._wsprintfW
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [ebx + eax]
mov word [edi + eax], dx
add eax, 2
test dx, dx
jne 0x405590
lea esi, [ebp - 0x42e]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 5
mov dword [esp], 0
call sym._SHGetFolderPathW_20
sub esp, 0x14
mov dword [esp], edi
call sym._file_basename
mov ebx, eax
xor eax, eax
mov word [ebx - 2], ax
mov dword [esp + 4], esi
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
movzx ecx, word [ebx]
sub esp, 8
test eax, eax
je 0x40561c
test cx, cx
je 0x405710
mov eax, ebx
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x405608
sub eax, ebx
cmp eax, 0x42
jle 0x405710
mov eax, 0x5c
mov word [ebx - 2], ax
cmp word [ebp - 0x226], 0
lea eax, [ebp - 0x226]
je 0x405653
lea esi, [esi]
add eax, 2
cmp word [eax], 0
je 0x405653
add eax, 2
cmp word [eax], 0
jne 0x405638
jmp 0x405653
movzx ecx, word [ebx]
add eax, 2
add ebx, 2
mov word [eax - 2], cx
test cx, cx
jne 0x405650
lea esi, [esi]
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 sym._InsertMenuItemW_16
add dword [ebp - 0x658], 1
mov dword [ebp - 0x694], 0x208
sub esp, 0x10
cmp dword [ebp - 0x69c], 4
jne 0x4054c8
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 sym._InsertMenuItemW_16
mov eax, dword [ebp - 0x698]
sub esp, 0x10
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, 0x5c
mov word [ebx - 2], si
cmp ebx, edi
jbe 0x40578c
mov word [ebp - 0x6a4], cx
xor esi, esi
mov edx, edi
jmp 0x40573d
cmp ax, 0x2f
je 0x405746
add edx, 2
cmp ebx, edx
jbe 0x40577d
movzx eax, word [edx]
cmp ax, 0x5c
jne 0x405730
mov ecx, edx
sub ecx, edi
sar ecx, 1
mov eax, ecx
test esi, esi
jne 0x4057c5
cmp word [ebp - 0x6a4], 0
je 0x40576f
mov eax, ebx
nop
add eax, 2
cmp word [eax], 0
jne 0x405760
sub eax, ebx
sar eax, 1
add eax, ecx
cmp eax, 0x21
jg 0x40578c
mov esi, edx
add edx, 2
cmp ebx, edx
ja 0x40573d
movzx ecx, word [ebp - 0x6a4]
cmp esi, ebx
je 0x405625
cmp word [ebp - 0x226], 0
lea edx, [ebp - 0x226]
je 0x4057a9
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4057a0
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [edi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4057b0
jmp 0x405668
mov dword [ebp - 0x6a8], ecx
movzx ecx, word [ebp - 0x6a4]
test cx, cx
je 0x405950
mov eax, ebx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4057e0
sub eax, ebx
sar eax, 1
add eax, dword [ebp - 0x6a8]
cmp eax, 0x21
jg 0x405784
mov dword [ebp - 0x6ac], ebx
mov esi, ecx
xor eax, eax
cmp ebx, edx
jb 0x40578c
mov dword [ebp - 0x6a4], eax
mov eax, ecx
mov ecx, edx
mov edx, dword [ebp - 0x6ac]
jmp 0x405830
cmp ax, 0x2f
je 0x405836
sub edx, 2
cmp edx, ecx
jb 0x40586d
movzx eax, word [edx]
cmp ax, 0x5c
jne 0x405820
test si, si
je 0x405945
mov eax, ebx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x405848
sub eax, ebx
sar eax, 1
add eax, dword [ebp - 0x6a8]
lea eax, [ebx + eax*2]
sub eax, edx
cmp eax, 0x42
jg 0x40586d
mov dword [ebp - 0x6a4], edx
jmp 0x405826
mov edx, ecx
mov eax, dword [ebp - 0x6a4]
mov ecx, esi
cmp ebx, edx
je 0x405625
test eax, eax
je 0x40578c
cmp edx, eax
je 0x40578c
xor ecx, ecx
cmp word [ebp - 0x226], 0
mov word [edx + 2], cx
lea ecx, [ebp - 0x226]
je 0x4058b1
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x4058a8
xor edx, edx
lea esi, [esi]
nop
movzx ebx, word [edi + edx]
mov word [ecx + edx], bx
add edx, 2
test bx, bx
jne 0x4058b8
cmp word [ebp - 0x226], 0
lea ecx, [ebp - 0x226]
je 0x4058e9
lea esi, [esi]
nop
add ecx, 2
cmp word [ecx], 0
jne 0x4058e0
xor edx, edx
mov ebx, 0x2e
jmp 0x4058ff
movzx ebx, word [edx + 0x411520]
mov word [ecx + edx], bx
add edx, 2
test bx, bx
jne 0x4058f8
cmp word [ebp - 0x226], 0
lea ecx, [ebp - 0x226]
je 0x405929
lea esi, [esi]
nop
add ecx, 2
cmp word [ecx], 0
jne 0x405920
xor edx, edx
lea esi, [esi]
nop
movzx ebx, word [eax + edx]
mov word [ecx + edx], bx
add edx, 2
test bx, bx
jne 0x405930
jmp 0x405668
mov eax, dword [ebp - 0x6a8]
jmp 0x40585b
mov eax, dword [ebp - 0x6a8]
jmp 0x4057f3