Function at 0x481b54
Capabilities:
Reference sql statements

Disassembly:
jmp 0x481b54
push ebp
lea ebp, [esp - 0x4f4]
sub esp, 0x574
mov eax, dword [0x6294a0]
xor eax, ebp
mov dword [ebp + 0x4f0], eax
push ebx
push esi
mov esi, dword [ebp + 0x4fc]
push edi
mov ebx, 0x3ff
push ebx
xor edi, edi
lea eax, [ebp - 0x4f]
push edi
push eax
mov dword [ebp - 0x58], esi
mov byte [ebp - 0x50], 0
call fcn.00508d00
push 0x3f
lea eax, [ebp + 0x4b1]
push edi
push eax
mov dword [ebp - 0x74], edi
mov byte [ebp + 0x4b0], 0
call fcn.00508d00
push 0xff
lea eax, [ebp + 0x3b1]
push edi
push eax
mov byte [ebp + 0x3b0], 0
call fcn.00508d00
add esp, 0x24
cmp esi, edi
jne 0x481bdf
push edi
call fcn.00402527
mov esi, eax
pop ecx
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x70], 1
jmp 0x481be2
mov dword [ebp - 0x70], edi
cmp esi, edi
jne 0x481bed
xor eax, eax
jmp 0x482218
cmp dword [ebp + 0x504], edi
mov dword [ebp - 0x54], 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 0x481c03
mov dword [ebp - 0x54], 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 0x2c
push dword [ebp - 0x54]
call fcn.00402bdf
mov edi, eax
inc edi
push esi
mov dword [ebp - 0x6c], edi
call fcn.004026c1
add esp, 0xc
test eax, eax
mov dword [ebp - 0x60], eax
jle 0x481c3c
push eax
push str._AND_INVOICE.LOC_d
lea eax, [ebp + 0x4b0]
push 0x40
push eax
call fcn.00402dbf
add esp, 0x10
jmp 0x481c49
lea eax, [ebp + 0x4b0]
push eax
call fcn.00401ff5
pop ecx
cmp byte [ebp + 0x502], 6
mov esi, 0x587a02
jne 0x481c8c
cmp byte [ebp + 0x503], 0xf
jne 0x481c8c
cmp word [ebp + 0x500], 0x7d9
jne 0x481c8c
push str.SEA223
push 0
push 0
call fcn.0040188e
pop ecx
pop ecx
push eax
call fcn.004020db
test eax, eax
pop ecx
pop ecx
je 0x481c8c
mov esi, str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
lea eax, [ebp + 0x3b0]
push eax
call fcn.00401ff5
cmp dword [ebp + 0x50c], 0
pop ecx
jle 0x481cc3
push dword [ebp + 0x50c]
lea eax, [ebp + 0x3b0]
push str.INVOICE.INVOICE_NUMBER_d
push pe_nt_image_headers32
push eax
call fcn.00402dbf
add esp, 0x10
jmp 0x481cf5
movzx eax, byte [ebp + 0x503]
push esi
push eax
movzx eax, byte [ebp + 0x502]
push eax
movzx eax, word [ebp + 0x500]
push eax
push str._DATE_INVOICE.INVOICE_DATE__04d__02d__02d_s_
lea eax, [ebp + 0x3b0]
push pe_nt_image_headers32
push eax
call fcn.00402dbf
add esp, 0x1c
cmp dword [ebp + 0x504], 0
lea eax, [ebp + 0x4b0]
push eax
lea eax, [ebp + 0x3b0]
push eax
push dword [ebp - 0x54]
je 0x481d16
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 0x481d1b
push str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
push dword [ebp - 0x58]
call fcn.0040245f
add esp, 0x14
test eax, eax
jne 0x481d6d
push dword [ebp + 0x50c]
movzx eax, byte [ebp + 0x503]
push eax
movzx eax, byte [ebp + 0x502]
push eax
movzx eax, word [ebp + 0x500]
push eax
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___FAILED.
call fcn.004020c2
add esp, 0x14
cmp dword [ebp - 0x70], 0
je 0x481be6
push dword [ebp - 0x58]
call fcn.0040141f
pop ecx
jmp 0x481be6
push str..ParseSA12.c
push 0x99a
push 0
call fcn.00401a9b
add esp, 0xc
cmp dword [ebp + 0x508], 0
mov esi, eax
mov dword [ebp - 0x68], esi
je 0x481e15
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
push esi
call fcn.004014f6
push str._InvNum__AccntNum__AccntName__InvoiceDateTime__AccntingDay__EmpNum__SalesmanNum__CashierNum__PONum__AttentionField__TaxAmnt1__TaxAmnt2__RoaDiscount__SubTotal__Total__TransType_Csh1_Chrg2_Roa3_
push esi
call fcn.004014f6
add esp, 0x14
cmp dword [ebp + 0x504], 0
je 0x481dc1
push str.__TenderType__CheckNum
jmp 0x481dc6
push str.__FILLER__FILLER
push esi
call fcn.004014f6
pop ecx
pop ecx
push str.__bIsManualTrans__bIsVoided
push esi
call fcn.004014f6
cmp dword [ebp + 0x504], 0
pop ecx
pop ecx
je 0x481deb
push str.__IPC_JOURNAL_KEY
jmp 0x481df0
push str.__FILLER
push esi
call fcn.004014f6
cmp dword [ebp + 0x504], 0
pop ecx
pop ecx
je 0x481e08
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
jmp 0x481e0d
push 0x5871e0
push esi
call fcn.004014f6
pop ecx
pop ecx
xor esi, esi
cmp dword [ebp + 0x504], esi
je 0x481e29
call fcn.00402f4f
mov dword [ebp - 0x64], eax
jmp 0x481e2c
mov dword [ebp - 0x64], esi
cmp dword [ebp - 0x60], esi
lea eax, [ebp + 0x4b0]
jle 0x481e4c
push dword [ebp - 0x60]
push str._AND_LOC_d
push 0x40
push eax
call fcn.00402dbf
add esp, 0x10
jmp 0x481e53
push eax
call fcn.00401ff5
pop ecx
and dword [ebp - 0x60], 0
push edi
push 9
push ebx
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x58]
call fcn.00401ce4
add esp, 0x14
test eax, eax
mov esi, 0x599e94
je 0x481f47
mov edi, 0x58af30
cmp dword [ebp - 0x60], 0x56ce
jge 0x481f32
lea eax, [ebp - 0x50]
push eax
push esi
push dword [ebp - 0x68]
call fcn.004014f6
add esp, 0xc
cmp dword [ebp - 0x64], 0
je 0x481f10
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x50]
push edi
push eax
call fcn.004019d3
and dword [ebp - 0x5c], 0
add esp, 0xc
cmp dword [ebp - 0x6c], 0
jle 0x481f10
test eax, eax
je 0x481f10
cmp dword [ebp - 0x5c], 5
je 0x481ed0
cmp dword [ebp - 0x5c], 6
je 0x481ed0
cmp dword [ebp - 0x5c], 7
jne 0x481ef6
push eax
call fcn.00510980
push eax
push dword [ebp - 0x64]
mov dword [ebp - 0x54], eax
call fcn.0040236f
add esp, 0xc
test eax, eax
jne 0x481ef6
push dword [ebp - 0x54]
push dword [ebp - 0x64]
call fcn.0040153c
pop ecx
pop ecx
lea eax, [ebp - 0x74]
push eax
push edi
push 0
call fcn.004019d3
add esp, 0xc
inc dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x5c]
cmp ecx, dword [ebp - 0x6c]
jl 0x481eba
push dword [ebp - 0x6c]
inc dword [ebp - 0x60]
push 9
push ebx
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x58]
call fcn.00401ce4
add esp, 0x14
test eax, eax
jne 0x481e7c
jmp 0x481f3d
push str.:10:GetSybaseSA12___FAILED:_Stuck_in_a_never_ending_loop___
call fcn.004020c2
pop ecx
cmp dword [ebp - 0x60], 0
jne 0x482115
xor esi, esi
push esi
call fcn.00401e97
mov dword [ebp - 0x78], eax
call fcn.00402a63
push 0xfffffffffffffffe
push eax
call fcn.00401c35
movzx edi, ax
mov ecx, eax
mov dword [ebp - 0x54], eax
shr eax, 0x10
shr ecx, 0x18
push ecx
movzx eax, al
push eax
push edi
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 str.SELECT__s_FROM_INVOICE_WHERE_DATE_INVOICE_DATE__04d__02d__02d
push dword [ebp - 0x58]
call fcn.0040245f
add esp, 0x24
test eax, eax
mov dword [ebp - 0x5c], esi
je 0x481fcd
push dword [ebp - 0x6c]
lea eax, [ebp - 0x50]
push 9
push ebx
push eax
push dword [ebp - 0x58]
call fcn.00401ce4
add esp, 0x14
test eax, eax
je 0x481fd7
cmp dword [ebp - 0x5c], 0x56ce
jge 0x481fcd
push dword [ebp - 0x6c]
inc dword [ebp - 0x5c]
push 9
push ebx
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x58]
call fcn.00401ce4
add esp, 0x14
test eax, eax
jne 0x481fa8
cmp dword [ebp - 0x5c], 2
jge 0x4820be
call fcn.00401e97
mov ebx, eax
sub ebx, dword [ebp - 0x78]
mov esi, 0x2710
cmp ebx, esi
mov dword [ebp - 0x60], str.Trying_again_2_more_days_back...
jb 0x481ff8
mov dword [ebp - 0x60], str.NOT_trying_again.
push dword [ebp - 0x60]
movzx edx, byte [ebp - 0x51]
movzx eax, byte [ebp + 0x503]
movzx ecx, byte [ebp + 0x502]
push edx
movzx edx, byte [ebp - 0x52]
push edx
push edi
push dword [ebp + 0x50c]
mov dword [ebp - 0x80], eax
push eax
movzx eax, word [ebp + 0x500]
push ecx
push eax
push str.:2:GetSybaseSA12__04d__02d__02d___d_EAP:_An_empty_invoice_set_was_parsed_for_prev_day_attempt_1__04d__02d__02d:__s
mov dword [ebp - 0x7c], ecx
call fcn.00401375
add esp, 0x24
cmp ebx, esi
jae 0x4820b6
push 0xfffffffffffffffe
push dword [ebp - 0x54]
call fcn.00401c35
movzx edi, ax
mov ecx, eax
mov dword [ebp - 0x54], eax
shr eax, 0x10
shr ecx, 0x18
push ecx
movzx eax, al
push eax
push edi
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 str.SELECT__s_FROM_INVOICE_WHERE_DATE_INVOICE_DATE__04d__02d__02d
push dword [ebp - 0x58]
call fcn.0040245f
add esp, 0x20
xor ebx, ebx
test eax, eax
je 0x4820b9
push dword [ebp - 0x6c]
mov esi, 0x3ff
push 9
push esi
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x58]
call fcn.00401ce4
add esp, 0x14
test eax, eax
je 0x4820d6
cmp ebx, 0x56ce
jge 0x4820b9
push dword [ebp - 0x6c]
lea eax, [ebp - 0x50]
push 9
push esi
push eax
push dword [ebp - 0x58]
inc ebx
call fcn.00401ce4
add esp, 0x14
test eax, eax
jne 0x482092
jmp 0x4820b9
mov ebx, dword [ebp - 0x5c]
cmp ebx, 2
jl 0x4820d6
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
mov esi, 0x599e94
push esi
push dword [ebp - 0x68]
call fcn.004014f6
add esp, 0xc
jmp 0x482110
call fcn.00401e97
sub eax, dword [ebp - 0x78]
push eax
movzx eax, byte [ebp - 0x51]
push eax
movzx eax, byte [ebp - 0x52]
push eax
movzx eax, word [ebp + 0x500]
push edi
push dword [ebp + 0x50c]
push dword [ebp - 0x80]
push dword [ebp - 0x7c]
push eax
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.004020c2
add esp, 0x24
mov esi, 0x599e94
mov ebx, 0x3ff
push str.END_Invoice_Definition_Table
push esi
push dword [ebp - 0x68]
call fcn.004014f6
add esp, 0xc
cmp dword [ebp - 0x64], 0
je 0x482206
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
push dword [ebp - 0x68]
call fcn.004014f6
push dword [ebp - 0x64]
call fcn.00402798
add esp, 0x10
jmp 0x4821e2
push dword [ebp - 0x54]
push str.SELECT_EMPLOYEE_NUM_FIRST_NAME_LAST_NAME_FROM_EMPLOYEE_WHERE_ID_d
push dword [ebp - 0x58]
call fcn.0040245f
add esp, 0xc
test eax, eax
je 0x4821ab
xor edi, edi
jmp 0x482191
cmp edi, 0xde
jge 0x4821d9
test edi, edi
jne 0x482190
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x54]
push str._d_t_s_n
push dword [ebp - 0x68]
call fcn.004014f6
add esp, 0x10
inc edi
push 3
push 9
push ebx
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x58]
call fcn.00401ce4
add esp, 0x14
test eax, eax
jne 0x48216d
jmp 0x4821d9
push dword [ebp - 0x54]
movzx eax, byte [ebp + 0x503]
push dword [ebp + 0x50c]
push eax
movzx eax, byte [ebp + 0x502]
push eax
movzx eax, word [ebp + 0x500]
push eax
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___for_empId__d_FAILED.
call fcn.004020c2
add esp, 0x18
push dword [ebp - 0x64]
call fcn.00401aff
pop ecx
test eax, eax
mov dword [ebp - 0x54], eax
jne 0x482152
push str.End_EmpId_Conv_Table
push esi
push dword [ebp - 0x68]
call fcn.004014f6
push dword [ebp - 0x64]
call fcn.00401672
add esp, 0x10
cmp dword [ebp - 0x70], 0
je 0x482215
push dword [ebp - 0x58]
call fcn.0040141f
pop ecx
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp + 0x4f0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00508cf0
add ebp, 0x4f4
leave
ret