Function at 0x45709b
Capabilities:
Reference sql statements
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x57c
mov eax, dword [0x5385d0]
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.004b7880
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.004b7880
add esp, 0xc
push 0xff
lea eax, [esp + 0x85]
push esi
push eax
mov byte [esp + 0x8c], 0
call fcn.004b7880
add esp, 0xc
cmp edi, esi
jne 0x45712e
push esi
call fcn.0045412c
pop ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x3c], 1
jmp 0x457132
mov dword [esp + 0x3c], esi
cmp dword [esp + 0x10], esi
jne 0x45713f
xor eax, eax
jmp 0x457729
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 0x457154
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.0047ee53
pop ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esp + 0x20], eax
call fcn.0045440b
cmp eax, esi
mov dword [esp + 0x2c], eax
jle 0x45718d
push eax
push str._AND_INVOICE.LOC_d
lea eax, [esp + 0x48]
push 0x40
push eax
call fcn.00480225
add esp, 0x10
jmp 0x457196
lea eax, [esp + 0x40]
call fcn.0047eb32
cmp byte [ebp + 0xa], 6
mov dword [esp + 0x18], 0x4d8137
jne 0x4571d6
cmp byte [ebp + 0xb], 0xf
jne 0x4571d6
cmp word [ebp + 8], 0x7d9
jne 0x4571d6
push str.SEA223
push ecx
push esi
xor ecx, ecx
call fcn.0044249a
pop ecx
pop ecx
push eax
call fcn.0047f83d
test eax, eax
pop ecx
pop ecx
je 0x4571d6
mov dword [esp + 0x18], str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
lea eax, [esp + 0x80]
call fcn.0047eb32
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.00480225
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 0x457232
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 0x457237
push str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
push dword [esp + 0x20]
call fcn.00453375
add esp, 0x14
test eax, eax
jne 0x457272
push eax
push edi
push ebx
push esi
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___FAILED.
call fcn.00418e96
add esp, 0x14
cmp dword [esp + 0x3c], 0
je 0x457138
push dword [esp + 0x10]
call fcn.00452f92
pop ecx
jmp 0x457138
push str..ParseSA12.c
push 0x99b
xor ecx, ecx
call fcn.00440fd2
xor edi, edi
cmp dword [ebp + 0x10], edi
pop ecx
mov esi, eax
pop ecx
mov dword [esp + 0x24], esi
je 0x45730a
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
mov ecx, esi
call fcn.0044137c
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.0044137c
add esp, 0xc
cmp dword [ebp + 0xc], edi
mov ecx, esi
je 0x4572c0
push str.__TenderType__CheckNum
jmp 0x4572c5
push str.__FILLER__FILLER
call fcn.0044137c
pop ecx
push str.__bIsManualTrans__bIsVoided
mov ecx, esi
call fcn.0044137c
cmp dword [ebp + 0xc], edi
pop ecx
mov ecx, esi
je 0x4572e6
push str.__IPC_JOURNAL_KEY
jmp 0x4572eb
push str.__FILLER
call fcn.0044137c
cmp dword [ebp + 0xc], edi
pop ecx
mov ecx, esi
je 0x4572ff
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
jmp 0x457304
push 0x4da17c
call fcn.0044137c
pop ecx
cmp dword [ebp + 0xc], edi
je 0x45731a
call fcn.00471551
mov dword [esp + 0x1c], eax
jmp 0x45731e
mov dword [esp + 0x1c], edi
cmp dword [esp + 0x2c], edi
lea eax, [esp + 0x40]
jle 0x45733e
push dword [esp + 0x2c]
push str._AND_LOC_d
push 0x40
push eax
call fcn.00480225
add esp, 0x10
jmp 0x457343
call fcn.0047eb32
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.00453475
add esp, 0x14
test eax, eax
je 0x457445
mov esi, 0x4dc058
cmp dword [esp + 0x14], 0x56ce
jge 0x45742f
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x180]
push eax
push 0x4e4f8c
call fcn.0044137c
cmp dword [esp + 0x24], 0
pop ecx
pop ecx
je 0x457402
push esi
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x184]
call fcn.00480650
xor edi, edi
cmp dword [esp + 0x24], edi
pop ecx
jle 0x457402
test eax, eax
je 0x457402
cmp edi, 5
je 0x4573cd
cmp edi, 6
je 0x4573cd
cmp edi, 7
jne 0x4573ee
push eax
call fcn.004b8944
mov ebx, eax
mov eax, dword [esp + 0x20]
pop ecx
call fcn.004719b9
test eax, eax
jne 0x4573ee
mov eax, dword [esp + 0x1c]
push ebx
call fcn.0047163a
pop ecx
push esi
lea eax, [esp + 0x2c]
xor ecx, ecx
call fcn.00480650
inc edi
cmp edi, dword [esp + 0x24]
pop ecx
jl 0x4573ba
push dword [esp + 0x20]
inc dword [esp + 0x18]
push 9
push 0x3ff
lea eax, [esp + 0x18c]
push eax
push dword [esp + 0x20]
call fcn.00453475
add esp, 0x14
test eax, eax
jne 0x457373
jmp 0x45743a
push str.:10:GetSybaseSA12___FAILED:_Stuck_in_a_never_ending_loop___
call fcn.00418e96
pop ecx
cmp dword [esp + 0x14], 0
jne 0x45761a
xor esi, esi
push esi
call fcn.004a6bcb
pop ecx
mov dword [esp + 0x28], eax
call fcn.004a77bc
push 0xfffffffffffffffe
push eax
call fcn.004a60c6
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.00453375
add esp, 0x20
test eax, eax
mov dword [esp + 0x18], esi
je 0x4574e4
push dword [esp + 0x20]
mov esi, 0x3ff
push 9
push esi
lea eax, [esp + 0x18c]
push eax
push dword [esp + 0x20]
call fcn.00453475
add esp, 0x14
test eax, eax
je 0x4574ef
cmp dword [esp + 0x18], 0x56ce
jge 0x4574e4
push dword [esp + 0x20]
inc dword [esp + 0x1c]
push 9
push esi
lea eax, [esp + 0x18c]
push eax
push dword [esp + 0x20]
call fcn.00453475
add esp, 0x14
test eax, eax
jne 0x4574b7
cmp dword [esp + 0x18], 2
jge 0x4575d1
call fcn.004a6bcb
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 0x45750f
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.0041936e
add esp, 0x24
cmp dword [esp + 0x2c], esi
jae 0x4575c8
push 0xfffffffffffffffe
push dword [esp + 0x18]
call fcn.004a60c6
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.00453375
add esp, 0x20
xor edi, edi
test eax, eax
je 0x4575cc
push dword [esp + 0x20]
mov esi, 0x3ff
push 9
push esi
lea eax, [esp + 0x18c]
push eax
push dword [esp + 0x20]
call fcn.00453475
add esp, 0x14
test eax, eax
je 0x4575e8
cmp edi, 0x56ce
jge 0x4575cc
push dword [esp + 0x20]
lea eax, [esp + 0x184]
push 9
push esi
push eax
push dword [esp + 0x20]
inc edi
call fcn.00453475
add esp, 0x14
test eax, eax
jne 0x45759e
jmp 0x4575cc
mov edi, dword [esp + 0x18]
cmp edi, 2
jl 0x4575e8
mov ecx, dword [esp + 0x24]
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
push 0x4e4f8c
call fcn.0044137c
pop ecx
pop ecx
jmp 0x45761a
call fcn.004a6bcb
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.00418e96
add esp, 0x24
mov ecx, dword [esp + 0x24]
push str.END_Invoice_Definition_Table
push 0x4e4f8c
call fcn.0044137c
cmp dword [esp + 0x24], 0
pop ecx
pop ecx
je 0x457714
mov ecx, dword [esp + 0x24]
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
call fcn.0044137c
mov esi, dword [esp + 0x24]
pop ecx
pop ecx
call fcn.004718f5
mov ebx, eax
test ebx, ebx
je 0x4576f6
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.00453375
add esp, 0xc
test eax, eax
je 0x4576c7
xor esi, esi
jmp 0x4576a8
cmp esi, 0xde
jge 0x4576e3
test esi, esi
jne 0x4576a7
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x180]
push eax
push ebx
push str._d_t_s_n
call fcn.0044137c
add esp, 0xc
inc esi
push 3
push 9
push edi
lea eax, [esp + 0x18c]
push eax
push dword [esp + 0x20]
call fcn.00453475
add esp, 0x14
test eax, eax
jne 0x457681
jmp 0x4576e3
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.00418e96
add esp, 0x18
mov esi, dword [esp + 0x1c]
call fcn.00471956
mov ebx, eax
test ebx, ebx
jne 0x457667
mov ecx, dword [esp + 0x24]
push str.End_EmpId_Conv_Table
push 0x4e4f8c
call fcn.0044137c
mov edi, dword [esp + 0x24]
pop ecx
pop ecx
call fcn.004715f4
cmp dword [esp + 0x3c], 0
je 0x457725
push dword [esp + 0x10]
call fcn.00452f92
pop ecx
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x584]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004b7140
mov esp, ebp
pop ebp
ret