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

Disassembly:
push 0xffffffffffffffff
push 0x5b54c6
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 0x4a5dee
push str.PNRR
mov ecx, eax
call fcn.004ddd00
mov esi, eax
jmp 0x4a5df0
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.004ddd90
test eax, eax
je 0x4a5e38
mov ecx, esi
call sym.ETermProxy.exe_public:_long_int___thiscall_CAdoRecordSet::GetRecordCount_void_
test eax, eax
jle 0x4a5e38
lea ecx, [esp + 0x14]
push ecx
push 0x60c170
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 0x4a5e44
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 [0x641030]
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 0x4a5e94
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 0x4a6019
mov eax, dword [esp + 0x10]
cmp dword [eax - 8], ebp
je 0x4a6019
push 0x60ccb4
push 0x621ce4
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.004ec420
mov eax, dword [esp + 0x48]
add esp, 0x18
test eax, eax
jle 0x4a600b
lea eax, [esp + 0x1c]
push ebp
push eax
lea ecx, [esp + 0x30]
call fcn.0041abd0
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 0x4a5ffe
movsx eax, byte [ecx]
mov dl, byte [ecx + 1]
sub eax, 0x30
cmp dl, 0x3a
jne 0x4a5ffe
cmp eax, 1
jne 0x4a5fca
push 0x40
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
mov byte [esp + 0x6c], 7
je 0x4a5f81
push str.PNRR
mov ecx, eax
call fcn.004ddd00
mov esi, eax
jmp 0x4a5f83
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.004ddd90
cmp eax, 1
jne 0x4a5fbc
mov ecx, esi
call sym.ETermProxy.exe_public:_long_int___thiscall_CAdoRecordSet::GetRecordCount_void_
test esi, esi
mov edi, eax
je 0x4a5fb6
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
test edi, edi
jg 0x4a600b
jmp 0x4a5ffe
test esi, esi
je 0x4a5ffe
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
jmp 0x4a5ffe
cmp eax, 2
je 0x4a5fd4
cmp eax, 3
jne 0x4a5ffe
mov edx, dword [0x641030]
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 0x4a5ffe
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x30]
inc ebp
cmp ebp, eax
jl 0x4a5f0a
lea ecx, [esp + 0x28]
mov byte [esp + 0x6c], 4
call fcn.0059ba94
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.0059ba94
lea ecx, [esp + 0x50]
mov byte [esp + 0x6c], 0
call fcn.0059bb2a
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