Function at 0x480735
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4bc
mov eax, dword [0x5c4e68]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor ebx, ebx
push 0x3f
mov dword [ebp - 0x4b4], eax
lea eax, [ebp - 0x9f]
mov esi, ecx
mov edi, edx
push ebx
push eax
mov dword [ebp - 0x4bc], esi
mov dword [ebp - 0x4b8], edi
mov byte [ebp - 0xa0], bl
call fcn.005117f0
add esp, 0xc
push 0x3ff
lea eax, [ebp - 0x49f]
push ebx
push eax
mov byte [ebp - 0x4a0], bl
call fcn.005117f0
add esp, 0xc
cmp esi, ebx
je 0x48079f
mov dword [esi], ebx
cmp edi, ebx
je 0x4807a5
mov dword [edi], ebx
mov eax, dword [ebp - 0x4b4]
cmp eax, ebx
je 0x4807b1
mov dword [eax], ebx
call fcn.00415bfa
test eax, eax
jne 0x4807c1
xor eax, eax
jmp 0x480a68
xor eax, eax
call fcn.00478270
test eax, eax
jne 0x4807df
push ebx
call fcn.00478fbd
pop ecx
mov ecx, eax
cmp ecx, ebx
mov dword [ebp - 0x4a4], ecx
jne 0x4807fd
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.00426c01
add esp, 0x10
jmp 0x4807ba
call fcn.0047931a
cmp eax, ebx
jle 0x48081f
push eax
push str._AND_LOC_d
lea eax, [ebp - 0xa0]
push 0x40
push eax
call fcn.004c53b7
add esp, 0x10
jmp 0x48082a
lea eax, [ebp - 0xa0]
call fcn.004c3ab2
movzx edi, byte [ebp + 0xb]
movzx esi, byte [ebp + 0xa]
movzx eax, word [ebp + 8]
lea ecx, [ebp - 0xa0]
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 [ebp - 0x4a4]
mov dword [ebp - 0x4ac], ebx
mov dword [ebp - 0x4a8], ebx
mov dword [ebp - 0x4b0], ebx
call fcn.00477efe
add esp, 0x18
test eax, eax
je 0x4809e6
xor eax, eax
mov byte [ebp - 0x1c], bl
lea edi, [ebp - 0x1b]
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 [ebp - 0x3c], bl
lea edi, [ebp - 0x3b]
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 [ebp - 0x5c], bl
lea edi, [ebp - 0x5b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [ebp - 0x10], bl
lea edi, [ebp - 0xf]
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, [ebp - 0x4a0]
push eax
push dword [ebp - 0x4a4]
xor edi, edi
call fcn.00477ff9
add esp, 0x14
test eax, eax
je 0x4809e1
mov esi, 0x530a24
cmp edi, 0x8ae
jge 0x4809e1
push 0xb
lea eax, [ebp - 0x1c]
push eax
push ebx
push esi
lea eax, [ebp - 0x4a0]
call fcn.004c5734
push 0x1f
lea eax, [ebp - 0x3c]
push eax
push 1
push esi
lea eax, [ebp - 0x4a0]
call fcn.004c5734
push 0x1f
lea eax, [ebp - 0x5c]
push eax
push 2
push esi
lea eax, [ebp - 0x4a0]
call fcn.004c5734
push 0xb
lea eax, [ebp - 0x10]
push eax
push 3
push esi
lea eax, [ebp - 0x4a0]
call fcn.004c5734
movsx eax, byte [ebp - 0x10]
add esp, 0x40
call fcn.004c39b2
mov byte [ebp - 0x10], al
lea eax, [ebp - 0x1c]
push eax
call fcn.00512917
pop ecx
call fcn.004848c5
push eax
call fcn.0048765f
add esp, 4
test eax, eax
je 0x480982
cmp byte [ebp - 0x10], 0x50
jne 0x4809ba
lea eax, [ebp - 0x1c]
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.00426c01
add esp, 0x14
jmp 0x4809ba
cmp byte [ebp - 0x10], 0x43
je 0x4809ac
cmp byte [ebp - 0x10], 0x4e
je 0x4809ac
lea eax, [ebp - 0x3c]
call fcn.0045ff20
add dword [ebp - 0x4ac], eax
lea eax, [ebp - 0x5c]
call fcn.0045ff20
add dword [ebp - 0x4a8], eax
jmp 0x4809ba
lea eax, [ebp - 0x3c]
call fcn.0045ff20
add dword [ebp - 0x4b0], eax
push 4
push 9
push 0x3ff
lea eax, [ebp - 0x4a0]
push eax
push dword [ebp - 0x4a4]
inc edi
call fcn.00477ff9
add esp, 0x14
test eax, eax
jne 0x4808d4
xor edi, edi
inc edi
jmp 0x4809fc
movzx eax, word [ebp + 8]
push edi
push esi
push eax
push str.:2:TotalOfficePayments__04d__02d__02d__FAILED:_ExecuteODBCFormat___FAILED.
call fcn.00426c01
add esp, 0x10
xor edi, edi
push dword [ebp - 0x4a4]
call fcn.00477b11
mov esi, dword [ebp - 0x4b0]
cmp esi, ebx
pop ecx
je 0x480a36
push esi
call fcn.0045feeb
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.00426c01
add esp, 0x14
mov eax, dword [ebp - 0x4bc]
cmp eax, ebx
je 0x480a48
mov ecx, dword [ebp - 0x4ac]
mov dword [eax], ecx
mov eax, dword [ebp - 0x4b8]
cmp eax, ebx
je 0x480a5a
mov ecx, dword [ebp - 0x4a8]
mov dword [eax], ecx
mov eax, dword [ebp - 0x4b4]
cmp eax, ebx
je 0x480a66
mov dword [eax], esi
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051291c
leave
ret