Function at 0x10003af0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x128
mov eax, dword [esp + 0x134]
push ebx
mov ebx, dword [esp + 0x13c]
push ebp
mov ebp, dword [esp + 0x138]
push esi
push edi
xor edi, edi
xor esi, esi
cmp eax, edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], edi
je 0x10003d86
mov eax, dword [esp + 0x150]
cmp eax, 1
jne 0x10003d4c
call fcn.10003e20
push ebp
call sub.olsql40.dll_AllocEnvConn
mov esi, eax
add esp, 4
test si, si
jl 0x10003d86
mov ecx, dword [ebp]
lea eax, [esp + 0x10]
push eax
push 0x178
push 1
push ecx
call sub.olobj40.dll_hmAllocate
mov esi, eax
add esp, 0x10
test si, si
jl 0x10003d86
mov edi, dword [esp + 0x10]
mov ecx, 0x5e
xor eax, eax
lea edx, [esp + 0x10]
mov dword [ebx], edi
push edx
rep stosd dword es:[edi], eax
mov eax, dword [ebp]
push 0x10
push 1
push eax
call sub.olobj40.dll_hmAllocate
mov esi, eax
add esp, 0x10
test si, si
jl 0x10003d82
mov ecx, dword [ebx]
mov edx, dword [esp + 0x10]
xor eax, eax
mov dword [ecx + 0xc], edx
mov ecx, dword [ebx]
mov edx, dword [ecx + 0xc]
mov dword [edx], eax
mov dword [edx + 4], eax
mov dword [edx + 8], eax
mov dword [edx + 0xc], eax
mov ecx, dword [ebp]
lea eax, [esp + 0x10]
push eax
push 0x18
push 1
push ecx
call sub.olobj40.dll_hmAllocate
mov esi, eax
add esp, 0x10
test si, si
jl 0x10003d82
mov edx, dword [ebx]
mov eax, dword [esp + 0x10]
mov dword [edx + 0x14], eax
mov ecx, dword [ebx]
xor eax, eax
mov edx, dword [ecx + 0x14]
mov ecx, 6
mov edi, edx
push edx
rep stosd dword es:[edi], eax
lea edi, [ebp + 4]
mov dword [esp + 0x14], edx
push edi
call sub.olsql40.dll_sqlAllocStmt
mov esi, eax
add esp, 8
test si, si
jl 0x10003d82
lea edx, [esp + 0x14]
push edx
push 0
push edi
call sub.olsql40.dll_sqlAllocDesc
mov esi, eax
add esp, 0xc
test si, si
jl 0x10003d82
mov ecx, dword [ebp]
lea eax, [esp + 0x1c]
push eax
push 0x1000
push 1
push ecx
call sub.olobj40.dll_hmAllocate
mov esi, eax
add esp, 0x10
test si, si
jl 0x10003d82
mov edi, dword [esp + 0x1c]
push str.SYSTEM
lea edx, [esp + 0x3c]
push str.SELECT_TRANID____SEQNO____OWNER__STORE_FROM__s.USLOG_WHERE_TRANID_____0_ORDER_BY_TRANID____SEQNO__
push edx
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], 0
mov byte [esp + 0x3c], 0
mov dword [esp + 0x40], 0x1000
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], edi
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x44]
lea ecx, [esp + 0x30]
push eax
push ecx
call sub.olobj40.dll_ilsCatAscii
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x24]
push 0
push edi
mov ecx, dword [eax]
push edx
push 0
push 0
push 0
push ecx
call sub.olsql40.dll_sqlPrepStmt
mov esi, eax
add esp, 0x30
test si, si
jl 0x10003d82
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push 2
mov eax, dword [edx]
push eax
push ecx
call sub.olsql40.dll_sqlDescribe
mov esi, eax
add esp, 0xc
test si, si
jl 0x10003d82
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx]
push edx
lea eax, [esp + 0x24]
mov edx, dword [ecx + 0xc]
push eax
push edx
push ebp
call fcn.10003e30
mov esi, eax
add esp, 0x10
test si, si
jl 0x10003d82
mov eax, dword [esp + 0x20]
push ebx
push eax
push ebp
call fcn.100053d0
mov esi, eax
add esp, 0xc
test si, si
jl 0x10003d82
lea ecx, [esp + 0x14]
push ecx
call sub.olsql40.dll_sqlFreeDesc
mov esi, eax
add esp, 4
test si, si
jl 0x10003d82
test edi, edi
je 0x10003d3f
mov edx, dword [ebp]
push edi
push 1
push edx
call sub.olobj40.dll_hmFree
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x128
ret
cmp eax, 2
jne 0x10003d86
mov eax, dword [ebx]
push edi
push eax
push ebp
call fcn.100045d0
mov esi, eax
add esp, 0xc
test si, si
jl 0x10003d86
je 0x10003d3f
cmp si, 0x13ed
jne 0x10003df2
pop edi
pop esi
pop ebp
mov eax, 0x57b
pop ebx
add esp, 0x128
ret
mov edi, dword [esp + 0x18]
cmp dword [ebx], 0
je 0x10003d9c
push ebx
push ebp
call fcn.100042a0
add esp, 8
test si, si
jne 0x10003d9c
mov esi, eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10003db8
lea ecx, [esp + 0x14]
push ecx
call sub.olsql40.dll_sqlFreeDesc
add esp, 4
test si, si
jne 0x10003db8
mov esi, eax
test edi, edi
je 0x10003dd2
mov edx, dword [ebp]
push edi
push 1
push edx
call sub.olobj40.dll_hmFree
add esp, 0xc
test si, si
jne 0x10003ddb
mov esi, eax
test si, si
je 0x10003d3f
cmp si, 0x13ed
jne 0x10003df2
pop edi
pop esi
pop ebp
mov eax, 0x57b
pop ebx
add esp, 0x128
ret
push str.Check_ooterr.h
push str.UsIndexGet
push esi
push ebp
call sub.olsql40.dll_ErrorInfoSet
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret