Total operating expenses (excluding divestment related gain) for the first nine months of 2012 were $7.1 million compared to $8.4 million for the prior year period as a result of business streamlining and management's continued efforts to control costs. Sales and marketing expenses decreased 47% to $2.0 million from $3.8 million in the prior year period, primarily reflecting a proportional decrease in sales commissions as a result of lower revenue. General and administrative expenses increased 10% to $5.0 million from $4.6 million in the prior year period, reflecting an increase in agency expenses.
Operating profit was $7.2 million compared to $2.2 million due to the $11.1 million gain on disposal of subsidiaries and extinguishment of certain acquisition consideration payable. Net profit for the first nine months of 2012 was $6.0 million compared to $1.1 million in the prior year period due to a gain on the disposal of subsidiaries and the extinguishment of certain acquisition consideration payable.
Adjusted net loss for the first nine months of 2012 was $3.8 million compared with net profit of $1.2 million after excluding non-cash items such as the gain from the extinguishment of acquisition consideration payable of $3.0 million, the gain on disposal of subsidiaries of $8.1 million, the loss on abandonment of lease of $0.5 million, the loss on disposal of fixed assets of $0.4 million, and share based compensation of $0.4 million. Please refer to the non-GAAP reconciliation table provided at the end of the release for a period-over-period comparison of non-cash adjustments.
Earnout liabilities as of September 30, 2012 totaled $5.7 million down from $23.2 million at December 31, 2011. Additional reduction of the earnout liability is expected in fourth quarter of 2012. For the nine months ended September 30, 2012, the Company had a weighted average number of basic and diluted shares outstanding of 20.3 million shares. After giving effect to the approximate 1.7 million shares to be issued as a result of the December 2012 warrant exercise, the Company will have basic and diluted shares outstanding of approximately 30.1 million shares.