Function at 0x47bc50
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c0
mov eax, dword [0x581900]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
lea eax, [ebp - 0x9c]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x14]
push 0x40
push 0
push eax
mov dword [ebp - 0x4b4], ecx
mov dword [ebp - 0x4bc], edi
mov dword [ebp - 0x4c0], ebx
call fcn.004e69c0
push 0x400
lea eax, [ebp - 0x49c]
push 0
push eax
call fcn.004e69c0
mov eax, dword [ebp - 0x4b4]
add esp, 0x18
test eax, eax
je 0x47bcba
mov dword [eax], 0
test edi, edi
je 0x47bcc4
mov dword [edi], 0
test ebx, ebx
je 0x47bcce
mov dword [ebx], 0
push esi
mov dword [ebp - 0x4b0], 0
call fcn.0046ea00
add esp, 4
test eax, eax
jne 0x47bcfa
push eax
call fcn.0046caa0
add esp, 4
mov dword [ebp - 0x4b0], 1
mov esi, eax
test esi, esi
jne 0x47bd2d
movzx eax, byte [ebp + 0xf]
push eax
movzx eax, byte [ebp + 0xe]
push eax
movzx eax, word [ebp + 0xc]
push eax
push str.:2:TotalOfficePayments__04d__02d__02d__FAILED:_CreateTAMSiiODBC___FAILED.
call fcn.00424fd0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
push esi
call fcn.0046de00
add esp, 4
test eax, eax
jle 0x47bd53
push eax
push str._AND_LOC_d
lea eax, [ebp - 0x9c]
push 0x40
push eax
call fcn.004a94b0
add esp, 0x10
jmp 0x47bd62
lea eax, [ebp - 0x9c]
push eax
call fcn.004a55e0
add esp, 4
movzx eax, byte [ebp + 0xf]
xor edi, edi
movzx ecx, byte [ebp + 0xe]
xor ebx, ebx
movzx edx, word [ebp + 0xc]
mov dword [ebp - 0x4a0], edi
lea edi, [ebp - 0x9c]
push edi
push eax
push ecx
push edx
push str.SELECT_REF_TENDER_TYPE_ID_PAYMENT_AMOUNT_DISCOUNT_TAKEN_REF_AR_PAYMENT_ORIGINATION_CD_FROM_AR_PAYMENT_WHERE_DATE_PAYMENT_ENTRY_DATE__04d__02d__02d_s_AND__REF_AR_PAYMENT_ORIGINATION_CDN_OR_REF_AR_PAYMENT_ORIGINATION_CDC_OR_REF_AR_PAYMENT_ORIGINATION_CDP_
push esi
mov dword [ebp - 0x4ac], 0
mov dword [ebp - 0x4a4], eax
mov dword [ebp - 0x4a8], ecx
call fcn.0046d380
add esp, 0x18
mov edi, ebx
test eax, eax
je 0x47bf27
push 4
push 9
xorps xmm0, xmm0
mov dword [ebp - 0x14], ebx
push 0x3ff
lea eax, [ebp - 0x49c]
movq qword [ebp - 0x1c], xmm0
push eax
push esi
movups xmmword [ebp - 0x3c], xmm0
mov dword [ebp - 8], ebx
movups xmmword [ebp - 0x2c], xmm0
movups xmmword [ebp - 0x5c], xmm0
movups xmmword [ebp - 0x4c], xmm0
movq qword [ebp - 0x10], xmm0
call fcn.0046d4c0
add esp, 0x14
test eax, eax
je 0x47bf15
cmp edi, 0x8ae
jge 0x47bf15
push 0xb
lea eax, [ebp - 0x1c]
push eax
push 0
lea eax, [ebp - 0x49c]
push 0x510e78
push eax
call fcn.004a8f90
push 0x1f
lea eax, [ebp - 0x3c]
push eax
push 1
lea eax, [ebp - 0x49c]
push 0x510e78
push eax
call fcn.004a8f90
push 0x1f
lea eax, [ebp - 0x5c]
push eax
push 2
lea eax, [ebp - 0x49c]
push 0x510e78
push eax
call fcn.004a8f90
push 0xb
lea eax, [ebp - 0x10]
push eax
push 3
lea eax, [ebp - 0x49c]
push 0x510e78
push eax
call fcn.004a8f90
movsx eax, byte [ebp - 0x10]
add esp, 0x50
push eax
call fcn.004a9170
mov byte [ebp - 0x10], al
lea eax, [ebp - 0x1c]
push eax
call fcn.004efdaf
push eax
call fcn.0047a970
add esp, 0xc
cmp al, 9
je 0x47becb
movsx eax, byte [ebp - 0x10]
sub eax, 0x43
je 0x47bebb
sub eax, 0xb
je 0x47bebb
lea eax, [ebp - 0x3c]
push eax
call fcn.00458340
add dword [ebp - 0x4ac], eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00458340
add esp, 8
add dword [ebp - 0x4a0], eax
jmp 0x47bef3
lea eax, [ebp - 0x3c]
push eax
call fcn.00458340
add esp, 4
add ebx, eax
jmp 0x47bef3
cmp byte [ebp - 0x10], 0x50
jne 0x47bef3
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x4a4]
movzx eax, word [ebp + 0xc]
push dword [ebp - 0x4a8]
push eax
push str.:7:TotalOfficePayments__04d__02d__02d__encountered_an_exception:_INVALID_ROA_TENDER_TYPE:__s__CHARGE_SALE_
call fcn.00424fd0
add esp, 0x14
push 4
push 9
push 0x3ff
lea eax, [ebp - 0x49c]
inc edi
push eax
push esi
call fcn.0046d4c0
add esp, 0x14
test eax, eax
jne 0x47bdf4
mov edi, dword [ebp - 0x4a0]
mov dword [ebp - 0x4b8], 1
jmp 0x47bf4b
push dword [ebp - 0x4a4]
movzx eax, word [ebp + 0xc]
push dword [ebp - 0x4a8]
push eax
push str.:2:TotalOfficePayments__04d__02d__02d__FAILED:_ExecuteODBCFormat___FAILED.
call fcn.00424fd0
add esp, 0x10
mov dword [ebp - 0x4b8], ebx
cmp dword [ebp - 0x4b0], 0
je 0x47bf5d
push esi
call fcn.0046ce60
add esp, 4
test ebx, ebx
je 0x47bf86
push ebx
call fcn.004578b0
push eax
push dword [ebp - 0x4a4]
movzx eax, word [ebp + 0xc]
push dword [ebp - 0x4a8]
push eax
push str.:2:FYI:_TotalOfficePayments__04d__02d__02d__has_encountered_a_CASH_Journal_Entry_total:__s
call fcn.00424fd0
add esp, 0x18
mov ecx, dword [ebp - 0x4b4]
test ecx, ecx
je 0x47bf98
mov eax, dword [ebp - 0x4ac]
mov dword [ecx], eax
mov eax, dword [ebp - 0x4bc]
test eax, eax
je 0x47bfa4
mov dword [eax], edi
mov eax, dword [ebp - 0x4c0]
test eax, eax
je 0x47bfb0
mov dword [eax], ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x4b8]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004e50dc
mov esp, ebp
pop ebp
ret