
.intel_syntax noprefix

.global define_name
.global undef_name
.global SymSetCmpFunc
.global SymClearLocal
.global SymGetLocal
.global SymSetLocal
.global SymHash
.global SymAlloc
.global SymFindID
.global SymFind
.global SymLookup
.global SymLookupLocal
.global SymFree
.global SymAddLocal
.global SymAddGlobal
.global SymCreate
.global SymGCreate
.global SymLCreate
.global SymGetCount
.global SymMakeAllSymbolsPublic
.global SymInit
.global SymPassInit
.global SymGetAll
.global SymEnum
.global QEnqueue
.global QAddItem
.global AddPublicData
.global szDate
.global szTime
.global SymCmpFunc
.global strFILE
.global strFUNC

.extern symCurSeg
.extern LineCur
.extern FileCur
.extern UpdateCurPC
.extern UpdateWordSize
.extern UseSavedState
.extern UpdateLineNumber
.extern ReleaseMacroData
.extern DeleteProc
.extern CurrProc
.extern LclAlloc
.extern tsprintf
.extern asmerr
.extern ModuleInfo
.extern tstrcmp
.extern tmemicmp
.extern tmemcmp
.extern time
.extern localtime


.SECTION .text
	.ALIGN	16

$_001:	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 40
	mov	rbx, rcx
	lea	rsi, [dyneqtable+rip]
	xor	edi, edi
$_002:	cmp	edi, dword ptr [dyneqcount+rip]
	jge	$_004
	mov	rdx, qword ptr [rsi]
	mov	rcx, rbx
	call	tstrcmp@PLT
	test	eax, eax
	jnz	$_003
	inc	edi
	mov	eax, edi
	jmp	$_005

$_003:	inc	edi
	add	rsi, 8
	jmp	$_002

$_004:	xor	eax, eax
$_005:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

define_name:
	mov	qword ptr [rsp+0x8], rcx
	mov	qword ptr [rsp+0x10], rdx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 32
	call	$_001
	test	eax, eax
	jnz	$_006
	mov	ecx, dword ptr [dyneqcount+rip]
	lea	rdx, [dyneqtable+rip]
	mov	rax, qword ptr [rbp+0x10]
	mov	qword ptr [rdx+rcx*8], rax
	lea	rdx, [dyneqvalue+rip]
	mov	rax, qword ptr [rbp+0x18]
	mov	qword ptr [rdx+rcx*8], rax
	inc	dword ptr [dyneqcount+rip]
$_006:	leave
	ret

undef_name:
	push	rbp
	mov	rbp, rsp
	sub	rsp, 32
	call	$_001
	test	eax, eax
	jz	$_009
	mov	ecx, eax
$_007:	cmp	ecx, dword ptr [dyneqcount+rip]
	jge	$_008
	lea	rdx, [dyneqtable+rip]
	mov	rax, qword ptr [rdx+rcx*8]
	mov	qword ptr [rdx+rcx*8-0x8], rax
	lea	rdx, [dyneqvalue+rip]
	mov	rax, qword ptr [rdx+rcx*8]
	mov	qword ptr [rdx+rcx*8-0x8], rax
	inc	ecx
	jmp	$_007

$_008:	dec	dword ptr [dyneqcount+rip]
$_009:	leave
	ret

SymSetCmpFunc:
	lea	rax, [tmemicmp@PLT+rip]
	test	byte ptr [r14], 0x01
	jz	$_010
	lea	rax, [tmemcmp@PLT+rip]
$_010:	mov	qword ptr [SymCmpFunc+rip], rax
	ret

SymClearLocal:
	xor	eax, eax
	lea	rdx, [lsym_table+rip]
	mov	ecx, 8194
	xchg	rdi, rdx
	rep stosd
	mov	rdi, rdx
	ret

SymGetLocal:
	push	rbx
	push	rbp
	mov	rbp, rsp
	mov	rdx, qword ptr [rcx+0x78]
	lea	rdx, [rdx+0x28]
	xor	ecx, ecx
	lea	rbx, [lsym_table+rip]
	jmp	$_012

$_011:	mov	rax, qword ptr [rbx+rcx*8]
	inc	ecx
	test	rax, rax
	jz	$_012
	mov	qword ptr [rdx], rax
	lea	rdx, [rax+0x78]
