Function at 0x454c5d
Capabilities:
Reference sql statements
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x57c
mov eax, dword [0x5345d0]
xor eax, esp
mov dword [esp + 0x578], eax
push ebx
push esi
push edi
push 0x3ff
xor esi, esi
lea eax, [esp + 0x185]
mov edi, ecx
push esi
push eax
mov dword [esp + 0x1c], edi
mov byte [esp + 0x18c], 0
call fcn.004b53e0
add esp, 0xc
push 0x3f
lea eax, [esp + 0x45]
push esi
push eax
mov dword [esp + 0x34], esi
mov byte [esp + 0x4c], 0
call fcn.004b53e0
add esp, 0xc
push 0xff
lea eax, [esp + 0x85]
push esi
push eax
mov byte [esp + 0x8c], 0
call fcn.004b53e0
add esp, 0xc
cmp edi, esi
jne 0x454cf0
push esi
call fcn.004521ee
pop ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x3c], 1
jmp 0x454cf4
mov dword [esp + 0x3c], esi
cmp dword [esp + 0x10], esi
jne 0x454d01
xor eax, eax
jmp 0x4552eb
cmp dword [ebp + 0xc], esi
mov dword [esp + 0x14], 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
jne 0x454d16
mov dword [esp + 0x14], 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
mov edx, dword [esp + 0x14]
push 0x2c
call fcn.0047c66e
pop ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esp + 0x20], eax
call fcn.004524cd
cmp eax, esi
mov dword [esp + 0x2c], eax
jle 0x454d4f
push eax
push str._AND_INVOICE.LOC_d
lea eax, [esp + 0x48]
push 0x40
push eax
call fcn.0047da40
add esp, 0x10
jmp 0x454d58
lea eax, [esp + 0x40]
call fcn.0047c34d
cmp byte [ebp + 0xa], 6
mov dword [esp + 0x18], 0x4d5567
jne 0x454d98
cmp byte [ebp + 0xb], 0xf
jne 0x454d98
cmp word [ebp + 8], 0x7d9
jne 0x454d98
push str.SEA223
push ecx
push esi
xor ecx, ecx
call fcn.00440582
pop ecx
pop ecx
push eax
call fcn.0047d058
test eax, eax
pop ecx
pop ecx
je 0x454d98
mov dword [esp + 0x18], str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
lea eax, [esp + 0x80]
call fcn.0047c34d
push dword [esp + 0x18]
movzx edi, byte [ebp + 0xb]
movzx ebx, byte [ebp + 0xa]
movzx esi, word [ebp + 8]
push edi
push ebx
push esi
push str._DATE_INVOICE.INVOICE_DATE__04d__02d__02d_s_
push 0x100
push eax
mov dword [esp + 0x54], edi
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], esi
call fcn.0047da40
add esp, 0x1c
cmp dword [ebp + 0xc], 0
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x84]
push eax
push dword [esp + 0x1c]
je 0x454df4
push 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
jmp 0x454df9
push str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
push dword [esp + 0x20]
call fcn.0045145b
add esp, 0x14
test eax, eax
jne 0x454e34
push eax
push edi
push ebx
push esi
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___FAILED.
call fcn.004178df
add esp, 0x14
cmp dword [esp + 0x3c], 0
je 0x454cfa
push dword [esp + 0x10]
call fcn.00451078
pop ecx
jmp 0x454cfa
push str..ParseSA12.c
push 0x99b
xor ecx, ecx
call fcn.0043f0ba
xor edi, edi
cmp dword [ebp + 0x10], edi
pop ecx
mov esi, eax
pop ecx
mov dword [esp + 0x24], esi
je 0x454ecc
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
mov ecx, esi
call fcn.0043f464
push str._InvNum__AccntNum__AccntName__InvoiceDateTime__AccntingDay__EmpNum__SalesmanNum__CashierNum__PONum__AttentionField__TaxAmnt1__TaxAmnt2__RoaDiscount__SubTotal__Total__TransType_Csh1_Chrg2_Roa3_
mov ecx, esi
call fcn.0043f464
add esp, 0xc
cmp dword [ebp + 0xc], edi
mov ecx, esi
je 0x454e82
push str.__TenderType__CheckNum
jmp 0x454e87
push str.__FILLER__FILLER
call fcn.0043f464
pop ecx
push str.__bIsManualTrans__bIsVoided
mov ecx, esi
call fcn.0043f464
cmp dword [ebp + 0xc], edi
pop ecx
mov ecx, esi
je 0x454ea8
push str.__IPC_JOURNAL_KEY
jmp 0x454ead
push str.__FILLER
call fcn.0043f464
cmp dword [ebp + 0xc], edi
pop ecx
mov ecx, esi
je 0x454ec1
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
jmp 0x454ec6
push 0x4d75ac
call fcn.0043f464
pop ecx
cmp dword [ebp + 0xc], edi
je 0x454edc
call fcn.0046ed85
mov dword [esp + 0x1c], eax
jmp 0x454ee0
mov dword [esp + 0x1c], edi
cmp dword [esp + 0x2c], edi
lea eax, [esp + 0x40]
jle 0x454f00
push dword [esp + 0x2c]
push str._AND_LOC_d
push 0x40
push eax
call fcn.0047da40
add esp, 0x10
jmp 0x454f05
call fcn.0047c34d
push dword [esp + 0x20]
lea eax, [esp + 0x184]
push 9
push 0x3ff
push eax
push dword [esp + 0x20]
mov dword [esp + 0x28], edi
call fcn.0045155b
add esp, 0x14
test eax, eax
je 0x455007
mov esi, 0x4d9488
cmp dword [esp + 0x14], 0x56ce
jge 0x454ff1
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x180]
push eax
push 0x4e239c
call fcn.0043f464
cmp dword [esp + 0x24], 0
pop ecx
pop ecx
je 0x454fc4
push esi
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x184]
call fcn.0047de6b
xor edi, edi
cmp dword [esp + 0x24], edi
pop ecx
jle 0x454fc4
test eax, eax
je 0x454fc4
cmp edi, 5
je 0x454f8f
cmp edi, 6
je 0x454f8f
cmp edi, 7
jne 0x454fb0
push eax
call fcn.004b64a4
mov ebx, eax
mov eax, dword [esp + 0x20]
pop ecx
call fcn.0046f1ed
test eax, eax
jne 0x454fb0
mov eax, dword [esp + 0x1c]
push ebx
call fcn.0046ee6e
pop ecx
push esi
lea eax, [esp + 0x2c]
xor ecx, ecx
call fcn.0047de6b
inc edi
cmp edi, dword [esp + 0x24]
pop ecx
jl 0x454f7c
push dword [esp + 0x20]
inc dword [esp + 0x18]
push 9
push 0x3ff
lea eax, [esp + 0x18c]
push eax
push dword [esp + 0x20]
call fcn.0045155b
add esp, 0x14
test eax, eax
jne 0x454f35
jmp 0x454ffc
push str.:10:GetSybaseSA12___FAILED:_Stuck_in_a_never_ending_loop___
call fcn.004178df
pop ecx
cmp dword [esp + 0x14], 0
jne 0x4551dc
xor esi, esi
push esi
call fcn.004a4ba8
pop ecx
mov dword [esp + 0x28], eax
call fcn.004a5799
push 0xfffffffffffffffe
push eax
call fcn.004a40a3
movzx ebx, ax
mov ecx, eax
mov dword [esp + 0x1c], eax
shr eax, 0x10
shr ecx, 0x18
push ecx
movzx eax, al
push eax
push ebx
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
mov edi, str.SELECT__s_FROM_INVOICE_WHERE_DATE_INVOICE_DATE__04d__02d__02d
push edi
push dword [esp + 0x2c]
call fcn.0045145b
add esp, 0x20
test eax, eax
mov dword [esp + 0x18], esi
je 0x4550a6
push dword [esp + 0x20]
mov esi, 0x3ff
push 9
push esi
lea eax, [esp + 0x18c]
push eax
push dword [esp + 0x20]
call fcn.0045155b
add esp, 0x14
test eax, eax
je 0x4550b1
cmp dword [esp + 0x18], 0x56ce
jge 0x4550a6
push dword [esp + 0x20]
inc dword [esp + 0x1c]
push 9
push esi
lea eax, [esp + 0x18c]
push eax
push dword [esp + 0x20]
call fcn.0045155b
add esp, 0x14
test eax, eax
jne 0x455079
cmp dword [esp + 0x18], 2
jge 0x455193
call fcn.004a4ba8
sub eax, dword [esp + 0x28]
mov esi, 0x2710
mov dword [esp + 0x2c], eax
cmp eax, esi
mov eax, str.Trying_again_2_more_days_back...
jb 0x4550d1
mov eax, str.NOT_trying_again.
push eax
movzx eax, byte [esp + 0x1b]
push eax
movzx eax, byte [esp + 0x1e]
push eax
push ebx
push 0
push dword [esp + 0x4c]
push dword [esp + 0x48]
push dword [esp + 0x50]
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.00417db7
add esp, 0x24
cmp dword [esp + 0x2c], esi
jae 0x45518a
push 0xfffffffffffffffe
push dword [esp + 0x18]
call fcn.004a40a3
movzx ebx, ax
mov ecx, eax
mov dword [esp + 0x1c], eax
shr eax, 0x10
shr ecx, 0x18
push ecx
movzx eax, al
push eax
push ebx
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 edi
push dword [esp + 0x2c]
call fcn.0045145b
add esp, 0x20
xor edi, edi
test eax, eax
je 0x45518e
push dword [esp + 0x20]
mov esi, 0x3ff
push 9
push esi
lea eax, [esp + 0x18c]
push eax
push dword [esp + 0x20]
call fcn.0045155b
add esp, 0x14
test eax, eax
je 0x4551aa
cmp edi, 0x56ce
jge 0x45518e
push dword [esp + 0x20]
lea eax, [esp + 0x184]
push 9
push esi
push eax
push dword [esp + 0x20]
inc edi
call fcn.0045155b
add esp, 0x14
test eax, eax
jne 0x455160
jmp 0x45518e
mov edi, dword [esp + 0x18]
cmp edi, 2
jl 0x4551aa
mov ecx, dword [esp + 0x24]
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
push 0x4e239c
call fcn.0043f464
pop ecx
pop ecx
jmp 0x4551dc
call fcn.004a4ba8
sub eax, dword [esp + 0x28]
push eax
movzx eax, byte [esp + 0x1b]
push eax
movzx eax, byte [esp + 0x1e]
push eax
push ebx
push 0
push dword [esp + 0x4c]
push dword [esp + 0x48]
push dword [esp + 0x50]
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.004178df
add esp, 0x24
mov ecx, dword [esp + 0x24]
push str.END_Invoice_Definition_Table
push 0x4e239c
call fcn.0043f464
cmp dword [esp + 0x24], 0
pop ecx
pop ecx
je 0x4552d6
mov ecx, dword [esp + 0x24]
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
call fcn.0043f464
mov esi, dword [esp + 0x24]
pop ecx
pop ecx
call fcn.0046f129
mov ebx, eax
test ebx, ebx
je 0x4552b8
mov edi, 0x3ff
push ebx
push str.SELECT_EMPLOYEE_NUM_FIRST_NAME_LAST_NAME_FROM_EMPLOYEE_WHERE_ID_d
push dword [esp + 0x18]
call fcn.0045145b
add esp, 0xc
test eax, eax
je 0x455289
xor esi, esi
jmp 0x45526a
cmp esi, 0xde
jge 0x4552a5
test esi, esi
jne 0x455269
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x180]
push eax
push ebx
push str._d_t_s_n
call fcn.0043f464
add esp, 0xc
inc esi
push 3
push 9
push edi
lea eax, [esp + 0x18c]
push eax
push dword [esp + 0x20]
call fcn.0045155b
add esp, 0x14
test eax, eax
jne 0x455243
jmp 0x4552a5
push ebx
push 0
push dword [esp + 0x40]
push dword [esp + 0x3c]
push dword [esp + 0x44]
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___for_empId__d_FAILED.
call fcn.004178df
add esp, 0x18
mov esi, dword [esp + 0x1c]
call fcn.0046f18a
mov ebx, eax
test ebx, ebx
jne 0x455229
mov ecx, dword [esp + 0x24]
push str.End_EmpId_Conv_Table
push 0x4e239c
call fcn.0043f464
mov edi, dword [esp + 0x24]
pop ecx
pop ecx
call fcn.0046ee28
cmp dword [esp + 0x3c], 0
je 0x4552e7
push dword [esp + 0x10]
call fcn.00451078
pop ecx
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x584]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004b4c95
mov esp, ebp
pop ebp
ret