Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
v1.0.0.5 - changed to static SDLlog (compiled from SDL source) instea…
Browse files Browse the repository at this point in the history
…d of using SDL2.dll
  • Loading branch information
mrfearless committed Sep 4, 2019
1 parent e3ccf13 commit a1cff75
Show file tree
Hide file tree
Showing 18 changed files with 1,520 additions and 227 deletions.
136 changes: 0 additions & 136 deletions IEex/IEex.asm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ CHECK_IEexDLL_EXISTS EQU 1 ; uncomment to check if IEex.dll exists
CHECK_IEexLUA_EXISTS EQU 1 ; uncomment to check if M___IEex.lua exists
;CHECK_OVERRIDE_FILES EQU 1 ; uncomment to check if override files exists


.CODE

;------------------------------------------------------------------------------
Expand All @@ -44,57 +43,10 @@ start:
Invoke GetCommandLine
mov CommandLine, eax
Invoke ProcessCmdLine
Invoke WinMain, hInstance, NULL, CommandLine, SW_SHOWDEFAULT
Invoke ExitProcess, eax
ret

IEEX_ALIGN
;------------------------------------------------------------------------------
; ProcessCmdLine - process the command line
;------------------------------------------------------------------------------
ProcessCmdLine PROC
LOCAL dwTotalParameters:DWORD
LOCAL dwLenParam1:DWORD
Invoke ConsoleParseCmdLine, Addr CmdLineParameters
mov dwTotalParameters, eax

.IF eax == 1 ; only IEex.exe is specified on command line
ret
.ELSEIF eax == 2 ; IEex.exe and some other parameter
Invoke ConsoleCmdLineParam, Addr CmdLineParameters, 1, dwTotalParameters, Addr szParameter1Buffer
Invoke GetCurrentDirectory, MAX_PATH, Addr szLogFile
Invoke lstrcat, Addr szLogFile, Addr szBackslash
Invoke lstrcat, Addr szLogFile, Addr szParameter1Buffer
IFDEF DEBUG32
PrintString szLogFile
ENDIF
Invoke CreateFile, Addr szLogFile, GENERIC_READ or GENERIC_WRITE, FILE_SHARE_WRITE or FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL
.IF eax == INVALID_HANDLE_VALUE
IFDEF DEBUG32
Invoke GetLastError
PrintDec eax
ENDIF
ret
.ENDIF

.ENDIF
mov hLogFile, eax
IFDEF DEBUG32
PrintDec hLogFile
ENDIF
xor eax, eax
ret
ProcessCmdLine ENDP

IEEX_ALIGN
;------------------------------------------------------------------------------
Expand Down Expand Up @@ -140,17 +92,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szIEexByBubb
Invoke ConsoleText, Addr szCRLF
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szAppName
Invoke LogMessage, Addr szAppVersion
Invoke LogMessage, Addr szCRLF
Invoke LogMessage, Addr szCRLF
Invoke LogMessage, Addr szInfoEntry
Invoke LogMessage, Addr szIEexLoaderByfearless
Invoke LogMessage, Addr szCRLF
Invoke LogMessage, Addr szInfoEntry
Invoke LogMessage, Addr szIEexByBubb
Invoke LogMessage, Addr szCRLF
Invoke LogMessage, Addr szCRLF
.ENDIF

