Function at 0x483191
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5ec
mov eax, dword [0x55f900]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
mov dword [ebp - 0x5bc], eax
mov dword [ebp - 0x5b8], ecx
mov dword [ebp - 0x5b0], esi
push edi
test eax, eax
je 0x4839c7
test ebx, ebx
je 0x4839c7
push dword [ebx + 0x14]
call fcn.0045d2bd
xor eax, eax
mov dword [esp], 0x400
lea edi, [ebp - 0x594]
stosd dword es:[edi], eax
push esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x584]
push eax
call fcn.004c37f0
push 0x80
lea eax, [ebp - 0x84]
push esi
push eax
call fcn.004c37f0
push 0x100
lea eax, [ebp - 0x184]
push esi
push eax
call fcn.004c37f0
push esi
push 1
mov dword [ebp - 0x5a8], esi
call fcn.0048607c
push 1
call fcn.00485fa5
add esp, 0x30
cmp dword [ebx + 0x2f94], esi
jne 0x48324c
push dword [ebx + 0x14]
call fcn.00490059
pop ecx
mov dword [ebx + 0x14], esi
push esi
push esi
call fcn.004812f1
pop ecx
pop ecx
push dword [ebx + 0x14]
test eax, eax
je 0x48327b
call fcn.0045d2bd
pop ecx
test eax, eax
je 0x4839c7
push dword [ebx + 0x14]
call fcn.0045bba5
pop ecx
mov dword [ebx + 0x14], esi
jmp 0x4839c7
call fcn.0045d2bd
pop ecx
test eax, eax
jne 0x48329e
push esi
call fcn.0045b86c
mov dword [ebx + 0x14], eax
xor eax, eax
inc eax
pop ecx
mov dword [ebx + 0x2f94], eax
mov dword [ebp - 0x5a8], eax
cmp dword [ebx + 0x14], esi
jne 0x4832b3
push str.:5:Need_to_handle_TAMS_II_SA7_login_failure_
call fcn.0041c80a
pop ecx
jmp 0x4839c7
push dword [ebx + 0x14]
call fcn.004b4ecb
mov dword [esp], 0xc06
lea eax, [ebp - 0x594]
push str.C:UsersOfficeDocumentsVisual_StudioPAULAServerPAULA.c
push eax
call fcn.004b5bf0
push ecx
mov edi, esp
lea esi, [ebp - 0x594]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004b7250
mov dword [ebp - 0x598], eax
add esp, 0x10
mov byte [ebp - 0x595], 1
mov eax, dword [ebp - 0x598]
mov dword [ebp - 0x59c], eax
mov si, word [ebp - 0x59c]
shr eax, 0x10
inc al
cmp al, 0xc
jbe 0x483313
inc si
xor edx, edx
movzx ecx, al
inc edx
cmp al, 0xc
push 0x2c
cmovbe edx, ecx
push str.SALES_YEAR_MONTH_ACCOUNTING_DAY_GROSS_CASH_SALES_GROSS_CHARGE_SALES_NET_SALES_RETURNS_RETURNS_COST_MISCELLANEOUS_ADJUSTMENTS_INVOICE_COUNT_VOID_AMOUNT_VOID_COUNT_RECEIVED_ON_ACCOUNT_ROA_DISCOUNT_TAKEN_JOURNAL_ENTRIES_SALES_COST_FREIGHT_CHARGES
mov dword [ebp - 0x5a0], edx
call fcn.0048ab31
push dword [ebx + 0x14]
inc eax
mov dword [ebp - 0x5ac], eax
call fcn.0045c8d0
and dword [ebp - 0x5a4], 0
add esp, 0xc
mov ecx, dword [0x55f86c]
mov edi, eax
test ecx, ecx
je 0x483399
push edi
lea eax, [ecx + 1]
mov dword [0x55f86c], eax
movzx eax, byte [ebp - 0x599]
push eax
mov eax, dword [ebp - 0x5a0]
movzx eax, al
push eax
movzx eax, si
push eax
movzx eax, byte [ebp - 0x596]
push 1
push eax
movzx eax, word [ebp - 0x598]
push eax
push str.SALES_YEAR_MONTH_ACCOUNTING_DAY_GROSS_CASH_SALES_GROSS_CHARGE_SALES_NET_SALES_RETURNS_RETURNS_COST_MISCELLANEOUS_ADJUSTMENTS_INVOICE_COUNT_VOID_AMOUNT_VOID_COUNT_RECEIVED_ON_ACCOUNT_ROA_DISCOUNT_TAKEN_JOURNAL_ENTRIES_SALES_COST_FREIGHT_CHARGES
push ecx
push str.SA7_DBG__d:_SET_ROWCOUNT_1_SELECT__s_FROM_STORE_DAILY_SALES_WHERE__SALES_YEAR_MONTH_04d__02d__02d_OR_SALES_YEAR_MONTH_04d__02d__02d__AND_LOC_d_ORDER_BY_SALES_YEAR_MONTH_DESC__ACCOUNTING_DAY_DESC
call fcn.0041cce9
add esp, 0x28
movzx ecx, byte [ebp - 0x599]
mov eax, dword [ebp - 0x5a0]
movzx edx, byte [ebp - 0x596]
push edi
push ecx
movzx eax, al
push eax
movzx esi, si
push esi
push 1
push edx
mov dword [ebp - 0x5b4], eax
movzx eax, word [ebp - 0x598]
push eax
push str.SALES_YEAR_MONTH_ACCOUNTING_DAY_GROSS_CASH_SALES_GROSS_CHARGE_SALES_NET_SALES_RETURNS_RETURNS_COST_MISCELLANEOUS_ADJUSTMENTS_INVOICE_COUNT_VOID_AMOUNT_VOID_COUNT_RECEIVED_ON_ACCOUNT_ROA_DISCOUNT_TAKEN_JOURNAL_ENTRIES_SALES_COST_FREIGHT_CHARGES
push str.SET_ROWCOUNT_1_SELECT__s_FROM_STORE_DAILY_SALES_WHERE__SALES_YEAR_MONTH_04d__02d__02d_OR_SALES_YEAR_MONTH_04d__02d__02d__AND_LOC_d_ORDER_BY_SALES_YEAR_MONTH_DESC__ACCOUNTING_DAY_DESC
push dword [ebx + 0x14]
mov dword [ebp - 0x59c], ecx
mov dword [ebp - 0x5a0], edx
call fcn.0045bf37
add esp, 0x28
test eax, eax
je 0x483931
push dword [ebp - 0x5ac]
lea eax, [ebp - 0x584]
push 9
push 0x3ff
push eax
push dword [ebx + 0x14]
call fcn.0045c028
add esp, 0x14
push ebx
test eax, eax
je 0x483451
lea eax, [ebp - 0x584]
push eax
call fcn.00481ae7
mov esi, eax
mov dword [ebp - 0x59c], esi
pop ecx
pop ecx
test esi, esi
jne 0x483460
lea eax, [ebp - 0x584]
push eax
push str.:5:RefreshSales___EAP:_Sales_line___s__is_invalid.
lea eax, [ebp - 0x184]
push 0x100
push eax
call fcn.0048d960
add esp, 0x10
jmp 0x483460
call fcn.00484f88
xor esi, esi
inc esi
pop ecx
mov dword [ebp - 0x59c], esi
mov ecx, dword [0x55f86c]
test ecx, ecx
je 0x483487
lea eax, [ecx + 1]
mov dword [0x55f86c], eax
lea eax, [ebp - 0x584]
push eax
push ecx
push str.SA7_DBG__d:__s
call fcn.0041cce9
add esp, 0xc
test esi, esi
jle 0x48396f
push 0x2c
push str.EOD_STARTED_DATE_NEW_DAY_STARTED_DATE_SALES_YEAR_MONTH_ACCT_DAY_STARTED_BY_IP_ADDRESS_STARTED_BY_EMPLOYEE_ID
call fcn.0048ab31
pop ecx
pop ecx
mov ecx, dword [0x55f86c]
lea esi, [eax + 1]
test ecx, ecx
je 0x4834c6
push edi
push str.EOD_STARTED_DATE_NEW_DAY_STARTED_DATE_SALES_YEAR_MONTH_ACCT_DAY_STARTED_BY_IP_ADDRESS_STARTED_BY_EMPLOYEE_ID
push ecx
lea eax, [ecx + 1]
push str.SA7_DBG__d:_SET_ROWCOUNT_1_SELECT__s_FROM_END_OF_DAY_MONITOR_WHERE_LOC_d_AND_EOD_STARTED_DATE_SELECT_MAX_EOD_STARTED_DATE__FROM_END_OF_DAY_MONITOR_
mov dword [0x55f86c], eax
call fcn.0041cce9
add esp, 0x10
push edi
push str.EOD_STARTED_DATE_NEW_DAY_STARTED_DATE_SALES_YEAR_MONTH_ACCT_DAY_STARTED_BY_IP_ADDRESS_STARTED_BY_EMPLOYEE_ID
push str.SET_ROWCOUNT_1_SELECT__s_FROM_END_OF_DAY_MONITOR_WHERE_LOC_d_AND_EOD_STARTED_DATE_SELECT_MAX_EOD_STARTED_DATE__FROM_END_OF_DAY_MONITOR_
push dword [ebx + 0x14]
call fcn.0045bf37
add esp, 0x10
test eax, eax
je 0x483773
xor eax, eax
lea edi, [ebp - 0x5cc]
stosd dword es:[edi], eax
push esi
push 9
push 0x3ff
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x5dc]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x584]
push eax
push dword [ebx + 0x14]
xor edi, edi
mov dword [ebp - 0x5a0], edi
call fcn.0045c028
add esp, 0x14
test eax, eax
je 0x48361c
push 0x80
lea eax, [ebp - 0x584]
mov dword [ebp - 0x598], edi
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.0048dd2a
mov ecx, dword [0x55f86c]
add esp, 0xc
test ecx, ecx
je 0x48356e
lea eax, [ecx + 1]
mov dword [0x55f86c], eax
lea eax, [ebp - 0x584]
push eax
push ecx
push str.SA7_DBG__d:__s
call fcn.0041cce9
add esp, 0xc
lea eax, [ebp - 0x598]
push eax
lea eax, [ebp - 0x584]
push 0x4ee0d0
push eax
call fcn.0048d659
push eax
lea eax, [ebp - 0x5ec]
push eax
call fcn.004b68ec
mov esi, eax
lea edi, [ebp - 0x5cc]
lea eax, [ebp - 0x598]
push eax
push 0x4ee0d0
movsd dword es:[edi], dword [esi]
push 0
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0048d659
push eax
lea eax, [ebp - 0x5ec]
push eax
call fcn.004b68ec
mov esi, eax
lea edi, [ebp - 0x5dc]
lea eax, [ebp - 0x598]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, 0x4ee0d0
xor edi, edi
push esi
push edi
call fcn.0048d659
lea eax, [ebp - 0x598]
push eax
push esi
push edi
call fcn.0048d659
add esp, 0x40
push eax
call fcn.00447fc1
mov dword [ebp - 0x5a0], eax
lea eax, [ebp - 0x598]
push eax
push esi
push edi
call fcn.0048d659
lea eax, [ebp - 0x598]
push eax
push esi
push edi
call fcn.0048d659
add esp, 0x1c
push edi
sub esp, 0x10
lea esi, [ebp - 0x5cc]
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004b5f47
add esp, 0x14
test eax, eax
jne 0x4836a9
push eax
sub esp, 0x10
lea esi, [ebp - 0x5dc]
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004b5f47
add esp, 0x14
test eax, eax
jne 0x4836a9
lea eax, [ebp - 0x84]
push eax
sub esp, 0x10
lea esi, [ebp - 0x5dc]
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004b633f
add esp, 0x10
lea esi, [ebp - 0x5cc]
push eax
sub esp, 0x10
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004b633f
add esp, 0x10
push eax
push str.:7:RefreshSales___EAP:_Sales_CANNOT_be_posted:_stEODTime___s__stNewDayTime___s:__s
lea eax, [ebp - 0x184]
push 0x100
push eax
call fcn.0048d960
add esp, 0x18
jmp 0x48396f
mov eax, dword [ebp - 0x59c]
push 0xc7f
mov dword [ebp - 0x5a4], eax
lea eax, [ebx + 0x4c]
push str.C:UsersOfficeDocumentsVisual_StudioPAULAServerPAULA.c
push eax
call fcn.004b5bf0
lea edi, [ebx + 0x5c]
lea esi, [ebp - 0x5cc]
movsd dword es:[edi], dword [esi]
push ecx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movzx edi, word [ebp - 0x5c8]
lea esi, [ebp - 0x5cc]
shl edi, 4
add edi, 0x2f9c
add edi, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, esp
lea esi, [ebp - 0x5dc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004b6026
add esp, 0x10
test eax, eax
jne 0x48376e
sub esp, 0x10
lea esi, [ebp - 0x5cc]
mov edi, esp
sub esp, 0x10
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, esp
lea esi, [ebp - 0x5dc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004b5dfb
add esp, 0x20
test eax, eax
jne 0x48376e
mov eax, dword [ebp - 0x59c]
xor ecx, ecx
mov edx, dword [ebp - 0x5a0]
cmp edx, eax
jg 0x483750
cmp edx, 1
jne 0x48379a
cmp eax, 0x14
jle 0x48379a
push str.Yesterday_sales_catch_test.
lea eax, [ebp - 0x184]
push 0x100
push eax
call fcn.0048d960
add esp, 0xc
jmp 0x48396f
xor ecx, ecx
inc ecx
jmp 0x48379a
lea eax, [ebp - 0x84]
push eax
push edi
push str.:7:RefreshSales___EAP:_ExecuteODBCFormat_LOC_d__FAILED:_EOD_cannot_be_determined:__s
lea eax, [ebp - 0x184]
push 0x100
push eax
call fcn.0048d960
mov ecx, dword [ebp - 0x5b0]
add esp, 0x14
cmp dword [ebp - 0x5a4], 0
jle 0x48396f
mov dword [ebx + 0x2f90], 1
test ecx, ecx
je 0x48385e
cmp dword [ebx + 0x2f98], 0
jne 0x483922
cmp dword [ebx + 0x44], 0
je 0x483835
cmp dword [ebx + 0x38], 0
je 0x483835
push ebx
call fcn.00482b05
cmp dword [0x656944], 0
pop ecx
jne 0x483821
push ebx
call fcn.00484f88
push ebx
call fcn.00482b05
pop ecx
pop ecx
test eax, eax
jne 0x483807
lea eax, [ebp - 0x84]
push eax
push str.:8:RefreshSales___Critical_Exception_:_PostSales___says_EOD_has_NOT_been_encountered__This_will_result_in_EOD_never_being_posted___s
call fcn.0041c80a
pop ecx
pop ecx
push str.:0:FYI:_End_Of_Day_process_has_begun.__TAMS_II_
mov dword [ebx + 0x2f98], 1
call fcn.0041cce9
pop ecx
jmp 0x483922
lea eax, [ebp - 0x84]
push eax
push str.:5:RefreshSales___EAP:_End_of_Day_process_has_begun__but_the_initial_PostSalesResult___FAILED:_EOD_cannot_be_posted._Another_attempt_will_be_made:__s
call fcn.0041c80a
pop ecx
jmp 0x48381b
lea eax, [ebp - 0x84]
push eax
push str.:2:RefreshSales___EAP:_EOD_has_been_detected_from_zero_sales.__This_may_happen_when_the_server_is_started_after_EOD.__EOD_has_been_ignored:__s
call fcn.0041cce9
push ebx
call fcn.00484f88
add esp, 0xc
mov dword [ebx + 0x2f98], 1
jmp 0x483922
and dword [ebx + 0x2f98], 0
push ebx
call fcn.00482b05
pop ecx
test eax, eax
je 0x483922
lea eax, [ebp - 0x84]
push eax
push dword [ebx + 0x38]
call fcn.00448be5
pop ecx
push eax
push str.:9:RefreshSales___Critical_Exception_:_PostSales___says_EOD_has_been_encountered__This_should_never_happen._NetSales___s:__s
call fcn.0041c80a
movzx eax, word [0x653854]
add esp, 0xc
push dword [0x656868]
push eax
movzx eax, word [0x650844]
push eax
push dword [0x656864]
movzx eax, word [0x65089a]
push eax
movzx eax, word [0x6538aa]
push eax
push dword [0x650890]
push dword [0x6538a0]
push dword [0x65088c]
push dword [0x65389c]
push dword [0x650880]
call fcn.00448be5
pop ecx
push eax
push dword [0x653890]
call fcn.00448be5
pop ecx
push eax
push dword [0x6537d8]
mov esi, 0x650834
push dword [0x6567e8]
push 0
sub esp, 0x10
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004b639c
add esp, 0x14
push eax
push str.:9:RefreshSales___DEBUG:_SnapShot_at__s:_bIsTAMSii_d__d__tNetSales_s__s__iNumInvoices_d__d__iNumVoids_d__d__wDay_d__d:_STATICS:_dwTimeLastParse_d__wLastDayParsed_d__wLastDayEOD_d__iNumTimesInitTried_d
call fcn.0041c80a
add esp, 0x40
and dword [0x55f86c], 0
xor eax, eax
inc eax
jmp 0x4839c9
lea eax, [ebp - 0x84]
push eax
movzx eax, word [ebp - 0x598]
push edi
push dword [ebp - 0x59c]
push dword [ebp - 0x5b4]
push esi
push 1
push dword [ebp - 0x5a0]
push eax
push str.:7:RefreshSales___EAP:_OUTER_ExecuteODBCFormat__SALES_YEAR_MONTH_04d__02d__02d_OR_SALES_YEAR_MONTH_04d__02d__02d__AND_LOC_d_FAILED:__s
lea eax, [ebp - 0x184]
push 0x100
push eax
call fcn.0048d960
add esp, 0x2c
cmp dword [ebp - 0x5a8], 0
jne 0x4839ac
push dword [ebx + 0x14]
call fcn.0045bba5
and dword [ebx + 0x14], 0
lea eax, [ebp - 0x84]
push eax
push str.:5:RefreshSales___EOP:_The_recycled_connection_failed._Trying_again_with_new_connection...___s
call fcn.0041c80a
push dword [ebp - 0x5b8]
push ebx
push dword [ebp - 0x5bc]
call fcn.00483191
add esp, 0x18
jmp 0x4839c9
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x184]
push eax
push str.:5:FYI:_TAMSii_SA7_FAILED:__s:__s
call fcn.0041c80a
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004c2120
leave
ret