Function at 0x406ea0
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40dfcc
push eax
mov dword fs:[0], esp
sub esp, 0x150
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x64]
test eax, eax
jne 0x406edf
mov eax, dword [edi + 0x60]
lea ecx, [edi + 0x60]
push 1
push str.ODBC_
push 0
push 0
push 0x414348
call dword [eax + 0x14]
mov ecx, dword [edi + 0xe0]
push 0
push 0
push 0x1009
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
lea edx, [edi + 0x60]
lea ecx, [esp + 0x30]
push edx
call fcn.0040c900
lea ecx, [esp + 8]
mov dword [esp + 0x160], 0
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 8]
push str.select__from_COURSE_AVAILABLE
push eax
mov byte [esp + 0x168], 1
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x10]
add esp, 8
push 0
push ecx
push 0xffffffffffffffff
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CRecordset::Open
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CDBVariant::CDBVariant
mov eax, dword [esp + 0xcc]
mov byte [esp + 0x160], 2
test eax, eax
je 0x406f6d
mov edx, dword [esp + 0x30]
push 2
push 1
lea ecx, [esp + 0x38]
call dword [edx + 0x1c]
mov eax, dword [esp + 0xf8]
xor esi, esi
test eax, eax
jne 0x407108
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
add edi, 0xc0
lea eax, [esp + 0x10]
push 0
push eax
push 0
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CRecordset::GetFieldValue
movsx ecx, word [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push 0x414364
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x20]
mov ecx, edi
push 0
push 0
push 0
push 0
push eax
push esi
push 1
call sub.MFC42.DLL_CListCtrl::InsertItem
lea ecx, [esp + 0x10]
push 0
push ecx
push 1
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CRecordset::GetFieldValue
mov eax, dword [esp + 0x18]
xor edx, edx
xor ecx, ecx
mov dx, word [eax + 4]
mov cx, word [eax + 2]
push edx
push ecx
movsx edx, word [eax]
push edx
lea eax, [esp + 0x2c]
push str._d__d__d
push eax
call ebp
add esp, 0x14
lea ecx, [esp + 0x20]
push ecx
push 1
push esi
mov ecx, edi
call sub.MFC42.DLL_CListCtrl::SetItemText
lea edx, [esp + 0x10]
push 0
push edx
push 2
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CRecordset::GetFieldValue
mov eax, dword [esp + 0x18]
xor ecx, ecx
xor edx, edx
mov cx, word [eax + 4]
mov dx, word [eax + 2]
movsx eax, word [eax]
push ecx
push edx
push eax
lea ecx, [esp + 0x2c]
push str._d__d__d
push ecx
call ebp
add esp, 0x14
lea edx, [esp + 0x20]
mov ecx, edi
push edx
push 2
push esi
call sub.MFC42.DLL_CListCtrl::SetItemText
lea eax, [esp + 0x10]
push 0
push eax
push 3
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CRecordset::GetFieldValue
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x20]
push ecx
push 0x414364
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x20]
mov ecx, edi
push eax
push 3
push esi
call sub.MFC42.DLL_CListCtrl::SetItemText
lea ecx, [esp + 0x10]
push 0
push ecx
push 4
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CRecordset::GetFieldValue
movsx edx, word [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push 0x414364
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
push 4
push esi
mov ecx, edi
call sub.MFC42.DLL_CListCtrl::SetItemText
lea edx, [esp + 0x10]
push 0
push edx
push 5
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CRecordset::GetFieldValue
mov ecx, dword [esp + 0x18]
push 1
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 5
push esi
mov ecx, edi
call sub.MFC42.DLL_CListCtrl::SetItemText
mov eax, dword [esp + 0x34]
push 1
push 1
lea ecx, [esp + 0x3c]
call dword [eax + 0x1c]
mov eax, dword [esp + 0xfc]
inc esi
test eax, eax
je 0x406f8b
pop ebp
lea ecx, [esp + 0xc]
mov byte [esp + 0x160], 1
call fcn.0040ccd4
lea ecx, [esp + 8]
mov byte [esp + 0x160], 0
call fcn.0040cb78
lea ecx, [esp + 0x154]
mov dword [esp + 0x160], 3
call fcn.0040cb78
lea ecx, [esp + 0x30]
mov dword [esp + 0x160], 0xffffffff
call fcn.0040cbb4
mov ecx, dword [esp + 0x158]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x15c
ret