Expand All @@ -164,9 +105,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorIEGameRunning
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorIEGameRunning
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke DisplayErrorMessage, Addr szErrorIEGameRunning, 0
.ENDIF
Expand Down Expand Up @@ -194,9 +132,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
; Invoke ConsoleText, Addr szErrorEntry
; Invoke ConsoleText, Addr szErrorBioware_BG
; Invoke ConsoleText, Addr szCRLF
; Invoke LogMessage, Addr szErrorEntry
; Invoke LogMessage, Addr szErrorBioware_BG
; Invoke LogMessage, Addr szCRLF
; .ELSE
; Invoke DisplayErrorMessage, Addr szErrorBioware_BG, 0
; .ENDIF
Expand Down Expand Up @@ -226,9 +161,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorBioware_BG2
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorBioware_BG2
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke DisplayErrorMessage, Addr szErrorBioware_BG2, 0
.ENDIF
Expand Down Expand Up @@ -259,9 +191,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorBlackIsle_IWD
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorBlackIsle_IWD
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke DisplayErrorMessage, Addr szErrorBlackIsle_IWD, 0
.ENDIF
Expand Down Expand Up @@ -292,9 +221,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorBlackIsle_IWD2
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorBlackIsle_IWD2
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke DisplayErrorMessage, Addr szErrorBlackIsle_IWD, 0
.ENDIF
Expand Down Expand Up @@ -325,9 +251,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorBlackIsle_PST
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorBlackIsle_PST
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke DisplayErrorMessage, Addr szErrorBlackIsle_PST, 0
.ENDIF
Expand Down Expand Up @@ -355,9 +278,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorIEGameEXE
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorIEGameEXE
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke DisplayErrorMessage, Addr szErrorIEGameEXE, 0
.ENDIF
Expand Down Expand Up @@ -387,9 +307,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorIEexDLLFind
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorIEexDLLFind
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke DisplayErrorMessage, Addr szErrorIEexDLLFind, 0
.ENDIF
Expand Down Expand Up @@ -422,9 +339,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorM__IEexMissing
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorM__IEexMissing
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke DisplayErrorMessage, Addr szErrorM__IEexMissing, 0
.ENDIF
Expand Down Expand Up @@ -456,9 +370,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorIEexDBMissing
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorIEexDBMissing
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke DisplayErrorMessage, Addr szErrorIEexDBMissing, 0
.ENDIF
Expand Down Expand Up @@ -511,10 +422,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szStatusLaunchingIEGame
Invoke ConsoleText, lpszIEGame
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szStatusEntry
Invoke LogMessage, Addr szStatusLaunchingIEGame
Invoke LogMessage, lpszIEGame
Invoke LogMessage, Addr szCRLF
.ENDIF
Invoke CreateProcess, lpszIEGame, NULL, NULL, NULL, TRUE, CREATE_SUSPENDED, NULL, NULL, Addr startinfo, Addr pi
.IF eax != 0 ; CreateProcess success
Expand All @@ -531,9 +438,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szStatusEntry
Invoke ConsoleText, Addr szStatusInjectingDLL
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szStatusEntry
Invoke LogMessage, Addr szStatusInjectingDLL
Invoke LogMessage, Addr szCRLF
.ENDIF

IFDEF DEBUG32
Expand All @@ -555,10 +459,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
; Invoke ConsoleText, Addr szStatusRedirectCon
; Invoke ConsoleText, Addr szCRLF
; Invoke ConsoleText, Addr szCRLF
; Invoke LogMessage, Addr szStatusEntry
; Invoke LogMessage, Addr szStatusRedirectCon
; Invoke LogMessage, Addr szCRLF
; Invoke LogMessage, Addr szCRLF
;
; IFDEF DEBUG32
; PrintText 'ReadFromPipe'
Expand Down Expand Up @@ -595,9 +495,6 @@ WinMain PROC USES EBX hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdSh
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorIEGameExecute
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorIEGameExecute
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke GetLastError
Invoke DisplayErrorMessage, Addr szErrorIEGameExecute, eax
Expand Down Expand Up @@ -692,9 +589,6 @@ InjectDLL PROC hProcess:HANDLE, szDLLPath:DWORD
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorVirtualAllocEx
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorVirtualAllocEx
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke GetLastError
Invoke DisplayErrorMessage, Addr szErrorVirtualAllocEx, eax
Expand All @@ -709,9 +603,6 @@ InjectDLL PROC hProcess:HANDLE, szDLLPath:DWORD
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorWriteProcessMem
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorWriteProcessMem
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke GetLastError
Invoke DisplayErrorMessage, Addr szErrorWriteProcessMem, eax
Expand All @@ -729,9 +620,6 @@ InjectDLL PROC hProcess:HANDLE, szDLLPath:DWORD
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorGetModuleHandle
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorGetModuleHandle
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke GetLastError
Invoke DisplayErrorMessage, Addr szErrorGetModuleHandle, eax
Expand All @@ -747,9 +635,6 @@ InjectDLL PROC hProcess:HANDLE, szDLLPath:DWORD
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorGetProcAddress
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorGetProcAddress
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke GetLastError
Invoke DisplayErrorMessage, Addr szErrorGetProcAddress, eax
Expand All @@ -769,9 +654,6 @@ InjectDLL PROC hProcess:HANDLE, szDLLPath:DWORD
Invoke ConsoleText, Addr szErrorEntry
Invoke ConsoleText, Addr szErrorRemoteThread
Invoke ConsoleText, Addr szCRLF
Invoke LogMessage, Addr szErrorEntry
Invoke LogMessage, Addr szErrorRemoteThread
Invoke LogMessage, Addr szCRLF
.ELSE
Invoke GetLastError
Invoke DisplayErrorMessage, Addr szErrorRemoteThread, eax
Expand Down Expand Up @@ -932,24 +814,6 @@ CheckFileVersion PROC USES EBX szVersionFile:DWORD, szVersion:DWORD
CheckFileVersion endp
ENDIF

