Function at 0x40649b
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x724
mov eax, dword [0x41d0e8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, 0x208
lea eax, [ebp - 0x2b0]
push edi
xor esi, esi
mov ebx, ecx
push esi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0xa8]
push 0xa0
push esi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x4b8]
push edi
push esi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x6c0]
push edi
push esi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
push esi
push 0x130b
push dword [ebx + 0x28]
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [0x41d4e8], 4
mov edi, eax
mov dword [ebp - 0x6c4], edi
jne 0x40654b
movzx eax, word [0x41d010]
mov edx, 0xbd5
push eax
push 0x4f
lea eax, [ebp - 0xa8]
push eax
call fcn.00414712
add edi, 3
mov dword [ebp - 0x6c4], edi
jmp 0x40655c
push 0x4f
lea eax, [ebp - 0xa8]
push eax
push 0x19
pop edx
call fcn.00412f67
push 0x103
lea eax, [ebp - 0x4b8]
push eax
push 0x1a
pop edx
call fcn.00412f67
mov ecx, eax
test ecx, ecx
jle 0x4065b9
movzx edx, word [ebp + ecx*2 - 0x4ba]
mov eax, esi
cmp word [ebp - 0x4b8], ax
je 0x4065c2
cmp eax, ecx
jge 0x4065c2
cmp word [ebp + eax*2 - 0x4b8], dx
jne 0x4065ac
cmp eax, 0x104
jae 0x406786
xor edi, edi
mov word [ebp + eax*2 - 0x4b8], di
inc eax
cmp word [ebp + eax*2 - 0x4b8], si
jne 0x406589
jmp 0x4065c2
xor eax, eax
mov word [ebp - 0x4b8], ax
lea eax, [ebp - 0x6c0]
push eax
push esi
push esi
push 5
push dword [ebx + 8]
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ecx, eax
mov dword [ebp - 0x720], 0x58
mov eax, dword [ebx + 8]
neg ecx
mov dword [ebp - 0x71c], eax
lea eax, [ebp - 0x4b8]
mov dword [ebp - 0x714], eax
sbb ecx, ecx
lea eax, [ebp - 0x2b0]
mov dword [ebp - 0x710], esi
mov dword [ebp - 0x704], eax
not ecx
lea eax, [ebp - 0x6c0]
mov dword [ebp - 0x70c], esi
and ecx, eax
mov dword [ebp - 0x708], 1
lea eax, [ebp - 0xa8]
mov dword [ebp - 0x700], 0x104
mov dword [ebp - 0x6f0], eax
lea eax, [ebp - 0x720]
push eax
mov dword [ebp - 0x6fc], esi
mov dword [ebp - 0x6f8], esi
mov dword [ebp - 0x6f4], ecx
mov dword [ebp - 0x6ec], 0x201804
mov dword [ebp - 0x6e4], esi
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
test eax, eax
je 0x406775
lea edi, [ebp - 0x2b0]
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
cmp ax, si
jne 0x40667d
sub edi, ecx
sar edi, 1
cmp edi, 4
jbe 0x40673b
mov eax, dword [ebp - 0x6c4]
test eax, eax
jne 0x4066fb
push 0xffffffffffffffff
push 0x402988
push 0xffffffffffffffff
lea eax, [ebp + edi*2 - 0x2b8]
push eax
push 1
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, 2
jne 0x4066d6
mov ecx, dword [ebx + 0x38]
lea eax, [ebp - 0x2b0]
push eax
push dword [ebx + 0x1c]
mov ecx, dword [ecx + 4]
call fcn.00409bd5
jmp 0x406735
push 0xffffffffffffffff
push 0x402994
push 0xffffffffffffffff
lea eax, [ebp + edi*2 - 0x2b8]
push eax
push 1
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, 2
jne 0x40673b
xor esi, esi
inc esi
jmp 0x406771
cmp eax, 3
jne 0x40673b
push 0xffffffffffffffff
push 0x402988
push 0xffffffffffffffff
lea eax, [ebp + edi*2 - 0x2b8]
push eax
push 1
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, 2
jne 0x40673b
mov ecx, dword [ebx + 0x38]
lea eax, [ebp - 0x2b0]
push eax
push dword [ebx + 0x1c]
mov ecx, dword [ecx + 4]
call fcn.0040db45
mov esi, eax
test esi, esi
jne 0x406771
xor eax, eax
push 0x103
mov word [ebp - 0x2b0], ax
lea eax, [ebp - 0x2b0]
push eax
push 0x1b
pop edx
call fcn.00412f67
push 0x30
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0x2b0]
push eax
push dword [ebx + 8]
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, esi
jmp 0x406777
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041b570
leave
ret
call fcn.0041b84a
int3