	.686P

_TEXT	SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT	ENDS


_TEXT	SEGMENT


	org	00406f90h
GetProcAddress:

	org	00407060h
LoadLibraryA:


	org	0041c080h
F0041c080:
	
	


	org	0047e640h
S0047e640:
;0047e640                      db      'imm32.dll',0




	org	00497ef9h
; original code
;
;00497ef9 8b45e0               mov     eax,dword [ebp-020h]
;00497efc 8945f8               mov     dword [ebp-008h],eax
;00497eff 837df801             cmp     dword [ebp-008h],byte +001h

; patched code
	movzx	eax,byte ptr [ebp-020h]
	mov	dword ptr [ebp-8],eax
	cmp	eax,1
@@:




	org	0049bf38h
; original code
;
;0049bf38 55                        push    ebp
;0049bf39 ff75e4                    push    dword [ebp-01ch]
;0049bf3c ff75e0                    push    dword [ebp-020h]
;0049bf3f 8d8538feffff              lea     eax,[ebp+0fffffe38h]
;0049bf45 e83601f8ff                call    near F0041c080
;0049bf4a ffb538feffff              push    dword [ebp+0fffffe38h]
;0049bf50 6800d94900                push    dword L0049d900	;' '
;0049bf55 680cd94900                push    dword L0049d90c	;'°'
;0049bf5a 6818d94900                push    dword L0049d918	;'C'

; patched code
	push	ebp
	lea	edx,[ebp+0fffffe38h]
	push	edx
	xor	eax,eax
	push	eax
	mov	al,[ebp-020h]
	push	eax
	mov	eax,edx
	call	F0041c080
	pop	eax
	push	dword ptr [eax]
	mov	eax,0049d900h
	push	eax
	add	eax,0ch
	push	eax
	add	eax,0ch
	push	eax
@@:

;0049bf5f 8d853cfeffff              lea     eax,[ebp+0fffffe3ch]
;0049bf65 ba04000000                mov     edx,dword 000000004h
;0049bf6a e81d8af6ff                call    near F0040498c
;0049bf6f 8b8d3cfeffff              mov     ecx,dword [ebp+0fffffe3ch]
;0049bf75 ba24d94900                mov     edx,dword L0049d924	;'Temperature'
;0049bf7a 8b45fc                    mov     eax,dword [ebp-004h]
;0049bf7d e8b6deffff                call    near F00499e38
;0049bf82 59                        pop     ecx
;0049bf83 e95f010000                jmp     near C0049c0e7                             ;; goto





	org	004ef104h
	push	offset S0047e640	;'imm32.dll'
	call	LoadLibraryA
	test	eax,eax
	jz	@f
	push	offset S_ImmDisableIME
	push	eax
	call	GetProcAddress
	test	eax,eax
	jz	@f
	push	-1
	call	eax
@@:
	jmp	StartAddr
S_ImmDisableIME	db	'ImmDisableIME',0


	org	00b16431h
StartAddr:


_TEXT	ENDS
	end
