Function at 0x437828
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x580
mov eax, dword [0x4cc8c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x544]
push esi
push edi
push 0x400
xor esi, esi
mov dword [ebp - 0x558], ebx
push esi
push eax
call fcn.00466ad0
push 0x40
lea eax, [ebp - 0x44]
mov dword [ebp - 0x56c], esi
push esi
push eax
call fcn.00466ad0
push 0x100
lea eax, [ebp - 0x144]
push esi
push eax
call fcn.00466ad0
add esp, 0x24
test ebx, ebx
jne 0x4378a9
push esi
call fcn.00434204
mov ebx, eax
mov dword [ebp - 0x564], 1
mov dword [ebp - 0x558], ebx
pop ecx
test ebx, ebx
je 0x437a14
jmp 0x4378af
mov dword [ebp - 0x564], esi
mov esi, dword [ebp + 0x10]
mov ecx, 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
test esi, esi
mov eax, 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
cmovne eax, ecx
push eax
mov dword [ebp - 0x560], eax
call fcn.004503c6
inc eax
push ebx
mov dword [ebp - 0x54c], eax
call fcn.00435269
add esp, 0xc
mov dword [ebp - 0x550], eax
test eax, eax
jle 0x4378ff
push eax
push str._AND_INVOICE.LOC_d
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.0045285b
add esp, 0x10
jmp 0x437909
lea eax, [ebp - 0x44]
push eax
call fcn.00450a50
pop ecx
cmp byte [ebp + 0xe], 6
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x548], 0x48b207
jne 0x437959
cmp byte [ebp + 0xf], 0xf
jne 0x437959
mov eax, 0x7d9
cmp di, ax
jne 0x437959
push str.SEA223
push 0
push 0
call fcn.0042c4b9
pop ecx
pop ecx
push eax
call fcn.004529d5
pop ecx
pop ecx
test eax, eax
mov ecx, str._OR_DATE_INVOICE.INVOICE_DATE_2009_06_14
mov eax, 0x48b207
cmove ecx, eax
mov dword [ebp - 0x548], ecx
lea eax, [ebp - 0x144]
push eax
call fcn.00450a50
cmp dword [ebp + 0x18], 0
pop ecx
jle 0x43798a
push dword [ebp + 0x18]
lea eax, [ebp - 0x144]
push str.INVOICE.INVOICE_NUMBER_d
push 0x100
push eax
call fcn.0045285b
add esp, 0x10
jmp 0x4379b8
mov eax, dword [ebp - 0x548]
push eax
movzx eax, byte [ebp + 0xf]
push eax
movzx eax, byte [ebp + 0xe]
push eax
movzx eax, di
push eax
push str._DATE_INVOICE.INVOICE_DATE__04d__02d__02d_s_
lea eax, [ebp - 0x144]
push 0x100
push eax
call fcn.0045285b
add esp, 0x1c
lea eax, [ebp - 0x44]
mov ecx, 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
push eax
lea eax, [ebp - 0x144]
test esi, esi
push eax
push dword [ebp - 0x560]
mov eax, str.SELECT__s_FROM_INVOICE_WHERE__s_s_ORDER_BY_INVOICE_NUMBER_ASC
cmovne eax, ecx
push eax
push ebx
call fcn.004348cf
add esp, 0x14
test eax, eax
jne 0x437a1b
push dword [ebp + 0x18]
movzx eax, byte [ebp + 0xf]
push eax
movzx eax, byte [ebp + 0xe]
push eax
movzx eax, di
push eax
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___FAILED.
call fcn.0040d511
add esp, 0x14
cmp dword [ebp - 0x564], 0
je 0x437a14
push ebx
call fcn.0043453d
pop ecx
xor eax, eax
jmp 0x437fbb
push str.C:UsersOfficeDocumentsVisual_StudioPAULAParseSA12.c
push 0x99d
push 0
call fcn.004274e2
add esp, 0xc
mov esi, eax
cmp dword [ebp + 0x14], 0
mov dword [ebp - 0x560], esi
je 0x437ae3
push str.This_is_a_PAULA_invoice_compilation.
push str.__s_n
push esi
call fcn.00427ddb
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.00427ddb
cmp dword [ebp + 0x10], 0
mov ecx, str.__TenderType__CheckNum
mov eax, str.__FILLER__FILLER
cmovne eax, ecx
push eax
push esi
call fcn.00427ddb
push str.__bIsManualTrans__bIsVoided
push esi
call fcn.00427ddb
cmp dword [ebp + 0x10], 0
mov ecx, str.__IPC_JOURNAL_KEY
mov eax, str.__FILLER
cmovne eax, ecx
push eax
push esi
call fcn.00427ddb
add esp, 0x2c
cmp dword [ebp + 0x10], 0
je 0x437aaf
push str.:_TenderTypes_0Csh_1Chrg_2Chk_3Visa_4M_C_5AMEX_6Disc__n
push esi
call fcn.00427ddb
pop ecx
pop ecx
jmp 0x437ae9
push 0x48b2d0
push esi
call fcn.00427ddb
pop ecx
pop ecx
and dword [ebp - 0x554], 0
mov eax, dword [ebp - 0x550]
test eax, eax
jle 0x437af6
push eax
push str._AND_LOC_d
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.0045285b
add esp, 0x10
jmp 0x437b00
cmp dword [ebp + 0x10], 0
je 0x437abc
call fcn.00443594
mov dword [ebp - 0x554], eax
jmp 0x437ac3
lea eax, [ebp - 0x44]
push eax
call fcn.00450a50
pop ecx
push dword [ebp - 0x54c]
and dword [ebp - 0x548], 0
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.004349c0
add esp, 0x14
test eax, eax
je 0x437c33
cmp dword [ebp - 0x548], 0x56ce
jge 0x437e3b
lea eax, [ebp - 0x544]
push eax
push 0x494328
push esi
call fcn.00427ddb
add esp, 0xc
cmp dword [ebp - 0x554], 0
je 0x437bfc
lea eax, [ebp - 0x56c]
push eax
lea eax, [ebp - 0x544]
push 0x48cb58
push eax
call fcn.0045243c
mov ecx, eax
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x55c], eax
cmp dword [ebp - 0x54c], eax
jle 0x437bfc
mov edi, dword [ebp - 0x554]
test ecx, ecx
je 0x437bf9
cmp eax, 5
je 0x437ba4
cmp eax, 6
je 0x437ba4
cmp eax, 7
jne 0x437bcc
push ecx
call fcn.0047168f
push eax
push edi
mov dword [ebp - 0x550], eax
call fcn.00443997
add esp, 0xc
test eax, eax
jne 0x437bcc
push dword [ebp - 0x550]
push edi
call fcn.00443a46
pop ecx
pop ecx
lea eax, [ebp - 0x56c]
push eax
push 0x48cb58
push 0
call fcn.0045243c
mov ecx, eax
add esp, 0xc
mov eax, dword [ebp - 0x55c]
inc eax
mov dword [ebp - 0x55c], eax
cmp eax, dword [ebp - 0x54c]
jl 0x437b91
mov edi, dword [ebp + 0xc]
push dword [ebp - 0x54c]
inc dword [ebp - 0x548]
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.004349c0
add esp, 0x14
test eax, eax
jne 0x437b2c
cmp dword [ebp - 0x548], eax
jne 0x437e96
push 0
call fcn.004609ba
mov dword [ebp - 0x55c], eax
call fcn.0045f047
push 0xfffffffffffffffe
push eax
call fcn.0045e03a
mov esi, eax
shr eax, 0x10
mov ecx, esi
movzx eax, al
shr ecx, 0x18
push ecx
push eax
movzx edx, si
push edx
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 ebx
mov dword [ebp - 0x548], esi
mov dword [ebp - 0x574], ecx
mov dword [ebp - 0x578], eax
mov dword [ebp - 0x568], edx
call fcn.004348cf
add esp, 0x24
test eax, eax
je 0x437cfa
push dword [ebp - 0x54c]
and dword [ebp - 0x550], 0
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.004349c0
add esp, 0x14
test eax, eax
je 0x437cfa
mov edi, dword [ebp - 0x54c]
mov esi, dword [ebp - 0x550]
cmp esi, 0x56ce
jge 0x437ce8
push edi
push 9
push 0x3ff
lea eax, [ebp - 0x544]
inc esi
push eax
push ebx
call fcn.004349c0
add esp, 0x14
test eax, eax
jne 0x437cc3
mov edi, dword [ebp + 0xc]
cmp esi, 2
mov esi, dword [ebp - 0x548]
jge 0x437e20
call fcn.004609ba
movzx edx, byte [ebp + 0xe]
mov ebx, eax
sub ebx, dword [ebp - 0x55c]
movzx eax, byte [ebp + 0xf]
cmp ebx, 0x2710
movzx ecx, di
mov dword [ebp - 0x550], ecx
mov ecx, str.Trying_again_2_more_days_back...
mov dword [ebp - 0x570], str.NOT_trying_again.
cmovae ecx, dword [ebp - 0x570]
push ecx
push dword [ebp - 0x574]
mov dword [ebp - 0x57c], eax
push dword [ebp - 0x578]
mov dword [ebp - 0x580], edx
push dword [ebp - 0x568]
push dword [ebp + 0x18]
push eax
push edx
push dword [ebp - 0x550]
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.0040d9e1
add esp, 0x24
cmp ebx, 0x2710
jae 0x437e48
push 0xfffffffffffffffe
push esi
call fcn.0045e03a
mov ebx, dword [ebp - 0x558]
mov esi, eax
shr eax, 0x18
push eax
mov eax, esi
mov dword [ebp - 0x548], esi
shr eax, 0x10
movzx eax, al
push eax
movzx eax, si
push eax
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 ebx
call fcn.004348cf
add esp, 0x20
test eax, eax
je 0x437e4e
push dword [ebp - 0x54c]
and dword [ebp - 0x568], 0
lea eax, [ebp - 0x544]
push 9
push 0x3ff
push eax
push ebx
call fcn.004349c0
add esp, 0x14
test eax, eax
je 0x437e4e
mov edi, dword [ebp - 0x54c]
mov esi, dword [ebp - 0x568]
cmp esi, 0x56ce
jge 0x437e12
push edi
push 9
push 0x3ff
lea eax, [ebp - 0x544]
inc esi
push eax
push ebx
call fcn.004349c0
add esp, 0x14
test eax, eax
jne 0x437ded
mov edi, dword [ebp + 0xc]
cmp esi, 2
mov esi, dword [ebp - 0x548]
jl 0x437e4e
mov esi, dword [ebp - 0x560]
push str.There_are_no_parts_matching_the_selection_criteria__please_try_again...
push 0x494328
push esi
call fcn.00427ddb
add esp, 0xc
jmp 0x437e96
push str.:10:GetSybaseSA12___FAILED:_Stuck_in_a_never_ending_loop___
call fcn.0040d511
pop ecx
jmp 0x437e96
mov ebx, dword [ebp - 0x558]
call fcn.004609ba
sub eax, dword [ebp - 0x55c]
push eax
movzx eax, byte [ebp - 0x545]
push eax
movzx eax, byte [ebp - 0x546]
push eax
movzx eax, si
push eax
push dword [ebp + 0x18]
push dword [ebp - 0x57c]
push dword [ebp - 0x580]
push dword [ebp - 0x550]
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.0040d511
mov esi, dword [ebp - 0x560]
add esp, 0x24
push str.END_Invoice_Definition_Table
push 0x494328
push esi
call fcn.00427ddb
add esp, 0xc
cmp dword [ebp - 0x554], 0
je 0x437fa9
push str._Start_EmpId_Conv_Table_
push str._n_n_s_n
push esi
call fcn.00427ddb
push dword [ebp - 0x554]
call fcn.00443688
add esp, 0x10
jmp 0x437f7d
push eax
push str.SELECT_EMPLOYEE_NUM_FIRST_NAME_LAST_NAME_FROM_EMPLOYEE_WHERE_ID_d
push ebx
call fcn.004348cf
add esp, 0xc
test eax, eax
je 0x437f4d
and dword [ebp - 0x558], 0
jmp 0x437f2e
mov eax, dword [ebp - 0x558]
cmp eax, 0xde
jge 0x437f71
test eax, eax
jne 0x437f27
lea eax, [ebp - 0x544]
push eax
push dword [ebp - 0x548]
push str._d_t_s_n
push esi
call fcn.00427ddb
mov eax, dword [ebp - 0x558]
add esp, 0x10
inc eax
mov dword [ebp - 0x558], eax
push 3
push 9
push 0x3ff
lea eax, [ebp - 0x544]
push eax
push ebx
call fcn.004349c0
add esp, 0x14
test eax, eax
jne 0x437ef5
jmp 0x437f71
push dword [ebp - 0x548]
movzx eax, byte [ebp + 0xf]
push dword [ebp + 0x18]
push eax
movzx eax, byte [ebp + 0xe]
push eax
movzx eax, di
push eax
push str.:8:GetSybaseSA12__04d__02d__02d___d_FAILED:_ExecuteODBCFormat___for_empId__d_FAILED.
call fcn.0040d511
add esp, 0x18
push dword [ebp - 0x554]
call fcn.004436eb
pop ecx
mov dword [ebp - 0x548], eax
test eax, eax
jne 0x437ed9
push str.End_EmpId_Conv_Table
push 0x494328
push esi
call fcn.00427ddb
push dword [ebp - 0x554]
call fcn.00443636
add esp, 0x10
cmp dword [ebp - 0x564], 0
je 0x437fb9
push ebx
call fcn.0043453d
pop ecx
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004654a8
leave
ret