Function at 0x47fb80
Capabilities:
Reference sql statements
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x580
mov eax, dword [0x5c4e68]
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.005117f0
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.005117f0
add esp, 0xc
push 0xff
lea eax, [ebp - 0x14b]
push edi
push eax
mov byte [ebp - 0x14c], 0
call fcn.005117f0
add esp, 0xc
cmp esi, edi
jne 0x47fc10
push edi
call fcn.00478fbd
mov esi, eax
pop ecx
mov dword [ebp - 0x554], esi
mov dword [ebp - 0x578], 1
jmp 0x47fc16
mov dword [ebp - 0x578], edi
cmp esi, edi
jne 0x47fc21
xor eax, eax
jmp 0x480313
call fcn.0048a53c
test eax, eax
je 0x47fc73
mov eax, esi
call fcn.00478270
test eax, eax
jne 0x47fc73
push str..ParseSA12.c
push 0x927
xor ecx, ecx
call fcn.0046091b
mov esi, eax
mov eax, 0x6c55e0
mov ecx, esi
call fcn.00461666
push edi
xor eax, eax
mov ecx, esi
call fcn.00460cfe
add esp, 0xc
push 0x4e20
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, esi
jmp 0x480313
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 0x47fc8c
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.004c3ddd
pop ecx
inc eax
mov ecx, esi
mov dword [ebp - 0x55c], eax
call fcn.0047931a
cmp eax, edi
mov dword [ebp - 0x56c], eax
jle 0x47fcc8
push eax
push str._AND_INVOICE.LOC_d
lea eax, [ebp - 0x4c]
push 0x40
push eax
call fcn.004c53b7
add esp, 0x10
jmp 0x47fcd0
lea eax, [ebp - 0x4c]
call fcn.004c3ab2
cmp byte [ebp + 0xa], 6
mov dword [ebp - 0x558], 0x5304ba
jne 0x47fd14
cmp byte [ebp + 0xb], 0xf
jne 0x47fd14
cmp word [ebp + 8], 0x7d9
jne 0x47fd14
push str.SEA223
push ecx
push edi
xor ecx, ecx
call fcn.00462751
pop ecx
pop ecx
push eax
call fcn.004c48c1
test eax, eax
pop ecx
pop ecx
je 0x47fd14
mov dword [ebp - 0x558], str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
lea eax, [ebp - 0x14c]
call fcn.004c3ab2
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.004c53b7
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 0x47fd77
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 0x47fd7c
push str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
push dword [ebp - 0x554]
call fcn.00477efe
add esp, 0x14
test eax, eax
jne 0x47fdbd
push eax
push edi
push ebx
push esi
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___FAILED.
call fcn.004265da
add esp, 0x14
cmp dword [ebp - 0x578], 0
je 0x47fc1a
push dword [ebp - 0x554]
call fcn.00477b11
pop ecx
jmp 0x47fc1a
push str..ParseSA12.c
push 0x99b
xor ecx, ecx
call fcn.0046091b
xor esi, esi
cmp dword [ebp + 0x10], esi
pop ecx
mov ebx, eax
pop ecx
mov dword [ebp - 0x564], ebx
je 0x47fe57
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
mov ecx, ebx
call fcn.00460d97
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.00460d97
add esp, 0xc
cmp dword [ebp + 0xc], esi
mov ecx, ebx
je 0x47fe0d
push str.__TenderType__CheckNum
jmp 0x47fe12
push str.__FILLER__FILLER
call fcn.00460d97
pop ecx
push str.__bIsManualTrans__bIsVoided
mov ecx, ebx
call fcn.00460d97
cmp dword [ebp + 0xc], esi
pop ecx
mov ecx, ebx
je 0x47fe33
push str.__IPC_JOURNAL_KEY
jmp 0x47fe38
push str.__FILLER
call fcn.00460d97
cmp dword [ebp + 0xc], esi
pop ecx
mov ecx, ebx
je 0x47fe4c
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
jmp 0x47fe51
push 0x530220
call fcn.00460d97
pop ecx
cmp dword [ebp + 0xc], esi
je 0x47fe69
call fcn.004a8f27
mov dword [ebp - 0x560], eax
jmp 0x47fe6f
mov dword [ebp - 0x560], esi
cmp dword [ebp - 0x56c], esi
lea eax, [ebp - 0x4c]
jle 0x47fe92
push dword [ebp - 0x56c]
push str._AND_LOC_d
push 0x40
push eax
call fcn.004c53b7
add esp, 0x10
jmp 0x47fe97
call fcn.004c3ab2
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.00477ff9
add esp, 0x14
test eax, eax
je 0x47ffd5
mov edi, 0x530a24
cmp dword [ebp - 0x550], 0x56ce
jge 0x47ffbd
lea eax, [ebp - 0x54c]
push eax
push 0x533b00
mov ecx, ebx
call fcn.00460d97
cmp dword [ebp - 0x560], 0
pop ecx
pop ecx
je 0x47ff8f
push edi
lea eax, [ebp - 0x568]
lea ecx, [ebp - 0x54c]
call fcn.004c5846
and dword [ebp - 0x558], 0
cmp dword [ebp - 0x55c], 0
pop ecx
jle 0x47ff8f
test eax, eax
je 0x47ff8f
cmp dword [ebp - 0x558], 5
je 0x47ff41
cmp dword [ebp - 0x558], 6
je 0x47ff41
cmp dword [ebp - 0x558], 7
jne 0x47ff66
push eax
call fcn.00512917
mov ebx, eax
mov eax, dword [ebp - 0x560]
pop ecx
call fcn.004a939f
test eax, eax
jne 0x47ff66
mov eax, dword [ebp - 0x560]
push ebx
call fcn.004a9020
pop ecx
push edi
lea eax, [ebp - 0x568]
xor ecx, ecx
call fcn.004c5846
inc dword [ebp - 0x558]
mov ebx, dword [ebp - 0x564]
pop ecx
mov ecx, dword [ebp - 0x558]
cmp ecx, dword [ebp - 0x55c]
jl 0x47ff22
push dword [ebp - 0x55c]
inc dword [ebp - 0x550]
push 9
push esi
lea eax, [ebp - 0x54c]
push eax
push dword [ebp - 0x554]
call fcn.00477ff9
add esp, 0x14
test eax, eax
jne 0x47fecd
jmp 0x47ffc8
push str.:10:GetSybaseSA12___FAILED:_Stuck_in_a_never_ending_loop___
call fcn.004265da
pop ecx
cmp dword [ebp - 0x550], 0
jne 0x4801e5
push 0
call fcn.004f16be
pop ecx
mov dword [ebp - 0x568], eax
call fcn.004f26d9
push 0xfffffffffffffffe
push eax
call fcn.004f0abc
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.00477efe
and dword [ebp - 0x558], 0
add esp, 0x20
test eax, eax
je 0x480081
push dword [ebp - 0x55c]
lea eax, [ebp - 0x54c]
push 9
push esi
push eax
push dword [ebp - 0x554]
call fcn.00477ff9
add esp, 0x14
test eax, eax
je 0x48008e
cmp dword [ebp - 0x558], 0x56ce
jge 0x480081
push dword [ebp - 0x55c]
inc dword [ebp - 0x558]
push 9
push esi
lea eax, [ebp - 0x54c]
push eax
push dword [ebp - 0x554]
call fcn.00477ff9
add esp, 0x14
test eax, eax
jne 0x48004d
cmp dword [ebp - 0x558], 2
jge 0x48018e
call fcn.004f16be
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 0x4800b2
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.00426c01
add esp, 0x24
cmp dword [ebp - 0x56c], esi
jae 0x480183
push 0xfffffffffffffffe
push dword [ebp - 0x550]
call fcn.004f0abc
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.00477efe
add esp, 0x20
xor edi, edi
test eax, eax
je 0x480189
push dword [ebp - 0x55c]
mov esi, 0x3ff
push 9
push esi
lea eax, [ebp - 0x54c]
push eax
push dword [ebp - 0x554]
call fcn.00477ff9
add esp, 0x14
test eax, eax
je 0x4801a7
cmp edi, 0x56ce
jge 0x480189
push dword [ebp - 0x55c]
lea eax, [ebp - 0x54c]
push 9
push esi
push eax
push dword [ebp - 0x554]
inc edi
call fcn.00477ff9
add esp, 0x14
test eax, eax
jne 0x480156
jmp 0x480189
mov edi, dword [ebp - 0x558]
cmp edi, 2
jl 0x4801a7
mov ecx, dword [ebp - 0x564]
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
push 0x533b00
call fcn.00460d97
pop ecx
pop ecx
jmp 0x4801e5
call fcn.004f16be
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.004265da
add esp, 0x24
mov ecx, dword [ebp - 0x564]
push str.END_Invoice_Definition_Table
push 0x533b00
call fcn.00460d97
cmp dword [ebp - 0x560], 0
pop ecx
pop ecx
je 0x4802f8
mov ecx, dword [ebp - 0x564]
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
call fcn.00460d97
mov esi, dword [ebp - 0x560]
pop ecx
pop ecx
call fcn.004a92db
mov ebx, eax
test ebx, ebx
je 0x4802d5
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.00477efe
add esp, 0xc
test eax, eax
je 0x48029e
xor esi, esi
jmp 0x48027e
cmp esi, 0xde
jge 0x4802c0
test esi, esi
jne 0x48027d
mov ecx, dword [ebp - 0x564]
lea eax, [ebp - 0x54c]
push eax
push ebx
push str._d_t_s_n
call fcn.00460d97
add esp, 0xc
inc esi
push 3
push 9
push edi
lea eax, [ebp - 0x54c]
push eax
push dword [ebp - 0x554]
call fcn.00477ff9
add esp, 0x14
test eax, eax
jne 0x480256
jmp 0x4802c0
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.004265da
add esp, 0x18
mov esi, dword [ebp - 0x560]
call fcn.004a933c
mov ebx, eax
test ebx, ebx
jne 0x48023a
mov ecx, dword [ebp - 0x564]
push str.End_EmpId_Conv_Table
push 0x533b00
call fcn.00460d97
push dword [ebp - 0x560]
call fcn.004a8fca
add esp, 0xc
cmp dword [ebp - 0x578], 0
je 0x48030d
push dword [ebp - 0x554]
call fcn.00477b11
pop ecx
mov eax, dword [ebp - 0x564]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051291c
leave
ret