Function at 0x471e30
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x584
mov eax, dword [0x581900]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x544]
push esi
push edi
push 0x400
push 0
push eax
mov dword [ebp - 0x54c], ebx
call fcn.004e69c0
push 0x40
lea eax, [ebp - 0x44]
mov dword [ebp - 0x56c], 0
push 0
push eax
call fcn.004e69c0
push 0x100
lea eax, [ebp - 0x144]
push 0
push eax
call fcn.004e69c0
add esp, 0x24
test ebx, ebx
jne 0x471eb8
push ebx
call fcn.0046caa0
mov ebx, eax
mov dword [ebp - 0x568], 1
add esp, 4
mov dword [ebp - 0x54c], ebx
test ebx, ebx
je 0x47202f
jmp 0x471ec2
mov dword [ebp - 0x568], 0
mov esi, dword [ebp + 0x10]
mov ecx, str.INVOICE.INVOICE_NUMBER_CUSTOMER.CUSTOMER_NUM_CUSTOMER.NAME_INVOICE.INVOICE_DATE_INVOICE.ACCOUNTING_DAY_INVOICE.COUNTERMAN_EMPLOYEE_ID_INVOICE.SALESMAN_EMPLOYEE_ID_INVOICE.CASHIER_EMPLOYEE_ID_INVOICE.PO_NUMBER_INVOICE.ATTENTION_INVOICE.TAX_AMOUNT_1_INVOICE.TAX_AMOUNT_2_INVOICE.ROA_DISCOUNT_INVOICE.INVOICE_NET_SALES_INVOICE.INVOICE_TOTAL_INVOICE.REF_TRANSACTION_TYPE_ID_INVOICE_PAYMENT.REF_TENDER_TYPE_ID_INVOICE_PAYMENT.CHECK_NUMBER_INVOICE.MANUAL_TRANSACTION_INVOICE.VOIDED_INVOICE_PAYMENT.AMOUNT_APPLIED_INVOICE_PAYMENT.IPC_JOURNAL_KEY
test esi, esi
mov eax, str.INVOICE_NUMBER_CUSTOMER_ID_CUSTOMER_NAME_INVOICE_DATE_ACCOUNTING_DAY_COUNTERMAN_EMPLOYEE_ID_SALESMAN_EMPLOYEE_ID_CASHIER_EMPLOYEE_ID_PO_NUMBER_ATTENTION_TAX_AMOUNT_1_TAX_AMOUNT_2_ROA_DISCOUNT_INVOICE_NET_SALES_INVOICE_TOTAL_REF_TRANSACTION_TYPE_ID_REF_TRANSACTION_TYPE_ID_PO_NUMBER_MANUAL_TRANSACTION_VOIDED_INVOICE_TOTAL_VOIDED
push 0x2c
cmovne eax, ecx
push eax
mov dword [ebp - 0x564], eax
call fcn.004a4140
inc eax
push ebx
mov dword [ebp - 0x550], eax
call fcn.0046de00
add esp, 0xc
mov dword [ebp - 0x560], eax
test eax, eax
jle 0x471f12
push eax
push str._AND_INVOICE.LOC_d
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004a94b0
add esp, 0x10
jmp 0x471f1e
lea eax, [ebp - 0x44]
push eax
call fcn.004a55e0
add esp, 4
cmp byte [ebp + 0xe], 6
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x548], 0x50cae7
jne 0x471f70
cmp byte [ebp + 0xf], 0xf
jne 0x471f70
mov eax, 0x7d9
cmp di, ax
jne 0x471f70
push str.SEA223
push 0
push 0
call fcn.0045dc10
add esp, 8
push eax
call fcn.004a96e0
add esp, 8
mov ecx, str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
test eax, eax
mov eax, 0x50cae7
cmove ecx, eax
mov dword [ebp - 0x548], ecx
lea eax, [ebp - 0x144]
push eax
call fcn.004a55e0
mov eax, dword [ebp + 0x18]
add esp, 4
test eax, eax
jle 0x471fa2
push eax
push str.INVOICE.INVOICE_NUMBER_d
lea eax, [ebp - 0x144]
push 0x100
push eax
call fcn.004a94b0
add esp, 0x10
jmp 0x471fd0
mov eax, dword [ebp - 0x548]
push eax
movzx eax, byte [ebp + 0xf]
push eax
movzx eax, byte [ebp + 0xe]
push eax
movzx eax, di
push eax
push str._DATE_INVOICE.INVOICE_DATE__04d__02d__02d_s_
lea eax, [ebp - 0x144]
push 0x100
push eax
call fcn.004a94b0
add esp, 0x1c
lea eax, [ebp - 0x44]
mov ecx, str.SELECT__s_FROM_INVOICE_INVOICE_PAYMENT_CUSTOMER_WHERE__s_AND_INVOICE.IDINVOICE_PAYMENT.INVOICE_ID_AND_INVOICE.CUSTOMER_IDCUSTOMER.ID_s_ORDER_BY_INVOICE.INVOICE_NUMBER_ASC
push eax
lea eax, [ebp - 0x144]
test esi, esi
push eax
push dword [ebp - 0x564]
mov eax, str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
cmovne eax, ecx
push eax
push ebx
call fcn.0046d380
add esp, 0x14
test eax, eax
jne 0x472042
mov ecx, dword [ebp + 0x18]
movzx eax, byte [ebp + 0xf]
push ecx
push eax
movzx eax, byte [ebp + 0xe]
push eax
movzx eax, di
push eax
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___FAILED.
call fcn.00424a90
add esp, 0x14
cmp dword [ebp - 0x568], 0
je 0x47202f
push ebx
call fcn.0046ce60
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
push str.C:UsersOfficeDocumentsVisual_StudioPAULAParseSA12.c
push 0x99d
push 0
call fcn.00458460
add esp, 0xc
mov esi, eax
cmp dword [ebp + 0x14], 0
mov dword [ebp - 0x558], esi
je 0x47211a
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
push esi
call fcn.00459720
push str._InvNum__AccntNum__AccntName__InvoiceDateTime__AccntingDay__EmpNum__SalesmanNum__CashierNum__PONum__AttentionField__TaxAmnt1__TaxAmnt2__RoaDiscount__SubTotal__Total__TransType_Csh1_Chrg2_Roa3_
push esi
call fcn.00459720
cmp dword [ebp + 0x10], 0
mov ecx, str.__TenderType__CheckNum
mov eax, str.__FILLER__FILLER
cmovne eax, ecx
push eax
push esi
call fcn.00459720
push str.__bIsManualTrans__bIsVoided
push esi
call fcn.00459720
cmp dword [ebp + 0x10], 0
mov ecx, str.__IPC_JOURNAL_KEY
mov eax, str.__FILLER
cmovne eax, ecx
push eax
push esi
call fcn.00459720
add esp, 0x2c
cmp dword [ebp + 0x10], 0
je 0x4720e4
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
push esi
call fcn.00459720
add esp, 8
call fcn.00490e40
mov esi, eax
mov dword [ebp - 0x554], eax
jmp 0x4720fa
push 0x50eb3c
push esi
call fcn.00459720
add esp, 8
xor esi, esi
mov dword [ebp - 0x554], esi
mov eax, dword [ebp - 0x560]
test eax, eax
jle 0x47212f
push eax
push str._AND_LOC_d
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004a94b0
add esp, 0x10
jmp 0x47213b
cmp dword [ebp + 0x10], 0
je 0x4720f2
call fcn.00490e40
mov esi, eax
mov dword [ebp - 0x554], eax
jmp 0x4720fa
lea eax, [ebp - 0x44]
push eax
call fcn.004a55e0
add esp, 4
push dword [ebp - 0x550]
lea eax, [ebp - 0x544]
mov dword [ebp - 0x548], 0
push 9
push 0x3ff
push eax
push ebx
call fcn.0046d4c0
add esp, 0x14
test eax, eax
je 0x472268
nop word [eax + eax]
cmp dword [ebp - 0x548], 0x56ce
jge 0x47248b
lea eax, [ebp - 0x544]
push eax
push 0x51c2d0
push dword [ebp - 0x558]
call fcn.00459720
add esp, 0xc
test esi, esi
je 0x472231
lea eax, [ebp - 0x56c]
push eax
lea eax, [ebp - 0x544]
push 0x510e78
push eax
call fcn.004a8ea0
xor esi, esi
add esp, 0xc
cmp dword [ebp - 0x550], esi
jle 0x47222b
mov edi, dword [ebp - 0x554]
nop dword [eax]
test eax, eax
je 0x472222
cmp esi, 5
je 0x4721e3
cmp esi, 6
je 0x4721e3
cmp esi, 7
jne 0x472203
push eax
call fcn.004efdaf
mov ebx, eax
push ebx
push edi
call fcn.00491320
add esp, 0xc
test eax, eax
jne 0x472203
push ebx
push edi
call fcn.004913f0
add esp, 8
lea eax, [ebp - 0x56c]
push eax
push 0x510e78
push 0
call fcn.004a8ea0
inc esi
add esp, 0xc
cmp esi, dword [ebp - 0x550]
jl 0x4721d0
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x54c]
mov esi, dword [ebp - 0x554]
push dword [ebp - 0x550]
inc dword [ebp - 0x548]
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.0046d4c0
add esp, 0x14
test eax, eax
jne 0x472170
cmp dword [ebp - 0x548], eax
jne 0x4724dc
push 0
call fcn.004d9850
mov dword [ebp - 0x560], eax
call fcn.004d7980
push 0xfffffffffffffffe
push eax
call fcn.004d6620
mov esi, eax
shr eax, 0x10
movzx eax, al
mov edx, esi
mov dword [ebp - 0x578], eax
mov eax, esi
shr edx, 0x18
push edx
shr eax, 0x10
movzx eax, al
push eax
movzx ecx, si
push ecx
push str.INVOICE_NUMBER_CUSTOMER_ID_CUSTOMER_NAME_INVOICE_DATE_ACCOUNTING_DAY_COUNTERMAN_EMPLOYEE_ID_SALESMAN_EMPLOYEE_ID_CASHIER_EMPLOYEE_ID_PO_NUMBER_ATTENTION_TAX_AMOUNT_1_TAX_AMOUNT_2_ROA_DISCOUNT_INVOICE_NET_SALES_INVOICE_TOTAL_REF_TRANSACTION_TYPE_ID_REF_TRANSACTION_TYPE_ID_PO_NUMBER_MANUAL_TRANSACTION_VOIDED_INVOICE_TOTAL_VOIDED
push str.SELECT__s_FROM_INVOICE_WHERE_DATE_INVOICE_DATE__04d__02d__02d
push ebx
mov dword [ebp - 0x548], esi
mov dword [ebp - 0x574], edx
mov dword [ebp - 0x57c], ecx
call fcn.0046d380
add esp, 0x24
mov dword [ebp - 0x55c], 0
test eax, eax
je 0x47233d
push dword [ebp - 0x550]
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.0046d4c0
add esp, 0x14
test eax, eax
je 0x47233d
mov esi, dword [ebp - 0x550]
xor edi, edi
nop
cmp edi, 0x56ce
jge 0x472325
push esi
push 9
push 0x3ff
lea eax, [ebp - 0x544]
inc edi
push eax
push ebx
call fcn.0046d4c0
add esp, 0x14
test eax, eax
jne 0x472300
mov esi, dword [ebp - 0x548]
cmp edi, 2
mov dword [ebp - 0x55c], edi
mov edi, dword [ebp + 0xc]
jge 0x472471
call fcn.004d9850
movzx edx, byte [ebp + 0xe]
mov ebx, eax
sub ebx, dword [ebp - 0x560]
movzx eax, byte [ebp + 0xf]
cmp ebx, 0x2710
movzx ecx, di
mov dword [ebp - 0x564], ecx
mov ecx, str.Trying_again_2_more_days_back...
mov dword [ebp - 0x570], str.NOT_trying_again.
cmovae ecx, dword [ebp - 0x570]
push ecx
push dword [ebp - 0x574]
mov ecx, dword [ebp + 0x18]
push dword [ebp - 0x578]
mov dword [ebp - 0x580], eax
push dword [ebp - 0x57c]
mov dword [ebp - 0x584], edx
push ecx
push eax
push edx
push dword [ebp - 0x564]
push str.:2:GetSybaseSA12__04d__02d__02d___d_EAP:_An_empty_invoice_set_was_parsed_for_prev_day_attempt_1__04d__02d__02d:__s
call fcn.00424fd0
add esp, 0x24
cmp ebx, 0x2710
jae 0x472468
push 0xfffffffffffffffe
push esi
call fcn.004d6620
mov ebx, dword [ebp - 0x54c]
mov esi, eax
shr eax, 0x18
push eax
mov eax, esi
mov dword [ebp - 0x548], esi
shr eax, 0x10
movzx eax, al
push eax
movzx eax, si
push eax
push str.INVOICE_NUMBER_CUSTOMER_ID_CUSTOMER_NAME_INVOICE_DATE_ACCOUNTING_DAY_COUNTERMAN_EMPLOYEE_ID_SALESMAN_EMPLOYEE_ID_CASHIER_EMPLOYEE_ID_PO_NUMBER_ATTENTION_TAX_AMOUNT_1_TAX_AMOUNT_2_ROA_DISCOUNT_INVOICE_NET_SALES_INVOICE_TOTAL_REF_TRANSACTION_TYPE_ID_REF_TRANSACTION_TYPE_ID_PO_NUMBER_MANUAL_TRANSACTION_VOIDED_INVOICE_TOTAL_VOIDED
push str.SELECT__s_FROM_INVOICE_WHERE_DATE_INVOICE_DATE__04d__02d__02d
push ebx
call fcn.0046d380
add esp, 0x20
test eax, eax
je 0x47249a
push dword [ebp - 0x550]
lea eax, [ebp - 0x544]
mov dword [ebp - 0x55c], 0
push 9
push 0x3ff
push eax
push ebx
call fcn.0046d4c0
add esp, 0x14
test eax, eax
je 0x47249a
mov edi, dword [ebp - 0x55c]
mov esi, dword [ebp - 0x550]
cmp edi, 0x56ce
jge 0x472459
push esi
push 9
push 0x3ff
lea eax, [ebp - 0x544]
inc edi
push eax
push ebx
call fcn.0046d4c0
add esp, 0x14
test eax, eax
jne 0x472434
mov esi, dword [ebp - 0x548]
mov dword [ebp - 0x55c], edi
mov edi, dword [ebp + 0xc]
cmp dword [ebp - 0x55c], 2
jl 0x47249a
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
push 0x51c2d0
push dword [ebp - 0x558]
call fcn.00459720
add esp, 0xc
jmp 0x4724dc
push str.:10:GetSybaseSA12___FAILED:_Stuck_in_a_never_ending_loop___
call fcn.00424a90
add esp, 4
jmp 0x4724dc
call fcn.004d9850
sub eax, dword [ebp - 0x560]
push eax
movzx eax, byte [ebp - 0x545]
push eax
movzx eax, byte [ebp - 0x546]
push eax
movzx eax, si
push eax
push dword [ebp + 0x18]
push dword [ebp - 0x580]
push dword [ebp - 0x584]
push dword [ebp - 0x564]
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED_but_is_returning_success:_The_empty_invoice_set_could_not_be_verified__PriorDay:__04d__02d__02d:_PriorDay_scan_took__ums.
call fcn.00424a90
add esp, 0x24
push str.END_Invoice_Definition_Table
push 0x51c2d0
push dword [ebp - 0x558]
call fcn.00459720
mov ebx, dword [ebp - 0x554]
add esp, 0xc
test ebx, ebx
je 0x47261f
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
push dword [ebp - 0x558]
call fcn.00459720
push ebx
call fcn.00490f60
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x4725d8
mov esi, dword [ebp - 0x54c]
push ebx
push str.SELECT_EMPLOYEE_NUM_FIRST_NAME_LAST_NAME_FROM_EMPLOYEE_WHERE_ID_d
push esi
call fcn.0046d380
add esp, 0xc
test eax, eax
je 0x4725fe
push 3
push 9
push 0x3ff
lea eax, [ebp - 0x544]
xor esi, esi
push eax
push dword [ebp - 0x54c]
call fcn.0046d4c0
add esp, 0x14
test eax, eax
je 0x4725ba
nop dword [eax + eax]
cmp esi, 0xde
jge 0x4725ba
test esi, esi
jne 0x472597
lea eax, [ebp - 0x544]
push eax
push ebx
push str._d_t_s_n
push dword [ebp - 0x558]
call fcn.00459720
add esp, 0x10
push 3
push 9
push 0x3ff
lea eax, [ebp - 0x544]
inc esi
push eax
push dword [ebp - 0x54c]
call fcn.0046d4c0
add esp, 0x14
test eax, eax
jne 0x472570
mov esi, dword [ebp - 0x54c]
push dword [ebp - 0x554]
call fcn.00490fd0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x472530
mov ebx, dword [ebp - 0x558]
push str.End_EmpId_Conv_Table
push 0x51c2d0
push ebx
call fcn.00459720
push dword [ebp - 0x554]
call fcn.00490f00
add esp, 0x10
jmp 0x472625
movzx eax, byte [ebp + 0xf]
push ebx
push dword [ebp + 0x18]
push eax
movzx eax, byte [ebp + 0xe]
push eax
movzx eax, di
push eax
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___for_empId__d_FAILED.
call fcn.00424a90
add esp, 0x18
jmp 0x4725c0
mov ebx, dword [ebp - 0x558]
cmp dword [ebp - 0x568], 0
je 0x47263c
push dword [ebp - 0x54c]
call fcn.0046ce60
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e50dc
mov esp, ebp
pop ebp
ret