Function at 0x4cf2f0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c0
mov eax, dword [0x6fb448]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x460], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x458], 0
mov dword [ebp - 0x454], 0
mov dword [ebp - 0x45c], 0
mov byte [ebp - 0x48], 0
push 0x3f
push 0
lea eax, [ebp - 0x47]
push eax
call fcn.005b02a0
add esp, 0xc
mov byte [ebp - 0x450], 0
push 0x3ff
push 0
lea ecx, [ebp - 0x44f]
push ecx
call fcn.005b02a0
add esp, 0xc
cmp dword [ebp + 0x10], 0
je 0x4cf379
mov edx, dword [ebp + 0x10]
mov dword [edx], 0
cmp dword [ebp + 0x14], 0
je 0x4cf388
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
cmp dword [ebp + 0x18], 0
je 0x4cf397
mov ecx, dword [ebp + 0x18]
mov dword [ecx], 0
xor edx, edx
je 0x4cf3a2
xor eax, eax
jmp 0x4cf7a0
mov dword [ebp - 0x458], 0
mov eax, dword [ebp + 8]
push eax
call fcn.00402211
add esp, 4
test eax, eax
jne 0x4cf3d3
push 0
call fcn.0040184d
add esp, 4
mov dword [ebp + 8], eax
mov dword [ebp - 0x458], 1
cmp dword [ebp + 8], 0
jne 0x4cf3fc
movzx ecx, byte [ebp + 0xf]
push ecx
movzx edx, byte [ebp + 0xe]
push edx
movzx eax, word [ebp + 0xc]
push eax
push str.:2:TotalOfficePayments__04d__02d__02d__FAILED:_CreateTAMSiiODBC___FAILED.
call fcn.004018ca
add esp, 0x10
xor eax, eax
jmp 0x4cf7a0
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401bdb
add esp, 4
mov dword [ebp - 0x45c], eax
cmp dword [ebp - 0x45c], 0
jle 0x4cf433
mov edx, dword [ebp - 0x45c]
push edx
push str._AND_LOC_d
push 0x40
lea eax, [ebp - 0x48]
push eax
call fcn.00402dc9
add esp, 0x10
jmp 0x4cf43f
lea ecx, [ebp - 0x48]
push ecx
call fcn.00402158
add esp, 4
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x460], 0
mov dword [ebp - 0x4c], 0
lea edx, [ebp - 0x48]
push edx
movzx eax, byte [ebp + 0xf]
push eax
movzx ecx, byte [ebp + 0xe]
push ecx
movzx edx, word [ebp + 0xc]
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_
mov eax, dword [ebp + 8]
push eax
call fcn.00401703
add esp, 0x18
test eax, eax
je 0x4cf703
mov dword [ebp - 0x47c], 0
mov byte [ebp - 0x478], 0
xor ecx, ecx
mov dword [ebp - 0x477], ecx
mov dword [ebp - 0x473], ecx
mov word [ebp - 0x46f], cx
mov byte [ebp - 0x46d], cl
mov byte [ebp - 0x4bc], 0
xor edx, edx
mov dword [ebp - 0x4bb], edx
mov dword [ebp - 0x4b7], edx
mov dword [ebp - 0x4b3], edx
mov dword [ebp - 0x4af], edx
mov dword [ebp - 0x4ab], edx
mov dword [ebp - 0x4a7], edx
mov dword [ebp - 0x4a3], edx
mov word [ebp - 0x49f], dx
mov byte [ebp - 0x49d], dl
mov byte [ebp - 0x49c], 0
xor eax, eax
mov dword [ebp - 0x49b], eax
mov dword [ebp - 0x497], eax
mov dword [ebp - 0x493], eax
mov dword [ebp - 0x48f], eax
mov dword [ebp - 0x48b], eax
mov dword [ebp - 0x487], eax
mov dword [ebp - 0x483], eax
mov word [ebp - 0x47f], ax
mov byte [ebp - 0x47d], al
mov byte [ebp - 0x46c], 0
xor ecx, ecx
mov dword [ebp - 0x46b], ecx
mov dword [ebp - 0x467], ecx
mov word [ebp - 0x463], cx
mov byte [ebp - 0x461], cl
mov dword [ebp - 0x47c], 0
jmp 0x4cf56c
mov edx, dword [ebp - 0x47c]
add edx, 1
mov dword [ebp - 0x47c], edx
push 4
push 9
push 0x3ff
lea eax, [ebp - 0x450]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00402e6e
add esp, 0x14
test eax, eax
je 0x4cf6f7
cmp dword [ebp - 0x47c], 0x8ae
jge 0x4cf6f7
push 0xb
lea edx, [ebp - 0x478]
push edx
push 0
push str._t_t_t_t
lea eax, [ebp - 0x450]
push eax
call fcn.0040321f
add esp, 0x14
push 0x1f
lea ecx, [ebp - 0x4bc]
push ecx
push 1
push 0x6a68c8
lea edx, [ebp - 0x450]
push edx
call fcn.0040321f
add esp, 0x14
push 0x1f
lea eax, [ebp - 0x49c]
push eax
push 2
push 0x6a68cc
lea ecx, [ebp - 0x450]
push ecx
call fcn.0040321f
add esp, 0x14
push 0xb
lea edx, [ebp - 0x46c]
push edx
push 3
push 0x6a68d0
lea eax, [ebp - 0x450]
push eax
call fcn.0040321f
add esp, 0x14
movsx ecx, byte [ebp - 0x46c]
push ecx
call fcn.0040178a
add esp, 4
mov byte [ebp - 0x46c], al
lea edx, [ebp - 0x478]
push edx
call fcn.005b8c60
add esp, 4
push eax
call fcn.00402f0e
add esp, 4
push eax
call fcn.004017d5
add esp, 4
test eax, eax
je 0x4cf68b
movsx eax, byte [ebp - 0x46c]
cmp eax, 0x50
jne 0x4cf686
lea ecx, [ebp - 0x478]
push ecx
movzx edx, byte [ebp + 0xf]
push edx
movzx eax, byte [ebp + 0xe]
push eax
movzx ecx, word [ebp + 0xc]
push ecx
push str.:7:TotalOfficePayments__04d__02d__02d__encountered_an_exception:_INVALID_ROA_TENDER_TYPE:__s__CHARGE_SALE_
call fcn.004018ca
add esp, 0x14
jmp 0x4cf55d
mov dl, byte [ebp - 0x46c]
mov byte [ebp - 0x4c0], dl
cmp byte [ebp - 0x4c0], 0x43
je 0x4cf6ab
cmp byte [ebp - 0x4c0], 0x4e
je 0x4cf6ab
jmp 0x4cf6c2
lea eax, [ebp - 0x4bc]
push eax
call fcn.00402310
add esp, 4
add eax, dword [ebp - 0x4c]
mov dword [ebp - 0x4c], eax
jmp 0x4cf6f2
lea ecx, [ebp - 0x4bc]
push ecx
call fcn.00402310
add esp, 4
add eax, dword [ebp - 0x50]
mov dword [ebp - 0x50], eax
lea edx, [ebp - 0x49c]
push edx
call fcn.00402310
add esp, 4
add eax, dword [ebp - 0x460]
mov dword [ebp - 0x460], eax
jmp 0x4cf55d
mov dword [ebp - 0x454], 1
jmp 0x4cf729
movzx eax, byte [ebp + 0xf]
push eax
movzx ecx, byte [ebp + 0xe]
push ecx
movzx edx, word [ebp + 0xc]
push edx
push str.:2:TotalOfficePayments__04d__02d__02d__FAILED:_ExecuteODBCFormat___FAILED.
call fcn.004018ca
add esp, 0x10
mov dword [ebp - 0x454], 0
cmp dword [ebp - 0x458], 0
je 0x4cf73e
mov eax, dword [ebp + 8]
push eax
call fcn.00401a28
add esp, 4
cmp dword [ebp - 0x4c], 0
je 0x4cf76d
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.0040109b
add esp, 4
push eax
movzx edx, byte [ebp + 0xf]
push edx
movzx eax, byte [ebp + 0xe]
push eax
movzx ecx, word [ebp + 0xc]
push ecx
push str.:2:FYI:_TotalOfficePayments__04d__02d__02d__has_encountered_a_CASH_Journal_Entry_total:__s
call fcn.004018ca
add esp, 0x14
cmp dword [ebp + 0x10], 0
je 0x4cf77b
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x50]
mov dword [edx], eax
cmp dword [ebp + 0x14], 0
je 0x4cf78c
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x460]
mov dword [ecx], edx
cmp dword [ebp + 0x18], 0
je 0x4cf79a
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x4c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x454]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b0290
mov esp, ebp
pop ebp
ret