$_012:	cmp	ecx, 4096
	jc	$_011
	xor	eax, eax
	mov	qword ptr [rdx], rax
	leave
	pop	rbx
	ret

SymSetLocal:
	push	rsi
	push	rdi
	push	rbp
	mov	rbp, rsp
	mov	rsi, rcx
	xor	eax, eax
	lea	rdx, [lsym_table+rip]
	mov	rdi, rdx
	mov	ecx, 8194
	rep stosd
	mov	rdi, rdx
	mov	rsi, qword ptr [rsi+0x78]
	mov	rsi, qword ptr [rsi+0x28]
	jmp	$_017

$_013:	mov	eax, dword ptr [rsi+0x18]
	test	byte ptr [rsi+0x1C], 0x01
	jz	$_016
	mov	rcx, qword ptr [rsi+0x8]
	mov	eax, 2166136261
	mov	dl, byte ptr [rcx]
	jmp	$_015

$_014:	inc	rcx
	or	dl, 0x20
	imul	eax, eax, 16777619
	xor	al, dl
	mov	dl, byte ptr [rcx]
$_015:	test	dl, dl
	jnz	$_014
$_016:	and	eax, 0xFFF
	mov	qword ptr [rdi+rax*8], rsi
	mov	rsi, qword ptr [rsi+0x78]
$_017:	test	rsi, rsi
	jnz	$_013
	leave
	pop	rdi
	pop	rsi
	ret

SymHash:
	mov	edx, 8192
	test	byte ptr [r14], 0x01
	jz	$_018
	xor	edx, edx
$_018:	mov	eax, 2166136261
$_019:	cmp	byte ptr [rcx], 0
	jz	$_020
	mov	dl, byte ptr [rcx]
	or	dl, dh
	imul	eax, eax, 16777619
	xor	al, dl
	inc	rcx
	jmp	$_019

$_020:
	ret

SymAlloc:
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 40
	mov	rsi, rcx
	mov	rcx, rsi
	call	SymHash
	mov	ebx, eax
	sub	rcx, rsi
	mov	edi, ecx
	lea	ecx, [rdi+0x91]
	call	LclAlloc@PLT
	mov	dword ptr [rax+0x18], ebx
	mov	dword ptr [rax+0x14], edi
	mov	byte ptr [rax+0x1E], 192
	lea	rdx, [rax+0x90]
	mov	qword ptr [rax+0x8], rdx
	test	byte ptr [r14+0x3], 0x10
	jz	$_021
	or	byte ptr [rax+0x12], 0x01
$_021:	test	byte ptr [r14], 0x01
	jz	$_022
	or	byte ptr [rax+0x1C], 0x01
$_022:	test	edi, edi
	jz	$_023
	mov	ecx, edi
	mov	rdi, rdx
	rep movsb
$_023:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret


.ALIGN	16

SymFindID:
	xor	eax, eax
	mov	r8d, dword ptr [rcx+0x8]
	mov	r9d, dword ptr [rcx+0xC]
	movzx	ecx, byte ptr [rcx+0x3]
	test	ecx, ecx
	je	$_030
	cmp	rax, qword ptr [CurrProc+rip]
	jz	$_027
	mov	eax, r8d
	and	eax, 0xFFF
	lea	r10, [lsym_table+rip]
	lea	rdx, [r10+rax*8]
	mov	rax, qword ptr [rdx]
	test	rax, rax
	jz	$_026
$_024:	cmp	ecx, dword ptr [rax+0x14]
	jnz	$_025
	test	byte ptr [rax+0x1C], 0x01
	mov	r10d, r9d
	cmove	r10d, r8d
	cmp	r10d, dword ptr [rax+0x18]
	jz	$_030
$_025:	mov	rdx, rax
	mov	rax, qword ptr [rax]
	test	rax, rax
	jnz	$_024
$_026:	mov	qword ptr [lsym+rip], rdx
$_027:	mov	eax, r8d
	and	eax, 0x7FFF
	lea	r10, [gsym_table+rip]
	lea	rdx, [r10+rax*8]
	mov	rax, qword ptr [rdx]
	test	rax, rax
	jz	$_030
