.486
.model flat, stdcall

extrn	LoadLibraryA	:PROC
extrn	MessageBoxA	:PROC
extrn	ExitProcess	:PROC


.data

Copyright	db	'FGC41b493 Security Enabler by Frost_Byte',0
Date		db	'5/11/01',0

FGCDLL		db	'FGCNWRK.DLL',0
LibBase		dd	?

export_table	dd	?
export_base	dd	?

.code

code_section:

	push	offset FGCDLL
	call	LoadLibraryA
	mov     LibBase, eax

	mov	ebx, eax
	mov	ecx, eax
	add	eax, dword ptr [eax+03Ch]
	add	ebx, dword ptr [eax+078h]

	mov	eax,dword ptr [ebx+010h]
	push	eax
	pop	export_base

	mov	eax,dword ptr[ebx+01Ch]
	add	eax, ecx
	push	eax
	pop	export_table

	mov	eax, 2Bh
	sub	eax, export_base
	mov	ecx, export_table
	mov	edi, dword ptr [ecx+eax*4]
	add	edi, LibBase

	push	1
	push	1
	push	0
        call	edi
	nop
	nop
	
	push	0
	call	@@1
		db	'FGC 4.1 Security Enabled',0
@@1:
	call	@@2
		db	'Reboot to return system to normal operating status.',0
@@2:
	push	0
	call	MessageBoxA

	push	0
	call	ExitProcess

end	code_section

