Function at 0x4e58d0
Capabilities:
Check os version
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x501bb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x210
push ebx
push esi
mov dword [ebp - 0x2c], ecx
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x21b]
mov byte [ebp - 0x21c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, 0x27
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp - 0x118]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x118]
mov dword [ebp - 0x10], esp
push eax
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x118], 0x9c
call esi
test eax, eax
jne 0x4e5972
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x118], 0x94
push ecx
call esi
test eax, eax
jne 0x4e5972
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea edx, [ebp - 0x21c]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov eax, dword [ebp - 0x114]
mov ebx, 5
cmp eax, ebx
jae 0x4e59c5
mov edi, 0x53028c
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x21c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
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]
jmp 0x4e5a0a
lea eax, [ebp - 0x34]
push 3
push eax
call fcn.004dbaa0
mov eax, dword [eax]
or ecx, 0xffffffff
mov edi, eax
xor eax, eax
add esp, 8
lea edx, [ebp - 0x21c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
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]
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CFile::CFile
xor esi, esi
lea ecx, [ebp - 0x5c]
mov dword [ebp - 4], esi
call sub.MFC42.DLL_CException::CException
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString_4
push esi
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 2
mov dword [ebp - 0x5c], 0x505cd4
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], 0xffffffff
call sub.MFC42.DLL_CString::operator_3
lea eax, [ebp - 0x5c]
lea ecx, [ebp - 0x21c]
push eax
push esi
push ecx
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CFile::Open
cmp eax, esi
je 0x4e6049
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CFile::GetLength
mov esi, eax
lea edx, [esi + 1]
push edx
call sub.MFC42.DLL_operatornew
mov ebx, eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], ebx
lea edi, [eax*4]
push edi
call sub.MFC42.DLL_operatornew
mov edx, eax
mov ecx, edi
mov dword [ebp - 0x30], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 8
and ecx, 3
rep stosb byte es:[edi], al
push esi
push ebx
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CFile::Read
lea ecx, [ebp - 0x48]
mov byte [ebx + esi], 0
call sub.MFC42.DLL_CFile::Close
push ebx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString_4
mov eax, dword [ebp + 0xc]
mov byte [ebp - 4], 5
test eax, eax
jbe 0x4e5bcb
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0x30]
sub edi, esi
mov dword [ebp - 0x24], eax
mov eax, dword [esi]
mov ebx, dword [sym.imp.MSVCRT.dll__mbscmp]
push 0x530280
push eax
call ebx
add esp, 8
test eax, eax
je 0x4e5bb8
mov eax, dword [esi]
push 0x5307a8
push eax
call ebx
add esp, 8
test eax, eax
je 0x4e5bb8
push esi
lea eax, [ebp - 0x38]
push 0x5238f8
push eax
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
lea ecx, [ebp - 0x14]
push eax
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jge 0x4e5b77
push esi
lea ecx, [ebp - 0x20]
push 0x5268fc
push ecx
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
lea ecx, [ebp - 0x14]
push eax
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::Find_1
test eax, eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 6
setge bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x4e5b79
mov bl, 1
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x4e5bb8
push 0x523e84
lea edx, [ebp - 0x28]
push esi
push edx
mov dword [edi + esi], 1
call sub.MFC42.DLL_operator_4
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 8
call fcn.004e96da
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x24]
add esi, 4
dec eax
mov dword [ebp - 0x24], eax
jne 0x4e5af2
mov ebx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x18]
push 0x5307a8
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
je 0x4e601d
lea ecx, [ebp - 0x24]
push 2
push ecx
call fcn.004dbaa0
add esp, 8
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x28]
push edx
push 0x5268f4
push eax
mov byte [ebp - 4], 9
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
lea ecx, [ebp - 0x24]
push eax
push 0x5268f4
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CString::Replace
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0x24]
push 0x24
push 0
push ecx
mov ecx, dword [ebp - 0x2c]
call sub.MFC42.DLL_CWnd::MessageBoxA
cmp eax, 6
je 0x4e5c4a
mov dword [ebp - 0x1c], 0
jmp 0x4e6011
mov eax, dword [ebp + 0xc]
test eax, eax
jbe 0x4e5d9f
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp + 0xc]
mov ecx, ebx
sub eax, ecx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x20], edx
jmp 0x4e5c70
mov eax, dword [ebp - 0x28]
cmp dword [ebx + eax], 0
je 0x4e5d8c
mov eax, dword [ebp - 0x14]
push ebx
lea ecx, [ebp - 0x38]
push 0x5238f8
mov edi, dword [eax - 8]
push ecx
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
lea ecx, [ebp - 0x14]
push eax
mov byte [ebp - 4], 0xb
call sub.MFC42.DLL_CString::Find_1
lea ecx, [ebp - 0x38]
mov esi, eax
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
test esi, esi
jge 0x4e5ce4
push ebx
lea edx, [ebp - 0x60]
push 0x5268fc
push edx
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
lea ecx, [ebp - 0x14]
push eax
mov byte [ebp - 4], 0xc
call sub.MFC42.DLL_CString::Find_1
lea ecx, [ebp - 0x60]
mov esi, eax
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
test esi, esi
jl 0x4e5d8c
push 0
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::GetBuffer
cmp esi, edi
mov ecx, esi
jge 0x4e5d06
mov dl, byte [ecx + eax]
cmp dl, 0xd
je 0x4e5d06
cmp dl, 0xa
je 0x4e5d06
inc ecx
cmp ecx, edi
jl 0x4e5cf4
test esi, esi
mov ebx, ecx
jl 0x4e5d1c
mov cl, byte [esi + eax]
cmp cl, 0xa
je 0x4e5d1c
cmp cl, 0xd
je 0x4e5d1c
dec esi
jns 0x4e5d0c
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::ReleaseBuffer
sub edi, ebx
lea eax, [ebp - 0x78]
push edi
push eax
lea ecx, [ebp - 0x14]
inc esi
call sub.MFC42.DLL_CString::Right
mov edi, eax
lea ecx, [ebp - 0x74]
push esi
push ecx
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xd
call sub.MFC42.DLL_CString::Left
push edi
lea edx, [ebp - 0x6c]
push eax
push edx
mov byte [ebp - 4], 0xe
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xf
call sub.MFC42.DLL_CString::operator_2
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 0xe
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 0xd
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
mov ebx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
add ebx, 4
dec eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], eax
jne 0x4e5c6d
push str._r_n_r_n
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jl 0x4e5dd3
push 0x523e84
push str._r_n_r_n
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Replace
push str._r_n_r_n
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jge 0x4e5db0
push 0x5307a8
lea ecx, [ebp - 0x18]
call sub.MFC42.DLL_CString::operator_3
mov eax, dword [ebp + 0xc]
test eax, eax
jbe 0x4e5ed7
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0x30]
mov ecx, esi
mov dword [ebp - 0x20], eax
sub edi, ecx
mov eax, dword [esi]
mov ebx, dword [sym.imp.MSVCRT.dll__mbscmp]
push 0x530280
push eax
call ebx
add esp, 8
test eax, eax
je 0x4e5ec0
mov eax, dword [esi]
push 0x5307a8
push eax
call ebx
add esp, 8
test eax, eax
je 0x4e5ec0
push esi
lea eax, [ebp - 0x7c]
push 0x5238f8
push eax
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
lea ecx, [ebp - 0x14]
push eax
mov byte [ebp - 4], 0x10
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jge 0x4e5e7d
push esi
lea ecx, [ebp - 0x70]
push 0x5268fc
push ecx
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
lea ecx, [ebp - 0x14]
push eax
mov byte [ebp - 4], 0x11
call sub.MFC42.DLL_CString::Find_1
test eax, eax
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 0x10
setge bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x4e5e7f
mov bl, 1
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x4e5ec0
push 0x523e84
lea edx, [ebp - 0x64]
push esi
push edx
mov dword [edi + esi], 1
call sub.MFC42.DLL_operator_4
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0x12
call fcn.004e96da
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
jmp 0x4e5ec7
mov dword [edi + esi], 0
mov eax, dword [ebp - 0x20]
add esi, 4
dec eax
mov dword [ebp - 0x20], eax
jne 0x4e5df8
mov eax, dword [ebp - 0x18]
push 0x5307a8
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x4e5c4a
push eax
lea ecx, [ebp - 0x21c]
push 1
push ecx
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x4e5fad
lea ecx, [ebp - 0x68]
call sub.MFC42.DLL_AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK
mov edx, dword [ebp - 0x48]
push 0
push 0
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0x14
call dword [edx + 0x30]
mov eax, dword [ebp - 0x14]
push 0
lea ecx, [ebp - 0x14]
mov esi, dword [eax - 8]
call sub.MFC42.DLL_CString::GetBuffer
push esi
push eax
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CFile::Write
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx - 8]
lea ecx, [ebp - 0x48]
push eax
call sub.MFC42.DLL_CFile::SetLength
mov dword [ebp - 4], 9
call sub.MFC42.DLL_AfxTryCleanup
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::ReleaseBuffer
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CFile::Close
jmp 0x4e5fda
lea eax, [ebp + 0xc]
push 1
push eax
call fcn.004dbaa0
add esp, 8
mov eax, dword [eax]
mov ecx, dword [ebp - 0x2c]
push 0x10
push 0
push eax
mov byte [ebp - 4], 0x17
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
push 1
push ecx
call fcn.004dbaa0
add esp, 8
mov eax, dword [eax]
mov ecx, dword [ebp - 0x2c]
push 0x10
push 0
push eax
mov byte [ebp - 4], 0x18
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
mov ebx, dword [ebp - 0x34]
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
mov edx, dword [ebp - 0x30]
push edx
call sub.MFC42.DLL_operatordelete
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 8
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
jmp 0x4e60b2
push ecx
lea eax, [ebp - 0x21c]
mov ecx, esp
mov dword [ebp + 0xc], esp
push eax
call sub.MFC42.DLL_CString::CString_2
call fcn.0040c240
add esp, 4
cmp eax, esi
je 0x4e60b2
mov edx, dword [ebp - 0x4c]
lea ecx, [ebp - 0x21c]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x4e6084
cmp dword [ebp - 0x54], ebx
je 0x4e60b2
lea eax, [ebp + 0xc]
push esi
push eax
call fcn.004dbaa0
add esp, 8
mov eax, dword [eax]
mov ecx, dword [ebp - 0x2c]
push 0x10
push esi
push eax
mov byte [ebp - 4], 0x19
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x5c], 0x505cd4
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 0x1a
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x5c], 0x50412c
mov dword [ebp - 4], 0xffffffff
call fcn.004e9818
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8