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

Disassembly:
push 0xffffffffffffffff
push 0x5ac316
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 0x4a4cee
push str.PNRR
mov ecx, eax
call fcn.004dc060
mov esi, eax
jmp 0x4a4cf0
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.004dc0f0
test eax, eax
je 0x4a4d38
mov ecx, esi
call sym.ETermProxy.exe_public:_long_int___thiscall_CAdoRecordSet::GetRecordCount_void_
test eax, eax
jle 0x4a4d38
lea ecx, [esp + 0x14]
push ecx
push 0x601170
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 0x4a4d44
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 [0x635400]
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 0x4a4d94
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 0x4a4f19
mov eax, dword [esp + 0x10]
cmp dword [eax - 8], ebp
je 0x4a4f19
push 0x601c98
push 0x616dd4
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.004ea830
mov eax, dword [esp + 0x48]
add esp, 0x18
test eax, eax
jle 0x4a4f0b
lea eax, [esp + 0x1c]
push ebp
push eax
lea ecx, [esp + 0x30]
call fcn.0041ac50
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 0x4a4efe
movsx eax, byte [ecx]
mov dl, byte [ecx + 1]
sub eax, 0x30
cmp dl, 0x3a
jne 0x4a4efe
cmp eax, 1
jne 0x4a4eca
push 0x40
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
mov byte [esp + 0x6c], 7
je 0x4a4e81
push str.PNRR
mov ecx, eax
call fcn.004dc060
mov esi, eax
jmp 0x4a4e83
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.004dc0f0
cmp eax, 1
jne 0x4a4ebc
mov ecx, esi
call sym.ETermProxy.exe_public:_long_int___thiscall_CAdoRecordSet::GetRecordCount_void_
test esi, esi
mov edi, eax
je 0x4a4eb6
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
test edi, edi
jg 0x4a4f0b
jmp 0x4a4efe
test esi, esi
je 0x4a4efe
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
jmp 0x4a4efe
cmp eax, 2
je 0x4a4ed4
cmp eax, 3
jne 0x4a4efe
mov edx, dword [0x635400]
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 0x4a4efe
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x30]
inc ebp
cmp ebp, eax
jl 0x4a4e0a
lea ecx, [esp + 0x28]
mov byte [esp + 0x6c], 4
call fcn.00592bb2
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.00592bb2
lea ecx, [esp + 0x50]
mov byte [esp + 0x6c], 0
call fcn.00592c48
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