Function at 0x4ce550
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5a8
mov eax, dword [0x6fb448]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x7c], 0
mov byte [ebp - 0x488], 0
push 0x3ff
push 0
lea eax, [ebp - 0x487]
push eax
call fcn.005b02a0
add esp, 0xc
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48c], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x594], 0
mov byte [ebp - 0x48], 0
push 0x3f
push 0
lea ecx, [ebp - 0x47]
push ecx
call fcn.005b02a0
add esp, 0xc
mov dword [ebp - 0x70], 0x818bf5
mov dword [ebp - 0x64], 0
mov byte [ebp - 0x590], 0
push 0xff
push 0
lea edx, [ebp - 0x58f]
push edx
call fcn.005b02a0
add esp, 0xc
cmp dword [ebp + 8], 0
jne 0x4ce657
push 0
call fcn.0040184d
add esp, 4
mov dword [ebp + 8], eax
mov dword [ebp - 0x4c], 1
jmp 0x4ce65e
mov dword [ebp - 0x4c], 0
cmp dword [ebp + 8], 0
jne 0x4ce66b
xor eax, eax
jmp 0x4ceec6
xor eax, eax
je 0x4ce6ba
push 0x6a5bf8
push 0x926
push 0
call fcn.00402a40
add esp, 0xc
mov dword [ebp - 0x58], eax
push 0x818d28
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00401ca3
add esp, 8
push 0
push 0
mov edx, dword [ebp - 0x58]
push edx
call fcn.004024aa
add esp, 0xc
push 0x4e20
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x58]
jmp 0x4ceec6
mov dword [ebp - 0x50], 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
mov dword [ebp - 0x6c], 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
cmp dword [ebp + 0x10], 0
je 0x4ce6d6
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x60], eax
jmp 0x4ce6dc
mov ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x60], ecx
push 0x2c
mov edx, dword [ebp - 0x60]
push edx
call fcn.00402987
add esp, 8
add eax, 1
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00401bdb
add esp, 4
mov dword [ebp - 0x594], eax
cmp dword [ebp - 0x594], 0
jle 0x4ce727
mov ecx, dword [ebp - 0x594]
push ecx
push str._AND_INVOICE.LOC_d
push 0x40
lea edx, [ebp - 0x48]
push edx
call fcn.00402dc9
add esp, 0x10
jmp 0x4ce733
lea eax, [ebp - 0x48]
push eax
call fcn.00402158
add esp, 4
mov dword [ebp - 0x70], 0x818bf6
movzx ecx, byte [ebp + 0xe]
cmp ecx, 6
jne 0x4ce77c
movzx edx, byte [ebp + 0xf]
cmp edx, 0xf
jne 0x4ce77c
movzx eax, word [ebp + 0xc]
cmp eax, 0x7d9
jne 0x4ce77c
push str.SEA223
push 0
push 0
call fcn.00402626
add esp, 8
push eax
call fcn.00401041
add esp, 8
test eax, eax
je 0x4ce77c
mov dword [ebp - 0x70], str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
lea ecx, [ebp - 0x590]
push ecx
call fcn.00402158
add esp, 4
cmp dword [ebp + 0x18], 0
jle 0x4ce7b0
mov edx, dword [ebp + 0x18]
push edx
push str.INVOICE.INVOICE_NUMBER_d
push 0x100
lea eax, [ebp - 0x590]
push eax
call fcn.00402dc9
add esp, 0x10
jmp 0x4ce7dc
mov ecx, dword [ebp - 0x70]
push ecx
movzx edx, byte [ebp + 0xf]
push edx
movzx eax, byte [ebp + 0xe]
push eax
movzx ecx, word [ebp + 0xc]
push ecx
push str._DATE_INVOICE.INVOICE_DATE__04d__02d__02d_s_
push 0x100
lea edx, [ebp - 0x590]
push edx
call fcn.00402dc9
add esp, 0x1c
cmp dword [ebp + 0x10], 0
je 0x4ce80a
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x590]
push ecx
mov edx, dword [ebp - 0x60]
push edx
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
mov eax, dword [ebp + 8]
push eax
call fcn.00401703
add esp, 0x14
mov dword [ebp - 0x48c], eax
jmp 0x4ce830
lea ecx, [ebp - 0x48]
push ecx
lea edx, [ebp - 0x590]
push edx
mov eax, dword [ebp - 0x60]
push eax
push str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401703
add esp, 0x14
mov dword [ebp - 0x48c], eax
cmp dword [ebp - 0x48c], 0
jne 0x4ce88b
mov edx, dword [ebp + 0x18]
push edx
movzx eax, byte [ebp + 0xf]
push eax
movzx ecx, byte [ebp + 0xe]
push ecx
movzx edx, word [ebp + 0xc]
push edx
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___FAILED.
call fcn.00401014
add esp, 0x14
cmp dword [ebp - 0x4c], 0
je 0x4ce86b
mov eax, dword [ebp + 8]
push eax
call fcn.00401a28
add esp, 4
cmp dword [ebp - 0x64], 0
je 0x4ce884
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.00401a28
add esp, 4
mov dword [ebp - 0x64], 0
xor eax, eax
jmp 0x4ceec6
push 0x6a6140
push 0x99a
push 0
call fcn.00402a40
add esp, 0xc
mov dword [ebp - 0x58], eax
cmp dword [ebp + 0x14], 0
je 0x4ce962
push 0x6a6150
push str.__s_n
mov edx, dword [ebp - 0x58]
push edx
call fcn.00401ba9
add esp, 0xc
push str._InvNum__AccntNum__AccntName__InvoiceDateTime__AccntingDay__EmpNum__SalesmanNum__CashierNum__PONum__AttentionField__TaxAmnt1__TaxAmnt2__RoaDiscount__SubTotal__Total__TransType_Csh1_Chrg2_Roa3_
mov eax, dword [ebp - 0x58]
push eax
call fcn.00401ba9
add esp, 8
cmp dword [ebp + 0x10], 0
je 0x4ce8ec
push str.__TenderType__CheckNum
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00401ba9
add esp, 8
jmp 0x4ce8fd
push str.__FILLER__FILLER
mov edx, dword [ebp - 0x58]
push edx
call fcn.00401ba9
add esp, 8
push str.__bIsManualTrans__bIsVoided
mov eax, dword [ebp - 0x58]
push eax
call fcn.00401ba9
add esp, 8
cmp dword [ebp + 0x10], 0
je 0x4ce927
push str.__IPC_JOURNAL_KEY
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00401ba9
add esp, 8
jmp 0x4ce938
push str.__FILLER
mov edx, dword [ebp - 0x58]
push edx
call fcn.00401ba9
add esp, 8
cmp dword [ebp + 0x10], 0
je 0x4ce951
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
mov eax, dword [ebp - 0x58]
push eax
call fcn.00401ba9
add esp, 8
jmp 0x4ce962
push 0x6a62ec
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00401ba9
add esp, 8
cmp dword [ebp + 0x10], 0
je 0x4ce972
call fcn.004030cb
mov dword [ebp - 0x80], eax
jmp 0x4ce979
mov dword [ebp - 0x80], 0
cmp dword [ebp - 0x594], 0
jle 0x4ce99e
mov edx, dword [ebp - 0x594]
push edx
push 0x6a62f0
push 0x40
lea eax, [ebp - 0x48]
push eax
call fcn.00402dc9
add esp, 0x10
jmp 0x4ce9aa
lea ecx, [ebp - 0x48]
push ecx
call fcn.00402158
add esp, 4
mov dword [ebp - 0x7c], 0
jmp 0x4ce9bc
mov edx, dword [ebp - 0x7c]
add edx, 1
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp - 0x5c]
push eax
push 9
push 0x3ff
lea ecx, [ebp - 0x488]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00402e6e
add esp, 0x14
test eax, eax
je 0x4cead1
cmp dword [ebp - 0x7c], 0x56ce
jl 0x4ce9fd
push str.:10:GetSybaseSA12___FAILED:_Stuck_in_a_never_ending_loop___
call fcn.00401014
add esp, 4
jmp 0x4cead1
lea eax, [ebp - 0x488]
push eax
push 0x6a6338
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00401ba9
add esp, 0xc
cmp dword [ebp - 0x80], 0
je 0x4ceabd
lea edx, [ebp - 0x88]
push edx
push 0x6a633c
lea eax, [ebp - 0x488]
push eax
call fcn.00402897
add esp, 0xc
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x68], 0
jmp 0x4cea4f
mov ecx, dword [ebp - 0x68]
add ecx, 1
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x68]
cmp edx, dword [ebp - 0x5c]
jge 0x4ceabd
cmp dword [ebp - 0x54], 0
je 0x4ceabd
cmp dword [ebp - 0x68], 5
je 0x4cea6f
cmp dword [ebp - 0x68], 6
je 0x4cea6f
cmp dword [ebp - 0x68], 7
jne 0x4ceaa2
mov eax, dword [ebp - 0x54]
push eax
call fcn.005b8c60
add esp, 4
mov dword [ebp - 0x78], eax
mov ecx, dword [ebp - 0x78]
push ecx
mov edx, dword [ebp - 0x80]
push edx
call fcn.0040151e
add esp, 8
test eax, eax
jne 0x4ceaa2
mov eax, dword [ebp - 0x78]
push eax
mov ecx, dword [ebp - 0x80]
push ecx
call fcn.00401c3f
add esp, 8
lea edx, [ebp - 0x88]
push edx
push 0x6a6340
push 0
call fcn.00402897
add esp, 0xc
mov dword [ebp - 0x54], eax
jmp 0x4cea46
mov eax, dword [ebp - 0x84]
add eax, 1
mov dword [ebp - 0x84], eax
jmp 0x4ce9b3
cmp dword [ebp - 0x7c], 0
jne 0x4ced5a
push 0
call fcn.0040323d
add esp, 4
mov dword [ebp - 0x5a0], eax
mov word [ebp - 0x59c], 0
xor ecx, ecx
mov word [ebp - 0x59a], cx
mov dword [ebp - 0x598], 0
call fcn.0040268f
mov dword [ebp - 0x59c], eax
push 0xfffffffffffffffe
mov edx, dword [ebp - 0x59c]
push edx
call fcn.00402d1f
add esp, 8
mov dword [ebp - 0x59c], eax
movzx eax, byte [ebp - 0x599]
push eax
movzx ecx, byte [ebp - 0x59a]
push ecx
movzx edx, word [ebp - 0x59c]
push edx
mov eax, dword [ebp - 0x6c]
push eax
push 0x6a6348
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401703
add esp, 0x18
mov dword [ebp - 0x48c], eax
cmp dword [ebp - 0x48c], 0
je 0x4cebb2
mov dword [ebp - 0x598], 0
jmp 0x4ceb80
mov edx, dword [ebp - 0x598]
add edx, 1
mov dword [ebp - 0x598], edx
mov eax, dword [ebp - 0x5c]
push eax
push 9
push 0x3ff
lea ecx, [ebp - 0x488]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00402e6e
add esp, 0x14
test eax, eax
je 0x4cebb0
cmp dword [ebp - 0x598], 0x56ce
jge 0x4cebb0
jmp 0x4ceb71
jmp 0x4cebbc
mov dword [ebp - 0x598], 0
cmp dword [ebp - 0x598], 2
jge 0x4cecf5
call fcn.0040323d
sub eax, dword [ebp - 0x5a0]
mov dword [ebp - 0x5a4], eax
cmp dword [ebp - 0x5a4], 0x2710
jae 0x4cebf2
mov dword [ebp - 0x5a8], str.Trying_again_2_more_days_back...
jmp 0x4cebfc
mov dword [ebp - 0x5a8], str.NOT_trying_again.
mov eax, dword [ebp - 0x5a8]
push eax
movzx ecx, byte [ebp - 0x599]
push ecx
movzx edx, byte [ebp - 0x59a]
push edx
movzx eax, word [ebp - 0x59c]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
movzx edx, byte [ebp + 0xf]
push edx
movzx eax, byte [ebp + 0xe]
push eax
movzx ecx, word [ebp + 0xc]
push ecx
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.004018ca
add esp, 0x24
cmp dword [ebp - 0x5a4], 0x2710
jae 0x4cecf5
push 0xfffffffffffffffe
mov edx, dword [ebp - 0x59c]
push edx
call fcn.00402d1f
add esp, 8
mov dword [ebp - 0x59c], eax
movzx eax, byte [ebp - 0x599]
push eax
movzx ecx, byte [ebp - 0x59a]
push ecx
movzx edx, word [ebp - 0x59c]
push edx
mov eax, dword [ebp - 0x6c]
push eax
push str.SELECT__s_FROM_INVOICE_WHERE_DATE_INVOICE_DATE__04d__02d__02d
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401703
add esp, 0x18
mov dword [ebp - 0x48c], eax
cmp dword [ebp - 0x48c], 0
je 0x4ceceb
mov dword [ebp - 0x598], 0
jmp 0x4cecb9
mov edx, dword [ebp - 0x598]
add edx, 1
mov dword [ebp - 0x598], edx
mov eax, dword [ebp - 0x5c]
push eax
push 9
push 0x3ff
lea ecx, [ebp - 0x488]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00402e6e
add esp, 0x14
test eax, eax
je 0x4cece9
cmp dword [ebp - 0x598], 0x56ce
jge 0x4cece9
jmp 0x4cecaa
jmp 0x4cecf5
mov dword [ebp - 0x598], 0
cmp dword [ebp - 0x598], 2
jl 0x4ced16
push 0x6a6488
push 0x6a64d0
mov eax, dword [ebp - 0x58]
push eax
call fcn.00401ba9
add esp, 0xc
jmp 0x4ced5a
call fcn.0040323d
sub eax, dword [ebp - 0x5a0]
push eax
movzx ecx, byte [ebp - 0x599]
push ecx
movzx edx, byte [ebp - 0x59a]
push edx
movzx eax, word [ebp - 0x59c]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
movzx edx, byte [ebp + 0xf]
push edx
movzx eax, byte [ebp + 0xe]
push eax
movzx ecx, word [ebp + 0xc]
push ecx
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.00401014
add esp, 0x24
push 0x6a6580
push 0x6a64d4
mov edx, dword [ebp - 0x58]
push edx
call fcn.00401ba9
add esp, 0xc
cmp dword [ebp - 0x80], 0
je 0x4cee98
push 0x6a65a0
push str._n_n_s_n
mov eax, dword [ebp - 0x58]
push eax
call fcn.00401ba9
add esp, 0xc
mov ecx, dword [ebp - 0x80]
push ecx
call fcn.00401d93
add esp, 4
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x78], 0
je 0x4cee6f
mov edx, dword [ebp - 0x78]
push edx
push str.SELECT_EMPLOYEE_NUM_FIRST_NAME_LAST_NAME_FROM_EMPLOYEE_WHERE_ID_d
mov eax, dword [ebp + 8]
push eax
call fcn.00401703
add esp, 0xc
mov dword [ebp - 0x48c], eax
mov dword [ebp - 0x5c], 3
cmp dword [ebp - 0x48c], 0
je 0x4cee37
mov dword [ebp - 0x74], 0
jmp 0x4cede6
mov ecx, dword [ebp - 0x74]
add ecx, 1
mov dword [ebp - 0x74], ecx
mov edx, dword [ebp - 0x5c]
push edx
push 9
push 0x3ff
lea eax, [ebp - 0x488]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00402e6e
add esp, 0x14
test eax, eax
je 0x4cee35
cmp dword [ebp - 0x74], 0xde
jge 0x4cee35
cmp dword [ebp - 0x74], 0
jne 0x4cee33
lea edx, [ebp - 0x488]
push edx
mov eax, dword [ebp - 0x78]
push eax
push str._d_t_s_n
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00401ba9
add esp, 0x10
jmp 0x4ceddd
jmp 0x4cee5b
mov edx, dword [ebp - 0x78]
push edx
mov eax, dword [ebp + 0x18]
push eax
movzx ecx, byte [ebp + 0xf]
push ecx
movzx edx, byte [ebp + 0xe]
push edx
movzx eax, word [ebp + 0xc]
push eax
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___for_empId__d_FAILED.
call fcn.00401014
add esp, 0x18
mov ecx, dword [ebp - 0x80]
push ecx
call fcn.00402ae5
add esp, 4
mov dword [ebp - 0x78], eax
jmp 0x4ced9f
push 0x6a6670
push 0x6a6688
mov edx, dword [ebp - 0x58]
push edx
call fcn.00401ba9
add esp, 0xc
mov eax, dword [ebp - 0x80]
push eax
call fcn.00401fe1
add esp, 4
mov dword [ebp - 0x80], 0
cmp dword [ebp - 0x4c], 0
je 0x4ceeaa
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401a28
add esp, 4
cmp dword [ebp - 0x64], 0
je 0x4ceec3
mov edx, dword [ebp - 0x64]
push edx
call fcn.00401a28
add esp, 4
mov dword [ebp - 0x64], 0
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b0290
mov esp, ebp
pop ebp
ret