$_028:	cmp	ecx, dword ptr [rax+0x14]
	jnz	$_029
	test	byte ptr [rax+0x1C], 0x01
	mov	r10d, r9d
	cmove	r10d, r8d
	cmp	r10d, dword ptr [rax+0x18]
	jz	$_030
$_029:	mov	rdx, rax
	mov	rax, qword ptr [rax]
	test	rax, rax
	jnz	$_028
$_030:	ret

	nop

.ALIGN	16
SymFind:
	movzx	eax, byte ptr [rcx]
	mov	r8d, 2166136261
	mov	r9d, 2166136261
	mov	rdx, rcx
	test	eax, eax
	je	$_038
$_031:	imul	r9d, r9d, 16777619
	imul	r8d, r8d, 16777619
	xor	r9d, eax
	or	eax, 0x20
	inc	rcx
	xor	r8d, eax
	mov	al, byte ptr [rcx]
	test	eax, eax
	jnz	$_031
	sub	rcx, rdx
	cmp	rax, qword ptr [CurrProc+rip]
	jz	$_035
	mov	eax, r8d
	and	eax, 0xFFF
	lea	r10, [lsym_table+rip]
	lea	rdx, [r10+rax*8]
	mov	rax, qword ptr [rdx]
	test	rax, rax
	jz	$_034
$_032:	cmp	ecx, dword ptr [rax+0x14]
	jnz	$_033
	test	byte ptr [rax+0x1C], 0x01
	mov	r10d, r9d
	cmove	r10d, r8d
	cmp	r10d, dword ptr [rax+0x18]
	jz	$_038
$_033:	mov	rdx, rax
	mov	rax, qword ptr [rax]
	test	rax, rax
	jnz	$_032
$_034:	mov	qword ptr [lsym+rip], rdx
$_035:	mov	eax, r8d
	and	eax, 0x7FFF
	lea	r10, [gsym_table+rip]
	lea	rdx, [r10+rax*8]
	mov	rax, qword ptr [rdx]
	test	rax, rax
	jz	$_038
$_036:	cmp	ecx, dword ptr [rax+0x14]
	jnz	$_037
	test	byte ptr [rax+0x1C], 0x01
	mov	r10d, r9d
	cmove	r10d, r8d
	cmp	r10d, dword ptr [rax+0x18]
	jz	$_038
$_037:	mov	rdx, rax
	mov	rax, qword ptr [rax]
	test	rax, rax
	jnz	$_036
$_038:	ret

SymLookup:
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 40
	mov	rbx, rcx
	mov	rcx, rbx
	call	SymFind
	test	rax, rax
	jnz	$_039
	xchg	rbx, rdx
	mov	rcx, rdx
	call	SymAlloc
	mov	qword ptr [rbx], rax
	inc	dword ptr [SymCount+rip]
$_039:	leave
	pop	rbx
	ret

SymLookupLocal:
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 40
	mov	rbx, rdx
	test	rcx, rcx
	jz	$_040
	call	SymFindID
	jmp	$_041

$_040:	mov	rcx, rbx
	call	SymFind
$_041:	test	rax, rax
	jz	$_042
	test	byte ptr [rax+0x10], 0x04
	jz	$_043
	test	byte ptr [r14+0x2], 0x80
	jnz	$_043
$_042:	mov	rcx, rbx
	call	SymAlloc
	or	byte ptr [rax+0x11], 0x04
	mov	rcx, qword ptr [lsym+rip]
	mov	qword ptr [rcx], rax
	jmp	$_044

$_043:	cmp	byte ptr [rax+0x1D], 0
	jnz	$_044
	test	byte ptr [rax+0x11], 0x04
	jnz	$_044
	mov	rcx, qword ptr [rax]
	mov	qword ptr [rdx], rcx
	dec	dword ptr [SymCount+rip]
	or	byte ptr [rax+0x11], 0x04
	mov	qword ptr [rax], 0
	mov	rcx, qword ptr [lsym+rip]
	mov	qword ptr [rcx], rax
$_044:	leave
	pop	rbx
	ret

SymFree:
	mov	qword ptr [rsp+0x8], rcx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 32
	movzx	eax, byte ptr [rcx+0x1D]
	jmp	$_050

$_045:	test	byte ptr [rcx+0x10], 0x02
	jz	$_046
	call	DeleteProc@PLT
