Function at 0x40393a
Capabilities:
Check os version
Get common file path
Query environment variable
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8d8
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x18], 2
call fcn.004033d9
mov dword [ebp - 4], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x134]
mov ebx, 0x105
push eax
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.USERENV.dll_GetProfilesDirectoryA]
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x134]
push 0x48a190
push eax
call esi
push dword [edi + 0x14]
lea eax, [ebp - 0x134]
push eax
call esi
push dword [0x48a0ac]
lea eax, [ebp - 0x134]
push eax
call esi
lea eax, [ebp - 0x134]
push eax
call fcn.00403374
test al, al
pop ecx
jne 0x4039c3
lea eax, [ebp - 0x134]
push ebx
push eax
push str._USERPROFILE_Application_DataMicrosoftNetworkConnectionspbk_rasphone.pbk
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsA]
push 0
lea eax, [ebp - 0x4d8]
push 0x23
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x4d8]
push str.MicrosoftNetworkConnectionspbk_rasphone.pbk
push eax
lea eax, [ebp - 0x4d8]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], ebx
push eax
lea eax, [ebp - 0x2d0]
push eax
push dword [ebp - 4]
call dword [sym.imp.USERENV.dll_GetUserProfileDirectoryA]
push dword [0x48a0ac]
lea eax, [ebp - 0x2d0]
push eax
call esi
cmp dword [ebp - 4], 0
je 0x403a2c
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0x134]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x4d8]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2d0]
push eax
call fcn.00403374
test al, al
pop ecx
je 0x403a77
lea eax, [ebp - 0x2d0]
push eax
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
pop ecx
test eax, eax
pop ecx
je 0x403a77
push 3
lea eax, [ebp - 0x2d0]
pop esi
mov dword [ebp - 0x24], eax
jmp 0x403a7a
mov esi, dword [ebp - 0x18]
lea eax, [ebp - 0x1c8]
mov dword [ebp - 0x1c8], 0x94
push eax
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
cmp dword [ebp - 0x1b8], 2
jne 0x403aaa
cmp dword [ebp - 0x1c4], 5
jb 0x403aaa
mov ecx, edi
call fcn.004038af
push 0x1000
call sub.MFC42.DLL_operatornew
test esi, esi
pop ecx
mov dword [ebp - 4], eax
jle 0x403cb5
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], eax
mov esi, 0x100
push 0x1000
push 0
push dword [ebp - 4]
call sub.MSVCRT.dll_memset
mov eax, dword [ebp - 0x14]
add esp, 0xc
mov ebx, dword [eax]
push ebx
push 0x1000
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileSectionNamesA]
mov eax, dword [ebp - 4]
cmp byte [eax], 0
mov dword [ebp - 8], eax
je 0x403ca8
push eax
mov ecx, edi
call fcn.00403efb
mov dword [ebp - 0xc], eax
push esi
lea eax, [ebp - 0x3d0]
push 0
push eax
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x7d8]
push 0
push eax
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x8d8]
push 0
push eax
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x5d8]
push 0
push eax
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x6d8]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0x3c
lea eax, [ebp - 0x3d0]
push ebx
push esi
xor ebx, ebx
push eax
push ebx
push str.DialParamsUID
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileStringA]
test eax, eax
jle 0x403bea
cmp dword [edi + 8], ebx
jle 0x403bea
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp - 0x10]
add eax, dword [edi + 0x1c]
push eax
lea eax, [ebp - 0x3d0]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpA]
test eax, eax
je 0x403ba9
add dword [ebp - 0x10], 0x301
inc ebx
cmp ebx, dword [edi + 8]
jl 0x403b82
jmp 0x403bea
imul ebx, ebx, 0x301
mov eax, dword [edi + 0x1c]
lea eax, [ebx + eax + 0x200]
push eax
lea eax, [ebp - 0x7d8]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
mov eax, dword [edi + 0x1c]
lea eax, [ebx + eax + 0x100]
push eax
lea eax, [ebp - 0x8d8]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
mov eax, dword [edi + 0x1c]
mov byte [ebx + eax + 0x300], 1
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax]
lea eax, [ebp - 0x5d8]
push ebx
push esi
push eax
push 0
push str.PhoneNumber
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileStringA]
push ebx
lea eax, [ebp - 0x6d8]
push esi
push eax
push 0
push str.Device
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileStringA]
lea eax, [ebp - 0x6d8]
mov ecx, edi
push eax
call fcn.00403efb
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x7d8]
push eax
mov ecx, edi
call fcn.00403efb
push dword [ebp - 0x10]
lea ecx, [ebp - 0x5d8]
mov dword [ebp - 0x20], eax
push ecx
lea ecx, [ebp - 0x8d8]
push ecx
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x3d0]
mov ecx, edi
push eax
call fcn.00403d1e
cmp dword [ebp - 0xc], 0
je 0x403c75
push dword [ebp - 0xc]
call sub.MFC42.DLL_operatordelete
pop ecx
cmp dword [ebp - 0x20], 0
je 0x403c84
push dword [ebp - 0x20]
call sub.MFC42.DLL_operatordelete
pop ecx
cmp dword [ebp - 0x10], 0
je 0x403c93
push dword [ebp - 0x10]
call sub.MFC42.DLL_operatordelete
pop ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax + 1]
jmp 0x403af7
add dword [ebp - 0x14], 4
dec dword [ebp - 0x18]
jne 0x403ace
xor ebx, ebx
cmp dword [edi + 8], ebx
mov dword [ebp - 0xc], ebx
jle 0x403d0e
mov esi, 0x49bf30
mov eax, dword [edi + 0x1c]
add eax, ebx
cmp byte [eax + 0x300], 0
jne 0x403cfd
cmp byte [eax + 0x200], 0
lea ecx, [eax + 0x200]
jne 0x403cea
cmp byte [eax + 0x100], 0
je 0x403cfd
push esi
lea edx, [eax + 0x100]
push esi
push edx
push ecx
push esi
push eax
mov ecx, edi
call fcn.00403d1e
inc dword [ebp - 0xc]
add ebx, 0x301
mov eax, dword [ebp - 0xc]
cmp eax, dword [edi + 8]
jl 0x403cc4
push dword [ebp - 4]
call sub.MFC42.DLL_operatordelete
pop ecx
pop edi
pop esi
mov al, 1
pop ebx
leave
ret