Function at 0x471193
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5e8
mov eax, dword [0x5025d0]
xor eax, ebp
mov dword [ebp - 8], 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 [ebp - 0x5d0], edi
mov dword [ebp - 0x5cc], eax
mov dword [ebp - 0x59c], esi
je 0x47123e
cmp ebx, esi
je 0x47123e
call fcn.004bbf64
test eax, eax
jne 0x47123e
mov eax, dword [ebx + 0x14]
call fcn.0044fb68
test eax, eax
jne 0x47124f
call fcn.0040fb59
test eax, eax
jne 0x47124f
push esi
push esi
call fcn.004729c7
test eax, eax
pop ecx
pop ecx
jne 0x47123e
cmp dword [0x60ab64], esi
je 0x471214
call fcn.0049a965
sub eax, dword [0x60ab68]
cmp eax, dword [0x60ab64]
jbe 0x47123e
cmp dword [0x60ab6c], esi
je 0x47122f
push str.PaulaConfig.cfg
push edi
call fcn.004357bb
pop ecx
pop ecx
mov dword [0x60ab6c], esi
mov dword [ebx + 0x14], esi
mov dword [0x60ab64], esi
mov dword [0x60ab68], esi
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a8565
leave
ret
xor eax, eax
mov word [ebp - 0x5b8], si
lea edi, [ebp - 0x5b6]
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.004a8c80
add esp, 0xc
push 0x7f
lea eax, [ebp - 0x8b]
push esi
push eax
mov byte [ebp - 0x8c], 0
call fcn.004a8c80
add esp, 0xc
push 0xff
lea eax, [ebp - 0x18b]
push esi
push eax
mov byte [ebp - 0x18c], 0
call fcn.004a8c80
add esp, 0xc
mov dword [ebp - 0x5a8], esi
call fcn.004737ec
call fcn.00473813
cmp dword [ebx + 0x2f94], esi
jne 0x4712cf
mov dword [ebx + 0x14], esi
push esi
push esi
call fcn.004729c7
pop ecx
test eax, eax
mov eax, dword [ebx + 0x14]
pop ecx
je 0x4712fd
call fcn.0044fb68
test eax, eax
je 0x47123e
push dword [ebx + 0x14]
call fcn.0044f658
pop ecx
mov dword [ebx + 0x14], esi
jmp 0x47123e
call fcn.0044fb68
test eax, eax
jne 0x47131f
push esi
call fcn.004506b0
mov dword [ebx + 0x14], eax
xor eax, eax
inc eax
pop ecx
mov dword [ebx + 0x2f94], eax
mov dword [ebp - 0x5a8], eax
mov ecx, dword [ebx + 0x14]
cmp ecx, esi
je 0x47123e
call fcn.0049ac44
push 0xbfd
lea eax, [ebp - 0x5b8]
push str..ServerPAULA.c
push eax
call fcn.0049b356
push ecx
lea esi, [ebp - 0x5b8]
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.00499a1b
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 0x471390
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.00477cba
pop ecx
mov ecx, dword [ebx + 0x14]
mov edi, eax
inc edi
call fcn.00450937
movzx ecx, byte [ebp - 0x58e]
movzx edx, word [ebp - 0x590]
and dword [ebp - 0x5a0], 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 - 0x5a4], edx
push dword [ebp - 0x5a4]
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.0044f89d
add esp, 0x28
test eax, eax
je 0x47177d
push edi
push 9
push 0x3ff
lea eax, [ebp - 0x58c]
push eax
push dword [ebx + 0x14]
call fcn.0044f988
add esp, 0x14
test eax, eax
mov esi, ebx
je 0x471462
lea eax, [ebp - 0x58c]
call fcn.0047100d
test eax, eax
mov dword [ebp - 0x594], eax
jne 0x47146f
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.00478fcf
add esp, 0x10
jmp 0x47146f
xor eax, eax
call fcn.0047100d
mov dword [ebp - 0x594], eax
cmp dword [ebp - 0x594], 0
jle 0x471643
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.00477cba
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.0044f89d
add esp, 0x10
test eax, eax
je 0x471755
and word [ebp - 0x5c8], 0
and word [ebp - 0x5b8], 0
xor eax, eax
lea edi, [ebp - 0x5c6]
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 - 0x5b6]
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.0044f988
add esp, 0x14
test eax, eax
je 0x4715b2
and dword [ebp - 0x590], 0
lea eax, [ebp - 0x58c]
push eax
mov ecx, 0x80
lea eax, [ebp - 0x8c]
call fcn.00477a48
pop ecx
lea eax, [ebp - 0x590]
lea ecx, [ebp - 0x58c]
call fcn.0047921a
push eax
lea eax, [ebp - 0x5e4]
push eax
call fcn.0049a392
mov esi, eax
lea edi, [ebp - 0x5c8]
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.0047921a
push eax
lea eax, [ebp - 0x5e4]
push eax
call fcn.0049a392
mov esi, eax
lea edi, [ebp - 0x5b8]
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.0047921a
lea eax, [ebp - 0x590]
xor ecx, ecx
call fcn.0047921a
push eax
call fcn.0043bea2
mov dword [ebp - 0x598], eax
add esp, 0x14
lea eax, [ebp - 0x590]
xor ecx, ecx
call fcn.0047921a
lea eax, [ebp - 0x590]
xor ecx, ecx
call fcn.0047921a
push 0
sub esp, 0x10
lea esi, [ebp - 0x5c8]
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.00499a8c
add esp, 0x14
test eax, eax
jne 0x471677
push eax
sub esp, 0x10
lea esi, [ebp - 0x5b8]
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.00499a8c
add esp, 0x14
test eax, eax
jne 0x471677
lea eax, [ebp - 0x8c]
push eax
sub esp, 0x10
lea esi, [ebp - 0x5b8]
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.0049a751
add esp, 0x10
push eax
sub esp, 0x10
lea esi, [ebp - 0x5c8]
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.0049a751
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.00478fcf
add esp, 0x18
cmp dword [ebp - 0x5a8], 0
jne 0x47123e
push dword [ebx + 0x14]
call fcn.0044f658
and dword [ebx + 0x14], 0
pop ecx
push dword [ebp - 0x5cc]
push ebx
push dword [ebp - 0x5d0]
call fcn.00471193
add esp, 0xc
jmp 0x471240
mov eax, dword [ebp - 0x594]
push 0xc76
mov dword [ebp - 0x5a0], eax
lea eax, [ebx + 0x4c]
push str..ServerPAULA.c
push eax
call fcn.0049b356
movzx eax, word [ebp - 0x5c4]
lea edi, [ebx + 0x5c]
lea esi, [ebp - 0x5c8]
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 - 0x5c8]
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 - 0x5b8]
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.00499b95
add esp, 0x10
test eax, eax
jne 0x471749
sub esp, 0x10
mov edi, esp
lea esi, [ebp - 0x5c8]
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 - 0x5b8]
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.00499d2f
add esp, 0x20
test eax, eax
jne 0x471749
and dword [ebp - 0x59c], eax
mov eax, dword [ebp - 0x598]
cmp eax, dword [ebp - 0x594]
jg 0x47172b
cmp eax, 1
jne 0x4717cb
cmp dword [ebp - 0x594], 0x14
jle 0x4717cb
push str.Yesterday_sales_catch_test.
lea eax, [ebp - 0x18c]
push 0x100
push eax
call fcn.00478fcf
add esp, 0xc
jmp 0x471643
mov dword [ebp - 0x59c], 1
jmp 0x4717cb
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.00478fcf
add esp, 0x14
jmp 0x4717cb
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 - 0x5a4]
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.00478fcf
add esp, 0x2c
cmp dword [ebp - 0x5a0], 0
jle 0x471643
xor edi, edi
inc edi
xor esi, esi
cmp dword [ebp - 0x59c], esi
mov dword [ebx + 0x2f90], edi
je 0x47182c
cmp dword [ebx + 0x2f98], esi
jne 0x471839
cmp dword [ebx + 0x44], esi
je 0x47181d
cmp dword [ebx + 0x38], esi
je 0x47181d
mov ecx, ebx
call fcn.00472ade
call fcn.00472ad2
test eax, eax
je 0x471839
mov eax, ebx
call fcn.00470fe9
mov ecx, ebx
call fcn.00472ade
jmp 0x471824
mov eax, ebx
call fcn.00470fe9
mov dword [ebx + 0x2f98], edi
jmp 0x471839
mov ecx, ebx
mov dword [ebx + 0x2f98], esi
call fcn.00472ade
mov dword [0x5105dc], esi
mov eax, edi
jmp 0x471240