$_046:	jmp	$_051

$_047:	test	byte ptr [rcx+0x10], 0x02
	jz	$_048
	call	DeleteProc@PLT
$_048:	mov	rcx, qword ptr [rbp+0x10]
	mov	dword ptr [rcx+0x48], 0
	jmp	$_051

$_049:	call	ReleaseMacroData@PLT
	jmp	$_051

$_050:	cmp	eax, 1
	jz	$_045
	cmp	eax, 2
	jz	$_047
	cmp	eax, 9
	jz	$_049
$_051:	leave
	ret

SymAddLocal:
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 40
	mov	rbx, rcx
	mov	rsi, rdx
	mov	rcx, rsi
	call	SymFind
	test	rax, rax
	jz	$_052
	cmp	byte ptr [rax+0x1D], 0
	jz	$_052
	mov	rdx, rsi
	mov	ecx, 2005
	call	asmerr@PLT
	xor	eax, eax
	jmp	$_053

$_052:	mov	rcx, rsi
	call	SymHash
	sub	rcx, rsi
	mov	dword ptr [rbx+0x18], eax
	mov	dword ptr [rbx+0x14], ecx
	lea	edi, [rcx+0x1]
	mov	ecx, edi
	call	LclAlloc@PLT
	mov	qword ptr [rbx+0x8], rax
	mov	ecx, edi
	mov	rdi, rax
	rep movsb
	mov	rcx, qword ptr [lsym+rip]
	mov	qword ptr [rcx], rbx
	mov	qword ptr [rbx], 0
	mov	rax, rbx
$_053:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

SymAddGlobal:
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 40
	mov	rbx, rcx
	mov	rcx, qword ptr [rbx+0x8]
	call	SymFind
	test	rax, rax
	jz	$_054
	mov	rdx, qword ptr [rbx+0x8]
	mov	ecx, 2005
	call	asmerr@PLT
	xor	eax, eax
	jmp	$_055

$_054:	mov	rax, rbx
	inc	dword ptr [SymCount+rip]
	mov	qword ptr [rdx], rax
	mov	qword ptr [rax], 0
$_055:	leave
	pop	rbx
	ret

SymCreate:
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 40
	mov	rbx, rcx
	mov	rcx, rbx
	call	SymFind
	test	rax, rax
	jz	$_056
	mov	rdx, rbx
	mov	ecx, 2005
	call	asmerr@PLT
	xor	eax, eax
	jmp	$_057

$_056:	xchg	rbx, rdx
	mov	rcx, rdx
	call	SymAlloc
	inc	dword ptr [SymCount+rip]
	mov	qword ptr [rbx], rax
$_057:	leave
	pop	rbx
	ret

SymGCreate:
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 40
	mov	rbx, rdx
	call	SymAlloc
	inc	dword ptr [SymCount+rip]
	mov	qword ptr [rbx], rax
	leave
	pop	rbx
	ret

SymLCreate:
	mov	qword ptr [rsp+0x8], rcx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 32
	mov	rcx, qword ptr [rbp+0x10]
	call	SymFind
	test	rax, rax
	jz	$_058
	cmp	byte ptr [rax+0x1D], 0
	jz	$_058
	mov	rdx, qword ptr [rbp+0x10]
	mov	ecx, 2005
	call	asmerr@PLT
	xor	eax, eax
	jmp	$_059

$_058:	mov	rcx, qword ptr [rbp+0x10]
	call	SymAlloc
	mov	rcx, qword ptr [lsym+rip]
	mov	qword ptr [rcx], rax
$_059:	leave
	ret

SymGetCount:
	mov	eax, dword ptr [SymCount+rip]
	ret

SymMakeAllSymbolsPublic:
	push	rsi
	push	rdi
	sub	rsp, 40
	xor	esi, esi
$_060:	lea	rax, [gsym_table+rip]
	mov	rdi, qword ptr [rax+rsi*8]
	jmp	$_067

