Function at 0x499d50
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5d4
mov eax, dword [0x581900]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x5b4], eax
mov dword [ebp - 0x5b0], ecx
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
test eax, eax
je 0x49a65d
test esi, esi
je 0x49a65d
push dword [esi + 0x14]
call fcn.0046ea00
push 0x400
lea eax, [ebp - 0x584]
xorps xmm0, xmm0
push 0
push eax
movups xmmword [ebp - 0x594], xmm0
call fcn.004e69c0
push 0x80
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.004e69c0
push 0x100
lea eax, [ebp - 0x184]
push 0
push eax
call fcn.004e69c0
add esp, 0x28
mov dword [ebp - 0x5a8], 0
cmp dword [esi + 0x2f94], 0
mov dword [0x67b4b8], 0
mov dword [0x67b4bc], 0
mov dword [0x67b4c0], 0
mov dword [0x67b4c4], 0
jne 0x499e26
push dword [esi + 0x14]
call fcn.004ac610
add esp, 4
mov dword [esi + 0x14], 0
push 0
push 0
call fcn.00497cd0
mov ecx, dword [esi + 0x14]
add esp, 8
push ecx
test eax, eax
je 0x499e6f
call fcn.0046ea00
add esp, 4
test eax, eax
je 0x49a65d
push dword [esi + 0x14]
call fcn.0046ce60
add esp, 4
mov dword [esi + 0x14], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
call fcn.0046ea00
add esp, 4
test eax, eax
jne 0x499e9b
push eax
call fcn.0046caa0
add esp, 4
mov dword [esi + 0x14], eax
mov dword [esi + 0x2f94], 1
mov dword [ebp - 0x5a8], 1
mov eax, dword [esi + 0x14]
test eax, eax
jne 0x499ec2
push str.:5:Need_to_handle_TAMS_II_SA7_login_failure_
call fcn.00424a90
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
push eax
call fcn.004d6b10
push 0xc02
lea eax, [ebp - 0x594]
push str.C:UsersOfficeDocumentsVisual_StudioPAULAServerPAULA.c
push eax
call fcn.004d7dc0
movups xmm0, xmmword [ebp - 0x594]
mov eax, esp
movups xmmword [eax], xmm0
call fcn.004d9820
mov dword [ebp - 0x598], eax
add esp, 0x10
mov byte [ebp - 0x595], 1
mov eax, dword [ebp - 0x598]
mov dword [ebp - 0x59c], eax
mov di, word [ebp - 0x59c]
shr eax, 0x10
inc al
cmp al, 0xc
jbe 0x499f1d
inc di
cmp al, 0xc
movzx ecx, al
mov edx, 1
cmovbe edx, ecx
push 0x2c
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.004a4140
push dword [esi + 0x14]
inc eax
mov dword [ebp - 0x5a4], eax
call fcn.0046de00
mov edx, dword [0x58186c]
add esp, 0xc
mov ebx, eax
test edx, edx
je 0x499f9f
movzx eax, byte [ebp - 0x599]
lea ecx, [edx + 1]
push ebx
push eax
mov eax, dword [ebp - 0x5a0]
movzx eax, al
push eax
movzx eax, di
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 edx
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
mov dword [0x58186c], ecx
call fcn.00424fd0
add esp, 0x28
movzx ecx, byte [ebp - 0x599]
mov eax, dword [ebp - 0x5a0]
movzx edx, byte [ebp - 0x596]
push ebx
push ecx
movzx eax, al
push eax
movzx edi, di
push edi
push 1
push edx
mov dword [ebp - 0x5ac], 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 [esi + 0x14]
mov dword [ebp - 0x59c], ecx
mov dword [ebp - 0x5a0], edx
call fcn.0046d380
add esp, 0x28
test eax, eax
je 0x49a5b5
push dword [ebp - 0x5a4]
lea eax, [ebp - 0x584]
push 9
push 0x3ff
push eax
push dword [esi + 0x14]
call fcn.0046d4c0
add esp, 0x14
test eax, eax
je 0x49a052
lea eax, [ebp - 0x584]
push esi
push eax
call fcn.004984b0
mov edi, eax
add esp, 8
test edi, edi
jne 0x49a096
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.004a94b0
add esp, 0x10
jmp 0x49a096
mov dword [esi + 0x28], 0
mov edi, 1
mov dword [esi + 0x2c], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x34], 0
mov ecx, dword [0x58186c]
test ecx, ecx
je 0x49a0bd
lea eax, [ecx + 1]
mov dword [0x58186c], eax
lea eax, [ebp - 0x584]
push eax
push ecx
push str.SA7_DBG__d:__s
call fcn.00424fd0
add esp, 0xc
test edi, edi
jle 0x49a5f3
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.004a4140
mov edx, dword [0x58186c]
inc eax
add esp, 8
mov dword [ebp - 0x5a4], eax
test edx, edx
je 0x49a102
push ebx
push str.EOD_STARTED_DATE_NEW_DAY_STARTED_DATE_SALES_YEAR_MONTH_ACCT_DAY_STARTED_BY_IP_ADDRESS_STARTED_BY_EMPLOYEE_ID
push edx
lea ecx, [edx + 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 [0x58186c], ecx
call fcn.00424fd0
add esp, 0x10
push ebx
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 [esi + 0x14]
call fcn.0046d380
add esp, 0x10
test eax, eax
je 0x49a592
push dword [ebp - 0x5a4]
lea eax, [ebp - 0x584]
xorps xmm0, xmm0
push 9
push 0x3ff
push eax
push dword [esi + 0x14]
movups xmmword [ebp - 0x5d4], xmm0
xor ebx, ebx
movups xmmword [ebp - 0x5c4], xmm0
call fcn.0046d4c0
add esp, 0x14
test eax, eax
je 0x49a255
push 0x80
lea eax, [ebp - 0x584]
mov dword [ebp - 0x598], ebx
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.004a9a20
mov ecx, dword [0x58186c]
add esp, 0xc
test ecx, ecx
je 0x49a1a2
lea eax, [ecx + 1]
mov dword [0x58186c], eax
lea eax, [ebp - 0x584]
push eax
push ecx
push str.SA7_DBG__d:__s
call fcn.00424fd0
add esp, 0xc
lea eax, [ebp - 0x598]
push eax
lea eax, [ebp - 0x584]
push 0x510e78
push eax
call fcn.004a9080
push eax
lea eax, [ebp - 0x5c4]
push eax
call fcn.004d8d70
movups xmm0, xmmword [eax]
lea eax, [ebp - 0x598]
push eax
push 0x510e78
push 0
movups xmmword [ebp - 0x5d4], xmm0
call fcn.004a9080
push eax
lea eax, [ebp - 0x5c4]
push eax
call fcn.004d8d70
movups xmm0, xmmword [eax]
lea eax, [ebp - 0x598]
push eax
push 0x510e78
push 0
movups xmmword [ebp - 0x5c4], xmm0
call fcn.004a9080
lea eax, [ebp - 0x598]
push eax
push 0x510e78
push 0
call fcn.004a9080
add esp, 0x40
push eax
call fcn.00456760
mov ebx, eax
lea eax, [ebp - 0x598]
push eax
push 0x510e78
push 0
call fcn.004a9080
lea eax, [ebp - 0x598]
push eax
push 0x510e78
push 0
call fcn.004a9080
add esp, 0x1c
movups xmm0, xmmword [ebp - 0x5d4]
push 0
sub esp, 0x10
mov eax, esp
movups xmmword [eax], xmm0
call fcn.004d81b0
add esp, 0x14
test eax, eax
jne 0x49a2e3
movups xmm0, xmmword [ebp - 0x5c4]
push eax
sub esp, 0x10
mov eax, esp
movups xmmword [eax], xmm0
call fcn.004d81b0
add esp, 0x14
test eax, eax
jne 0x49a2e3
movups xmm0, xmmword [ebp - 0x5c4]
lea eax, [ebp - 0x84]
push eax
sub esp, 0x10
mov eax, esp
movups xmmword [eax], xmm0
call fcn.004d8680
movups xmm0, xmmword [ebp - 0x5d4]
add esp, 0x10
push eax
sub esp, 0x10
mov eax, esp
movups xmmword [eax], xmm0
call fcn.004d8680
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.004a94b0
add esp, 0x18
jmp 0x49a5f3
push 0xc7b
lea eax, [esi + 0x4c]
push str.C:UsersOfficeDocumentsVisual_StudioPAULAServerPAULA.c
push eax
call fcn.004d7dc0
movups xmm0, xmmword [ebp - 0x5d4]
push ecx
pextrw eax, xmm0, 2
movups xmmword [esi + 0x5c], xmm0
movzx eax, ax
add eax, eax
movups xmmword [esi + eax*8 + 0x2f9c], xmm0
mov eax, esp
movups xmm0, xmmword [ebp - 0x5c4]
movups xmmword [eax], xmm0
call fcn.004d82c0
add esp, 0x10
test eax, eax
jne 0x49a382
movups xmm0, xmmword [ebp - 0x5d4]
sub esp, 0x10
mov eax, esp
sub esp, 0x10
movups xmmword [eax], xmm0
mov eax, esp
movups xmm0, xmmword [ebp - 0x5c4]
movups xmmword [eax], xmm0
call fcn.004d8040
add esp, 0x20
test eax, eax
jne 0x49a382
cmp ebx, edi
jg 0x49a364
cmp ebx, 1
jne 0x49a387
cmp edi, 0x14
jle 0x49a387
push str.Yesterday_sales_catch_test.
lea eax, [ebp - 0x184]
push 0x100
push eax
call fcn.004a94b0
add esp, 0xc
jmp 0x49a5f3
mov eax, 1
mov dword [esi + 0x2f90], 1
test eax, eax
je 0x49a4a2
cmp dword [esi + 0x2f98], 0
jne 0x49a572
cmp dword [esi + 0x44], 0
je 0x49a45e
cmp dword [esi + 0x38], 0
je 0x49a45e
push esi
call fcn.004996a0
add esp, 4
cmp dword [0x678484], 0
jne 0x49a42a
push esi
call fcn.0049c0e0
push esi
call fcn.004996a0
add esp, 8
test eax, eax
jne 0x49a3f3
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.00424a90
add esp, 8
push str.:0:FYI:_End_Of_Day_process_has_begun.__TAMS_II_
mov dword [esi + 0x2f98], 1
call fcn.00424fd0
add esp, 4
mov dword [0x58186c], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
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.00424a90
add esp, 8
mov dword [0x58186c], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
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.00424fd0
push esi
call fcn.0049c0e0
add esp, 0xc
mov dword [esi + 0x2f98], 1
mov dword [0x58186c], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
push esi
mov dword [esi + 0x2f98], 0
call fcn.004996a0
add esp, 4
test eax, eax
je 0x49a572
lea eax, [ebp - 0x84]
push eax
push dword [esi + 0x38]
call fcn.004578b0
add esp, 4
push eax
push str.:9:RefreshSales___Critical_Exception_:_PostSales___says_EOD_has_been_encountered__This_should_never_happen._NetSales___s:__s
call fcn.00424a90
movzx eax, word [0x675394]
add esp, 0xc
push dword [0x6783a8]
push eax
movzx eax, word [0x672384]
push eax
push dword [0x6783a4]
movzx eax, word [0x6723da]
push eax
movzx eax, word [0x6753ea]
push eax
push dword [0x6723d0]
push dword [0x6753e0]
push dword [0x6723cc]
push dword [0x6753dc]
push dword [0x6723c0]
call fcn.004578b0
add esp, 4
push eax
push dword [0x6753d0]
call fcn.004578b0
movups xmm0, xmmword [0x672374]
add esp, 4
push eax
push dword [0x675318]
push dword [0x678328]
push 0
sub esp, 0x10
mov eax, esp
movups xmmword [eax], xmm0
call fcn.004d86f0
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.00424a90
add esp, 0x40
mov dword [0x58186c], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x84]
push eax
push ebx
push str.:7:RefreshSales___EAP:_ExecuteODBCFormat_LOC_d__FAILED:_EOD_cannot_be_determined:__s
lea eax, [ebp - 0x184]
push 0x100
push eax
call fcn.004a94b0
add esp, 0x14
jmp 0x49a5f3
lea eax, [ebp - 0x84]
push eax
movzx eax, word [ebp - 0x598]
push ebx
push dword [ebp - 0x59c]
push dword [ebp - 0x5ac]
push edi
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.004a94b0
add esp, 0x2c
cmp dword [ebp - 0x5a8], 0
jne 0x49a642
push dword [esi + 0x14]
call fcn.0046ce60
lea eax, [ebp - 0x84]
mov dword [esi + 0x14], 0
push eax
push str.:5:RefreshSales___EOP:_The_recycled_connection_failed._Trying_again_with_new_connection...___s
call fcn.00424a90
push dword [ebp - 0x5b0]
push esi
push dword [ebp - 0x5b4]
call fcn.00499d50
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x184]
push eax
push str.:5:FYI:_TAMSii_SA7_FAILED:__s:__s
call fcn.00424a90
add esp, 0xc
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e50dc
mov esp, ebp
pop ebp
ret