Function at 0x471d9d
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x580
mov eax, dword [0x59a240]
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 edi, edi
mov dword [ebp - 0x558], ebx
push edi
push eax
call fcn.004e4da0
push 0x40
lea eax, [ebp - 0x44]
mov dword [ebp - 0x56c], edi
push edi
push eax
call fcn.004e4da0
push 0x100
lea eax, [ebp - 0x144]
push edi
push eax
call fcn.004e4da0
add esp, 0x24
test ebx, ebx
jne 0x471e1e
push edi
call fcn.0046d734
mov ebx, eax
mov dword [ebp - 0x564], 1
mov dword [ebp - 0x558], ebx
pop ecx
test ebx, ebx
je 0x471fd5
jmp 0x471e24
mov dword [ebp - 0x564], edi
call fcn.0047d25f
test eax, eax
je 0x471e70
push ebx
call fcn.0046f1b2
pop ecx
test eax, eax
jne 0x471e70
push str.E:UserskerryDocumentsVisual_Studio_2022ProjectsPAULA__TEMP_COPY_ParseSA12.c
push 0x927
push edi
call fcn.00459b09
mov esi, eax
push 0x6868c8
push esi
call fcn.0045ad96
push edi
push edi
push esi
call fcn.0045acea
add esp, 0x20
push 0x4e20
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x47257a
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.0049dbec
inc eax
push ebx
mov dword [ebp - 0x54c], eax
call fcn.0046e75f
add esp, 0xc
mov dword [ebp - 0x550], eax
test eax, eax
jle 0x471ec0
push eax
push str._AND_INVOICE.LOC_d
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004a0ddb
add esp, 0x10
jmp 0x471eca
lea eax, [ebp - 0x44]
push eax
call fcn.0049e2d6
pop ecx
cmp byte [ebp + 0xe], 6
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x548], 0x50c926
jne 0x471f1a
cmp byte [ebp + 0xf], 0xf
jne 0x471f1a
mov eax, 0x7d9
cmp di, ax
jne 0x471f1a
push str.SEA223
push 0
push 0
call fcn.0046028c
pop ecx
pop ecx
push eax
call fcn.004a0f55
pop ecx
pop ecx
test eax, eax
mov ecx, str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
mov eax, 0x50c926
cmove ecx, eax
mov dword [ebp - 0x548], ecx
lea eax, [ebp - 0x144]
push eax
call fcn.0049e2d6
cmp dword [ebp + 0x18], 0
pop ecx
jle 0x471f4b
push dword [ebp + 0x18]
lea eax, [ebp - 0x144]
push str.INVOICE.INVOICE_NUMBER_d
push 0x100
push eax
call fcn.004a0ddb
add esp, 0x10
jmp 0x471f79
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.004a0ddb
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.0046de59
add esp, 0x14
test eax, eax
jne 0x471fdc
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.004255b9
add esp, 0x14
cmp dword [ebp - 0x564], 0
je 0x471fd5
push ebx
call fcn.0046dac7
pop ecx
xor eax, eax
jmp 0x47257c
push str.E:UserskerryDocumentsVisual_Studio_2022ProjectsPAULA__TEMP_COPY_ParseSA12.c
push 0x99b
push 0
call fcn.00459b09
add esp, 0xc
mov esi, eax
cmp dword [ebp + 0x14], 0
mov dword [ebp - 0x560], esi
je 0x4720a4
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
push esi
call fcn.0045aa3a
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.0045aa3a
cmp dword [ebp + 0x10], 0
mov ecx, str.__TenderType__CheckNum
mov eax, str.__FILLER__FILLER
cmovne eax, ecx
push eax
push esi
call fcn.0045aa3a
push str.__bIsManualTrans__bIsVoided
push esi
call fcn.0045aa3a
cmp dword [ebp + 0x10], 0
mov ecx, str.__IPC_JOURNAL_KEY
mov eax, str.__FILLER
cmovne eax, ecx
push eax
push esi
call fcn.0045aa3a
add esp, 0x2c
cmp dword [ebp + 0x10], 0
je 0x472070
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
push esi
call fcn.0045aa3a
pop ecx
pop ecx
jmp 0x4720aa
push 0x50eafc
push esi
call fcn.0045aa3a
pop ecx
pop ecx
and dword [ebp - 0x554], 0
mov eax, dword [ebp - 0x550]
test eax, eax
jle 0x4720b7
push eax
push str._AND_LOC_d
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004a0ddb
add esp, 0x10
jmp 0x4720c1
cmp dword [ebp + 0x10], 0
je 0x47207d
call fcn.0048e640
mov dword [ebp - 0x554], eax
jmp 0x472084
lea eax, [ebp - 0x44]
push eax
call fcn.0049e2d6
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.0046df4a
add esp, 0x14
test eax, eax
je 0x4721f4
cmp dword [ebp - 0x548], 0x56ce
jge 0x4723fc
lea eax, [ebp - 0x544]
push eax
push 0x51f9c8
push esi
call fcn.0045aa3a
add esp, 0xc
cmp dword [ebp - 0x554], 0
je 0x4721bd
lea eax, [ebp - 0x56c]
push eax
lea eax, [ebp - 0x544]
push 0x511240
push eax
call fcn.004a093e
mov ecx, eax
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x55c], eax
cmp dword [ebp - 0x54c], eax
jle 0x4721bd
mov edi, dword [ebp - 0x554]
test ecx, ecx
je 0x4721ba
cmp eax, 5
je 0x472165
cmp eax, 6
je 0x472165
cmp eax, 7
jne 0x47218d
push ecx
call fcn.004ef9cb
push eax
push edi
mov dword [ebp - 0x550], eax
call fcn.0048ea43
add esp, 0xc
test eax, eax
jne 0x47218d
push dword [ebp - 0x550]
push edi
call fcn.0048eaf2
pop ecx
pop ecx
lea eax, [ebp - 0x56c]
push eax
push 0x511240
push 0
call fcn.004a093e
mov ecx, eax
add esp, 0xc
mov eax, dword [ebp - 0x55c]
inc eax
mov dword [ebp - 0x55c], eax
cmp eax, dword [ebp - 0x54c]
jl 0x472152
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.0046df4a
add esp, 0x14
test eax, eax
jne 0x4720ed
cmp dword [ebp - 0x548], eax
jne 0x472457
push 0
call fcn.004ca9ca
mov dword [ebp - 0x55c], eax
call fcn.004c8f47
push 0xfffffffffffffffe
push eax
call fcn.004c7ea1
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.0046de59
add esp, 0x24
test eax, eax
je 0x4722bb
push dword [ebp - 0x54c]
and dword [ebp - 0x550], 0
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.0046df4a
add esp, 0x14
test eax, eax
je 0x4722bb
mov edi, dword [ebp - 0x54c]
mov esi, dword [ebp - 0x550]
cmp esi, 0x56ce
jge 0x4722a9
push edi
push 9
push 0x3ff
lea eax, [ebp - 0x544]
inc esi
push eax
push ebx
call fcn.0046df4a
add esp, 0x14
test eax, eax
jne 0x472284
mov edi, dword [ebp + 0xc]
cmp esi, 2
mov esi, dword [ebp - 0x548]
jge 0x4723e1
call fcn.004ca9ca
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.00425c08
add esp, 0x24
cmp ebx, 0x2710
jae 0x472409
push 0xfffffffffffffffe
push esi
call fcn.004c7ea1
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.0046de59
add esp, 0x20
test eax, eax
je 0x47240f
push dword [ebp - 0x54c]
and dword [ebp - 0x568], 0
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.0046df4a
add esp, 0x14
test eax, eax
je 0x47240f
mov edi, dword [ebp - 0x54c]
mov esi, dword [ebp - 0x568]
cmp esi, 0x56ce
jge 0x4723d3
push edi
push 9
push 0x3ff
lea eax, [ebp - 0x544]
inc esi
push eax
push ebx
call fcn.0046df4a
add esp, 0x14
test eax, eax
jne 0x4723ae
mov edi, dword [ebp + 0xc]
cmp esi, 2
mov esi, dword [ebp - 0x548]
jl 0x47240f
mov esi, dword [ebp - 0x560]
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
push 0x51f9c8
push esi
call fcn.0045aa3a
add esp, 0xc
jmp 0x472457
push str.:10:GetSybaseSA12___FAILED:_Stuck_in_a_never_ending_loop___
call fcn.004255b9
pop ecx
jmp 0x472457
mov ebx, dword [ebp - 0x558]
call fcn.004ca9ca
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.004255b9
mov esi, dword [ebp - 0x560]
add esp, 0x24
push str.END_Invoice_Definition_Table
push 0x51f9c8
push esi
call fcn.0045aa3a
add esp, 0xc
cmp dword [ebp - 0x554], 0
je 0x47256a
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
push esi
call fcn.0045aa3a
push dword [ebp - 0x554]
call fcn.0048e734
add esp, 0x10
jmp 0x47253e
push eax
push str.SELECT_EMPLOYEE_NUM_FIRST_NAME_LAST_NAME_FROM_EMPLOYEE_WHERE_ID_d
push ebx
call fcn.0046de59
add esp, 0xc
test eax, eax
je 0x47250e
and dword [ebp - 0x558], 0
jmp 0x4724ef
mov eax, dword [ebp - 0x558]
cmp eax, 0xde
jge 0x472532
test eax, eax
jne 0x4724e8
lea eax, [ebp - 0x544]
push eax
push dword [ebp - 0x548]
push str._d_t_s_n
push esi
call fcn.0045aa3a
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.0046df4a
add esp, 0x14
test eax, eax
jne 0x4724b6
jmp 0x472532
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.004255b9
add esp, 0x18
push dword [ebp - 0x554]
call fcn.0048e797
pop ecx
mov dword [ebp - 0x548], eax
test eax, eax
jne 0x47249a
push str.End_EmpId_Conv_Table
push 0x51f9c8
push esi
call fcn.0045aa3a
push dword [ebp - 0x554]
call fcn.0048e6e2
add esp, 0x10
cmp dword [ebp - 0x564], 0
je 0x47257a
push ebx
call fcn.0046dac7
pop ecx
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e3632
leave
ret