Function at 0x45564f
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4bc
mov eax, dword [0x5345d0]
xor eax, esp
mov dword [esp + 0x4b8], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor ebx, ebx
push 0x3f
mov dword [esp + 0x20], eax
lea eax, [esp + 0x85]
mov esi, ecx
mov edi, edx
push ebx
push eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x2c], edi
mov byte [esp + 0x8c], bl
call fcn.004b53e0
add esp, 0xc
push 0x3ff
lea eax, [esp + 0xc5]
push ebx
push eax
mov byte [esp + 0xcc], bl
call fcn.004b53e0
add esp, 0xc
cmp esi, ebx
je 0x4556be
mov dword [esi], ebx
cmp edi, ebx
je 0x4556c4
mov dword [edi], ebx
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x4556ce
mov dword [eax], ebx
xor eax, eax
call fcn.004517d2
test eax, eax
jne 0x4556ea
push ebx
call fcn.004521ee
pop ecx
mov ecx, eax
cmp ecx, ebx
mov dword [esp + 0xc], ecx
jne 0x45570d
movzx eax, byte [ebp + 0xb]
push eax
movzx eax, byte [ebp + 0xa]
push eax
movzx eax, word [ebp + 8]
push eax
push str.:2:TotalOfficePayments__04d__02d__02d__FAILED:_CreateTAMSiiODBC___FAILED.
call fcn.00417db7
add esp, 0x10
xor eax, eax
jmp 0x45597a
call fcn.004524cd
cmp eax, ebx
jle 0x455730
push eax
push str._AND_LOC_d
lea eax, [esp + 0x88]
push 0x40
push eax
call fcn.0047da40
add esp, 0x10
jmp 0x45573c
lea eax, [esp + 0x80]
call fcn.0047c34d
movzx edi, byte [ebp + 0xb]
movzx esi, byte [ebp + 0xa]
movzx eax, word [ebp + 8]
lea ecx, [esp + 0x80]
push ecx
push edi
push esi
push eax
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 dword [esp + 0x20]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call fcn.0045145b
add esp, 0x18
test eax, eax
je 0x455906
xor eax, eax
mov byte [esp + 0x34], bl
lea edi, [esp + 0x35]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
push 7
pop ecx
mov byte [esp + 0x40], bl
lea edi, [esp + 0x41]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 7
xor eax, eax
pop ecx
mov byte [esp + 0x60], bl
lea edi, [esp + 0x61]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x28], bl
lea edi, [esp + 0x29]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
push 4
push 9
stosb byte es:[edi], al
push 0x3ff
lea eax, [esp + 0xcc]
push eax
push dword [esp + 0x1c]
xor edi, edi
call fcn.0045155b
add esp, 0x14
test eax, eax
je 0x455901
mov esi, 0x4d9488
cmp edi, 0x8ae
jge 0x455901
push 0xb
lea eax, [esp + 0x38]
push eax
push ebx
push esi
lea eax, [esp + 0xd0]
call fcn.0047dd59
push 0x1f
lea eax, [esp + 0x54]
push eax
push 1
push esi
lea eax, [esp + 0xe0]
call fcn.0047dd59
push 0x1f
lea eax, [esp + 0x84]
push eax
push 2
push esi
lea eax, [esp + 0xf0]
call fcn.0047dd59
push 0xb
lea eax, [esp + 0x5c]
push eax
push 3
push esi
lea eax, [esp + 0x100]
call fcn.0047dd59
movsx eax, byte [esp + 0x68]
add esp, 0x40
call fcn.0047c24d
mov byte [esp + 0x28], al
lea eax, [esp + 0x34]
push eax
call fcn.004b64a4
pop ecx
call fcn.00459519
push eax
call fcn.0045c1c2
add esp, 4
test eax, eax
je 0x4558a4
cmp byte [esp + 0x28], 0x50
jne 0x4558db
lea eax, [esp + 0x34]
push eax
movzx eax, byte [ebp + 0xb]
push eax
movzx eax, byte [ebp + 0xa]
push eax
movzx eax, word [ebp + 8]
push eax
push str.:7:TotalOfficePayments__04d__02d__02d__encountered_an_exception:_INVALID_ROA_TENDER_TYPE:__s__CHARGE_SALE_
call fcn.00417db7
add esp, 0x14
jmp 0x4558db
cmp byte [esp + 0x28], 0x43
je 0x4558ce
cmp byte [esp + 0x28], 0x4e
je 0x4558ce
lea eax, [esp + 0x40]
call fcn.0043e7cc
add dword [esp + 0x10], eax
lea eax, [esp + 0x60]
call fcn.0043e7cc
add dword [esp + 0x14], eax
jmp 0x4558db
lea eax, [esp + 0x40]
call fcn.0043e7cc
add dword [esp + 0x18], eax
push 4
push 9
push 0x3ff
lea eax, [esp + 0xcc]
push eax
push dword [esp + 0x1c]
inc edi
call fcn.0045155b
add esp, 0x14
test eax, eax
jne 0x4557e6
xor edi, edi
inc edi
jmp 0x45591c
movzx eax, word [ebp + 8]
push edi
push esi
push eax
push str.:2:TotalOfficePayments__04d__02d__02d__FAILED:_ExecuteODBCFormat___FAILED.
call fcn.00417db7
add esp, 0x10
xor edi, edi
push dword [esp + 0xc]
call fcn.00451078
mov esi, dword [esp + 0x1c]
cmp esi, ebx
pop ecx
je 0x455952
push esi
call fcn.0043e797
pop ecx
push eax
movzx eax, byte [ebp + 0xb]
push eax
movzx eax, byte [ebp + 0xa]
push eax
movzx eax, word [ebp + 8]
push eax
push str.:2:FYI:_TotalOfficePayments__04d__02d__02d__has_encountered_a_CASH_Journal_Entry_total:__s
call fcn.00417db7
add esp, 0x14
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x455960
mov ecx, dword [esp + 0x10]
mov dword [eax], ecx
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x45596e
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x455978
mov dword [eax], esi
mov eax, edi
mov ecx, dword [esp + 0x4c4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004b4c95
mov esp, ebp
pop ebp
ret