Function at 0x45fe41
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x580
mov eax, dword [0x55f900]
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
xor esi, esi
mov dword [ebp - 0x558], ebx
push esi
push eax
call fcn.004c37f0
push 0x40
lea eax, [ebp - 0x44]
mov dword [ebp - 0x56c], esi
push esi
push eax
call fcn.004c37f0
push 0x100
lea eax, [ebp - 0x144]
push esi
push eax
call fcn.004c37f0
add esp, 0x24
test ebx, ebx
jne 0x45fec2
push esi
call fcn.0045b86c
mov ebx, eax
mov dword [ebp - 0x564], 1
mov dword [ebp - 0x558], ebx
pop ecx
test ebx, ebx
je 0x46002d
jmp 0x45fec8
mov dword [ebp - 0x564], esi
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 - 0x560], eax
call fcn.0048ab31
inc eax
push ebx
mov dword [ebp - 0x54c], eax
call fcn.0045c8d0
add esp, 0xc
mov dword [ebp - 0x550], eax
test eax, eax
jle 0x45ff18
push eax
push str._AND_INVOICE.LOC_d
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.0048d960
add esp, 0x10
jmp 0x45ff22
lea eax, [ebp - 0x44]
push eax
call fcn.0048b21b
pop ecx
cmp byte [ebp + 0xe], 6
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x548], 0x4e9b8e
jne 0x45ff72
cmp byte [ebp + 0xf], 0xf
jne 0x45ff72
mov eax, 0x7d9
cmp di, ax
jne 0x45ff72
push str.SEA223
push 0
push 0
call fcn.0044e9d1
pop ecx
pop ecx
push eax
call fcn.0048dada
pop ecx
pop ecx
test eax, eax
mov ecx, str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
mov eax, 0x4e9b8e
cmove ecx, eax
mov dword [ebp - 0x548], ecx
lea eax, [ebp - 0x144]
push eax
call fcn.0048b21b
cmp dword [ebp + 0x18], 0
pop ecx
jle 0x45ffa3
push dword [ebp + 0x18]
lea eax, [ebp - 0x144]
push str.INVOICE.INVOICE_NUMBER_d
push 0x100
push eax
call fcn.0048d960
add esp, 0x10
jmp 0x45ffd1
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.0048d960
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 - 0x560]
mov eax, str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
cmovne eax, ecx
push eax
push ebx
call fcn.0045bf37
add esp, 0x14
test eax, eax
jne 0x460034
push dword [ebp + 0x18]
movzx eax, byte [ebp + 0xf]
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.0041c80a
add esp, 0x14
cmp dword [ebp - 0x564], 0
je 0x46002d
push ebx
call fcn.0045bba5
pop ecx
xor eax, eax
jmp 0x4605d4
push str.C:UsersOfficeDocumentsVisual_StudioPAULAParseSA12.c
push 0x99d
push 0
call fcn.004494eb
add esp, 0xc
mov esi, eax
cmp dword [ebp + 0x14], 0
mov dword [ebp - 0x560], esi
je 0x4600fc
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
push esi
call fcn.0044a077
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.0044a077
cmp dword [ebp + 0x10], 0
mov ecx, str.__TenderType__CheckNum
mov eax, str.__FILLER__FILLER
cmovne eax, ecx
push eax
push esi
call fcn.0044a077
push str.__bIsManualTrans__bIsVoided
push esi
call fcn.0044a077
cmp dword [ebp + 0x10], 0
mov ecx, str.__IPC_JOURNAL_KEY
mov eax, str.__FILLER
cmovne eax, ecx
push eax
push esi
call fcn.0044a077
add esp, 0x2c
cmp dword [ebp + 0x10], 0
je 0x4600c8
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
push esi
call fcn.0044a077
pop ecx
pop ecx
jmp 0x460102
push 0x4ebcf4
push esi
call fcn.0044a077
pop ecx
pop ecx
and dword [ebp - 0x554], 0
mov eax, dword [ebp - 0x550]
test eax, eax
jle 0x46010f
push eax
push str._AND_LOC_d
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.0048d960
add esp, 0x10
jmp 0x460119
cmp dword [ebp + 0x10], 0
je 0x4600d5
call fcn.0047bcca
mov dword [ebp - 0x554], eax
jmp 0x4600dc
lea eax, [ebp - 0x44]
push eax
call fcn.0048b21b
pop ecx
push dword [ebp - 0x54c]
and dword [ebp - 0x548], 0
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.0045c028
add esp, 0x14
test eax, eax
je 0x46024c
cmp dword [ebp - 0x548], 0x56ce
jge 0x460454
lea eax, [ebp - 0x544]
push eax
push 0x4f9480
push esi
call fcn.0044a077
add esp, 0xc
cmp dword [ebp - 0x554], 0
je 0x460215
lea eax, [ebp - 0x56c]
push eax
lea eax, [ebp - 0x544]
push 0x4ee0d0
push eax
call fcn.0048d4c3
mov ecx, eax
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x55c], eax
cmp dword [ebp - 0x54c], eax
jle 0x460215
mov edi, dword [ebp - 0x554]
test ecx, ecx
je 0x460212
cmp eax, 5
je 0x4601bd
cmp eax, 6
je 0x4601bd
cmp eax, 7
jne 0x4601e5
push ecx
call fcn.004ce43f
push eax
push edi
mov dword [ebp - 0x550], eax
call fcn.0047c0cd
add esp, 0xc
test eax, eax
jne 0x4601e5
push dword [ebp - 0x550]
push edi
call fcn.0047c17c
pop ecx
pop ecx
lea eax, [ebp - 0x56c]
push eax
push 0x4ee0d0
push 0
call fcn.0048d4c3
mov ecx, eax
add esp, 0xc
mov eax, dword [ebp - 0x55c]
inc eax
mov dword [ebp - 0x55c], eax
cmp eax, dword [ebp - 0x54c]
jl 0x4601aa
mov edi, dword [ebp + 0xc]
push dword [ebp - 0x54c]
inc dword [ebp - 0x548]
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.0045c028
add esp, 0x14
test eax, eax
jne 0x460145
cmp dword [ebp - 0x548], eax
jne 0x4604af
push 0
call fcn.004b729a
mov dword [ebp - 0x55c], eax
call fcn.004b5927
push 0xfffffffffffffffe
push eax
call fcn.004b48e9
mov esi, eax
shr eax, 0x10
mov ecx, esi
movzx eax, al
shr ecx, 0x18
push ecx
push eax
movzx edx, si
push edx
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], ecx
mov dword [ebp - 0x578], eax
mov dword [ebp - 0x568], edx
call fcn.0045bf37
add esp, 0x24
test eax, eax
je 0x460313
push dword [ebp - 0x54c]
and dword [ebp - 0x550], 0
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.0045c028
add esp, 0x14
test eax, eax
je 0x460313
mov edi, dword [ebp - 0x54c]
mov esi, dword [ebp - 0x550]
cmp esi, 0x56ce
jge 0x460301
push edi
push 9
push 0x3ff
lea eax, [ebp - 0x544]
inc esi
push eax
push ebx
call fcn.0045c028
add esp, 0x14
test eax, eax
jne 0x4602dc
mov edi, dword [ebp + 0xc]
cmp esi, 2
mov esi, dword [ebp - 0x548]
jge 0x460439
call fcn.004b729a
movzx edx, byte [ebp + 0xe]
mov ebx, eax
sub ebx, dword [ebp - 0x55c]
movzx eax, byte [ebp + 0xf]
cmp ebx, 0x2710
movzx ecx, di
mov dword [ebp - 0x550], 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 dword [ebp - 0x57c], eax
push dword [ebp - 0x578]
mov dword [ebp - 0x580], edx
push dword [ebp - 0x568]
push dword [ebp + 0x18]
push eax
push edx
push dword [ebp - 0x550]
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.0041cce9
add esp, 0x24
cmp ebx, 0x2710
jae 0x460461
push 0xfffffffffffffffe
push esi
call fcn.004b48e9
mov ebx, dword [ebp - 0x558]
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.0045bf37
add esp, 0x20
test eax, eax
je 0x460467
push dword [ebp - 0x54c]
and dword [ebp - 0x568], 0
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.0045c028
add esp, 0x14
test eax, eax
je 0x460467
mov edi, dword [ebp - 0x54c]
mov esi, dword [ebp - 0x568]
cmp esi, 0x56ce
jge 0x46042b
push edi
push 9
push 0x3ff
lea eax, [ebp - 0x544]
inc esi
push eax
push ebx
call fcn.0045c028
add esp, 0x14
test eax, eax
jne 0x460406
mov edi, dword [ebp + 0xc]
cmp esi, 2
mov esi, dword [ebp - 0x548]
jl 0x460467
mov esi, dword [ebp - 0x560]
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
push 0x4f9480
push esi
call fcn.0044a077
add esp, 0xc
jmp 0x4604af
push str.:10:GetSybaseSA12___FAILED:_Stuck_in_a_never_ending_loop___
call fcn.0041c80a
pop ecx
jmp 0x4604af
mov ebx, dword [ebp - 0x558]
call fcn.004b729a
sub eax, dword [ebp - 0x55c]
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 - 0x57c]
push dword [ebp - 0x580]
push dword [ebp - 0x550]
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.0041c80a
mov esi, dword [ebp - 0x560]
add esp, 0x24
push str.END_Invoice_Definition_Table
push 0x4f9480
push esi
call fcn.0044a077
add esp, 0xc
cmp dword [ebp - 0x554], 0
je 0x4605c2
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
push esi
call fcn.0044a077
push dword [ebp - 0x554]
call fcn.0047bdbe
add esp, 0x10
jmp 0x460596
push eax
push str.SELECT_EMPLOYEE_NUM_FIRST_NAME_LAST_NAME_FROM_EMPLOYEE_WHERE_ID_d
push ebx
call fcn.0045bf37
add esp, 0xc
test eax, eax
je 0x460566
and dword [ebp - 0x558], 0
jmp 0x460547
mov eax, dword [ebp - 0x558]
cmp eax, 0xde
jge 0x46058a
test eax, eax
jne 0x460540
lea eax, [ebp - 0x544]
push eax
push dword [ebp - 0x548]
push str._d_t_s_n
push esi
call fcn.0044a077
mov eax, dword [ebp - 0x558]
add esp, 0x10
inc eax
mov dword [ebp - 0x558], eax
push 3
push 9
push 0x3ff
lea eax, [ebp - 0x544]
push eax
push ebx
call fcn.0045c028
add esp, 0x14
test eax, eax
jne 0x46050e
jmp 0x46058a
push dword [ebp - 0x548]
movzx eax, byte [ebp + 0xf]
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.0041c80a
add esp, 0x18
push dword [ebp - 0x554]
call fcn.0047be21
pop ecx
mov dword [ebp - 0x548], eax
test eax, eax
jne 0x4604f2
push str.End_EmpId_Conv_Table
push 0x4f9480
push esi
call fcn.0044a077
push dword [ebp - 0x554]
call fcn.0047bd6c
add esp, 0x10
cmp dword [ebp - 0x564], 0
je 0x4605d2
push ebx
call fcn.0045bba5
pop ecx
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004c2120
leave
ret