Function at 0x488887
Capabilities:
Reference sql statements
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x580
mov eax, dword [0x5f2e68]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 0x3ff
xor edi, edi
lea eax, [ebp - 0x54b]
mov esi, ecx
push edi
push eax
mov dword [ebp - 0x554], esi
mov byte [ebp - 0x54c], 0
call fcn.005306b0
add esp, 0xc
push 0x3f
lea eax, [ebp - 0x4b]
push edi
push eax
mov dword [ebp - 0x568], edi
mov byte [ebp - 0x4c], 0
call fcn.005306b0
add esp, 0xc
push 0xff
lea eax, [ebp - 0x14b]
push edi
push eax
mov byte [ebp - 0x14c], 0
call fcn.005306b0
add esp, 0xc
cmp esi, edi
jne 0x488917
push edi
call fcn.00481c76
mov esi, eax
pop ecx
mov dword [ebp - 0x554], esi
mov dword [ebp - 0x578], 1
jmp 0x48891d
mov dword [ebp - 0x578], edi
cmp esi, edi
jne 0x488928
xor eax, eax
jmp 0x48901a
call fcn.004935a3
test eax, eax
je 0x48897a
mov eax, esi
call fcn.00480e9b
test eax, eax
jne 0x48897a
push str..ParseSA12.c
push 0x917
xor ecx, ecx
call fcn.00469183
mov esi, eax
mov eax, 0x6f3628
mov ecx, esi
call fcn.00469fc0
push edi
xor eax, eax
mov ecx, esi
call fcn.00469575
add esp, 0xc
push 0x4e20
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, esi
jmp 0x48901a
cmp dword [ebp + 0xc], edi
mov dword [ebp - 0x550], 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 0x488993
mov dword [ebp - 0x550], 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 - 0x550]
push 0x2c
call fcn.004cceb6
pop ecx
inc eax
mov ecx, esi
mov dword [ebp - 0x55c], eax
call fcn.00481fd3
cmp eax, edi
mov dword [ebp - 0x56c], eax
jle 0x4889cf
push eax
push str._AND_INVOICE.LOC_d
lea eax, [ebp - 0x4c]
push 0x40
push eax
call fcn.004ce4e5
add esp, 0x10
jmp 0x4889d7
lea eax, [ebp - 0x4c]
call fcn.004ccb8b
cmp byte [ebp + 0xa], 6
mov dword [ebp - 0x558], 0x54f4ea
jne 0x488a1b
cmp byte [ebp + 0xb], 0xf
jne 0x488a1b
cmp word [ebp + 8], 0x7d9
jne 0x488a1b
push str.SEA223
push ecx
push edi
xor ecx, ecx
call fcn.0046b0c2
pop ecx
pop ecx
push eax
call fcn.004cd9f0
test eax, eax
pop ecx
pop ecx
je 0x488a1b
mov dword [ebp - 0x558], str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
lea eax, [ebp - 0x14c]
call fcn.004ccb8b
push dword [ebp - 0x558]
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 [ebp - 0x574], edi
mov dword [ebp - 0x570], ebx
mov dword [ebp - 0x57c], esi
call fcn.004ce4e5
add esp, 0x1c
cmp dword [ebp + 0xc], 0
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 0x550]
je 0x488a7e
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 0x488a83
push str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
push dword [ebp - 0x554]
call fcn.00480b29
add esp, 0x14
test eax, eax
jne 0x488ac4
push eax
push edi
push ebx
push esi
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___FAILED.
call fcn.0042b70b
add esp, 0x14
cmp dword [ebp - 0x578], 0
je 0x488921
push dword [ebp - 0x554]
call fcn.0048073c
pop ecx
jmp 0x488921
push str..ParseSA12.c
push 0x98b
xor ecx, ecx
call fcn.00469183
xor esi, esi
cmp dword [ebp + 0x10], esi
pop ecx
mov ebx, eax
pop ecx
mov dword [ebp - 0x564], ebx
je 0x488b5e
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
mov ecx, ebx
call fcn.00469631
push str._InvNum__AccntNum__AccntName__InvoiceDateTime__AccntingDay__EmpNum__SalesmanNum__CashierNum__PONum__AttentionField__TaxAmnt1__TaxAmnt2__RoaDiscount__SubTotal__Total__TransType_Csh1_Chrg2_Roa3_
mov ecx, ebx
call fcn.00469631
add esp, 0xc
cmp dword [ebp + 0xc], esi
mov ecx, ebx
je 0x488b14
push str.__TenderType__CheckNum
jmp 0x488b19
push str.__FILLER__FILLER
call fcn.00469631
pop ecx
push str.__bIsManualTrans__bIsVoided
mov ecx, ebx
call fcn.00469631
cmp dword [ebp + 0xc], esi
pop ecx
mov ecx, ebx
je 0x488b3a
push str.__IPC_JOURNAL_KEY
jmp 0x488b3f
push str.__FILLER
call fcn.00469631
cmp dword [ebp + 0xc], esi
pop ecx
mov ecx, ebx
je 0x488b53
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
jmp 0x488b58
push 0x54f250
call fcn.00469631
pop ecx
cmp dword [ebp + 0xc], esi
je 0x488b70
call fcn.004b2094
mov dword [ebp - 0x560], eax
jmp 0x488b76
mov dword [ebp - 0x560], esi
cmp dword [ebp - 0x56c], esi
lea eax, [ebp - 0x4c]
jle 0x488b99
push dword [ebp - 0x56c]
push str._AND_LOC_d
push 0x40
push eax
call fcn.004ce4e5
add esp, 0x10
jmp 0x488b9e
call fcn.004ccb8b
push dword [ebp - 0x55c]
mov dword [ebp - 0x550], esi
push 9
mov esi, 0x3ff
push esi
lea eax, [ebp - 0x54c]
push eax
push dword [ebp - 0x554]
call fcn.00480c24
add esp, 0x14
test eax, eax
je 0x488cdc
mov edi, 0x54fb24
cmp dword [ebp - 0x550], 0x56ce
jge 0x488cc4
lea eax, [ebp - 0x54c]
push eax
push 0x553960
mov ecx, ebx
call fcn.00469631
cmp dword [ebp - 0x560], 0
pop ecx
pop ecx
je 0x488c96
push edi
lea eax, [ebp - 0x568]
lea ecx, [ebp - 0x54c]
call fcn.004ce974
and dword [ebp - 0x558], 0
cmp dword [ebp - 0x55c], 0
pop ecx
jle 0x488c96
test eax, eax
je 0x488c96
cmp dword [ebp - 0x558], 5
je 0x488c48
cmp dword [ebp - 0x558], 6
je 0x488c48
cmp dword [ebp - 0x558], 7
jne 0x488c6d
push eax
call fcn.005317e2
mov ebx, eax
mov eax, dword [ebp - 0x560]
pop ecx
call fcn.004b250c
test eax, eax
jne 0x488c6d
mov eax, dword [ebp - 0x560]
push ebx
call fcn.004b218d
pop ecx
push edi
lea eax, [ebp - 0x568]
xor ecx, ecx
call fcn.004ce974
inc dword [ebp - 0x558]
mov ebx, dword [ebp - 0x564]
pop ecx
mov ecx, dword [ebp - 0x558]
cmp ecx, dword [ebp - 0x55c]
jl 0x488c29
push dword [ebp - 0x55c]
inc dword [ebp - 0x550]
push 9
push esi
lea eax, [ebp - 0x54c]
push eax
push dword [ebp - 0x554]
call fcn.00480c24
add esp, 0x14
test eax, eax
jne 0x488bd4
jmp 0x488ccf
push str.:10:GetSybaseSA12___FAILED:_Stuck_in_a_never_ending_loop___
call fcn.0042b70b
pop ecx
cmp dword [ebp - 0x550], 0
jne 0x488eec
push 0
call fcn.004fa8e4
pop ecx
mov dword [ebp - 0x568], eax
call fcn.004fb8ff
push 0xfffffffffffffffe
push eax
call fcn.004f9beb
movzx ebx, ax
mov ecx, eax
mov dword [ebp - 0x550], 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 [ebp - 0x554]
call fcn.00480b29
and dword [ebp - 0x558], 0
add esp, 0x20
test eax, eax
je 0x488d88
push dword [ebp - 0x55c]
lea eax, [ebp - 0x54c]
push 9
push esi
push eax
push dword [ebp - 0x554]
call fcn.00480c24
add esp, 0x14
test eax, eax
je 0x488d95
cmp dword [ebp - 0x558], 0x56ce
jge 0x488d88
push dword [ebp - 0x55c]
inc dword [ebp - 0x558]
push 9
push esi
lea eax, [ebp - 0x54c]
push eax
push dword [ebp - 0x554]
call fcn.00480c24
add esp, 0x14
test eax, eax
jne 0x488d54
cmp dword [ebp - 0x558], 2
jge 0x488e95
call fcn.004fa8e4
sub eax, dword [ebp - 0x568]
mov esi, 0x2710
mov dword [ebp - 0x56c], eax
cmp eax, esi
mov eax, str.Trying_again_2_more_days_back...
jb 0x488db9
mov eax, str.NOT_trying_again.
push eax
movzx eax, byte [ebp - 0x54d]
push eax
movzx eax, byte [ebp - 0x54e]
push eax
push ebx
push 0
push dword [ebp - 0x574]
push dword [ebp - 0x570]
push dword [ebp - 0x57c]
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.0042bd38
add esp, 0x24
cmp dword [ebp - 0x56c], esi
jae 0x488e8a
push 0xfffffffffffffffe
push dword [ebp - 0x550]
call fcn.004f9beb
movzx ebx, ax
mov ecx, eax
mov dword [ebp - 0x550], 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 [ebp - 0x554]
call fcn.00480b29
add esp, 0x20
xor edi, edi
test eax, eax
je 0x488e90
push dword [ebp - 0x55c]
mov esi, 0x3ff
push 9
push esi
lea eax, [ebp - 0x54c]
push eax
push dword [ebp - 0x554]
call fcn.00480c24
add esp, 0x14
test eax, eax
je 0x488eae
cmp edi, 0x56ce
jge 0x488e90
push dword [ebp - 0x55c]
lea eax, [ebp - 0x54c]
push 9
push esi
push eax
push dword [ebp - 0x554]
inc edi
call fcn.00480c24
add esp, 0x14
test eax, eax
jne 0x488e5d
jmp 0x488e90
mov edi, dword [ebp - 0x558]
cmp edi, 2
jl 0x488eae
mov ecx, dword [ebp - 0x564]
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
push 0x553960
call fcn.00469631
pop ecx
pop ecx
jmp 0x488eec
call fcn.004fa8e4
sub eax, dword [ebp - 0x568]
push eax
movzx eax, byte [ebp - 0x54d]
push eax
movzx eax, byte [ebp - 0x54e]
push eax
push ebx
push 0
push dword [ebp - 0x574]
push dword [ebp - 0x570]
push dword [ebp - 0x57c]
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.0042b70b
add esp, 0x24
mov ecx, dword [ebp - 0x564]
push str.END_Invoice_Definition_Table
push 0x553960
call fcn.00469631
cmp dword [ebp - 0x560], 0
pop ecx
pop ecx
je 0x488fff
mov ecx, dword [ebp - 0x564]
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
call fcn.00469631
mov esi, dword [ebp - 0x560]
pop ecx
pop ecx
call fcn.004b2448
mov ebx, eax
test ebx, ebx
je 0x488fdc
mov edi, 0x3ff
push ebx
push str.SELECT_EMPLOYEE_NUM_FIRST_NAME_LAST_NAME_FROM_EMPLOYEE_WHERE_ID_d
push dword [ebp - 0x554]
call fcn.00480b29
add esp, 0xc
test eax, eax
je 0x488fa5
xor esi, esi
jmp 0x488f85
cmp esi, 0xde
jge 0x488fc7
test esi, esi
jne 0x488f84
mov ecx, dword [ebp - 0x564]
lea eax, [ebp - 0x54c]
push eax
push ebx
push str._d_t_s_n
call fcn.00469631
add esp, 0xc
inc esi
push 3
push 9
push edi
lea eax, [ebp - 0x54c]
push eax
push dword [ebp - 0x554]
call fcn.00480c24
add esp, 0x14
test eax, eax
jne 0x488f5d
jmp 0x488fc7
push ebx
push 0
push dword [ebp - 0x574]
push dword [ebp - 0x570]
push dword [ebp - 0x57c]
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___for_empId__d_FAILED.
call fcn.0042b70b
add esp, 0x18
mov esi, dword [ebp - 0x560]
call fcn.004b24a9
mov ebx, eax
test ebx, ebx
jne 0x488f41
mov ecx, dword [ebp - 0x564]
push str.End_EmpId_Conv_Table
push 0x553960
call fcn.00469631
push dword [ebp - 0x560]
call fcn.004b2137
add esp, 0xc
cmp dword [ebp - 0x578], 0
je 0x489014
push dword [ebp - 0x554]
call fcn.0048073c
pop ecx
mov eax, dword [ebp - 0x564]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005317e7
leave
ret