Function at 0x46f138
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5dc
mov eax, dword [0x5005d0]
xor eax, esp
mov dword [esp + 0x5d8], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
cmp edi, esi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], eax
mov dword [esp + 0x18], esi
je 0x46f1e4
cmp ebx, esi
je 0x46f1e4
call fcn.0046c54c
test eax, eax
jne 0x46f1e4
mov eax, dword [ebx + 0x14]
call fcn.0044e06e
test eax, eax
jne 0x46f1fb
call fcn.0040ee7c
test eax, eax
jne 0x46f1fb
push esi
push esi
call fcn.00470809
test eax, eax
pop ecx
pop ecx
jne 0x46f1e4
cmp dword [0x608b64], esi
je 0x46f1ba
call fcn.00498efc
sub eax, dword [0x608b68]
cmp eax, dword [0x608b64]
jbe 0x46f1e4
cmp dword [0x608b6c], esi
je 0x46f1d5
push str.PaulaConfig.cfg
push edi
call fcn.00433f20
pop ecx
pop ecx
mov dword [0x608b6c], esi
mov dword [ebx + 0x14], esi
mov dword [0x608b64], esi
mov dword [0x608b68], esi
xor eax, eax
mov ecx, dword [esp + 0x5e4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004a69f5
mov esp, ebp
pop ebp
ret
xor eax, eax
mov word [esp + 0x28], si
lea edi, [esp + 0x2a]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x3ff
stosw word es:[edi], ax
lea eax, [esp + 0x1e5]
push esi
push eax
mov byte [esp + 0x1ec], 0
call fcn.004a7110
add esp, 0xc
push 0x7f
lea eax, [esp + 0x65]
push esi
push eax
mov byte [esp + 0x6c], 0
call fcn.004a7110
add esp, 0xc
push 0xff
lea eax, [esp + 0xe5]
push esi
push eax
mov byte [esp + 0xec], 0
call fcn.004a7110
add esp, 0xc
mov dword [esp + 0x20], esi
call fcn.0047163f
call fcn.00471666
cmp dword [ebx + 0x2f94], esi
jne 0x46f275
mov dword [ebx + 0x14], esi
push esi
push esi
call fcn.00470809
pop ecx
test eax, eax
mov eax, dword [ebx + 0x14]
pop ecx
je 0x46f2a3
call fcn.0044e06e
test eax, eax
je 0x46f1e4
push dword [ebx + 0x14]
call fcn.0044db5e
pop ecx
mov dword [ebx + 0x14], esi
jmp 0x46f1e4
call fcn.0044e06e
test eax, eax
jne 0x46f2c3
push esi
call fcn.0044eba5
mov dword [ebx + 0x14], eax
xor eax, eax
inc eax
pop ecx
mov dword [ebx + 0x2f94], eax
mov dword [esp + 0x20], eax
mov ecx, dword [ebx + 0x14]
cmp ecx, esi
je 0x46f1e4
call fcn.004991db
push 0xbfd
lea eax, [esp + 0x2c]
push str..ServerPAULA.c
push eax
call fcn.004998ed
push ecx
lea esi, [esp + 0x38]
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.00497fb2
mov dword [esp + 0x20], eax
mov byte [esp + 0x23], 1
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], eax
shr eax, 0x10
add esp, 0x10
inc al
cmp al, 0xc
mov byte [esp + 0xe], al
jbe 0x46f322
inc word [esp + 0xc]
mov byte [esp + 0xe], 1
mov esi, 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 0x2c
mov edx, esi
call fcn.00475af5
pop ecx
mov ecx, dword [ebx + 0x14]
mov edi, eax
inc edi
call fcn.0044ee2c
movzx ecx, byte [esp + 0xe]
movzx edx, word [esp + 0xc]
and dword [esp + 0x24], 0
mov dword [esp + 0x14], eax
push dword [esp + 0x14]
movzx eax, byte [esp + 0x13]
push eax
movzx eax, byte [esp + 0x1a]
push ecx
mov dword [esp + 0x28], edx
push dword [esp + 0x28]
movzx edx, word [esp + 0x20]
push 1
push eax
push edx
push esi
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]
call fcn.0044dda3
add esp, 0x28
test eax, eax
je 0x46f6a7
push edi
push 9
push 0x3ff
lea eax, [esp + 0x1ec]
push eax
push dword [ebx + 0x14]
call fcn.0044de8e
add esp, 0x14
test eax, eax
mov esi, ebx
je 0x46f3e2
lea eax, [esp + 0x1e0]
call fcn.0046efb2
test eax, eax
mov dword [esp + 0x10], eax
jne 0x46f3ed
lea eax, [esp + 0x1e0]
push eax
push str.:5:RefreshSales___EAP:_Sales_line___s__is_invalid.
lea eax, [esp + 0xe8]
push pe_nt_image_headers32
push eax
call fcn.00476e0a
add esp, 0x10
jmp 0x46f3ed
xor eax, eax
call fcn.0046efb2
mov dword [esp + 0x10], eax
cmp dword [esp + 0x10], 0
jle 0x46f58f
mov edi, str.EOD_STARTED_DATE_NEW_DAY_STARTED_DATE_SALES_YEAR_MONTH_ACCT_DAY_STARTED_BY_IP_ADDRESS_STARTED_BY_EMPLOYEE_ID
push 0x2c
mov edx, edi
call fcn.00475af5
pop ecx
push dword [esp + 0x14]
mov esi, eax
push edi
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]
inc esi
call fcn.0044dda3
add esp, 0x10
test eax, eax
je 0x46f682
and word [esp + 0x38], 0
and word [esp + 0x28], 0
xor eax, eax
lea edi, [esp + 0x3a]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
and dword [esp + 0x14], 0
stosw word es:[edi], ax
xor eax, eax
lea edi, [esp + 0x2a]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push esi
push 9
stosw word es:[edi], ax
push 0x3ff
lea eax, [esp + 0x1ec]
push eax
push dword [ebx + 0x14]
call fcn.0044de8e
add esp, 0x14
test eax, eax
je 0x46f50b
and dword [esp + 0xc], 0
lea eax, [esp + 0x1e0]
push eax
mov ecx, 0x80
lea eax, [esp + 0x64]
call fcn.00475883
pop ecx
lea eax, [esp + 0xc]
lea ecx, [esp + 0x1e0]
call fcn.00477055
push eax
lea eax, [esp + 0x54]
push eax
call fcn.00498929
mov esi, eax
lea edi, [esp + 0x40]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x14]
xor ecx, ecx
movsd dword es:[edi], dword [esi]
call fcn.00477055
push eax
lea eax, [esp + 0x5c]
push eax
call fcn.00498929
mov esi, eax
lea edi, [esp + 0x38]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x1c]
xor ecx, ecx
movsd dword es:[edi], dword [esi]
call fcn.00477055
lea eax, [esp + 0x1c]
xor ecx, ecx
call fcn.00477055
push eax
call fcn.0043a558
mov dword [esp + 0x28], eax
add esp, 0x14
lea eax, [esp + 0xc]
xor ecx, ecx
call fcn.00477055
lea eax, [esp + 0xc]
xor ecx, ecx
call fcn.00477055
push 0
sub esp, 0x10
lea esi, [esp + 0x4c]
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.00498023
add esp, 0x14
test eax, eax
jne 0x46f5bd
push eax
sub esp, 0x10
lea esi, [esp + 0x3c]
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.00498023
add esp, 0x14
test eax, eax
jne 0x46f5bd
lea eax, [esp + 0x60]
push eax
sub esp, 0x10
lea esi, [esp + 0x3c]
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.00498ce8
add esp, 0x10
push eax
sub esp, 0x10
lea esi, [esp + 0x50]
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.00498ce8
add esp, 0x10
push eax
push str.:7:RefreshSales___EAP:_Sales_CANNOT_be_posted:_stEODTime___s__stNewDayTime___s:__s
lea eax, [esp + 0xf0]
push pe_nt_image_headers32
push eax
call fcn.00476e0a
add esp, 0x18
cmp dword [esp + 0x20], 0
jne 0x46f1e4
push dword [ebx + 0x14]
call fcn.0044db5e
and dword [ebx + 0x14], 0
pop ecx
push dword [esp + 0x48]
push ebx
push dword [esp + 0x54]
call fcn.0046f138
add esp, 0xc
jmp 0x46f1e6
mov eax, dword [esp + 0x10]
push 0xc76
mov dword [esp + 0x28], eax
lea eax, [ebx + 0x4c]
push str..ServerPAULA.c
push eax
call fcn.004998ed
movzx eax, word [esp + 0x48]
lea edi, [ebx + 0x5c]
lea esi, [esp + 0x44]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
shl eax, 4
lea edi, [eax + ebx + 0x2f9c]
lea esi, [esp + 0x44]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push ecx
lea esi, [esp + 0x38]
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.0049812c
add esp, 0x10
test eax, eax
jne 0x46f678
sub esp, 0x10
mov edi, esp
lea esi, [esp + 0x48]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
sub esp, 0x10
lea esi, [esp + 0x48]
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.004982c6
add esp, 0x20
test eax, eax
jne 0x46f678
and dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x10]
jg 0x46f659
cmp eax, 1
jne 0x46f6e8
cmp dword [esp + 0x10], 0x14
jle 0x46f6e8
push str.Yesterday_sales_catch_test.
lea eax, [esp + 0xe4]
push pe_nt_image_headers32
push eax
call fcn.00476e0a
add esp, 0xc
jmp 0x46f58f
mov dword [esp + 0x18], 1
jmp 0x46f6e8
lea eax, [esp + 0x60]
push eax
push dword [esp + 0x18]
lea eax, [esp + 0xe8]
push str.:7:RefreshSales___EAP:_ExecuteODBCFormat_LOC_d__FAILED:_EOD_cannot_be_determined:__s
push pe_nt_image_headers32
push eax
call fcn.00476e0a
add esp, 0x14
jmp 0x46f6e8
lea eax, [esp + 0x60]
push eax
push dword [esp + 0x18]
movzx eax, byte [esp + 0x17]
push eax
movzx eax, byte [esp + 0x1a]
push eax
push dword [esp + 0x2c]
movzx eax, byte [esp + 0x26]
push 1
push eax
movzx eax, word [esp + 0x2c]
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, [esp + 0x104]
push pe_nt_image_headers32
push eax
call fcn.00476e0a
add esp, 0x2c
cmp dword [esp + 0x24], 0
jle 0x46f58f
xor edi, edi
inc edi
xor esi, esi
cmp dword [esp + 0x18], esi
mov dword [ebx + 0x2f90], edi
je 0x46f745
cmp dword [ebx + 0x2f98], esi
jne 0x46f752
cmp dword [ebx + 0x44], esi
je 0x46f736
cmp dword [ebx + 0x38], esi
je 0x46f736
mov ecx, ebx
call fcn.0047092d
call fcn.00470921
test eax, eax
je 0x46f752
mov eax, ebx
call fcn.0046ef8e
mov ecx, ebx
call fcn.0047092d
jmp 0x46f73d
mov eax, ebx
call fcn.0046ef8e
mov dword [ebx + 0x2f98], edi
jmp 0x46f752
mov ecx, ebx
mov dword [ebx + 0x2f98], esi
call fcn.0047092d
mov dword [0x50e5ec], esi
mov eax, edi
jmp 0x46f1e6