Function at 0x451f59
Capabilities:
Reference sql statements
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x4e4]
sub esp, 0x564
mov eax, dword [0x5065d0]
xor eax, ebp
mov dword [ebp + 0x4e0], eax
push ebx
push esi
push edi
mov esi, 0x3ff
push esi
xor edi, edi
lea eax, [ebp - 0x5f]
mov ebx, ecx
push edi
push eax
mov dword [ebp - 0x64], ebx
mov byte [ebp - 0x60], 0
call fcn.004ab5d0
push 0x3f
lea eax, [ebp + 0x4a1]
push edi
push eax
mov dword [ebp - 0x7c], edi
mov byte [ebp + 0x4a0], 0
call fcn.004ab5d0
push 0xff
lea eax, [ebp + 0x3a1]
push edi
push eax
mov byte [ebp + 0x3a0], 0
call fcn.004ab5d0
add esp, 0x24
cmp ebx, edi
jne 0x451fde
push edi
call fcn.0044f4cd
pop ecx
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x80], 1
jmp 0x451fe1
mov dword [ebp - 0x80], edi
cmp dword [ebp - 0x64], edi
jne 0x451fed
xor eax, eax
jmp 0x4524ab
cmp dword [ebp + 0x4f0], edi
mov dword [ebp - 0x70], 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 0x452003
mov dword [ebp - 0x70], 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 [ebp - 0x70]
push 0x2c
call fcn.00476dde
mov ebx, eax
pop ecx
mov ecx, dword [ebp - 0x64]
inc ebx
mov dword [ebp - 0x78], ebx
call fcn.0044f754
cmp eax, edi
mov dword [ebp - 0x6c], eax
jle 0x45203c
push eax
push str._AND_INVOICE.LOC_d
lea eax, [ebp + 0x4a0]
push 0x40
push eax
call fcn.004781b1
add esp, 0x10
jmp 0x452047
lea eax, [ebp + 0x4a0]
call fcn.00476abd
cmp byte [ebp + 0x4ee], 6
mov edi, 0x4c9da3
jne 0x452089
cmp byte [ebp + 0x4ef], 0xf
jne 0x452089
cmp word [ebp + 0x4ec], 0x7d9
jne 0x452089
push str.SEA223
push 0
xor ecx, ecx
call fcn.0043f1b2
pop ecx
push eax
call fcn.004777c9
test eax, eax
pop ecx
pop ecx
je 0x452089
mov edi, str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
lea eax, [ebp + 0x3a0]
call fcn.00476abd
movzx eax, byte [ebp + 0x4ef]
push edi
push eax
movzx eax, byte [ebp + 0x4ee]
push eax
movzx eax, word [ebp + 0x4ec]
push eax
push str._DATE_INVOICE.INVOICE_DATE__04d__02d__02d_s_
lea eax, [ebp + 0x3a0]
push 0x100
push eax
call fcn.004781b1
mov edi, dword [ebp + 0x4f0]
add esp, 0x1c
test edi, edi
lea eax, [ebp + 0x4a0]
push eax
lea eax, [ebp + 0x3a0]
push eax
push dword [ebp - 0x70]
je 0x4520e8
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 0x4520ed
push str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
push dword [ebp - 0x64]
call fcn.0044e69e
add esp, 0x14
test eax, eax
jne 0x452113
cmp dword [ebp - 0x80], eax
je 0x451fe6
push dword [ebp - 0x64]
call fcn.0044e459
pop ecx
jmp 0x451fe6
push str..ParseSA12.c
push 0x99b
xor ecx, ecx
call fcn.0043df24
cmp dword [ebp + 0x4f4], 0
pop ecx
pop ecx
mov ecx, eax
mov dword [ebp - 0x68], ecx
je 0x4521ac
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
call fcn.0043e26c
mov ecx, dword [ebp - 0x68]
push str._InvNum__AccntNum__AccntName__InvoiceDateTime__AccntingDay__EmpNum__SalesmanNum__CashierNum__PONum__AttentionField__TaxAmnt1__TaxAmnt2__RoaDiscount__SubTotal__Total__TransType_Csh1_Chrg2_Roa3_
call fcn.0043e26c
mov ecx, dword [ebp - 0x68]
add esp, 0xc
test edi, edi
je 0x452161
push str.__TenderType__CheckNum
jmp 0x452166
push str.__FILLER__FILLER
call fcn.0043e26c
pop ecx
mov ecx, dword [ebp - 0x68]
push str.__bIsManualTrans__bIsVoided
call fcn.0043e26c
test edi, edi
pop ecx
mov ecx, dword [ebp - 0x68]
je 0x452188
push str.__IPC_JOURNAL_KEY
jmp 0x45218d
push str.__FILLER
call fcn.0043e26c
test edi, edi
pop ecx
mov ecx, dword [ebp - 0x68]
je 0x4521a1
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
jmp 0x4521a6
push 0x4cb20c
call fcn.0043e26c
pop ecx
test edi, edi
je 0x4521ba
call fcn.0046aaee
mov dword [ebp - 0x74], eax
jmp 0x4521be
and dword [ebp - 0x74], 0
cmp dword [ebp - 0x6c], 0
lea eax, [ebp + 0x4a0]
jle 0x4521df
push dword [ebp - 0x6c]
push str._AND_LOC_d
push 0x40
push eax
call fcn.004781b1
add esp, 0x10
jmp 0x4521e4
call fcn.00476abd
and dword [ebp - 0x6c], 0
push ebx
push 9
push esi
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x64]
call fcn.0044e789
add esp, 0x14
test eax, eax
je 0x4522b9
cmp dword [ebp - 0x6c], 0x56ce
jge 0x4522af
mov ecx, dword [ebp - 0x68]
lea eax, [ebp - 0x60]
push eax
push 0x4d0100
call fcn.0043e26c
cmp dword [ebp - 0x74], 0
pop ecx
pop ecx
je 0x452291
push 0x4cbe7c
lea eax, [ebp - 0x7c]
lea ecx, [ebp - 0x60]
call fcn.004785ce
and dword [ebp - 0x70], 0
test ebx, ebx
pop ecx
jle 0x452291
test eax, eax
je 0x452291
cmp dword [ebp - 0x70], 5
je 0x452258
cmp dword [ebp - 0x70], 6
je 0x452258
cmp dword [ebp - 0x70], 7
jne 0x452279
push eax
call fcn.004ac55e
mov edi, dword [ebp - 0x74]
pop ecx
mov ebx, eax
call fcn.0046ae77
test eax, eax
jne 0x452276
push ebx
mov ebx, edi
call fcn.0046aba0
pop ecx
mov ebx, dword [ebp - 0x78]
push 0x4cbe7c
lea eax, [ebp - 0x7c]
xor ecx, ecx
call fcn.004785ce
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], ebx
pop ecx
jl 0x452242
inc dword [ebp - 0x6c]
push ebx
push 9
push esi
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x64]
call fcn.0044e789
add esp, 0x14
test eax, eax
jne 0x452203
cmp dword [ebp - 0x6c], 0
jne 0x4523e0
push 0
call fcn.0049c471
mov dword [ebp - 0x7c], eax
call fcn.0049ce36
push 0xfffffffffffffffe
push eax
call fcn.0049b9d5
mov ecx, eax
shr ecx, 0x18
push ecx
mov ecx, eax
shr ecx, 0x10
movzx ecx, cl
mov dword [ebp - 0x6c], eax
push ecx
movzx eax, ax
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
mov edi, str.SELECT__s_FROM_INVOICE_WHERE_DATE_INVOICE_DATE__04d__02d__02d
push edi
push dword [ebp - 0x64]
call fcn.0044e69e
add esp, 0x24
xor ebx, ebx
test eax, eax
je 0x45233d
push dword [ebp - 0x78]
lea eax, [ebp - 0x60]
push 9
push esi
push eax
push dword [ebp - 0x64]
call fcn.0044e789
add esp, 0x14
test eax, eax
je 0x452346
cmp ebx, 0x56ce
jge 0x45233d
push dword [ebp - 0x78]
lea eax, [ebp - 0x60]
push 9
push esi
push eax
push dword [ebp - 0x64]
inc ebx
call fcn.0044e789
add esp, 0x14
test eax, eax
jne 0x45231b
cmp ebx, 2
jge 0x4523c9
call fcn.0049c471
sub eax, dword [ebp - 0x7c]
cmp eax, 0x2710
jae 0x4523c4
push 0xfffffffffffffffe
push dword [ebp - 0x6c]
call fcn.0049b9d5
mov ecx, eax
shr ecx, 0x18
push ecx
mov ecx, eax
shr ecx, 0x10
movzx ecx, cl
push ecx
movzx eax, ax
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 edi
push dword [ebp - 0x64]
call fcn.0044e69e
add esp, 0x20
xor ebx, ebx
test eax, eax
je 0x4523c4
push dword [ebp - 0x78]
lea eax, [ebp - 0x60]
push 9
push esi
push eax
push dword [ebp - 0x64]
call fcn.0044e789
add esp, 0x14
test eax, eax
je 0x4523e0
cmp ebx, 0x56ce
jge 0x4523c4
push dword [ebp - 0x78]
lea eax, [ebp - 0x60]
push 9
push esi
push eax
push dword [ebp - 0x64]
inc ebx
call fcn.0044e789
add esp, 0x14
test eax, eax
jne 0x4523a2
cmp ebx, 2
jl 0x4523e0
mov ecx, dword [ebp - 0x68]
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
mov ebx, 0x4d0100
push ebx
call fcn.0043e26c
pop ecx
pop ecx
jmp 0x4523e5
mov ebx, 0x4d0100
mov ecx, dword [ebp - 0x68]
push str.END_Invoice_Definition_Table
push ebx
call fcn.0043e26c
mov edi, dword [ebp - 0x74]
test edi, edi
pop ecx
pop ecx
je 0x452499
mov ecx, dword [ebp - 0x68]
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
call fcn.0043e26c
pop ecx
pop ecx
call fcn.0046addc
jmp 0x45247a
push dword [ebp - 0x6c]
push str.SELECT_EMPLOYEE_NUM_FIRST_NAME_LAST_NAME_FROM_EMPLOYEE_WHERE_ID_d
push dword [ebp - 0x64]
call fcn.0044e69e
add esp, 0xc
test eax, eax
je 0x452472
xor edi, edi
jmp 0x45245a
cmp edi, 0xde
jge 0x452472
test edi, edi
jne 0x452459
mov ecx, dword [ebp - 0x68]
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x6c]
push str._d_t_s_n
call fcn.0043e26c
add esp, 0xc
inc edi
push 3
push 9
push esi
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x64]
call fcn.0044e789
add esp, 0x14
test eax, eax
jne 0x452436
mov edi, dword [ebp - 0x74]
call fcn.0046ae28
test eax, eax
mov dword [ebp - 0x6c], eax
jne 0x45241b
mov ecx, dword [ebp - 0x68]
push str.End_EmpId_Conv_Table
push ebx
call fcn.0043e26c
mov esi, dword [ebp - 0x74]
pop ecx
pop ecx
call fcn.0046ab63
cmp dword [ebp - 0x80], 0
je 0x4524a8
push dword [ebp - 0x64]
call fcn.0044e459
pop ecx
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp + 0x4e0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004aaeb5
add ebp, 0x4e4
leave
ret