$_061:	cmp	byte ptr [rdi+0x1D], 1
	jnz	$_066
	mov	rcx, qword ptr [rdi+0x8]
	movzx	eax, word ptr [rcx]
	test	byte ptr [rdi+0x11], 0x80
	jnz	$_066
	test	byte ptr [rdi+0x10], 0x08
	jnz	$_066
	test	byte ptr [rdi+0x10], 0x04
	jnz	$_066
	test	byte ptr [rdi+0x11], 0x08
	jnz	$_066
	cmp	ah, 38
	jz	$_066
	xor	ecx, ecx
	cmp	ah, 36
	jnz	$_065
	cmp	al, 68
	jz	$_062
	cmp	al, 70
	jnz	$_063
$_062:	cmp	dword ptr [rdi+0x14], 6
	jnz	$_063
	inc	ecx
	jmp	$_065

$_063:	cmp	al, 84
	jz	$_064
	cmp	al, 73
	jnz	$_065
$_064:	cmp	dword ptr [rdi+0x14], 8
	jnz	$_065
	inc	ecx
$_065:	test	ecx, ecx
	jnz	$_066
	or	byte ptr [rdi+0x10], 0x04
	mov	rcx, rdi
	call	AddPublicData
$_066:	mov	rdi, qword ptr [rdi]
$_067:	test	rdi, rdi
	jnz	$_061
	add	esi, 1
	cmp	esi, 32768
	jne	$_060
	add	rsp, 40
	pop	rdi
	pop	rsi
	ret

SymInit:
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 56
	xor	eax, eax
	mov	dword ptr [SymCount+rip], eax
	mov	qword ptr [CurrProc+rip], rax
	lea	rdi, [gsym_table+rip]
	mov	ecx, 65536
	rep stosd
	lea	rdi, [rbp-0x8]
	call	time@PLT
	lea	rdi, [rbp-0x8]
	call	localtime@PLT
	mov	rsi, rax
	mov	edx, dword ptr [rsi+0x14]
	sub	edx, 100
	mov	ecx, dword ptr [rsi+0x10]
	add	ecx, 1
	mov	dword ptr [rsp+0x20], edx
	mov	r9d, dword ptr [rsi+0xC]
	mov	r8d, ecx
	lea	rdx, [DS000F+rip]
	lea	rcx, [szDate+rip]
	call	tsprintf@PLT
	mov	eax, dword ptr [rsi]
	mov	dword ptr [rsp+0x20], eax
	mov	r9d, dword ptr [rsi+0x4]
	mov	r8d, dword ptr [rsi+0x8]
	lea	rdx, [DS0010+rip]
	lea	rcx, [szTime+rip]
	call	tsprintf@PLT
	lea	rsi, [tmtab+rip]
	jmp	$_069

$_068:	mov	rcx, qword ptr [rsi]
	call	SymCreate
	mov	byte ptr [rax+0x1D], 10
	or	byte ptr [rax+0x10], 0x01
	or	byte ptr [rax+0x10], 0x08
	mov	rcx, qword ptr [rsi+0x8]
	mov	qword ptr [rax+0x30], rcx
	mov	rcx, qword ptr [rsi+0x10]
	add	rsi, 24
	test	rcx, rcx
	jz	$_069
	mov	qword ptr [rcx], rax
$_069:	cmp	qword ptr [rsi], 0
	jnz	$_068
	lea	rsi, [eqtab+rip]
	jmp	$_071

$_070:	mov	rcx, qword ptr [rsi]
	call	SymCreate
	mov	byte ptr [rax+0x1D], 1
	or	byte ptr [rax+0x10], 0x01
	or	byte ptr [rax+0x10], 0x08
	mov	rcx, qword ptr [rsi+0x8]
	mov	dword ptr [rax+0x30], ecx
	mov	rcx, qword ptr [rsi+0x10]
	mov	qword ptr [rax+0x68], rcx
	mov	rcx, qword ptr [rsi+0x18]
	add	rsi, 32
	test	rcx, rcx
	jz	$_071
	mov	qword ptr [rcx], rax
$_071:	cmp	qword ptr [rsi], 0
	jnz	$_070
	and	byte ptr [rax+0x12], 0xFE
	xor	esi, esi
	jmp	$_074

$_072:	lea	rax, [dyneqtable+rip]
	mov	rcx, qword ptr [rax+rsi*8]
	call	SymCreate
	test	rax, rax
	jz	$_073
	mov	byte ptr [rax+0x1D], 10
	or	byte ptr [rax+0x10], 0x01
	or	byte ptr [rax+0x10], 0x08
	lea	rdx, [dyneqvalue+rip]
	mov	rcx, qword ptr [rdx+rsi*8]
	mov	qword ptr [rax+0x30], rcx
	mov	qword ptr [rax+0x68], 0
