Function at 0x40c800
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47fc28
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
xor esi, esi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], esi
call sub.MFC42.DLL_CString::CString_2
mov dword [ebp - 0x18], esi
push str.SELECT__FROM_MATERIEL_WHERE_NAME
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::operator_1
lea eax, [ebp + 8]
lea ecx, [ebp - 0x1c]
push eax
lea edx, [ebp - 0x14]
push ecx
push edx
call sub.MFC42.DLL_operator_2
push 0x4980e8
push eax
lea eax, [ebp - 0x20]
mov ebx, 3
push eax
mov byte [ebp - 4], bl
call sub.MFC42.DLL_operator
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
mov ecx, str.ADODB.Recordset
mov byte [ebp - 4], 5
test ecx, ecx
je 0x40c8e8
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, ebx
and al, 0xfc
call fcn.00428320
mov edi, esp
push esi
push edi
push 0xffffffffffffffff
push str.ADODB.Recordset
push 0
push 0
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x40c8db
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
call esi
jmp 0x40c8e8
push 0x17
push 0
push edi
lea ecx, [ebp - 0x18]
call fcn.004047e0
mov eax, dword [0x49abcc]
mov word [ebp - 0x50], 9
mov dword [ebp - 0x48], eax
push eax
mov edx, dword [eax]
call dword [edx + 4]
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 4], 6
push eax
mov esi, eax
mov word [ebp - 0x40], 8
call fcn.00428629
test eax, eax
mov dword [ebp - 0x38], eax
jne 0x40c926
test esi, esi
je 0x40c926
push 0x8007000e
call fcn.0042857c
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 7
test eax, eax
jne 0x40c93e
push 0x80004003
call fcn.0042857c
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x50]
push 1
push ebx
push ebx
sub esp, 0x10
mov ecx, dword [eax]
mov edx, esp
sub esp, 0x10
mov esi, eax
mov dword [edx], edi
mov edi, dword [ebp - 0x4c]
mov dword [edx + 4], edi
mov edi, dword [ebp - 0x48]
mov dword [edx + 8], edi
mov edi, dword [ebp - 0x44]
mov dword [edx + 0xc], edi
mov edi, dword [ebp - 0x40]
mov edx, esp
push eax
mov dword [edx], edi
mov edi, dword [ebp - 0x3c]
mov dword [edx + 4], edi
mov edi, dword [ebp - 0x38]
mov dword [edx + 8], edi
mov edi, dword [ebp - 0x34]
mov dword [edx + 0xc], edi
call dword [ecx + 0xa0]
test eax, eax
jge 0x40c995
push 0x498130
push esi
push eax
call fcn.0042858a
mov esi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea eax, [ebp - 0x40]
push eax
mov byte [ebp - 4], 6
call esi
test eax, eax
jge 0x40c9af
push eax
call fcn.0042857c
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 5
push ecx
call esi
test eax, eax
jge 0x40c9c3
push eax
call fcn.0042857c
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x40c9d7
push 0x80004003
call fcn.0042857c
mov eax, dword [ebp - 0x18]
mov edx, dword [eax]
lea ecx, [ebp - 0x12]
push ecx
push eax
mov esi, eax
call dword [edx + 0x50]
test eax, eax
jge 0x40c9f3
push 0x498130
push esi
push eax
call fcn.0042858a
cmp word [ebp - 0x12], 0
je 0x40ca01
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x40ca15
push 0x80004003
call fcn.0042857c
mov eax, dword [ebp - 0x18]
mov edx, dword [eax]
lea ecx, [ebp - 0x12]
push ecx
push eax
mov esi, eax
call dword [edx + 0x50]
test eax, eax
jge 0x40ca31
push 0x498130
push esi
push eax
call fcn.0042858a
cmp word [ebp - 0x12], 0
jne 0x40ca3f
mov dword [ebp - 0x20], 1
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x40ca53
push 0x80004003
call fcn.0042857c
mov eax, dword [ebp - 0x18]
mov edx, dword [eax]
push eax
mov esi, eax
call dword [edx + 0x80]
test eax, eax
jge 0x40ca6e
push 0x498130
push esi
push eax
call fcn.0042858a
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 2
call fcn.004048c0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x20]
lea esp, [ebp - 0x5c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4