Function at 0x48bed0
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5ab003
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x220
push ebx
push ebp
push esi
mov edx, ecx
push edi
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], 0
mov esi, dword [edx + 4]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x240]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x30]
push eax
push ecx
mov ecx, edx
call fcn.0048bcc0
test al, al
jne 0x48c10b
mov eax, dword [esi + 0x7c]
mov edx, dword [esi]
inc eax
lea ecx, [esp + 0x30]
push eax
push ecx
mov ecx, esi
call dword [edx + 0x90]
mov eax, dword [0x637760]
xor ebp, ebp
cmp eax, ebp
je 0x48bfa5
mov cl, byte [eax + 0x40]
test cl, cl
je 0x48bfa5
add eax, 0x250
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x78]
lea edx, [esp + 0x30]
push edx
push str._RX_
push ebp
push ecx
add eax, 0x3c
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [0x637760]
push str.command
push str.esms
mov edx, dword [ecx + 0x44]
push edx
call fcn.004eb100
mov eax, dword [0x637760]
add esp, 0x1c
mov edx, dword [eax + 0x248]
lea ecx, [eax + 0x248]
call dword [edx + 0x1c]
call fcn.0044c4d0
mov eax, dword [eax + 0xd0]
cmp byte [eax], 0
je 0x48bffb
lea ecx, [esp + 0x30]
push ecx
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push str._RX_
call sub.MFC42.DLL_CString::CString_3
mov edx, dword [esi + 0x78]
push ecx
add edx, 0x3c
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
mov dword [esp + 0x248], ebp
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [0x631fb8]
mov dword [esp + 0x244], 0xffffffff
call fcn.00401140
mov eax, dword [0x631fc0]
cmp eax, ebp
je 0x48c859
cmp dword [eax + 0x50], ebp
jle 0x48c859
mov ebx, dword [sym.imp.MSVCRT.dll__mbsicmp]
mov ecx, dword [eax + 0x4c]
mov edi, dword [ecx + ebp*4]
test edi, edi
je 0x48c0fa
mov cl, byte [edi + 0x88]
test cl, cl
je 0x48c0fa
call fcn.0044c4d0
mov edx, dword [eax + 0xd0]
mov al, byte [edx + 2]
test al, al
je 0x48c0f5
mov eax, dword [edi + 0x84]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x48c0f5
mov ecx, dword [esi + 0x78]
add ecx, 0x3c
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_2
mov edx, dword [esp + 0x14]
mov dword [esp + 0x238], 1
mov eax, dword [edx - 8]
test eax, eax
je 0x48c0e1
mov al, byte [edi + 0x80]
test al, al
jne 0x48c0e1
mov eax, dword [esi + 0x78]
mov ecx, dword [edi + 0x84]
mov eax, dword [eax + 0x3c]
push eax
push ecx
call ebx
add esp, 8
test eax, eax
jne 0x48c0e1
lea ecx, [esp + 0x30]
push ecx
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push str._RX_
call sub.MFC42.DLL_CString::CString_3
mov edx, dword [esi + 0x78]
push ecx
add edx, 0x3c
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
mov byte [esp + 0x248], 2
call sub.MFC42.DLL_CString::CString_2
mov ecx, edi
mov byte [esp + 0x244], 1
call fcn.00402490
lea ecx, [esp + 0x14]
mov dword [esp + 0x238], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, dword [0x631fc0]
mov ecx, dword [eax + 0x50]
inc ebp
cmp ebp, ecx
jl 0x48c017
jmp 0x48c859
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [esi + 0x11c0]
mov ecx, dword [esi + 0x11bc]
push eax
push ecx
lea edx, [esp + 0x34]
push str.SELECT_COUNT_1__as_q_count_FROM__q_rec__WHERE_q_type_s__s
push edx
mov dword [esp + 0x248], 3
call sub.MFC42.DLL_CString::Format
push 0x40
call sub.MFC42.DLL_operatornew
add esp, 0x14
mov dword [esp + 0x10], eax
xor ebp, ebp
mov byte [esp + 0x238], 4
cmp eax, ebp
je 0x48c16c
push str.PNRR
mov ecx, eax
call fcn.004db9f0
mov edi, eax
mov dword [esp + 0x28], edi
jmp 0x48c172
mov dword [esp + 0x28], ebp
mov edi, ebp
mov eax, dword [esp + 0x2c]
push 3
push 3
push 1
push eax
mov ecx, edi
mov byte [esp + 0x248], 3
call fcn.004dba80
test eax, eax
je 0x48c1ca
mov ecx, edi
call sym.ETermProxy.exe_public:_long_int___thiscall_CAdoRecordSet::GetRecordCount_void_
test eax, eax
jle 0x48c1ca
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], ebp
push ecx
push str.q_count
mov ecx, edi
call sym.ETermProxy.exe_public:_int___thiscall_CAdoRecordSet::GetCollect_char_const___int__
mov eax, dword [esp + 0x14]
cmp eax, ebp
jl 0x48c1ca
cmp eax, 0x270f
jle 0x48c1c4
mov eax, 0x270f
mov dword [esi + 0x11cc], eax
mov edx, dword [esi + 0x11c0]
mov eax, dword [esi + 0x11bc]
push edx
push eax
lea ecx, [esp + 0x34]
push str.SELECT_TOP_1_id__q_data_FROM__q_rec__WHERE_q_type_s__s_ORDER_BY_ID_DESC
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x3c]
add esp, 0x10
mov ecx, edi
push 3
push 3
push 1
push edx
call fcn.004dba80
cmp eax, ebp
je 0x48c660
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
mov ecx, edi
mov byte [esp + 0x238], 5
call sym.ETermProxy.exe_public:_long_int___thiscall_CAdoRecordSet::GetRecordCount_void_
test eax, eax
jle 0x48c471
lea eax, [esp + 0x1c]
mov ecx, edi
push eax
push 0x603170
mov dword [esp + 0x24], ebp
call sym.ETermProxy.exe_public:_int___thiscall_CAdoRecordSet::GetCollect_char_const___int__
lea ecx, [esp + 0x14]
push ecx
push str.q_data
mov ecx, edi
call sym.ETermProxy.exe_public:_int___thiscall_CAdoRecordSet::GetCollect_char_const___class_CString__
mov edx, dword [esp + 0x1c]
push ecx
lea eax, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x14], esp
push eax
mov dword [esi + 0x11d0], edx
mov dword [esi + 0x11d4], 1
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x28]
push esi
push ecx
call fcn.0048d100
add esp, 0xc
mov eax, dword [esp + 0x24]
mov edx, dword [esi]
push 1
push eax
mov ecx, esi
mov byte [esp + 0x240], 6
call dword [edx + 0x90]
mov eax, dword [0x637760]
cmp eax, ebp
je 0x48c300
mov cl, byte [eax + 0x40]
test cl, cl
je 0x48c300
add eax, 0x250
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esp + 0x24]
mov edx, dword [esi + 0x78]
push ecx
push str._RX_
push ebp
push ecx
add edx, 0x3c
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [0x637760]
push str.command
push str.esms
mov ecx, dword [eax + 0x44]
push ecx
call fcn.004eb100
mov edx, dword [0x637760]
add esp, 0x1c
mov eax, dword [edx + 0x248]
lea ecx, [edx + 0x248]
call dword [eax + 0x1c]
call fcn.0044c4d0
mov ecx, dword [eax + 0xd0]
cmp byte [ecx], 0
je 0x48c354
mov edx, dword [esp + 0x24]
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push str._RX_
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [esi + 0x78]
push ecx
add eax, 0x3c
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
mov byte [esp + 0x248], 7
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [0x631fb8]
mov byte [esp + 0x244], 6
call fcn.00401140
mov eax, dword [0x631fc0]
cmp eax, ebp
je 0x48c45b
cmp dword [eax + 0x50], ebp
jle 0x48c45b
mov bl, 8
mov ecx, dword [eax + 0x4c]
mov edi, dword [ecx + ebp*4]
test edi, edi
je 0x48c44b
mov cl, byte [edi + 0x88]
test cl, cl
je 0x48c44b
call fcn.0044c4d0
mov edx, dword [eax + 0xd0]
mov al, byte [edx + 2]
test al, al
je 0x48c446
mov eax, dword [edi + 0x84]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x48c446
mov ecx, dword [esi + 0x78]
add ecx, 0x3c
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_2
mov edx, dword [esp + 0x10]
mov byte [esp + 0x238], bl
mov eax, dword [edx - 8]
test eax, eax
je 0x48c435
mov al, byte [edi + 0x80]
test al, al
jne 0x48c435
mov eax, dword [esi + 0x78]
mov ecx, dword [edi + 0x84]
mov eax, dword [eax + 0x3c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
test eax, eax
jne 0x48c435
mov ecx, dword [esp + 0x24]
push ecx
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str._RX_
call sub.MFC42.DLL_CString::CString_3
mov edx, dword [esi + 0x78]
push ecx
add edx, 0x3c
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
mov byte [esp + 0x248], 9
call sub.MFC42.DLL_CString::CString_2
mov ecx, edi
mov byte [esp + 0x244], bl
call fcn.00402490
lea ecx, [esp + 0x10]
mov byte [esp + 0x238], 6
call sub.MFC42.DLL_CString::CString
mov eax, dword [0x631fc0]
mov ecx, dword [eax + 0x50]
inc ebp
cmp ebp, ecx
jl 0x48c36c
mov edi, dword [esp + 0x28]
lea ecx, [esp + 0x24]
mov byte [esp + 0x238], 5
call sub.MFC42.DLL_CString::CString
jmp 0x48c64a
mov ecx, dword [esi + 0x7c]
mov eax, dword [esi]
inc ecx
push ecx
push str.INTERNAL_Q_EMPTY
mov ecx, esi
call dword [eax + 0x90]
mov eax, dword [0x637760]
cmp eax, ebp
je 0x48c4ef
mov cl, byte [eax + 0x40]
test cl, cl
je 0x48c4ef
add eax, 0x250
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0x78]
push str.INTERNAL_Q_EMPTY
push str._RX_
push ebp
push ecx
add edx, 0x3c
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [0x637760]
push str.command
push str.esms
mov ecx, dword [eax + 0x44]
push ecx
call fcn.004eb100
mov edx, dword [0x637760]
add esp, 0x1c
mov eax, dword [edx + 0x248]
lea ecx, [edx + 0x248]
call dword [eax + 0x1c]
call fcn.0044c4d0
mov ecx, dword [eax + 0xd0]
cmp byte [ecx], 0
je 0x48c543
push str.INTERNAL_Q_EMPTY
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str._RX_
call sub.MFC42.DLL_CString::CString_3
mov edx, dword [esi + 0x78]
push ecx
add edx, 0x3c
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
mov byte [esp + 0x248], 0xa
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [0x631fb8]
mov byte [esp + 0x244], 5
call fcn.00401140
mov eax, dword [0x631fc0]
cmp eax, ebp
je 0x48c64a
cmp dword [eax + 0x50], ebp
jle 0x48c64a
mov bl, 0xb
mov ecx, dword [eax + 0x4c]
mov edi, dword [ecx + ebp*4]
test edi, edi
je 0x48c63a
mov cl, byte [edi + 0x88]
test cl, cl
je 0x48c63a
call fcn.0044c4d0
mov edx, dword [eax + 0xd0]
mov al, byte [edx + 2]
test al, al
je 0x48c635
mov eax, dword [edi + 0x84]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x48c635
mov ecx, dword [esi + 0x78]
add ecx, 0x3c
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_2
mov edx, dword [esp + 0x10]
mov byte [esp + 0x238], bl
mov eax, dword [edx - 8]
test eax, eax
je 0x48c624
mov al, byte [edi + 0x80]
test al, al
jne 0x48c624
mov eax, dword [esi + 0x78]
mov ecx, dword [edi + 0x84]
mov eax, dword [eax + 0x3c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
test eax, eax
jne 0x48c624
push str.INTERNAL_Q_EMPTY
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str._RX_
call sub.MFC42.DLL_CString::CString_3
mov edx, dword [esi + 0x78]
push ecx
add edx, 0x3c
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
mov byte [esp + 0x248], 0xc
call sub.MFC42.DLL_CString::CString_2
mov ecx, edi
mov byte [esp + 0x244], bl
call fcn.00402490
lea ecx, [esp + 0x10]
mov byte [esp + 0x238], 5
call sub.MFC42.DLL_CString::CString
mov eax, dword [0x631fc0]
mov ecx, dword [eax + 0x50]
inc ebp
cmp ebp, ecx
jl 0x48c55b
mov edi, dword [esp + 0x28]
lea ecx, [esp + 0x14]
mov byte [esp + 0x238], 3
call sub.MFC42.DLL_CString::CString
jmp 0x48c839
mov ecx, dword [esi + 0x7c]
mov eax, dword [esi]
inc ecx
push ecx
push 0x615b10
mov ecx, esi
call dword [eax + 0x90]
mov eax, dword [0x637760]
cmp eax, ebp
je 0x48c6de
mov cl, byte [eax + 0x40]
test cl, cl
je 0x48c6de
add eax, 0x250
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0x78]
push 0x615b10
push str._RX_
push ebp
push ecx
add edx, 0x3c
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [0x637760]
push str.command
push str.esms
mov ecx, dword [eax + 0x44]
push ecx
call fcn.004eb100
mov edx, dword [0x637760]
add esp, 0x1c
mov eax, dword [edx + 0x248]
lea ecx, [edx + 0x248]
call dword [eax + 0x1c]
call fcn.0044c4d0
mov ecx, dword [eax + 0xd0]
cmp byte [ecx], 0
je 0x48c732
push 0x615b10
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str._RX_
call sub.MFC42.DLL_CString::CString_3
mov edx, dword [esi + 0x78]
push ecx
add edx, 0x3c
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
mov byte [esp + 0x248], 0xd
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [0x631fb8]
mov byte [esp + 0x244], 3
call fcn.00401140
mov eax, dword [0x631fc0]
cmp eax, ebp
je 0x48c839
cmp dword [eax + 0x50], ebp
jle 0x48c839
mov bl, 0xe
mov ecx, dword [eax + 0x4c]
mov edi, dword [ecx + ebp*4]
test edi, edi
je 0x48c829
mov cl, byte [edi + 0x88]
test cl, cl
je 0x48c829
call fcn.0044c4d0
mov edx, dword [eax + 0xd0]
mov al, byte [edx + 2]
test al, al
je 0x48c824
mov eax, dword [edi + 0x84]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x48c824
mov ecx, dword [esi + 0x78]
add ecx, 0x3c
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_2
mov edx, dword [esp + 0x10]
mov byte [esp + 0x238], bl
mov eax, dword [edx - 8]
test eax, eax
je 0x48c813
mov al, byte [edi + 0x80]
test al, al
jne 0x48c813
mov eax, dword [esi + 0x78]
mov ecx, dword [edi + 0x84]
mov eax, dword [eax + 0x3c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
test eax, eax
jne 0x48c813
push 0x615b10
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str._RX_
call sub.MFC42.DLL_CString::CString_3
mov edx, dword [esi + 0x78]
push ecx
add edx, 0x3c
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
mov byte [esp + 0x248], 0xf
call sub.MFC42.DLL_CString::CString_2
mov ecx, edi
mov byte [esp + 0x244], bl
call fcn.00402490
lea ecx, [esp + 0x10]
mov byte [esp + 0x238], 3
call sub.MFC42.DLL_CString::CString
mov eax, dword [0x631fc0]
mov ecx, dword [eax + 0x50]
inc ebp
cmp ebp, ecx
jl 0x48c74a
mov edi, dword [esp + 0x28]
test edi, edi
je 0x48c845
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
lea ecx, [esp + 0x2c]
mov dword [esp + 0x238], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x230]
pop edi
pop esi
pop ebp
mov al, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x22c
ret 4