$_073:	inc	esi
$_074:	cmp	esi, dword ptr [dyneqcount+rip]
	jl	$_072
	mov	rax, qword ptr [symPC+rip]
	and	byte ptr [rax+0x12], 0xFE
	or	byte ptr [rax+0x10], 0x80
	mov	rax, qword ptr [LineCur+rip]
	and	byte ptr [rax+0x12], 0xFE
	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

SymPassInit:
	mov	qword ptr [rsp+0x8], rcx
	push	rbp
	mov	rbp, rsp
	cmp	dword ptr [rbp+0x10], 0
	jz	$_079
	cmp	dword ptr [UseSavedState+rip], 0
	jnz	$_079
	xor	ecx, ecx
$_075:	lea	rax, [gsym_table+rip]
	mov	rax, qword ptr [rax+rcx*8]
	jmp	$_078

$_076:	test	byte ptr [rax+0x10], 0x08
	jnz	$_077
	and	byte ptr [rax+0x10], 0xFE
$_077:	mov	rax, qword ptr [rax]
$_078:	test	rax, rax
	jnz	$_076
	add	ecx, 1
	cmp	ecx, 32768
	jnz	$_075
$_079:	leave
	ret

SymGetAll:
	mov	rdx, rcx
	xor	ecx, ecx
$_080:	lea	rax, [gsym_table+rip]
	mov	rax, qword ptr [rax+rcx*8]
	jmp	$_082

$_081:	mov	qword ptr [rdx], rax
	add	rdx, 8
	mov	rax, qword ptr [rax]
$_082:	test	rax, rax
	jnz	$_081
	add	ecx, 1
	cmp	ecx, 32768
	jnz	$_080
	ret

SymEnum:
	push	rbx
	push	rbp
	mov	rbp, rsp
	lea	rbx, [gsym_table+rip]
	mov	rax, rcx
	test	rax, rax
	jz	$_083
	mov	rax, qword ptr [rax]
	mov	ecx, dword ptr [rdx]
	jmp	$_084

$_083:	xor	ecx, ecx
	mov	dword ptr [rdx], ecx
	mov	rax, qword ptr [rbx]
$_084:	jmp	$_086

$_085:	add	ecx, 1
	mov	dword ptr [rdx], ecx
	mov	rax, qword ptr [rbx+rcx*8]
$_086:	test	rax, rax
	jnz	$_087
	cmp	ecx, 32767
	jc	$_085
$_087:	leave
	pop	rbx
	ret

QEnqueue:
	xor	eax, eax
	cmp	rax, qword ptr [rcx]
	jnz	$_088
	mov	qword ptr [rcx], rdx
	mov	qword ptr [rcx+0x8], rdx
	mov	qword ptr [rdx], rax
	jmp	$_089

$_088:	mov	rax, qword ptr [rcx+0x8]
	mov	qword ptr [rcx+0x8], rdx
	mov	qword ptr [rax], rdx
	xor	eax, eax
	mov	qword ptr [rdx], rax
$_089:	ret

QAddItem:
	push	rsi
	push	rdi
	push	rbp
	mov	rbp, rsp
	sub	rsp, 32
	mov	rsi, rcx
	mov	rdi, rdx
	mov	ecx, 16
	call	LclAlloc@PLT
	mov	qword ptr [rax+0x8], rdi
	mov	rdx, rax
	mov	rcx, rsi
	call	QEnqueue
	leave
	pop	rdi
	pop	rsi
	ret

AddPublicData:
	push	rbp
	mov	rbp, rsp
	sub	rsp, 32
	mov	rdx, rcx
	lea	rcx, [r14+0x238]
	call	QAddItem
	leave
	ret


.SECTION .data
	.ALIGN	16

symPC:
	.quad  0x0000000000000000

