Function at 0x4a5be0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5b08d6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebp, ebp
lea ecx, [esp + 0x10]
mov dword [esp + 0x14], ebp
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x50]
mov dword [esp + 0x6c], ebp
call sub.MFC42.DLL_CUIntArray::CUIntArray
lea ecx, [esp + 0x3c]
mov byte [esp + 0x6c], 1
call sub.MFC42.DLL_CStringArray::CStringArray
lea eax, [edi + 0x40]
mov byte [esp + 0x6c], 2
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x40
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, ebp
mov byte [esp + 0x6c], 3
je 0x4a5c5e
push str.PNRR
mov ecx, eax
call fcn.004dd020
mov esi, eax
jmp 0x4a5c60
xor esi, esi
push 3
push 3
push 1
push str.SELECT_TOP_1__FROM_sql_rec_ORDER_BY_ID_ASC
mov ecx, esi
mov byte [esp + 0x7c], 2
call fcn.004dd0b0
test eax, eax
je 0x4a5ca8
mov ecx, esi
call sym.ETermProxy.exe_public:_long_int___thiscall_CAdoRecordSet::GetRecordCount_void_
test eax, eax
jle 0x4a5ca8
lea ecx, [esp + 0x14]
push ecx
push 0x606170
mov ecx, esi
call sym.ETermProxy.exe_public:_int___thiscall_CAdoRecordSet::GetCollect_char_const___int__
lea edx, [esp + 0x10]
mov ecx, esi
push edx
push str.sql_cmd
call sym.ETermProxy.exe_public:_int___thiscall_CAdoRecordSet::GetCollect_char_const___class_CString__
cmp esi, ebp
je 0x4a5cb4
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
push str.DELETE__FROM_sql_rec_WHERE_id_d
push edx
mov byte [esp + 0x78], 4
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x24]
mov edx, dword [0x63ac10]
add esp, 0xc
lea ecx, [esp + 0x1c]
push eax
push str.PNRR
push ecx
mov ecx, dword [edx + 8]
call sym.ETermProxy.exe_public:_class__com_ptr_t_class__com_IIID_struct_ADODB::_Recordset__struct___s_GUID__GUID_00000556_0000_0010_8000_00aa006d2ea4_____thiscall_CDBConnCollect::Execute_char___char_const__
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x4a5d04
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov edx, dword [edi + 0x38]
lea ecx, [edi + 0x38]
call dword [edx + 0x1c]
cmp dword [esp + 0x14], ebp
jle 0x4a5e89
mov eax, dword [esp + 0x10]
cmp dword [eax - 8], ebp
je 0x4a5e89
push 0x606cb4
push 0x61bd48
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Replace
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CStringArray::CStringArray
push 1
push ebp
push 2
lea ecx, [esp + 0x34]
push 0x3b
push ecx
push ecx
lea edx, [esp + 0x28]
mov bl, 5
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
mov byte [esp + 0x88], bl
call sub.MFC42.DLL_CString::CString_2
call fcn.004eb790
mov eax, dword [esp + 0x48]
add esp, 0x18
test eax, eax
jle 0x4a5e7b
lea eax, [esp + 0x1c]
push ebp
push eax
lea ecx, [esp + 0x30]
call fcn.0040aaa0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x70], 6
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x6c], bl
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 8], 1
jle 0x4a5e6e
movsx eax, byte [ecx]
mov dl, byte [ecx + 1]
sub eax, 0x30
cmp dl, 0x3a
jne 0x4a5e6e
cmp eax, 1
jne 0x4a5e3a
push 0x40
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
mov byte [esp + 0x6c], 7
je 0x4a5df1
push str.PNRR
mov ecx, eax
call fcn.004dd020
mov esi, eax
jmp 0x4a5df3
xor esi, esi
mov ecx, dword [esp + 0x10]
push 3
push 3
add ecx, 2
push 1
push ecx
mov ecx, esi
mov byte [esp + 0x7c], bl
call fcn.004dd0b0
cmp eax, 1
jne 0x4a5e2c
mov ecx, esi
call sym.ETermProxy.exe_public:_long_int___thiscall_CAdoRecordSet::GetRecordCount_void_
test esi, esi
mov edi, eax
je 0x4a5e26
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
test edi, edi
jg 0x4a5e7b
jmp 0x4a5e6e
test esi, esi
je 0x4a5e6e
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
jmp 0x4a5e6e
cmp eax, 2
je 0x4a5e44
cmp eax, 3
jne 0x4a5e6e
mov edx, dword [0x63ac10]
add ecx, 2
push ecx
lea ecx, [esp + 0x24]
push str.PNRR
push ecx
mov ecx, dword [edx + 8]
call sym.ETermProxy.exe_public:_class__com_ptr_t_class__com_IIID_struct_ADODB::_Recordset__struct___s_GUID__GUID_00000556_0000_0010_8000_00aa006d2ea4_____thiscall_CDBConnCollect::Execute_char___char_const__
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4a5e6e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x30]
inc ebp
cmp ebp, eax
jl 0x4a5d7a
lea ecx, [esp + 0x28]
mov byte [esp + 0x6c], 4
call fcn.00596f82
lea ecx, [esp + 0x18]
mov byte [esp + 0x6c], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x3c]
mov byte [esp + 0x6c], 1
call fcn.00596f82
lea ecx, [esp + 0x50]
mov byte [esp + 0x6c], 0
call fcn.00597018
lea ecx, [esp + 0x10]
mov dword [esp + 0x6c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x64]
pop edi
pop esi
pop ebp
mov al, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x60
ret