Function at 0x407790
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40e0e4
push eax
mov dword fs:[0], esp
sub esp, 0x158
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x64]
test eax, eax
jne 0x4077cf
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.0040af10
lea ecx, [esp + 8]
mov dword [esp + 0x168], 0
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 8]
push str.select__from_TM_RESOURCE
push eax
mov byte [esp + 0x170], 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 + 0x168], 2
test eax, eax
je 0x40785d
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 0x4079d3
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 ecx, dword [esp + 0x18]
push 1
call sub.MFC42.DLL_CString::GetBuffer
push eax
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]
lea ecx, [esp + 0x20]
and eax, 0xff
push eax
push 0x414364
push ecx
call ebp
add esp, 0xc
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 + 0x1c]
mov edx, dword [esp + 0x18]
push ecx
push edx
lea eax, [esp + 0x28]
push 0x414444
push eax
call ebp
add esp, 0x10
lea ecx, [esp + 0x20]
push ecx
push 3
push esi
mov ecx, edi
call sub.MFC42.DLL_CListCtrl::SetItemText
lea edx, [esp + 0x10]
push 0
push edx
push 4
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CRecordset::GetFieldValue
movsx eax, word [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push 0x414364
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x20]
mov ecx, edi
push edx
push 4
push esi
call sub.MFC42.DLL_CListCtrl::SetItemText
lea eax, [esp + 0x10]
push 0
push eax
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 edx, dword [esp + 0x34]
push 1
push 1
lea ecx, [esp + 0x3c]
call dword [edx + 0x1c]
mov eax, dword [esp + 0xfc]
inc esi
test eax, eax
je 0x40787b
pop ebp
lea ecx, [esp + 0xc]
mov byte [esp + 0x168], 1
call fcn.0040ccd4
lea ecx, [esp + 8]
mov byte [esp + 0x168], 0
call fcn.0040cb78
lea ecx, [esp + 0x15c]
mov dword [esp + 0x168], 4
call fcn.0040cb78
lea ecx, [esp + 0x144]
mov byte [esp + 0x168], 3
call fcn.0040cb78
lea ecx, [esp + 0x30]
mov dword [esp + 0x168], 0xffffffff
call fcn.0040cbb4
mov ecx, dword [esp + 0x160]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x164
ret