tmtab:
	.quad  DS0000
	.quad  DS0001
	.quad  0x0000000000000000
	.quad  DS0002
	.quad  szDate
	.quad  0x0000000000000000
	.quad  DS0003
	.quad  szTime
	.quad  0x0000000000000000
	.quad  DS0004
	.quad  ModuleInfo+0x74
	.quad  0x0000000000000000
	.quad  DS0005
	.quad  0x0000000000000000
	.quad  FileCur
	.quad  DS0006
	.quad  strFILE
	.quad  0x0000000000000000
	.quad  DS0007
	.quad  DS0008
	.quad  0x0000000000000000
	.quad  DS0009
	.quad  strFUNC
	.quad  0x0000000000000000
	.quad  DS000A
	.quad  DS000A+0x7
	.quad  symCurSeg
	.quad  0x0000000000000000

eqtab:
	.quad  DS000B
	.quad  0x00000000000000EF
	.quad  0x0000000000000000
	.quad  0x0000000000000000
	.quad  DS000C
	.quad  0x00000000000000D4
	.quad  0x0000000000000000
	.quad  0x0000000000000000
	.quad  DS000D
	.quad  0x0000000000000000
	.quad  UpdateCurPC
	.quad  symPC
	.quad  DS0008
	.quad  0x0000000000000000
	.quad  UpdateLineNumber
	.quad  LineCur
	.quad  DS000E
	.quad  0x0000000000000000
	.quad  UpdateWordSize
	.quad  0x0000000000000000
	.quad  0x0000000000000000

dyneqcount:
	.int   0x00000000

DS000F:
	.byte  0x25, 0x30, 0x32, 0x75, 0x2F, 0x25, 0x30, 0x32
	.byte  0x75, 0x2F, 0x25, 0x30, 0x32, 0x75, 0x00

DS0010:
	.byte  0x25, 0x30, 0x32, 0x75, 0x3A, 0x25, 0x30, 0x32
	.byte  0x75, 0x3A, 0x25, 0x30, 0x32, 0x75, 0x00


.SECTION .bss
	.ALIGN	16

szDate:
	.zero	16 * 1

szTime:
	.zero	16 * 1

gsym_table:
	.zero	262144 * 1

lsym_table:
	.zero	32776 * 1

lsym:	.zero	8

SymCmpFunc:
	.zero	8

dyneqtable:
	.zero	512 * 1

dyneqvalue:
	.zero	512 * 1

SymCount: .zero 4

strFILE:
	.zero	1024 * 1

strFUNC:
	.zero	256 * 1


.SECTION .rodata
	.ALIGN	16

DS0000:
	.byte  0x40, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E
	.byte  0x00

DS0001:
	.byte  0x31, 0x30, 0x30, 0x30, 0x00

DS0002:
	.byte  0x40, 0x44, 0x61, 0x74, 0x65, 0x00

DS0003:
	.byte  0x40, 0x54, 0x69, 0x6D, 0x65, 0x00

DS0004:
	.byte  0x40, 0x46, 0x69, 0x6C, 0x65, 0x4E, 0x61, 0x6D
	.byte  0x65, 0x00

DS0005:
	.byte  0x40, 0x46, 0x69, 0x6C, 0x65, 0x43, 0x75, 0x72
	.byte  0x00

DS0006:
	.byte  0x5F, 0x5F, 0x46, 0x49, 0x4C, 0x45, 0x5F, 0x5F
	.byte  0x00

DS0007:
	.byte  0x5F, 0x5F, 0x4C, 0x49, 0x4E, 0x45, 0x5F, 0x5F
	.byte  0x00

DS0008:
	.byte  0x40, 0x4C, 0x69, 0x6E, 0x65, 0x00

DS0009:
	.byte  0x5F, 0x5F, 0x66, 0x75, 0x6E, 0x63, 0x5F, 0x5F
	.byte  0x00

DS000A:
	.byte  0x40, 0x43, 0x75, 0x72, 0x53, 0x65, 0x67, 0x00

DS000B:
	.byte  0x5F, 0x5F, 0x41, 0x53, 0x4D, 0x43, 0x5F, 0x5F
	.byte  0x00

DS000C:
	.byte  0x5F, 0x5F, 0x4A, 0x57, 0x41, 0x53, 0x4D, 0x5F
	.byte  0x5F, 0x00

DS000D:
	.byte  0x24, 0x00

DS000E:
	.byte  0x40, 0x57, 0x6F, 0x72, 0x64, 0x53, 0x69, 0x7A
	.byte  0x65, 0x00


.att_syntax prefix
