Function at 0x401000
Capabilities:
Copy file
Get common file path
Read .ini file
Set registry value

Disassembly:
sub esp, 0x504
mov ecx, 0x40
xor eax, eax
push ebx
push ebp
push esi
push edi
lea edi, [esp + 0x14]
push 0x100
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x318]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x118]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x218]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x418]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x401626
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x314]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x406280
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x318]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.P3.ini
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x318]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004016c0
add esp, 8
test eax, eax
je 0x401626
call fcn.00403bb0
push str.P3.INI
lea ecx, [esp + 0x418]
push 0x100
push ecx
push str.c:p3winprojects
push str.PROJ
push str.Directories
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [esp + 0x214]
push 0x100
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
or ecx, 0xffffffff
mov edi, str.PBBTR12.DLL
xor eax, eax
lea edx, [esp + 0x214]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x114]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
lea edi, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ODBC.ini
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x114]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ODBC.prm
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
lea eax, [esp + 0x14]
push 6
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00401640
add esp, 8
test eax, eax
jne 0x401216
lea ecx, [esp + 0x114]
push 1
lea edx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x401216
lea eax, [esp + 0x114]
push 6
push eax
call fcn.00401640
add esp, 8
test eax, eax
jne 0x401626
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea ecx, [esp + 0x14]
push ecx
push str.PB_INTERSOLV_OEM_3.01_32_BIT_Btrieve__.dta___32_bit_
push str.P3_Sample_Data
push str.ODBC_32_bit_Data_Sources
call esi
lea edx, [esp + 0x14]
lea eax, [esp + 0x214]
push edx
push eax
push str.Driver32
push str.P3_Sample_Data
call esi
lea ecx, [esp + 0x10]
push ecx
push 2
push 0
push str.SoftwareODBCODBC.INIODBC_Data_Sources
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x401296
lea edx, [esp + 0x10]
push 0
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREODBCODBC.INIODBC_Data_Sources
push 0x80000002
mov dword [esp + 0x34], 0
call ebp
mov edi, str.PB_INTERSOLV_OEM_3.01_32_BIT_Btrieve__.dta_
or ecx, 0xffffffff
xor eax, eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x14]
push 0x406124
push 1
push eax
push str.P3_Sample_Data
push ecx
call ebx
lea edx, [esp + 0x10]
push 0
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREODBCODBC.INIP3_SAMPLE_DATA
push 0x80000002
mov dword [esp + 0x34], 0
call ebp
test eax, eax
jne 0x401626
mov edi, 0x4060f8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x14]
push 0x406124
push 1
push eax
push str.ApplicationUsingThread
push ecx
call ebx
mov edi, str.4096
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x406124
push 1
push eax
mov eax, dword [esp + 0x20]
push str.ArraySize
push eax
call ebx
lea edi, [esp + 0x414]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x406124
push 1
push eax
mov eax, dword [esp + 0x20]
push str.Database
push eax
call ebx
mov edi, 0x4060bc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x406124
push 1
push eax
mov eax, dword [esp + 0x20]
push str.DataFileExtension
push eax
call ebx
mov edi, str.P3_SAMPLE_DATA
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x406124
push 1
push eax
mov eax, dword [esp + 0x20]
push str.Description
push eax
call ebx
lea edi, [esp + 0x214]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x406124
push 1
push eax
mov eax, dword [esp + 0x20]
push str.Driver
push eax
call ebx
mov edi, 0x406080
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x406124
push 1
push eax
mov eax, dword [esp + 0x20]
push str.FileOpenCache
push eax
call ebx
mov edi, 0x406080
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x406124
push 1
push eax
mov eax, dword [esp + 0x20]
push str.IntlSort
push eax
call ebx
mov edi, 0x406124
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x406124
push 1
push eax
mov eax, dword [esp + 0x20]
push str.LogonID
push eax
call ebx
mov edi, str.PROMPT
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x406124
push 1
push eax
mov eax, dword [esp + 0x20]
push str.UndefinedTable
push eax
call ebx
mov edi, 0x406080
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x406124
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406124
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x406124
push 1
push eax
mov eax, dword [esp + 0x20]
push str.UseLongQualifiers
push eax
call ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x504
ret 0x10