Function at 0x404bbe
Capabilities:
Get common file path
Query environment variable
Read file on windows
Set environment variable

Disassembly:
push 0x730
mov eax, 0x445797
call fcn.0040d770
mov ebx, ecx
mov eax, dword [ebp + 8]
xor edi, edi
push 0x208
mov dword [ebp - 0x73c], eax
lea eax, [ebp - 0x21c]
push edi
push eax
call fcn.00428b20
add esp, 0xc
lea eax, [ebp - 0x21c]
mov esi, 0x104
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x21c]
push eax
call fcn.004305a4
mov dword [esp], 0x208
lea eax, [ebp - 0x424]
push edi
push eax
call fcn.00428b20
add esp, 0xc
lea eax, [ebp - 0x424]
push esi
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40548c
mov eax, 0x200
push eax
mov dword [ebp - 0x738], eax
lea eax, [ebp - 0x72c]
push edi
push eax
call fcn.00428b20
add esp, 0xc
push 2
push edi
push 0xfffffe00
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea eax, [ebp - 0x738]
push eax
push 0x200
lea eax, [ebp - 0x72c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x738], 0x200
jne 0x40546c
lea eax, [ebp - 0x72c]
cmp dword [eax], 0x2a4c5254
jne 0x40546c
cmp dword [ebp - 0x720], 0xbe
mov esi, str.CRunExecutable::Run
jae 0x404ce2
cmp dword [ebp - 0x720], edi
jne 0x405278
push 0xa000
push 0x460628
push 0x455cac
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0x455cdc
lea ecx, [ebp - 0x4e4]
call fcn.00405617
lea ecx, [ebp - 0x484]
mov dword [ebp - 4], edi
call fcn.0040461c
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4e4]
push edi
mov dword [ebp - 0x47c], 0x80000002
call fcn.004057b2
sub esp, 0x18
mov ecx, esp
push eax
call fcn.00401d1b
lea ecx, [ebp - 0x484]
call fcn.0040473b
test eax, eax
je 0x404e41
push edi
push edi
lea ecx, [ebp - 0x4e4]
call fcn.004057b2
sub esp, 0x18
mov ecx, esp
push eax
call fcn.00401d1b
lea ecx, [ebp - 0x484]
call fcn.0040478b
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x734], esp
push 0x455b54
call fcn.00401d1b
sub esp, 0x18
mov byte [ebp - 4], 2
mov ecx, esp
push str.MSRedist
call fcn.00401d1b
lea eax, [ebp - 0x454]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x484]
call fcn.00404888
push str.x86
lea edx, [ebp - 0x454]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x43c]
call fcn.00405496
pop ecx
mov byte [ebp - 4], 4
lea eax, [ebp - 0x43c]
cmp dword [ebp - 0x428], 8
cmovae eax, dword [ebp - 0x43c]
push eax
push 1
push 0x173
push esi
push str.d:ispbhelpercommon_runexecutable.cpp
call fcn.00403735
add esp, 0x14
mov dword [0x460628], 0x3b
cmp dword [ebp - 0x428], 8
lea ecx, [ebp - 0x43c]
mov edx, 0x460628
cmovae ecx, dword [ebp - 0x43c]
sub edx, ecx
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x404e1c
lea ecx, [ebp - 0x43c]
call fcn.00401e8f
lea ecx, [ebp - 0x454]
call fcn.00401e8f
lea ecx, [ebp - 0x484]
call fcn.00404674
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x4e4]
call fcn.004056b4
push str.SoftwareSybasePowerBuilder_
lea ecx, [ebp - 0x4e4]
call fcn.00405617
push 0xa
pop ecx
mov dword [ebp - 4], 5
xor edx, edx
mov eax, dword [ebp - 0x720]
div ecx
push eax
lea eax, [ebp - 0x4e4]
push str._d.0
push eax
call fcn.00405ae0
add esp, 0xc
lea ecx, [ebp - 0x484]
call fcn.0040461c
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x4e4]
push edi
mov dword [ebp - 0x47c], 0x80000002
call fcn.004057b2
sub esp, 0x18
mov ecx, esp
push eax
call fcn.00401d1b
lea ecx, [ebp - 0x484]
call fcn.0040473b
test eax, eax
je 0x40506e
push edi
push edi
lea ecx, [ebp - 0x4e4]
call fcn.004057b2
sub esp, 0x18
mov ecx, esp
push eax
call fcn.00401d1b
lea ecx, [ebp - 0x484]
call fcn.0040478b
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x730], esp
push 0x455b54
call fcn.00401d1b
sub esp, 0x18
mov byte [ebp - 4], 7
mov ecx, esp
push str.Location
call fcn.00401d1b
lea eax, [ebp - 0x49c]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x484]
call fcn.00404888
sub esp, 0x18
mov byte [ebp - 4], 8
mov ecx, esp
mov dword [ebp - 0x730], esp
push 0x455b54
call fcn.00401d1b
sub esp, 0x18
mov byte [ebp - 4], 9
mov ecx, esp
push str.IPS_Name
call fcn.00401d1b
lea eax, [ebp - 0x52c]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x484]
call fcn.00404888
push 0x455c7c
lea edx, [ebp - 0x49c]
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x500]
call fcn.00405496
pop ecx
lea ecx, [ebp - 0x52c]
mov byte [ebp - 4], 0xb
push ecx
mov ecx, eax
call fcn.00402726
push eax
lea ecx, [ebp - 0x454]
call fcn.00401ce8
push 4
push str.x86
lea ecx, [ebp - 0x454]
mov byte [ebp - 4], 0xc
call fcn.00402743
push eax
lea ecx, [ebp - 0x43c]
call fcn.00401ce8
lea ecx, [ebp - 0x454]
call fcn.00401e8f
lea ecx, [ebp - 0x500]
mov byte [ebp - 4], 0xf
call fcn.00401e8f
cmp dword [ebp - 0x428], 8
lea eax, [ebp - 0x43c]
cmovae eax, dword [ebp - 0x43c]
push eax
push 1
push 0x183
push esi
push str.d:ispbhelpercommon_runexecutable.cpp
call fcn.00403735
add esp, 0x14
mov dword [0x460628], 0x3b
cmp dword [ebp - 0x428], 8
lea ecx, [ebp - 0x43c]
mov edx, 0x460628
cmovae ecx, dword [ebp - 0x43c]
sub edx, ecx
movzx eax, word [ecx]
mov word [ecx + edx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x40503e
lea ecx, [ebp - 0x43c]
call fcn.00401e8f
lea ecx, [ebp - 0x52c]
call fcn.00401e8f
lea ecx, [ebp - 0x49c]
call fcn.00401e8f
lea ecx, [ebp - 0x484]
call fcn.00404674
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x4e4]
call fcn.004056b4
push str.SOFTWARESybasePowerBuilder_Runtime
lea ecx, [ebp - 0x514]
call fcn.00405617
lea ecx, [ebp - 0x4b4]
mov dword [ebp - 4], 0x10
call fcn.0040461c
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x514]
push edi
mov dword [ebp - 0x4ac], 0x80000002
call fcn.004057b2
sub esp, 0x18
mov ecx, esp
push eax
call fcn.00401d1b
lea ecx, [ebp - 0x4b4]
call fcn.0040473b
test eax, eax
je 0x40524e
push edi
push edi
lea ecx, [ebp - 0x514]
call fcn.004057b2
sub esp, 0x18
mov ecx, esp
push eax
call fcn.00401d1b
lea ecx, [ebp - 0x4b4]
call fcn.0040478b
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x730], esp
push 0x455b54
call fcn.00401d1b
sub esp, 0x18
mov byte [ebp - 4], 0x12
mov ecx, esp
push str.RuntimeVersion
call fcn.00401d1b
lea eax, [ebp - 0x454]
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0x4b4]
call fcn.00404888
mov byte [ebp - 4], 0x13
lea eax, [ebp - 0x454]
cmp dword [ebp - 0x440], 8
lea ecx, [ebp - 0x514]
push edi
cmovae eax, dword [ebp - 0x454]
push eax
push edi
push 0x455c7c
call fcn.00405a0c
mov ecx, eax
call fcn.00405a0c
push edi
push edi
lea ecx, [ebp - 0x514]
call fcn.004057b2
sub esp, 0x18
mov ecx, esp
push eax
call fcn.00401d1b
lea ecx, [ebp - 0x4b4]
call fcn.0040478b
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x730], esp
push 0x455b54
call fcn.00401d1b
sub esp, 0x18
mov byte [ebp - 4], 0x14
mov ecx, esp
push str.Location
call fcn.00401d1b
lea eax, [ebp - 0x43c]
mov byte [ebp - 4], 0x13
push eax
lea ecx, [ebp - 0x4b4]
call fcn.00404888
mov byte [ebp - 4], 0x15
lea eax, [ebp - 0x43c]
cmp dword [ebp - 0x428], 8
cmovae eax, dword [ebp - 0x43c]
push eax
push 1
push 0x193
push esi
push str.d:ispbhelpercommon_runexecutable.cpp
call fcn.00403735
add esp, 0x14
mov dword [0x460628], 0x3b
cmp dword [ebp - 0x428], 8
lea ecx, [ebp - 0x43c]
cmovae ecx, dword [ebp - 0x43c]
mov edx, 0x460628
sub edx, ecx
movzx eax, word [ecx]
mov word [ecx + edx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x405229
lea ecx, [ebp - 0x43c]
call fcn.00401e8f
lea ecx, [ebp - 0x454]
call fcn.00401e8f
lea ecx, [ebp - 0x4b4]
call fcn.00404674
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x514]
call fcn.004056b4
push 0x460628
push 0x455cac
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
mov esi, 0x460564
push str.PBVM
mov ecx, esi
call fcn.00405a0c
push edi
push str.PBSHR
mov ecx, 0x460594
call fcn.00405a0c
cmp dword [ebp - 0x720], 0
jbe 0x4052c0
push dword [ebp - 0x720]
mov ecx, esi
call fcn.00405a81
push dword [ebp - 0x720]
mov ecx, 0x460594
call fcn.00405a81
push edi
mov esi, str..DLL
mov ecx, 0x460564
push esi
call fcn.00405a0c
push edi
push esi
mov ecx, 0x460594
call fcn.00405a0c
mov ecx, 0x460564
call fcn.004057b2
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call esi
mov dword [0x460550], eax
test eax, eax
jne 0x40531d
push ecx
push ecx
push str.PBVM.DLL
mov ecx, 0x460564
call fcn.0040569c
push ecx
push ecx
push str.PBSHR.DLL
mov ecx, 0x460594
call fcn.0040569c
jmp 0x40532a
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x460550], edi
mov ecx, 0x460594
call fcn.004057b2
push eax
call esi
mov dword [0x46054c], eax
test eax, eax
jne 0x405369
push ecx
push dword [0x460584]
mov ecx, 0x460594
push dword [0x460568]
call fcn.004059a3
mov ecx, 0x460594
call fcn.004057b2
push eax
call esi
mov dword [0x46054c], eax
mov ecx, 0x460564
call fcn.004057b2
push eax
call esi
mov dword [0x460550], eax
test eax, eax
je 0x405443
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.ob_get_mode
push eax
call esi
push str.ob_get_process_mgr
push dword [0x460550]
call esi
push str.pbstg_sz
push dword [0x460550]
call esi
push str.FN_RunExecutable
push dword [0x460550]
call esi
mov esi, eax
test esi, esi
je 0x40546c
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x40540d
push dword [ebp - 0x710]
push dword [0x460550]
call ecx
test eax, eax
je 0x40540d
push str.run_app_...
push 1
push 0x1c8
push str.CRunExecutable::Run
push str.d:ispbhelpercommon_runexecutable.cpp
call fcn.00403471
add esp, 0x14
push edi
push 0x6b
push 5
push dword [ebp - 0x73c]
push dword [ebx + 4]
push dword [ebx]
call esi
mov edi, eax
push edi
push str.run_app_end__d
push 1
push 0x1cb
push str.CRunExecutable::Run
push str.d:ispbhelpercommon_runexecutable.cpp
call fcn.00403471
mov eax, dword [ebx + 0xc]
add esp, 0x18
test eax, eax
je 0x40546c
push dword [ebp - 0x710]
push dword [0x460550]
call eax
jmp 0x40546c
mov ecx, 0x460564
call fcn.004057b2
push eax
push str.load__s_fail_n
push 1
push 0x1d2
push str.CRunExecutable::Run
push str.d:ispbhelpercommon_runexecutable.cpp
call fcn.00403735
add esp, 0x18
mov eax, dword [0x46054c]
test eax, eax
je 0x40547c
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [0x460550]
test eax, eax
je 0x40548c
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
call fcn.0040d72b
ret 4