Function at 0x47af3e
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c8
mov eax, dword [0x59a240]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x14]
push 0x40
mov dword [ebp - 0x4c0], eax
lea eax, [ebp - 0x9c]
push 0
push eax
mov dword [ebp - 0x4c8], edi
mov dword [ebp - 0x4b8], ebx
call fcn.004e4da0
push 0x400
lea eax, [ebp - 0x49c]
push 0
push eax
call fcn.004e4da0
mov eax, dword [ebp - 0x4c0]
add esp, 0x18
test eax, eax
je 0x47afa5
and dword [eax], 0
test edi, edi
je 0x47afac
and dword [edi], 0
test ebx, ebx
je 0x47afb3
and dword [ebx], 0
and dword [ebp - 0x4bc], 0
push esi
call fcn.0046f1b2
xor edi, edi
inc edi
mov dword [ebp - 0x4c4], edi
pop ecx
test eax, eax
jne 0x47afdd
push eax
call fcn.0046d734
pop ecx
mov esi, eax
mov dword [ebp - 0x4bc], edi
test esi, esi
jne 0x47b004
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.00425c08
add esp, 0x10
xor eax, eax
jmp 0x47b2a0
push esi
call fcn.0046e75f
pop ecx
test eax, eax
jle 0x47b028
push eax
push str._AND_LOC_d
lea eax, [ebp - 0x9c]
push 0x40
push eax
call fcn.004a0ddb
add esp, 0x10
jmp 0x47b035
lea eax, [ebp - 0x9c]
push eax
call fcn.0049e2d6
pop ecx
movzx eax, byte [ebp + 0xf]
lea ebx, [ebp - 0x9c]
movzx ecx, byte [ebp + 0xe]
xor edi, edi
movzx edx, word [ebp + 0xc]
and dword [ebp - 0x4b0], 0
and dword [ebp - 0x4b4], 0
push ebx
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 - 0x4a4], edi
mov dword [ebp - 0x4a8], eax
mov dword [ebp - 0x4ac], ecx
call fcn.0046de59
mov ebx, dword [ebp - 0x4b8]
add esp, 0x18
test eax, eax
je 0x47b213
xor eax, eax
and dword [ebp - 0x4a0], 0
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
push 8
pop ecx
push 8
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x3c]
rep stosd dword es:[edi], eax
pop ecx
lea edi, [ebp - 0x5c]
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x10]
stosd dword es:[edi], eax
push 4
push 9
push 0x3ff
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x49c]
push eax
push esi
call fcn.0046df4a
add esp, 0x14
test eax, eax
je 0x47b20b
mov edi, dword [ebp - 0x4a4]
mov ebx, dword [ebp - 0x4a8]
cmp dword [ebp - 0x4a0], 0x8ae
jge 0x47b1ff
push 0xb
lea eax, [ebp - 0x1c]
push eax
push 0
lea eax, [ebp - 0x49c]
push 0x511240
push eax
call fcn.004a0a09
push 0x1f
lea eax, [ebp - 0x3c]
push eax
push 1
lea eax, [ebp - 0x49c]
push 0x511240
push eax
call fcn.004a0a09
push 0x1f
lea eax, [ebp - 0x5c]
push eax
push 2
lea eax, [ebp - 0x49c]
push 0x511240
push eax
call fcn.004a0a09
push 0xb
lea eax, [ebp - 0x10]
push eax
push 3
lea eax, [ebp - 0x49c]
push 0x511240
push eax
call fcn.004a0a09
movsx eax, byte [ebp - 0x10]
add esp, 0x50
push eax
call fcn.004a0b88
mov byte [ebp - 0x10], al
lea eax, [ebp - 0x1c]
push eax
call fcn.004ef9cb
push eax
call fcn.00479bcd
add esp, 0xc
cmp al, 9
je 0x47b1b5
movsx eax, byte [ebp - 0x10]
sub eax, 0x43
je 0x47b1a7
sub eax, 0xb
je 0x47b1a7
lea eax, [ebp - 0x3c]
push eax
call fcn.00459a69
add dword [ebp - 0x4b0], eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00459a69
add dword [ebp - 0x4b4], eax
pop ecx
pop ecx
jmp 0x47b1d8
lea eax, [ebp - 0x3c]
push eax
call fcn.00459a69
pop ecx
add edi, eax
jmp 0x47b1d8
cmp byte [ebp - 0x10], 0x50
jne 0x47b1d8
lea eax, [ebp - 0x1c]
push eax
movzx eax, word [ebp + 0xc]
push ebx
push dword [ebp - 0x4ac]
push eax
push str.:7:TotalOfficePayments__04d__02d__02d__encountered_an_exception:_INVALID_ROA_TENDER_TYPE:__s__CHARGE_SALE_
call fcn.00425c08
add esp, 0x14
inc dword [ebp - 0x4a0]
lea eax, [ebp - 0x49c]
push 4
push 9
push 0x3ff
push eax
push esi
call fcn.0046df4a
add esp, 0x14
test eax, eax
jne 0x47b0dd
mov ebx, dword [ebp - 0x4b8]
mov dword [ebp - 0x4a4], edi
mov edi, dword [ebp - 0x4a4]
jmp 0x47b237
push dword [ebp - 0x4a8]
movzx eax, word [ebp + 0xc]
push dword [ebp - 0x4ac]
push eax
push str.:2:TotalOfficePayments__04d__02d__02d__FAILED:_ExecuteODBCFormat___FAILED.
call fcn.00425c08
add esp, 0x10
and dword [ebp - 0x4c4], edi
cmp dword [ebp - 0x4bc], 0
je 0x47b247
push esi
call fcn.0046dac7
pop ecx
test edi, edi
je 0x47b270
push edi
call fcn.00459203
push eax
push dword [ebp - 0x4a8]
movzx eax, word [ebp + 0xc]
push dword [ebp - 0x4ac]
push eax
push str.:2:FYI:_TotalOfficePayments__04d__02d__02d__has_encountered_a_CASH_Journal_Entry_total:__s
call fcn.00425c08
add esp, 0x18
mov eax, dword [ebp - 0x4c0]
test eax, eax
je 0x47b282
mov ecx, dword [ebp - 0x4b0]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x4c8]
test ecx, ecx
je 0x47b294
mov eax, dword [ebp - 0x4b4]
mov dword [ecx], eax
test ebx, ebx
je 0x47b29a
mov dword [ebx], edi
mov eax, dword [ebp - 0x4c4]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e3632
leave
ret