Function at 0x404642
Capabilities:
Get common file path

Disassembly:
mov eax, 0x4055a7
call fcn.004050b0
sub esp, 0x454
push ebx
push esi
mov esi, ecx
push edi
xor edi, edi
mov dword [ebp - 0x14], esi
lea ebx, [esi + 4]
push edi
mov ecx, ebx
call fcn.00404b88
mov eax, dword [0x408010]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 4], edi
push eax
push 0x4084c8
push 0xcc
mov dword [0x408554], edi
call fcn.004042fe
add esp, 0xc
test al, al
je 0x4046a1
push dword [ebp - 0x18]
call dword [sym.imp.MSVCRT.dll_atoi]
pop ecx
mov dword [0x408554], eax
cmp dword [0x408554], edi
ja 0x404711
mov al, byte [ebp - 0xd]
push edi
lea ecx, [ebp - 0x50]
mov byte [ebp - 0x50], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 1
push eax
push 0x82
call fcn.0040437b
pop ecx
test al, al
pop ecx
je 0x404702
mov eax, dword [ebp - 0x4c]
cmp eax, edi
jne 0x4046dd
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push 0x10
push str.Error
push eax
push edi
call dword [sym.imp.USER32.dll_MessageBoxW]
push edi
mov ecx, esi
call fcn.004049b6
and byte [ebp - 4], 0
push 1
lea ecx, [ebp - 0x50]
jmp 0x404949
and byte [ebp - 4], 0
push 1
lea ecx, [ebp - 0x50]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov al, byte [ebp - 0xd]
push edi
lea ecx, [ebp - 0x40]
mov byte [ebp - 0x40], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
lea eax, [ebp - 0x460]
push 0x104
push eax
push edi
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.MSVCRT.dll_wcsrchr]
lea eax, [ebp - 0x460]
push 0x2e
push eax
call esi
pop ecx
cmp eax, edi
pop ecx
je 0x404779
mov word [eax], di
lea eax, [ebp - 0x460]
push 0x5c
push eax
call esi
pop ecx
cmp eax, edi
pop ecx
je 0x404779
lea esi, [eax + 2]
push esi
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
push esi
lea ecx, [ebp - 0x40]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov al, byte [ebp - 0xd]
push edi
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x30], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 3
push eax
push 0x85
call fcn.0040437b
pop ecx
test al, al
pop ecx
je 0x4047ed
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x38]
lea eax, [ecx + eax + 0xa]
add eax, eax
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov esi, eax
mov ecx, dword [ebp - 0x3c]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
cmp ecx, edi
jne 0x4047c4
mov ecx, eax
cmp dword [ebp - 0x2c], edi
je 0x4047cc
mov eax, dword [ebp - 0x2c]
push ecx
push eax
push esi
call dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0xc
push esi
push 0x404
push dword [ebx]
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
push esi
call fcn.00405072
pop ecx
mov eax, dword [0x408588]
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push edi
push 0xc
mov dword [ebp - 0x1c], eax
call esi
push eax
push 0xb
call esi
push eax
mov edi, 0x80
push 1
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.USER32.dll_LoadImageA]
push eax
push 1
push edi
push dword [ebx]
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [0x408588]
push 0
push 0x32
mov dword [ebp - 0x1c], eax
call esi
push eax
push 0x31
call esi
push eax
push 1
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.USER32.dll_LoadImageA]
push eax
push 0
push edi
push dword [ebx]
call dword [sym.imp.USER32.dll_SendMessageA]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
mov ecx, 0x408580
call fcn.00404b1c
mov edi, dword [ebp - 0x14]
mov esi, eax
mov eax, edi
neg eax
lea ecx, [edi + 0x20]
sbb eax, eax
and eax, ecx
lea ecx, [esi + 4]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
call fcn.00404a70
mov eax, edi
lea ecx, [edi + 0x24]
neg eax
sbb eax, eax
and eax, ecx
lea ecx, [esi + 0x10]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
call fcn.00404a70
mov eax, dword [ebx]
xor esi, esi
cmp eax, esi
je 0x4048b6
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [edi + 0x28]
mov word [ebp - 0x1c], 4
call fcn.00404ac3
mov eax, dword [ebx]
push 0x4084c8
push 0xc9
mov ecx, edi
mov dword [0x40851c], eax
call fcn.0040452d
push 1
push 0x400
push dword [ebx]
call dword [sym.imp.USER32.dll_CheckDlgButton]
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x256]
mov word [ebp - 0x258], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x258]
push eax
push esi
push esi
push 0x10
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x40491f
lea eax, [ebp - 0x258]
push eax
push 0x401
push dword [ebx]
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
call fcn.004018df
push esi
push 0x401a86
call fcn.00403f2d
pop ecx
mov byte [ebp - 4], 2
pop ecx
push 1
lea ecx, [ebp - 0x30]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
and byte [ebp - 4], 0
push 1
lea ecx, [ebp - 0x40]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.0040291f
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10