Function at 0x401310
Capabilities:
Create process on windows
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x50c
mov eax, dword [0x416358]
xor eax, esp
mov dword [esp + 0x508], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [str.VDB32App]
mov edx, dword [0x414c10]
mov dword [esp + 0x1c], eax
mov al, byte [0x414c14]
mov dword [esp + 0xd0], ecx
mov ecx, dword [str.IsNotAWebApp]
mov dword [esp + 0xd4], edx
mov edx, dword [0x414c34]
push ebx
push esi
mov esi, dword [ebp + 8]
mov byte [esp + 0xe0], al
mov eax, dword [0x414c38]
mov dword [esp + 0xe4], ecx
mov cl, byte [0x414c3c]
mov dword [esp + 0xe8], edx
mov edx, dword [str.Is___AWebApp]
push edi
mov dword [esp + 0xf0], eax
mov eax, dword [0x414c44]
mov byte [esp + 0xf4], cl
mov ecx, dword [0x414c48]
mov dword [esp + 0xf8], edx
mov dl, byte [0x414c4c]
xor edi, edi
cmp dword [ebp + 0xc], edi
mov dword [esp + 0x14], esi
mov dword [esp + 0xfc], eax
mov dword [esp + 0x100], ecx
mov byte [esp + 0x104], dl
jne 0x401425
push 0x7f00
push edi
mov dword [esp + 0x48], 0x1000
mov dword [esp + 0x4c], 0x4012c0
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], edi
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [esp + 0x58], eax
lea ecx, [esp + 0x40]
lea eax, [esp + 0xdc]
push ecx
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], eax
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x4019f2
mov eax, esi
call fcn.00401140
test eax, eax
je 0x4014d2
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov esi, dword [0x417734]
mov eax, dword [esp + 0x70]
mov edi, dword [0x417730]
sub eax, esi
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x74]
push 0
sub eax, edi
cdq
sub eax, edx
mov edx, dword [esp + 0x18]
push edx
push 0
push 0
push edi
push esi
sar eax, 1
push eax
sar ecx, 1
push ecx
push 0x80000000
push 0
lea eax, [esp + 0x104]
push eax
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov ebx, eax
test ebx, ebx
jne 0x4014c0
mov eax, dword [0x417740]
test eax, eax
je 0x4014a6
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x508]
xor ecx, esp
call fcn.00401d4b
mov esp, ebp
pop ebp
ret 0x10
push 5
push ebx
call dword [sym.imp.USER32.dll_ShowWindow]
push ebx
call dword [sym.imp.USER32.dll_UpdateWindow]
jmp 0x4014ed
push edi
push esi
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push edi
lea ecx, [esp + 0x104]
push ecx
push edi
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov ebx, eax
test ebx, ebx
je 0x4014a6
mov eax, dword [esp + 0x14]
push 0x104
lea edx, [esp + 0x40c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x408]
push ecx
push ebx
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov edx, dword [str.PLUSRUN.EXE]
mov eax, dword [0x414c54]
mov ecx, dword [0x414c58]
push ebx
mov dword [esp + 0x10c], edx
lea edx, [esp + 0x117]
push str.__h__08X
push edx
mov dword [esp + 0x118], eax
mov dword [esp + 0x11c], ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0xf8]
lea eax, [esp + 0xe8]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401583
test dl, dl
je 0x40157f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401583
add eax, 2
add ecx, 2
test dl, dl
jne 0x401563
xor eax, eax
jmp 0x401588
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4015b1
lea eax, [esp + 0x108]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x401596
mov ecx, dword [str.__W]
mov dl, byte [0x414c6c]
mov dword [eax], ecx
mov byte [eax + 4], dl
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4015ef
mov edx, eax
jmp 0x4015c0
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4015c0
lea edi, [esp + 0x108]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x4015d5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x44
lea eax, [esp + 0x7c]
push 0
push eax
call fcn.00408980
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0xc
mov edi, 1
push 0xfffffffffffffff6
mov dword [esp + 0x7c], 0x44
mov dword [esp + 0xa8], edi
mov word [esp + 0xac], 5
call esi
push 0xfffffffffffffff5
mov dword [esp + 0xb4], eax
call esi
push 0xfffffffffffffff4
mov dword [esp + 0xb8], eax
call esi
mov dword [esp + 0xb8], eax
xor eax, eax
push 0x14
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
call fcn.00401c88
add esp, 4
push edi
push eax
mov dword [esp + 0x24], eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x40169a
push 0x30
push str.PLUS
push str.Unable_Initialize_Security_Descriptor
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x508]
xor ecx, esp
call fcn.00401d4b
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [esp + 0x1c]
push 0
push 0
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x4016db
push 0x30
push str.PLUS
push str.Unable_to_Set_Security_Descriptor
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x508]
xor ecx, esp
call fcn.00401d4b
mov esp, ebp
pop ebp
ret 0x10
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x7c]
push eax
push 0
push 0
push 0x4000020
push edi
lea ecx, [esp + 0x30]
push ecx
mov edx, ecx
push edx
lea eax, [esp + 0x128]
push eax
push 0
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x48], edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40193f
lea ecx, [esp + 0x24]
push ecx
push edi
push eax
push str.SoftwaredBASEPLUSSeries1
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40192b
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x10c]
push eax
lea ecx, [esp + 0x34]
push ecx
push 0
push str.RuntimePath
push edx
mov dword [esp + 0x28], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x40192b
cmp dword [esp + 0x2c], edi
jne 0x4018df
cmp dword [esp + 0x10], edi
jbe 0x4018df
lea eax, [esp + 0x108]
call section..text
test eax, eax
jne 0x4017b1
mov eax, dword [esp + 0x10]
lea eax, [esp + eax + 0x108]
mov byte [eax - 1], 0x5c
mov byte [eax], 0
lea eax, [esp + 0x108]
add eax, 0xffffffff
jmp 0x4017c0
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4017c0
mov ecx, dword [str.PLUSRUN.EXE]
mov edx, dword [0x414c54]
mov dword [eax], ecx
mov ecx, dword [0x414c58]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
lea eax, [esp + 0x108]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4017f0
sub eax, edx
push ebx
lea edx, [esp + eax + 0x10c]
push str.__h__08X
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0xf8]
lea eax, [esp + 0xe8]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401840
test dl, dl
je 0x40183c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401840
add eax, 2
add ecx, 2
test dl, dl
jne 0x401820
xor eax, eax
jmp 0x401845
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40186e
lea eax, [esp + 0x108]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x401853
mov ecx, dword [str.__W]
mov dl, byte [0x414c6c]
mov dword [eax], ecx
mov byte [eax + 4], dl
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4018af
mov edx, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x401878
lea edi, [esp + 0x108]
sub eax, edx
add edi, 0xffffffff
lea ecx, [ecx]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x401890
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 1
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x7c]
push ecx
push 0
push 0
push 0x4000020
push edi
lea edx, [esp + 0x30]
push edx
mov eax, edx
push eax
lea ecx, [esp + 0x128]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40193f
mov eax, dword [esp + 0x14]
push 0x100
lea edx, [esp + 0x30c]
push edx
push 0
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
jle 0x401a0b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.PLUSRUN.EXE
lea ecx, [esp + 0x310]
push ecx
lea edx, [esp + 0x214]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x401a7a
push 0x30
push str.dBASE_PLUS_Runtime
push str.Registry_entry_missing_or_access_denied
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x30]
push 0x3e8
push ecx
call dword [sym.imp.USER32.dll_WaitForInputIdle]
mov eax, dword [esp + 0x30]
mov edi, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea edx, [esp + 0xc]
push edx
push eax
mov dword [esp + 0x14], 0x103
call edi
test eax, eax
je 0x4019ce
mov ebx, dword [sym.imp.USER32.dll_PeekMessageA]
mov esi, dword [sym.imp.KERNEL32.dll_SleepEx]
lea esp, [esp]
cmp dword [esp + 0xc], 0x103
jne 0x4019ce
push 1
push 0
push 0
push 0
lea ecx, [esp + 0xd0]
push ecx
call ebx
test eax, eax
je 0x4019b8
cmp dword [esp + 0xc4], 0x12
je 0x4019ce
lea edx, [esp + 0xc0]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0x1e
call esi
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0xc]
push eax
push ecx
call edi
test eax, eax
jne 0x401980
mov eax, dword [0x417740]
test eax, eax
je 0x4019de
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov edx, dword [esp + 0x34]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x30]
push eax
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x508]
xor ecx, esp
call fcn.00401d4b
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [str.Error_loading]
mov ecx, dword [0x414d2c]
mov edx, dword [0x414d30]
mov dword [esp + 0x208], eax
mov ax, word [0x414d34]
mov word [esp + 0x214], ax
mov dword [esp + 0x20c], ecx
mov cl, byte [0x414d36]
lea eax, [esp + 0x208]
mov dword [esp + 0x210], edx
mov byte [esp + 0x216], cl
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x401a56
mov edx, dword [str.PLUSRUN.EXE]
mov ecx, dword [0x414c54]
mov dword [eax], edx
mov edx, dword [0x414c58]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
call fcn.00401120
push 0x30
push 0x414d37
lea eax, [esp + 0x210]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x514]
pop edi
pop esi
pop ebx
xor ecx, esp
or eax, 0xffffffff
call fcn.00401d4b
mov esp, ebp
pop ebp
ret 0x10