Function at 0x45151e
Capabilities:
Reference sql statements
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x4e4]
sub esp, 0x564
mov eax, dword [0x5005d0]
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.004a7110
push 0x3f
lea eax, [ebp + 0x4a1]
push edi
push eax
mov dword [ebp - 0x7c], edi
mov byte [ebp + 0x4a0], 0
call fcn.004a7110
push 0xff
lea eax, [ebp + 0x3a1]
push edi
push eax
mov byte [ebp + 0x3a0], 0
call fcn.004a7110
add esp, 0x24
cmp ebx, edi
jne 0x4515a3
push edi
call fcn.0044eba5
pop ecx
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x80], 1
jmp 0x4515a6
mov dword [ebp - 0x80], edi
cmp dword [ebp - 0x64], edi
jne 0x4515b2
xor eax, eax
jmp 0x451a70
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 0x4515c8
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.00475af5
mov ebx, eax
pop ecx
mov ecx, dword [ebp - 0x64]
inc ebx
mov dword [ebp - 0x78], ebx
call fcn.0044ee2c
cmp eax, edi
mov dword [ebp - 0x6c], eax
jle 0x451601
push eax
push str._AND_INVOICE.LOC_d
lea eax, [ebp + 0x4a0]
push 0x40
push eax
call fcn.00476e0a
add esp, 0x10
jmp 0x45160c
lea eax, [ebp + 0x4a0]
call fcn.004757d4
cmp byte [ebp + 0x4ee], 6
mov edi, 0x4c5db3
jne 0x45164e
cmp byte [ebp + 0x4ef], 0xf
jne 0x45164e
cmp word [ebp + 0x4ec], 0x7d9
jne 0x45164e
push str.SEA223
push 0
xor ecx, ecx
call fcn.0043c48b
pop ecx
push eax
call fcn.00476422
test eax, eax
pop ecx
pop ecx
je 0x45164e
mov edi, str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
lea eax, [ebp + 0x3a0]
call fcn.004757d4
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 pe_nt_image_headers32
push eax
call fcn.00476e0a
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 0x4516ad
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 0x4516b2
push str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
push dword [ebp - 0x64]
call fcn.0044dda3
add esp, 0x14
test eax, eax
jne 0x4516d8
cmp dword [ebp - 0x80], eax
je 0x4515ab
push dword [ebp - 0x64]
call fcn.0044db5e
pop ecx
jmp 0x4515ab
push str..ParseSA12.c
push 0x99b
xor ecx, ecx
call fcn.0043adaa
cmp dword [ebp + 0x4f4], 0
pop ecx
pop ecx
mov ecx, eax
mov dword [ebp - 0x68], ecx
je 0x451771
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
call fcn.0043b0f2
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.0043b0f2
mov ecx, dword [ebp - 0x68]
add esp, 0xc
test edi, edi
je 0x451726
push str.__TenderType__CheckNum
jmp 0x45172b
push str.__FILLER__FILLER
call fcn.0043b0f2
pop ecx
mov ecx, dword [ebp - 0x68]
push str.__bIsManualTrans__bIsVoided
call fcn.0043b0f2
test edi, edi
pop ecx
mov ecx, dword [ebp - 0x68]
je 0x45174d
push str.__IPC_JOURNAL_KEY
jmp 0x451752
push str.__FILLER
call fcn.0043b0f2
test edi, edi
pop ecx
mov ecx, dword [ebp - 0x68]
je 0x451766
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
jmp 0x45176b
push 0x4c723c
call fcn.0043b0f2
pop ecx
test edi, edi
je 0x45177f
call fcn.00468599
mov dword [ebp - 0x74], eax
jmp 0x451783
and dword [ebp - 0x74], 0
cmp dword [ebp - 0x6c], 0
lea eax, [ebp + 0x4a0]
jle 0x4517a4
push dword [ebp - 0x6c]
push str._AND_LOC_d
push 0x40
push eax
call fcn.00476e0a
add esp, 0x10
jmp 0x4517a9
call fcn.004757d4
and dword [ebp - 0x6c], 0
push ebx
push 9
push esi
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x64]
call fcn.0044de8e
add esp, 0x14
test eax, eax
je 0x45187e
cmp dword [ebp - 0x6c], 0x56ce
jge 0x451874
mov ecx, dword [ebp - 0x68]
lea eax, [ebp - 0x60]
push eax
push 0x4cb10c
call fcn.0043b0f2
cmp dword [ebp - 0x74], 0
pop ecx
pop ecx
je 0x451856
push 0x4c7f6c
lea eax, [ebp - 0x7c]
lea ecx, [ebp - 0x60]
call fcn.0047717c
and dword [ebp - 0x70], 0
test ebx, ebx
pop ecx
jle 0x451856
test eax, eax
je 0x451856
cmp dword [ebp - 0x70], 5
je 0x45181d
cmp dword [ebp - 0x70], 6
je 0x45181d
cmp dword [ebp - 0x70], 7
jne 0x45183e
push eax
call fcn.004a8d7f
mov edi, dword [ebp - 0x74]
pop ecx
mov ebx, eax
call fcn.00468922
test eax, eax
jne 0x45183b
push ebx
mov ebx, edi
call fcn.0046864b
pop ecx
mov ebx, dword [ebp - 0x78]
push 0x4c7f6c
lea eax, [ebp - 0x7c]
xor ecx, ecx
call fcn.0047717c
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], ebx
pop ecx
jl 0x451807
inc dword [ebp - 0x6c]
push ebx
push 9
push esi
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x64]
call fcn.0044de8e
add esp, 0x14
test eax, eax
jne 0x4517c8
cmp dword [ebp - 0x6c], 0
jne 0x4519a5
push 0
call fcn.00498efc
mov dword [ebp - 0x7c], eax
call fcn.004998bd
push 0xfffffffffffffffe
push eax
call fcn.00498460
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.0044dda3
add esp, 0x24
xor ebx, ebx
test eax, eax
je 0x451902
push dword [ebp - 0x78]
lea eax, [ebp - 0x60]
push 9
push esi
push eax
push dword [ebp - 0x64]
call fcn.0044de8e
add esp, 0x14
test eax, eax
je 0x45190b
cmp ebx, 0x56ce
jge 0x451902
push dword [ebp - 0x78]
lea eax, [ebp - 0x60]
push 9
push esi
push eax
push dword [ebp - 0x64]
inc ebx
call fcn.0044de8e
add esp, 0x14
test eax, eax
jne 0x4518e0
cmp ebx, 2
jge 0x45198e
call fcn.00498efc
sub eax, dword [ebp - 0x7c]
cmp eax, 0x2710
jae 0x451989
push 0xfffffffffffffffe
push dword [ebp - 0x6c]
call fcn.00498460
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.0044dda3
add esp, 0x20
xor ebx, ebx
test eax, eax
je 0x451989
push dword [ebp - 0x78]
lea eax, [ebp - 0x60]
push 9
push esi
push eax
push dword [ebp - 0x64]
call fcn.0044de8e
add esp, 0x14
test eax, eax
je 0x4519a5
cmp ebx, 0x56ce
jge 0x451989
push dword [ebp - 0x78]
lea eax, [ebp - 0x60]
push 9
push esi
push eax
push dword [ebp - 0x64]
inc ebx
call fcn.0044de8e
add esp, 0x14
test eax, eax
jne 0x451967
cmp ebx, 2
jl 0x4519a5
mov ecx, dword [ebp - 0x68]
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
mov ebx, 0x4cb10c
push ebx
call fcn.0043b0f2
pop ecx
pop ecx
jmp 0x4519aa
mov ebx, 0x4cb10c
mov ecx, dword [ebp - 0x68]
push str.END_Invoice_Definition_Table
push ebx
call fcn.0043b0f2
mov edi, dword [ebp - 0x74]
test edi, edi
pop ecx
pop ecx
je 0x451a5e
mov ecx, dword [ebp - 0x68]
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
call fcn.0043b0f2
pop ecx
pop ecx
call fcn.00468887
jmp 0x451a3f
push dword [ebp - 0x6c]
push str.SELECT_EMPLOYEE_NUM_FIRST_NAME_LAST_NAME_FROM_EMPLOYEE_WHERE_ID_d
push dword [ebp - 0x64]
call fcn.0044dda3
add esp, 0xc
test eax, eax
je 0x451a37
xor edi, edi
jmp 0x451a1f
cmp edi, 0xde
jge 0x451a37
test edi, edi
jne 0x451a1e
mov ecx, dword [ebp - 0x68]
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x6c]
push str._d_t_s_n
call fcn.0043b0f2
add esp, 0xc
inc edi
push 3
push 9
push esi
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x64]
call fcn.0044de8e
add esp, 0x14
test eax, eax
jne 0x4519fb
mov edi, dword [ebp - 0x74]
call fcn.004688d3
test eax, eax
mov dword [ebp - 0x6c], eax
jne 0x4519e0
mov ecx, dword [ebp - 0x68]
push str.End_EmpId_Conv_Table
push ebx
call fcn.0043b0f2
mov esi, dword [ebp - 0x74]
pop ecx
pop ecx
call fcn.0046860e
cmp dword [ebp - 0x80], 0
je 0x451a6d
push dword [ebp - 0x64]
call fcn.0044db5e
pop ecx
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp + 0x4e0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a69f5
add ebp, 0x4e4
leave
ret