Function at 0x45bf79
Capabilities:
Reference sql statements
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x564
mov eax, dword [0x4d82d4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, 0x3ff
push esi
xor edi, edi
lea eax, [ebp - 0x543]
mov ebx, ecx
push edi
push eax
mov dword [ebp - 0x548], ebx
mov byte [ebp - 0x544], 0
call fcn.00401f80
push 0x3f
lea eax, [ebp - 0x43]
push edi
push eax
mov dword [ebp - 0x560], edi
mov byte [ebp - 0x44], 0
call fcn.00401f80
push 0xff
lea eax, [ebp - 0x143]
push edi
push eax
mov byte [ebp - 0x144], 0
call fcn.00401f80
add esp, 0x24
cmp ebx, edi
jne 0x45c002
push edi
call fcn.00460513
pop ecx
mov dword [ebp - 0x548], eax
mov dword [ebp - 0x564], 1
jmp 0x45c008
mov dword [ebp - 0x564], edi
cmp dword [ebp - 0x548], edi
jne 0x45c017
xor eax, eax
jmp 0x45c5b3
mov dword [ebp - 0x554], 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
cmp dword [ebp + 0xc], edi
jne 0x45c030
mov dword [ebp - 0x554], 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 - 0x554]
push 0x2c
call fcn.004389be
pop ecx
mov ecx, dword [ebp - 0x548]
lea ebx, [eax + 1]
mov dword [ebp - 0x55c], ebx
call fcn.004609e3
mov dword [ebp - 0x550], eax
cmp eax, edi
jle 0x45c072
push eax
push str._AND_INVOICE.LOC_d
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004392d1
add esp, 0x10
jmp 0x45c07a
lea eax, [ebp - 0x44]
call fcn.00438b7b
cmp byte [ebp + 0xa], 6
mov edi, 0x4a8c9f
jne 0x45c0b6
cmp byte [ebp + 0xb], 0xf
jne 0x45c0b6
mov eax, 0x7d9
cmp word [ebp + 8], ax
jne 0x45c0b6
push str.SEA223
push 0
xor ecx, ecx
call fcn.0046caea
pop ecx
push eax
call fcn.004395ea
pop ecx
pop ecx
test eax, eax
je 0x45c0b6
mov edi, str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
lea eax, [ebp - 0x144]
call fcn.00438b7b
movzx eax, byte [ebp + 0xb]
push edi
push eax
movzx eax, byte [ebp + 0xa]
push eax
movzx eax, word [ebp + 8]
push eax
push str._DATE_INVOICE.INVOICE_DATE__04d__02d__02d_s_
lea eax, [ebp - 0x144]
push 0x100
push eax
call fcn.004392d1
mov edi, dword [ebp + 0xc]
add esp, 0x1c
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x144]
push eax
push dword [ebp - 0x554]
test edi, edi
je 0x45c109
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 0x45c10e
push str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
push dword [ebp - 0x548]
call fcn.0045f780
add esp, 0x14
test eax, eax
jne 0x45c13d
cmp dword [ebp - 0x564], eax
je 0x45c010
push dword [ebp - 0x548]
call fcn.0045f66b
pop ecx
jmp 0x45c010
push str.ParseSA12.c
push 0x99b
xor ecx, ecx
call fcn.0049b040
cmp dword [ebp + 0x10], 0
pop ecx
pop ecx
mov dword [ebp - 0x54c], eax
je 0x45c1ec
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
push eax
call fcn.0049b97d
push str._InvNum__AccntNum__AccntName__InvoiceDateTime__AccntingDay__EmpNum__SalesmanNum__CashierNum__PONum__AttentionField__TaxAmnt1__TaxAmnt2__RoaDiscount__SubTotal__Total__TransType_Csh1_Chrg2_Roa3_
push dword [ebp - 0x54c]
call fcn.0049b97d
add esp, 0x14
test edi, edi
je 0x45c18e
push str.__TenderType__CheckNum
jmp 0x45c193
push str.__FILLER__FILLER
push dword [ebp - 0x54c]
call fcn.0049b97d
pop ecx
pop ecx
push str.__bIsManualTrans__bIsVoided
push dword [ebp - 0x54c]
call fcn.0049b97d
pop ecx
pop ecx
test edi, edi
je 0x45c1bd
push str.__IPC_JOURNAL_KEY
jmp 0x45c1c2
push str.__FILLER
push dword [ebp - 0x54c]
call fcn.0049b97d
pop ecx
pop ecx
test edi, edi
je 0x45c1da
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
jmp 0x45c1df
push 0x4a9914
push dword [ebp - 0x54c]
call fcn.0049b97d
pop ecx
pop ecx
test edi, edi
je 0x45c1fd
call fcn.004439f3
mov dword [ebp - 0x558], eax
jmp 0x45c204
and dword [ebp - 0x558], 0
cmp dword [ebp - 0x550], 0
lea eax, [ebp - 0x44]
jle 0x45c228
push dword [ebp - 0x550]
push str._AND_LOC_d
push 0x40
push eax
call fcn.004392d1
add esp, 0x10
jmp 0x45c22d
call fcn.00438b7b
and dword [ebp - 0x550], 0
push ebx
push 9
push esi
lea eax, [ebp - 0x544]
push eax
push dword [ebp - 0x548]
call fcn.0045f37f
add esp, 0x14
test eax, eax
je 0x45c349
cmp dword [ebp - 0x550], 0x56ce
jge 0x45c33c
lea eax, [ebp - 0x544]
push eax
push 0x4ace2c
push dword [ebp - 0x54c]
call fcn.0049b97d
add esp, 0xc
cmp dword [ebp - 0x558], 0
je 0x45c315
push 0x4bd1fc
lea eax, [ebp - 0x560]
lea ecx, [ebp - 0x544]
call fcn.004390d0
and dword [ebp - 0x554], 0
pop ecx
test ebx, ebx
jle 0x45c315
test eax, eax
je 0x45c315
cmp dword [ebp - 0x554], 5
je 0x45c2cd
cmp dword [ebp - 0x554], 6
je 0x45c2cd
cmp dword [ebp - 0x554], 7
jne 0x45c2f4
push eax
call fcn.00402c7e
mov edi, dword [ebp - 0x558]
pop ecx
mov ebx, eax
call fcn.00443b85
test eax, eax
jne 0x45c2ee
push ebx
mov ebx, edi
call fcn.004439a2
pop ecx
mov ebx, dword [ebp - 0x55c]
push 0x4bd1fc
lea eax, [ebp - 0x560]
xor ecx, ecx
call fcn.004390d0
inc dword [ebp - 0x554]
pop ecx
cmp dword [ebp - 0x554], ebx
jl 0x45c2ae
inc dword [ebp - 0x550]
push ebx
push 9
push esi
lea eax, [ebp - 0x544]
push eax
push dword [ebp - 0x548]
call fcn.0045f37f
add esp, 0x14
test eax, eax
jne 0x45c255
cmp dword [ebp - 0x550], 0
jne 0x45c4ae
push 0
call fcn.0041b82a
mov dword [ebp - 0x560], eax
call fcn.0041e298
push 0xfffffffffffffffe
push eax
call fcn.0041ce71
mov ecx, eax
shr ecx, 0x18
push ecx
mov ecx, eax
shr ecx, 0x10
movzx ecx, cl
mov dword [ebp - 0x550], 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 - 0x548]
call fcn.0045f780
add esp, 0x24
xor ebx, ebx
test eax, eax
je 0x45c3e8
push dword [ebp - 0x55c]
lea eax, [ebp - 0x544]
push 9
push esi
push eax
push dword [ebp - 0x548]
call fcn.0045f37f
add esp, 0x14
test eax, eax
je 0x45c3f1
cmp ebx, 0x56ce
jge 0x45c3e8
push dword [ebp - 0x55c]
lea eax, [ebp - 0x544]
push 9
push esi
push eax
push dword [ebp - 0x548]
inc ebx
call fcn.0045f37f
add esp, 0x14
test eax, eax
jne 0x45c3bd
cmp ebx, 2
jge 0x45c493
call fcn.0041b82a
sub eax, dword [ebp - 0x560]
cmp eax, 0x2710
jae 0x45c48e
push 0xfffffffffffffffe
push dword [ebp - 0x550]
call fcn.0041ce71
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 - 0x548]
call fcn.0045f780
add esp, 0x20
xor ebx, ebx
test eax, eax
je 0x45c48e
push dword [ebp - 0x55c]
lea eax, [ebp - 0x544]
push 9
push esi
push eax
push dword [ebp - 0x548]
call fcn.0045f37f
add esp, 0x14
test eax, eax
je 0x45c4ae
cmp ebx, 0x56ce
jge 0x45c48e
push dword [ebp - 0x55c]
lea eax, [ebp - 0x544]
push 9
push esi
push eax
push dword [ebp - 0x548]
inc ebx
call fcn.0045f37f
add esp, 0x14
test eax, eax
jne 0x45c463
cmp ebx, 2
jl 0x45c4ae
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
mov ebx, 0x4ace2c
push ebx
push dword [ebp - 0x54c]
call fcn.0049b97d
add esp, 0xc
jmp 0x45c4b3
mov ebx, 0x4ace2c
push str.END_Invoice_Definition_Table
push ebx
push dword [ebp - 0x54c]
call fcn.0049b97d
mov edi, dword [ebp - 0x558]
add esp, 0xc
test edi, edi
je 0x45c598
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
push dword [ebp - 0x54c]
call fcn.0049b97d
add esp, 0xc
call fcn.00443c19
jmp 0x45c56b
push dword [ebp - 0x550]
push str.SELECT_EMPLOYEE_NUM_FIRST_NAME_LAST_NAME_FROM_EMPLOYEE_WHERE_ID_d
push dword [ebp - 0x548]
call fcn.0045f780
add esp, 0xc
test eax, eax
je 0x45c560
xor edi, edi
jmp 0x45c542
cmp edi, 0xde
jge 0x45c560
test edi, edi
jne 0x45c541
lea eax, [ebp - 0x544]
push eax
push dword [ebp - 0x550]
push str._d_t_s_n
push dword [ebp - 0x54c]
call fcn.0049b97d
add esp, 0x10
inc edi
push 3
push 9
push esi
lea eax, [ebp - 0x544]
push eax
push dword [ebp - 0x548]
call fcn.0045f37f
add esp, 0x14
test eax, eax
jne 0x45c515
mov edi, dword [ebp - 0x558]
call fcn.00443bcc
mov dword [ebp - 0x550], eax
test eax, eax
jne 0x45c4f4
push str.End_EmpId_Conv_Table
push ebx
push dword [ebp - 0x54c]
call fcn.0049b97d
mov esi, dword [ebp - 0x558]
add esp, 0xc
call fcn.004439b6
cmp dword [ebp - 0x564], 0
je 0x45c5ad
push dword [ebp - 0x548]
call fcn.0045f66b
pop ecx
mov eax, dword [ebp - 0x54c]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401317
leave
ret