Function at 0x47e142
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5f8
mov eax, dword [0x51f5d0]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
cmp eax, esi
push edi
mov dword [ebp - 0x5a0], eax
mov dword [ebp - 0x5c0], ecx
mov dword [ebp - 0x59c], esi
je 0x47e315
cmp ebx, esi
je 0x47e315
call fcn.0045fb6e
test eax, eax
jne 0x47e315
mov eax, dword [ebx + 0x14]
call fcn.00453357
test eax, eax
jne 0x47e326
call fcn.0040fdff
test eax, eax
jne 0x47e326
mov eax, dword [ebx + 0x14]
call fcn.0048da20
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push esi
jne 0x47e272
call fcn.0047fc87
test eax, eax
pop ecx
pop ecx
jne 0x47e2b7
cmp dword [0x61b954], esi
je 0x47e1f5
call fcn.004af84c
sub eax, dword [0x61b958]
cmp eax, dword [0x61b954]
jbe 0x47e2b7
cmp dword [0x61b95c], esi
je 0x47e215
push str.PaulaConfig.cfg
push dword [ebp - 0x5a0]
call fcn.00437dbf
pop ecx
pop ecx
mov dword [0x61b95c], esi
mov ecx, dword [ebp - 0x5a0]
add ecx, 0x1094
call fcn.0048d27f
mov esi, eax
mov dword [ebx + 0x14], eax
call fcn.0048d993
mov esi, dword [ebx + 0x14]
call fcn.0048d8be
call fcn.0045fba0
test eax, eax
je 0x47e258
mov eax, dword [0x62373c]
test eax, eax
je 0x47e258
and dword [0x62373c], 0
push eax
call fcn.0041c787
pop ecx
mov esi, dword [ebx + 0x14]
call fcn.0048d1aa
and dword [0x61b954], 0
and dword [0x61b958], 0
xor esi, esi
jmp 0x47e2b7
call fcn.0047fc87
test eax, eax
pop ecx
pop ecx
je 0x47e2b7
push str.ww
push esi
push dword [ebx + 0x14]
call fcn.0048c595
add esp, 0xc
push 0x4b
call edi
push str.byM
push 5
push dword [ebx + 0x14]
call fcn.0048c595
add esp, 0xc
push 0xaf
call edi
push dword [ebx + 0x14]
call fcn.0048d709
pop ecx
mov dword [ebx + 0x14], esi
mov eax, dword [ebx + 0x14]
call fcn.0048da20
test eax, eax
je 0x47e315
cmp dword [0x61b960], esi
je 0x47e2de
call fcn.004af84c
sub eax, dword [0x61b964]
cmp eax, dword [0x61b960]
jbe 0x47e315
push str.ww
push 5
push dword [ebx + 0x14]
call fcn.0048c595
add esp, 0xc
push str.byM
push 5
push dword [ebx + 0x14]
call fcn.0048c595
add esp, 0xc
push 0x96
call edi
push dword [ebx + 0x14]
call fcn.0048d709
pop ecx
mov dword [ebx + 0x14], esi
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bfeb5
leave
ret
xor eax, eax
mov word [ebp - 0x5e0], si
lea edi, [ebp - 0x5de]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x3ff
stosw word es:[edi], ax
lea eax, [ebp - 0x58b]
push esi
push eax
mov byte [ebp - 0x58c], 0
call fcn.004c05d0
add esp, 0xc
push 0x7f
lea eax, [ebp - 0x8b]
push esi
push eax
mov byte [ebp - 0x8c], 0
call fcn.004c05d0
add esp, 0xc
push 0xff
lea eax, [ebp - 0x18b]
push esi
push eax
mov byte [ebp - 0x18c], 0
call fcn.004c05d0
add esp, 0xc
mov dword [ebp - 0x5a4], esi
call fcn.004814dc
push esi
push esi
call fcn.00432cab
pop ecx
pop ecx
call fcn.00481503
cmp dword [ebx + 0x2f94], esi
jne 0x47e3b8
push dword [ebx + 0x14]
call fcn.0048d709
pop ecx
mov dword [ebx + 0x14], esi
push esi
push esi
call fcn.0047fc87
pop ecx
test eax, eax
mov eax, dword [ebx + 0x14]
pop ecx
je 0x47e3e2
call fcn.00453357
test eax, eax
je 0x47e315
push dword [ebx + 0x14]
call fcn.00452e47
jmp 0x47e311
call fcn.00453357
test eax, eax
jne 0x47e404
push esi
call fcn.00453eb2
mov dword [ebx + 0x14], eax
xor eax, eax
inc eax
pop ecx
mov dword [ebx + 0x2f94], eax
mov dword [ebp - 0x5a4], eax
mov ecx, dword [ebx + 0x14]
cmp ecx, esi
je 0x47e315
call fcn.004afb2b
push 0xbfd
lea eax, [ebp - 0x5e0]
push str..ServerPAULA.c
push eax
call fcn.004b0243
push ecx
lea esi, [ebp - 0x5e0]
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.004ae902
mov dword [ebp - 0x594], eax
mov byte [ebp - 0x591], 1
mov eax, dword [ebp - 0x594]
mov dword [ebp - 0x590], eax
shr eax, 0x10
add esp, 0x10
inc al
cmp al, 0xc
mov byte [ebp - 0x58e], al
jbe 0x47e475
inc word [ebp - 0x590]
mov byte [ebp - 0x58e], 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.004859fd
pop ecx
mov ecx, dword [ebx + 0x14]
mov edi, eax
inc edi
call fcn.00454190
movzx ecx, byte [ebp - 0x58e]
movzx edx, word [ebp - 0x590]
and dword [ebp - 0x5ac], 0
mov dword [ebp - 0x598], eax
push dword [ebp - 0x598]
movzx eax, byte [ebp - 0x58d]
push eax
movzx eax, byte [ebp - 0x592]
push ecx
mov dword [ebp - 0x5a8], edx
push dword [ebp - 0x5a8]
movzx edx, word [ebp - 0x594]
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.0045308c
add esp, 0x28
test eax, eax
je 0x47e862
push edi
push 9
push 0x3ff
lea eax, [ebp - 0x58c]
push eax
push dword [ebx + 0x14]
call fcn.00453177
add esp, 0x14
test eax, eax
mov esi, ebx
je 0x47e547
lea eax, [ebp - 0x58c]
call fcn.0047dfbc
test eax, eax
mov dword [ebp - 0x594], eax
jne 0x47e554
lea eax, [ebp - 0x58c]
push eax
push str.:5:RefreshSales___EAP:_Sales_line___s__is_invalid.
lea eax, [ebp - 0x18c]
push 0x100
push eax
call fcn.00486e10
add esp, 0x10
jmp 0x47e554
xor eax, eax
call fcn.0047dfbc
mov dword [ebp - 0x594], eax
cmp dword [ebp - 0x594], 0
jle 0x47e728
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.004859fd
pop ecx
push dword [ebp - 0x598]
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.0045308c
add esp, 0x10
test eax, eax
je 0x47e83a
and word [ebp - 0x5bc], 0
and word [ebp - 0x5d0], 0
xor eax, eax
lea edi, [ebp - 0x5ba]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
and dword [ebp - 0x598], 0
stosw word es:[edi], ax
xor eax, eax
lea edi, [ebp - 0x5ce]
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, [ebp - 0x58c]
push eax
push dword [ebx + 0x14]
call fcn.00453177
add esp, 0x14
test eax, eax
je 0x47e697
and dword [ebp - 0x590], 0
lea eax, [ebp - 0x58c]
push eax
mov ecx, 0x80
lea eax, [ebp - 0x8c]
call fcn.00485786
pop ecx
lea eax, [ebp - 0x590]
lea ecx, [ebp - 0x58c]
call fcn.004870c4
push eax
lea eax, [ebp - 0x5f4]
push eax
call fcn.004af279
mov esi, eax
lea edi, [ebp - 0x5bc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x590]
xor ecx, ecx
movsd dword es:[edi], dword [esi]
call fcn.004870c4
push eax
lea eax, [ebp - 0x5f4]
push eax
call fcn.004af279
mov esi, eax
lea edi, [ebp - 0x5d0]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x590]
xor ecx, ecx
movsd dword es:[edi], dword [esi]
call fcn.004870c4
lea eax, [ebp - 0x590]
xor ecx, ecx
call fcn.004870c4
push eax
call fcn.0043e7dd
mov dword [ebp - 0x598], eax
add esp, 0x14
lea eax, [ebp - 0x590]
xor ecx, ecx
call fcn.004870c4
lea eax, [ebp - 0x590]
xor ecx, ecx
call fcn.004870c4
push 0
sub esp, 0x10
lea esi, [ebp - 0x5bc]
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.004ae973
add esp, 0x14
test eax, eax
jne 0x47e75c
push eax
sub esp, 0x10
lea esi, [ebp - 0x5d0]
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.004ae973
add esp, 0x14
test eax, eax
jne 0x47e75c
lea eax, [ebp - 0x8c]
push eax
sub esp, 0x10
lea esi, [ebp - 0x5d0]
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.004af638
add esp, 0x10
push eax
sub esp, 0x10
lea esi, [ebp - 0x5bc]
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.004af638
add esp, 0x10
push eax
push str.:7:RefreshSales___EAP:_Sales_CANNOT_be_posted:_stEODTime___s__stNewDayTime___s:__s
lea eax, [ebp - 0x18c]
push 0x100
push eax
call fcn.00486e10
add esp, 0x18
cmp dword [ebp - 0x5a4], 0
jne 0x47e315
push dword [ebx + 0x14]
call fcn.00452e47
and dword [ebx + 0x14], 0
pop ecx
push dword [ebp - 0x5c0]
push ebx
push dword [ebp - 0x5a0]
call fcn.0047e142
add esp, 0xc
jmp 0x47e317
mov eax, dword [ebp - 0x594]
push 0xc76
mov dword [ebp - 0x5ac], eax
lea eax, [ebx + 0x4c]
push str..ServerPAULA.c
push eax
call fcn.004b0243
movzx eax, word [ebp - 0x5b8]
lea edi, [ebx + 0x5c]
lea esi, [ebp - 0x5bc]
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, [ebp - 0x5bc]
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, [ebp - 0x5d0]
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.004aea7c
add esp, 0x10
test eax, eax
jne 0x47e82e
sub esp, 0x10
mov edi, esp
lea esi, [ebp - 0x5bc]
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, [ebp - 0x5d0]
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.004aec16
add esp, 0x20
test eax, eax
jne 0x47e82e
and dword [ebp - 0x59c], eax
mov eax, dword [ebp - 0x598]
cmp eax, dword [ebp - 0x594]
jg 0x47e810
cmp eax, 1
jne 0x47e8b0
cmp dword [ebp - 0x594], 0x14
jle 0x47e8b0
push str.Yesterday_sales_catch_test.
lea eax, [ebp - 0x18c]
push 0x100
push eax
call fcn.00486e10
add esp, 0xc
jmp 0x47e728
mov dword [ebp - 0x59c], 1
jmp 0x47e8b0
lea eax, [ebp - 0x8c]
push eax
push dword [ebp - 0x598]
lea eax, [ebp - 0x18c]
push str.:7:RefreshSales___EAP:_ExecuteODBCFormat_LOC_d__FAILED:_EOD_cannot_be_determined:__s
push 0x100
push eax
call fcn.00486e10
add esp, 0x14
jmp 0x47e8b0
lea eax, [ebp - 0x8c]
push eax
push dword [ebp - 0x598]
movzx eax, byte [ebp - 0x58d]
push eax
movzx eax, byte [ebp - 0x58e]
push eax
push dword [ebp - 0x5a8]
movzx eax, byte [ebp - 0x592]
push 1
push eax
movzx eax, word [ebp - 0x594]
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 - 0x18c]
push 0x100
push eax
call fcn.00486e10
add esp, 0x2c
cmp dword [ebp - 0x5ac], 0
jle 0x47e728
xor edi, edi
inc edi
xor esi, esi
cmp dword [ebp - 0x59c], esi
mov dword [ebx + 0x2f90], edi
je 0x47e911
cmp dword [ebx + 0x2f98], esi
jne 0x47e91e
cmp dword [ebx + 0x44], esi
je 0x47e902
cmp dword [ebx + 0x38], esi
je 0x47e902
mov ecx, ebx
call fcn.00480796
call fcn.0048078a
test eax, eax
je 0x47e91e
mov eax, ebx
call fcn.0047df98
mov ecx, ebx
call fcn.00480796
jmp 0x47e909
mov eax, ebx
call fcn.0047df98
mov dword [ebx + 0x2f98], edi
jmp 0x47e91e
mov ecx, ebx
mov dword [ebx + 0x2f98], esi
call fcn.00480796
mov dword [0x520790], esi
mov eax, edi
jmp 0x47e317