Function at 0x40ca80
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4782f8
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
mov ecx, dword [0x48fd28]
xor eax, eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
push str.SELECT__FROM_MATERIEL_WHERE_NAME
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.004721d6
lea edx, [ebp + 8]
lea eax, [ebp - 0x1c]
push edx
lea ecx, [ebp - 0x14]
push eax
push ecx
call fcn.0047223b
push 0x48d188
lea edx, [ebp - 0x20]
mov ebx, 3
push eax
push edx
mov byte [ebp - 4], bl
call fcn.004722a1
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.00472186
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], bl
call fcn.00472099
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.00472099
mov eax, str.ADODB.Recordset
mov byte [ebp - 4], 5
test eax, eax
je 0x40cb69
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, ebx
and al, 0xfc
call fcn.00429560
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 0x40cb5c
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
call esi
jmp 0x40cb69
push 0x17
push 0
push edi
lea ecx, [ebp - 0x18]
call fcn.00404750
mov eax, dword [0x49a948]
mov word [ebp - 0x50], 9
mov dword [ebp - 0x48], eax
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 4], 6
push eax
mov esi, eax
mov word [ebp - 0x40], 8
call fcn.00434947
test eax, eax
mov dword [ebp - 0x38], eax
jne 0x40cba7
test esi, esi
je 0x40cba7
push 0x8007000e
call fcn.0043489a
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 7
test eax, eax
jne 0x40cbbf
push 0x80004003
call fcn.0043489a
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x50]
push 1
push ebx
push ebx
sub esp, 0x10
mov edx, dword [eax]
mov ecx, esp
sub esp, 0x10
mov esi, eax
mov dword [ecx], edi
mov edi, dword [ebp - 0x4c]
mov dword [ecx + 4], edi
mov edi, dword [ebp - 0x48]
mov dword [ecx + 8], edi
mov edi, dword [ebp - 0x44]
mov dword [ecx + 0xc], edi
mov edi, dword [ebp - 0x40]
mov ecx, esp
push eax
mov dword [ecx], edi
mov edi, dword [ebp - 0x3c]
mov dword [ecx + 4], edi
mov edi, dword [ebp - 0x38]
mov dword [ecx + 8], edi
mov edi, dword [ebp - 0x34]
mov dword [ecx + 0xc], edi
call dword [edx + 0xa0]
test eax, eax
jge 0x40cc16
push 0x48d1d0
push esi
push eax
call fcn.004348a8
mov esi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 6
call esi
test eax, eax
jge 0x40cc30
push eax
call fcn.0043489a
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 5
push eax
call esi
test eax, eax
jge 0x40cc44
push eax
call fcn.0043489a
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x40cc58
push 0x80004003
call fcn.0043489a
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
lea edx, [ebp - 0x12]
push edx
push eax
mov esi, eax
call dword [ecx + 0x50]
test eax, eax
jge 0x40cc74
push 0x48d1d0
push esi
push eax
call fcn.004348a8
cmp word [ebp - 0x12], 0
je 0x40cc82
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x40cc96
push 0x80004003
call fcn.0043489a
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
lea edx, [ebp - 0x12]
push edx
push eax
mov esi, eax
call dword [ecx + 0x50]
test eax, eax
jge 0x40ccb2
push 0x48d1d0
push esi
push eax
call fcn.004348a8
cmp word [ebp - 0x12], 0
jne 0x40ccc0
mov dword [ebp - 0x20], 1
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x40ccd4
push 0x80004003
call fcn.0043489a
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
push eax
mov esi, eax
call dword [ecx + 0x80]
test eax, eax
jge 0x40ccef
push 0x48d1d0
push esi
push eax
call fcn.004348a8
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 2
call fcn.00404740
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call fcn.00472099
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call fcn.00472099
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