IEEX_ALIGN
;------------------------------------------------------------------------------
; LogMessage
;------------------------------------------------------------------------------
LogMessage PROC lpszLogText:DWORD
LOCAL dwBytesToWrite:DWORD
LOCAL dwBytesWritten:DWORD
.IF hLogFile != 0 && lpszLogText != 0
Invoke lstrlen, lpszLogText
mov dwBytesToWrite, eax
Invoke WriteFile, hLogFile, lpszLogText, dwBytesToWrite, Addr dwBytesWritten, NULL
mov eax, dwBytesWritten
.ELSE
xor eax, eax
.ENDIF
ret
LogMessage ENDP



Expand Down
Binary file modified IEex/IEex.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion IEex/IEex.inc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ IEEX_ALIGN TEXTEQU <ALIGN 16>
;------------------------------------------------------------------------------
AppName DB "IEex loader",0
szAppName DB "[IEex loader]",0
szAppVersion DB " v1.0.0.4",0
szAppVersion DB " v1.0.0.5",0
szIEexLoaderByfearless DB "IEex loader by fearless: github.com/mrfearless/IEexLoader",0
szIEexByBubb DB "IEex by Bubb: github.com/Bubb13/IEex",0
szCRLF DB 13,10,0
Expand Down
16 changes: 8 additions & 8 deletions IEex/IEex.rap
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@ Menu=1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0
[VerInf]
Nme=VERINF1
ID=1
FV=1.0.0.4
PV=1.0.0.4
FV=1.0.0.5
PV=1.0.0.5
VerOS=0x00000004
VerFT=0x00000001
VerLNG=0x00000409
VerCHS=0x000004B0
ProductVersion=1.0.0.4
ProductVersion=1.0.0.5
ProductName=IEex.exe
OriginalFilename=IEex.exe
LegalTrademarks=fearless
LegalCopyright=fearless
InternalName=IEex.exe
FileDescription=IEex loader
FileVersion=1.0.0.4
FileVersion=1.0.0.5
CompanyName=fearless
[Group]
Group=Assembly,Resources,Misc
Expand All @@ -96,7 +96,7 @@ AutoLoad=2,4,5,1
4=0,0,0,0,0
5=0,0,0,0,7586
2=0,0,0,0,1433
1=0,0,0,0,435
1=0,0,0,0,25136
[RADebugBP]
2=
1=
Expand All @@ -111,7 +111,7 @@ MilestoneOnTime=2
MilestoneOnDate=0
MilestoneOnDateWhen=1
MilestoneOnDateStatus=0
MilestoneOnDateDate=3
MilestoneOnDateDate=4
MilestoneOnDateTimeYear=2019
MilestoneOnDateTimeMonth=9
MilestoneOnDateTimeDate=1
Expand All @@ -135,10 +135,10 @@ ProductVer2Range=0
ProductVer3Range=0
ProductVer4Range=0
[PTimer]
PTimer=13712361
PTimer=14888967
[Collapse]
2=
1=1107296768,,1024
1=276824064,,
5=
4=
[GroupExpand]
Expand Down
8 changes: 4 additions & 4 deletions IEex/Res/IEexVer.rc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define VERINF1 1
VERINF1 VERSIONINFO
FILEVERSION 1,0,0,4
PRODUCTVERSION 1,0,0,4
FILEVERSION 1,0,0,5
PRODUCTVERSION 1,0,0,5
FILEOS 0x00000004
FILETYPE 0x00000001
BEGIN
Expand All @@ -10,14 +10,14 @@ BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "fearless\0"
VALUE "FileVersion", "1.0.0.4\0"
VALUE "FileVersion", "1.0.0.5\0"
VALUE "FileDescription", "IEex loader\0"
VALUE "InternalName", "IEex.exe\0"
VALUE "LegalCopyright", "fearless\0"
VALUE "LegalTrademarks", "fearless\0"
VALUE "OriginalFilename", "IEex.exe\0"
VALUE "ProductName", "IEex.exe\0"
VALUE "ProductVersion", "1.0.0.4\0"
VALUE "ProductVersion", "1.0.0.5\0"
END
END
BLOCK "VarFileInfo"
Expand Down
Loading

0 comments on commit a1cff75

Please sign in to comment.