Function at 0x4b9e5a
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x600
mov eax, dword [0x5c4e68]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push edi
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x59c], eax
mov dword [ebp - 0x5a0], esi
mov dword [ebp - 0x5a4], edi
je 0x4bad5e
cmp ebx, edi
je 0x4bad5e
call fcn.0048a508
test eax, eax
jne 0x4bad5e
mov eax, dword [ebx + 0x14]
call fcn.00478270
test eax, eax
jne 0x4ba537
call fcn.00415bfa
test eax, eax
jne 0x4ba537
push str..ServerPAULA.c
push 0xcea
push edi
push dword [ebx + 0x14]
mov dword [ebp - 0x5a4], edi
call fcn.004cd71a
add esp, 0x10
test eax, eax
push edi
push edi
jne 0x4ba182
call fcn.004bc47e
test eax, eax
pop ecx
pop ecx
jne 0x4ba1e8
cmp dword [0x6d3a84], edi
je 0x4b9f5f
call fcn.004f16be
sub eax, dword [0x6d3a88]
cmp eax, dword [0x6d3a84]
ja 0x4b9f5f
call fcn.004f16be
mov ecx, dword [0x6d3a84]
mov edx, dword [0x6d3a88]
add edx, ecx
sub edx, eax
test edx, edx
mov dword [ebp - 0x5b0], edx
fild dword [ebp - 0x5b0]
jge 0x4b9f42
fadd dword [0x5bf820]
fdiv qword [0x5bfdc0]
push ecx
push ecx
fstp qword [esp]
push str.:3:RefreshSales___FAILED:_TelNetTAMSLogon___cannot_logon_for__.02fmin
call fcn.00426c01
add esp, 0xc
jmp 0x4ba1e8
cmp dword [0x6d3a8c], edi
je 0x4b9f93
mov esi, str.PaulaConfig.cfg
push esi
push dword [ebp - 0x59c]
call fcn.00458e57
cmp eax, edi
pop ecx
pop ecx
je 0x4b9f8d
push eax
push esi
push str.:5:LoadConfigSettings__s__FAILED_in_PaulaServer_during_Invalid_LOGIN_Password_reload_attempt_because___s_
call fcn.00426c01
add esp, 0xc
mov dword [0x6d3a8c], edi
mov esi, dword [ebp - 0x59c]
add esi, 0x1094
mov ecx, esi
call fcn.004ccd6f
cmp eax, edi
mov dword [ebx + 0x14], eax
jne 0x4b9fc7
push edi
mov ecx, esi
call fcn.00462a7e
pop ecx
push eax
push esi
push str.:4:RefreshSales___FAILED_to_connect_to___s_:_PingHost___u
call fcn.004265da
add esp, 0xc
jmp 0x4b9fd4
push esi
push str.:0:FYI:_RefreshSales___has_opened_a_connection_to___s_.
call fcn.00426c01
pop ecx
pop ecx
mov esi, dword [ebx + 0x14]
call fcn.004cd661
mov esi, dword [ebx + 0x14]
call fcn.004cd571
call fcn.0048a53c
test eax, eax
je 0x4ba003
mov eax, dword [0x6db86c]
cmp eax, edi
je 0x4ba003
mov ecx, eax
mov dword [0x6db86c], edi
call fcn.0042d70e
mov esi, dword [ebx + 0x14]
call fcn.004ccb10
mov ecx, dword [ebp - 0x59c]
mov eax, dword [ecx + 0x2150]
call fcn.0050c4f7
push dword [ebp - 0x5a0]
lea esi, [ecx + 0x149c]
push edi
push esi
push str.sales
push dword [ebx + 0x14]
call fcn.0050c50e
add esp, 0x14
cmp eax, 4
ja 0x4ba10d
je 0x4ba0f3
mov ecx, eax
sub ecx, edi
je 0x4ba0c9
dec ecx
je 0x4ba0da
dec ecx
je 0x4ba090
dec ecx
jne 0x4ba120
push esi
push str.:7:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED_because_of_an_invalid_password___This_password____s___needs_to_be_fixed_ASAP_____Further_login_attempts_for_this_session_will_be_disallowed.
call fcn.00426c01
mov dword [0x6d3a84], 0x5265c0
pop ecx
pop ecx
call fcn.004f16be
mov dword [0x6d3a88], eax
mov dword [0x6d3a8c], 1
jmp 0x4ba1e8
fldz
mov ecx, ebx
fstp dword [ebx + 0x40]
mov dword [ebx + 0x28], edi
mov dword [ebx + 0x2c], edi
mov dword [ebx + 0x30], edi
mov dword [ebx + 0x34], edi
mov dword [ebx + 0x38], edi
mov dword [ebx + 0x3c], edi
mov dword [ebx + 0x44], edi
mov dword [ebx + 0x48], edi
call fcn.004bd192
push edi
push 1
call fcn.004bc47e
push str.:0:FYI:_EOM_process_has_begun.
call fcn.00426c01
add esp, 0xc
mov dword [0x6d3a84], edi
mov dword [0x6d3a88], edi
jmp 0x4ba1e8
push str.:3:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_System_maintenance_is_in_progress...
call fcn.00426c01
mov dword [0x6d3a84], 0xdbba0
jmp 0x4ba175
push esi
push str.:7:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED_because_a_login_password_is_required.___s_
call fcn.00426c01
mov dword [0x6d3a84], 0x36ee80
jmp 0x4ba075
mov ecx, eax
sub ecx, 7
je 0x4ba161
dec ecx
dec ecx
je 0x4ba15a
dec ecx
dec ecx
je 0x4ba144
dec ecx
dec ecx
je 0x4ba12e
push eax
push str.:6:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_Unknown_error__u.
call fcn.00426c01
pop ecx
jmp 0x4ba16b
push str.:3:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_TAMS_backup_failed...
call fcn.00426c01
mov dword [0x6d3a84], 0x36ee80
jmp 0x4ba175
push str.:6:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_Max_users_has_been_exceeded.
call fcn.00426c01
mov dword [0x6d3a84], 0x5265c0
jmp 0x4ba175
push str.:3:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_EOD_needs_to_be_restarted...
jmp 0x4ba133
push str.:3:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_Start_new_day_hang_up...
call fcn.00426c01
mov dword [0x6d3a84], 0x927c0
pop ecx
call fcn.004f16be
mov dword [0x6d3a88], eax
jmp 0x4ba1e8
call fcn.004bc47e
test eax, eax
pop ecx
pop ecx
je 0x4ba1e8
mov ecx, dword [ebx + 0x14]
mov edx, esi
call fcn.005102a1
test eax, eax
jne 0x4ba1ba
mov ecx, dword [ebx + 0x14]
mov edx, esi
call fcn.005102a1
test eax, eax
jne 0x4ba1ba
push 0x590308
push edi
push dword [ebx + 0x14]
call fcn.004cbc20
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x4b
call esi
push str.byM
push 5
push dword [ebx + 0x14]
call fcn.004cbc20
add esp, 0xc
push 0xaf
call esi
mov eax, dword [ebx + 0x14]
call fcn.004cd2f9
mov dword [ebx + 0x14], edi
push str..ServerPAULA.c
push 0xd96
push edi
push dword [ebx + 0x14]
call fcn.004cd71a
add esp, 0x10
test eax, eax
je 0x4ba52c
cmp dword [0x6d3a90], edi
je 0x4ba225
call fcn.004f16be
sub eax, dword [0x6d3a94]
cmp eax, dword [0x6d3a90]
jbe 0x4ba52c
mov edx, dword [ebp - 0x5a0]
mov ecx, dword [ebx + 0x14]
call fcn.005102a1
test eax, eax
jne 0x4ba288
mov edx, dword [ebp - 0x5a0]
mov ecx, dword [ebx + 0x14]
call fcn.005102a1
test eax, eax
jne 0x4ba288
push 0x590308
push 5
push dword [ebx + 0x14]
call fcn.004cbc20
add esp, 0xc
push str.byM
push 5
push dword [ebx + 0x14]
call fcn.004cbc20
add esp, 0xc
push 0x96
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebx + 0x14]
call fcn.004cd2f9
mov dword [ebx + 0x14], edi
jmp 0x4ba52c
cmp dword [0x6d3a98], edi
mov esi, dword [ebp - 0x59c]
je 0x4ba2c0
push str.PaulaConfig.cfg
push esi
call fcn.00458e57
cmp eax, edi
pop ecx
pop ecx
je 0x4ba2ba
push eax
push str.PaulaConfig.cfg
push str.:5:LoadConfigSettings__s__FAILED_in_PaulaServer_during_Invalid_SA7_Password_reload_attempt_because___s_
call fcn.00426c01
add esp, 0xc
mov dword [0x6d3a98], edi
mov eax, dword [esi + 0x206c]
push dword [ebp - 0x5a0]
mov dword [ebx + 8], eax
lea eax, [esi + 0x159c]
add esi, 0x189c
push ebx
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], esi
mov dword [0x5c5794], edi
call fcn.00509fd1
cmp dword [0x5c5794], edi
pop ecx
pop ecx
mov dword [ebp - 0x594], eax
je 0x4ba311
mov edi, dword [ebx + 0x14]
push 0
call fcn.004cea27
and dword [0x5c5794], 0
pop ecx
xor edi, edi
mov eax, dword [ebp - 0x594]
sub eax, edi
mov esi, 0x1b7740
je 0x4ba460
dec eax
je 0x4ba415
dec eax
je 0x4ba3cb
dec eax
dec eax
je 0x4ba3bf
dec eax
je 0x4ba415
mov eax, dword [0x6d3aa0]
inc dword [0x6d3aa0]
cmp eax, 2
jle 0x4ba48f
push dword [ebp - 0x594]
push dword [0x6d3aa0]
push str.:4:TelNetGetSalesSA7___has_failed__d_times_consecutively:_error__u
call fcn.00426c01
mov eax, dword [0x6d3aa0]
add esp, 0xc
cmp eax, 5
jg 0x4ba384
mov dword [0x6d3a90], 0x493e0
jmp 0x4ba3b0
cmp eax, 0xa
jg 0x4ba395
mov dword [0x6d3a90], 0x927c0
jmp 0x4ba3b0
xor ecx, ecx
cmp eax, 0xf
setg cl
dec ecx
and ecx, 0xffe488c0
add ecx, 0x36ee80
mov dword [0x6d3a90], ecx
call fcn.004f16be
mov dword [0x6d3a94], eax
jmp 0x4ba48f
push str.:2:SA7_parsing_failed_because_of_an_in_valid_SA_submenu_password.
call fcn.00426c01
jmp 0x4ba443
mov eax, dword [ebx + 0x10]
cmp eax, edi
je 0x4ba3da
cmp byte [eax], 0
je 0x4ba3da
push edi
jmp 0x4ba3dc
push 1
push edi
call fcn.004bdf3a
pop ecx
pop ecx
push str.:2:SA7_parsing_failed_because_of_an_in_valid_SA7_password.
call fcn.00426c01
inc dword [0x6d3a9c]
cmp dword [0x6d3a9c], 1
pop ecx
jne 0x4ba409
push edi
call fcn.004bd85a
test eax, eax
pop ecx
jne 0x4ba444
push dword [ebx + 0x10]
push 1
call fcn.00453495
jmp 0x4ba442
push edi
call fcn.004be022
cmp dword [ebp - 0x594], 5
mov eax, dword [ebp - 0x59c]
pop ecx
push dword [eax + 0x206c]
jne 0x4ba438
push str.:6:The_PAULA_Server_has_determined_by_TelNetGetSalesSA7___that_the_PAULA_employee_number__d_is_setup_to_require_a_password_
jmp 0x4ba43d
push str.:6:The_PAULA_Server_has_determined_by_TelNetGetSalesSA7___that_the_PAULA_employee_number__d_is_invalid_
call fcn.004265da
pop ecx
pop ecx
mov dword [0x6d3a90], esi
call fcn.004f16be
mov dword [0x6d3a94], eax
mov dword [0x6d3a98], 1
jmp 0x4ba48f
push edi
push 1
call fcn.004bdf3a
push edi
push edi
call fcn.00453495
push 1
call fcn.004be022
add esp, 0x14
mov dword [ebp - 0x5a4], 1
mov dword [0x6d3a90], edi
mov dword [0x6d3a94], edi
call fcn.004f16be
sub eax, dword [0x6d3aa4]
cmp eax, esi
jbe 0x4ba4b6
mov edx, dword [ebp - 0x5a0]
mov ecx, dword [ebx + 0x14]
call fcn.004f1a6b
call fcn.004f16be
mov dword [0x6d3aa4], eax
cmp dword [ebp - 0x594], edi
mov dword [ebx + 0x2f90], edi
jne 0x4ba4cd
mov ecx, ebx
call fcn.004bd192
jmp 0x4ba4cf
xor eax, eax
cmp eax, edi
je 0x4ba4de
push str.:0:FYI:_End_Of_Day_process_has_begun.
call fcn.00426c01
pop ecx
cmp dword [0x6d3a84], edi
ja 0x4ba4ee
cmp dword [0x6d3a90], edi
jbe 0x4ba52c
mov ecx, dword [ebp - 0x59c]
push edi
push 1
add ecx, 0x1094
call fcn.004b510d
test eax, eax
pop ecx
pop ecx
je 0x4ba52c
cmp dword [0x6d3a84], edi
jbe 0x4ba51a
mov dword [0x6d3a84], 0xdbba00
cmp dword [0x6d3a90], edi
jbe 0x4ba52c
mov dword [0x6d3a90], 0x2255100
mov eax, dword [ebp - 0x5a4]
jmp 0x4bad60
xor eax, eax
xor esi, esi
mov word [ebp - 0x5e8], si
lea edi, [ebp - 0x5e6]
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.005117f0
add esp, 0xc
push 0x7f
lea eax, [ebp - 0x8b]
push esi
push eax
mov byte [ebp - 0x8c], 0
call fcn.005117f0
add esp, 0xc
push 0xff
lea eax, [ebp - 0x18b]
push esi
push eax
mov byte [ebp - 0x18c], 0
call fcn.005117f0
add esp, 0xc
xor edi, edi
push esi
inc edi
push edi
mov dword [ebp - 0x5ac], esi
call fcn.004bdf3a
push esi
push esi
call fcn.00453495
push edi
call fcn.004be022
add esp, 0x14
cmp dword [ebx + 0x2f94], esi
jne 0x4ba5d1
mov eax, dword [ebx + 0x14]
call fcn.004cd2f9
mov dword [ebx + 0x14], esi
push esi
push esi
call fcn.004bc47e
pop ecx
test eax, eax
mov eax, dword [ebx + 0x14]
pop ecx
je 0x4ba5ff
call fcn.00478270
test eax, eax
je 0x4bad5e
push dword [ebx + 0x14]
call fcn.00477b11
pop ecx
mov dword [ebx + 0x14], esi
jmp 0x4bad5e
call fcn.00478270
test eax, eax
jne 0x4ba61e
push esi
call fcn.00478fbd
pop ecx
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x2f94], edi
mov dword [ebp - 0x5ac], edi
mov ecx, dword [ebx + 0x14]
cmp ecx, esi
jne 0x4ba635
push str.:5:Need_to_handle_TAMS_II_SA7_login_failure_
call fcn.004265da
pop ecx
jmp 0x4bad5e
call fcn.004f1a21
push 0xbfd
lea eax, [ebp - 0x5e8]
push str..ServerPAULA.c
push eax
call fcn.004f2709
push ecx
lea esi, [ebp - 0x5e8]
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.004f05c5
mov dword [ebp - 0x598], eax
mov byte [ebp - 0x595], 1
mov eax, dword [ebp - 0x598]
mov dword [ebp - 0x590], eax
shr eax, 0x10
add esp, 0x10
inc al
cmp al, 0xc
mov byte [ebp - 0x58e], al
jbe 0x4ba69b
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.004c3ddd
pop ecx
mov ecx, dword [ebx + 0x14]
inc eax
mov dword [ebp - 0x5c4], eax
call fcn.0047931a
and dword [ebp - 0x5a8], 0
cmp dword [0x5c5790], 0
mov dword [ebp - 0x594], eax
je 0x4ba719
push dword [ebp - 0x594]
movzx ecx, byte [ebp - 0x58d]
mov eax, dword [0x5c5790]
push ecx
movzx ecx, byte [ebp - 0x58e]
inc dword [0x5c5790]
push ecx
movzx ecx, word [ebp - 0x590]
push ecx
movzx ecx, byte [ebp - 0x596]
push 1
push ecx
movzx ecx, word [ebp - 0x598]
push ecx
push esi
push eax
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.00426c01
add esp, 0x28
push dword [ebp - 0x594]
movzx edi, byte [ebp - 0x58d]
movzx eax, byte [ebp - 0x58e]
movzx ecx, word [ebp - 0x590]
movzx edx, word [ebp - 0x598]
push edi
push eax
movzx eax, byte [ebp - 0x596]
push ecx
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]
mov dword [ebp - 0x5c8], ecx
mov dword [ebp - 0x5b0], edx
call fcn.00477efe
add esp, 0x28
test eax, eax
je 0x4bab70
push dword [ebp - 0x5c4]
lea eax, [ebp - 0x58c]
push 9
push 0x3ff
push eax
push dword [ebx + 0x14]
call fcn.00477ff9
add esp, 0x14
test eax, eax
mov esi, ebx
je 0x4ba7ca
lea eax, [ebp - 0x58c]
call fcn.004b9cd1
test eax, eax
mov dword [ebp - 0x590], eax
jne 0x4ba7d7
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.004c53b7
add esp, 0x10
jmp 0x4ba7d7
xor eax, eax
call fcn.004b9cd1
mov dword [ebp - 0x590], eax
cmp dword [0x5c5790], 0
je 0x4ba800
mov eax, dword [0x5c5790]
inc dword [0x5c5790]
lea ecx, [ebp - 0x58c]
push ecx
push eax
push str.SA7_DBG__d:__s
call fcn.00426c01
add esp, 0xc
cmp dword [ebp - 0x590], 0
jle 0x4baa25
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.004c3ddd
mov esi, eax
inc esi
cmp dword [0x5c5790], 0
pop ecx
je 0x4ba848
push dword [ebp - 0x594]
mov eax, dword [0x5c5790]
inc dword [0x5c5790]
push edi
push eax
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_
call fcn.00426c01
add esp, 0x10
push dword [ebp - 0x594]
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]
call fcn.00477efe
add esp, 0x10
test eax, eax
je 0x4bab48
xor eax, eax
xor ecx, ecx
mov word [ebp - 0x5c0], cx
lea edi, [ebp - 0x5be]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x5d8], cx
lea edi, [ebp - 0x5d6]
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]
mov dword [ebp - 0x594], ecx
call fcn.00477ff9
add esp, 0x14
test eax, eax
je 0x4ba994
and dword [ebp - 0x598], 0
lea eax, [ebp - 0x58c]
push eax
mov ecx, 0x80
lea eax, [ebp - 0x8c]
call fcn.004c3b66
cmp dword [0x5c5790], 0
pop ecx
je 0x4ba901
mov eax, dword [0x5c5790]
inc dword [0x5c5790]
lea ecx, [ebp - 0x58c]
push ecx
push eax
push str.SA7_DBG__d:__s
call fcn.00426c01
add esp, 0xc
lea eax, [ebp - 0x598]
lea ecx, [ebp - 0x58c]
call fcn.004c571f
push eax
lea eax, [ebp - 0x5fc]
push eax
call fcn.004f10eb
mov esi, eax
lea edi, [ebp - 0x5c0]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x598]
xor ecx, ecx
movsd dword es:[edi], dword [esi]
call fcn.004c571f
push eax
lea eax, [ebp - 0x5fc]
push eax
call fcn.004f10eb
mov esi, eax
lea edi, [ebp - 0x5d8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x598]
xor ecx, ecx
movsd dword es:[edi], dword [esi]
call fcn.004c571f
lea eax, [ebp - 0x598]
xor ecx, ecx
call fcn.004c571f
push eax
call fcn.0045ffb2
mov dword [ebp - 0x594], eax
add esp, 0x14
lea eax, [ebp - 0x598]
xor ecx, ecx
call fcn.004c571f
lea eax, [ebp - 0x598]
xor ecx, ecx
call fcn.004c571f
push 0
sub esp, 0x10
lea esi, [ebp - 0x5c0]
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.004f0665
add esp, 0x14
test eax, eax
jne 0x4baa6a
push eax
sub esp, 0x10
lea esi, [ebp - 0x5d8]
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.004f0665
add esp, 0x14
test eax, eax
jne 0x4baa6a
lea eax, [ebp - 0x8c]
push eax
sub esp, 0x10
lea esi, [ebp - 0x5d8]
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.004f14aa
add esp, 0x10
push eax
sub esp, 0x10
lea esi, [ebp - 0x5c0]
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.004f14aa
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.004c53b7
add esp, 0x18
cmp dword [ebp - 0x5ac], 0
jne 0x4bad43
push dword [ebx + 0x14]
call fcn.00477b11
and dword [ebx + 0x14], 0
pop ecx
lea eax, [ebp - 0x8c]
push eax
push str.:5:RefreshSales___EOP:_The_recycled_connection_failed._Trying_again_with_new_connection...___s
call fcn.004265da
push dword [ebp - 0x5a0]
push ebx
push dword [ebp - 0x59c]
call fcn.004b9e5a
add esp, 0x14
jmp 0x4bad60
mov eax, dword [ebp - 0x590]
push 0xc76
mov dword [ebp - 0x5a8], eax
lea eax, [ebx + 0x4c]
push str..ServerPAULA.c
push eax
call fcn.004f2709
movzx eax, word [ebp - 0x5bc]
lea edi, [ebx + 0x5c]
lea esi, [ebp - 0x5c0]
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 - 0x5c0]
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 - 0x5d8]
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.004f0788
add esp, 0x10
test eax, eax
jne 0x4bab3c
sub esp, 0x10
mov edi, esp
lea esi, [ebp - 0x5c0]
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 - 0x5d8]
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.004f0922
add esp, 0x20
test eax, eax
jne 0x4bab3c
and dword [ebp - 0x5a4], eax
mov eax, dword [ebp - 0x594]
cmp eax, dword [ebp - 0x590]
jg 0x4bab1e
cmp eax, 1
jne 0x4babb5
cmp dword [ebp - 0x590], 0x14
jle 0x4babb5
push str.Yesterday_sales_catch_test.
lea eax, [ebp - 0x18c]
push 0x100
push eax
call fcn.004c53b7
add esp, 0xc
jmp 0x4baa25
mov dword [ebp - 0x5a4], 1
jmp 0x4babb5
lea eax, [ebp - 0x8c]
push eax
push dword [ebp - 0x594]
lea eax, [ebp - 0x18c]
push str.:7:RefreshSales___EAP:_ExecuteODBCFormat_LOC_d__FAILED:_EOD_cannot_be_determined:__s
push 0x100
push eax
call fcn.004c53b7
add esp, 0x14
jmp 0x4babb5
lea eax, [ebp - 0x8c]
push eax
push dword [ebp - 0x594]
movzx eax, byte [ebp - 0x58e]
push edi
push eax
push dword [ebp - 0x5c8]
movzx eax, byte [ebp - 0x596]
push 1
push eax
push dword [ebp - 0x5b0]
lea eax, [ebp - 0x18c]
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
push 0x100
push eax
call fcn.004c53b7
add esp, 0x2c
xor eax, eax
cmp dword [ebp - 0x5a8], eax
jle 0x4baa25
xor esi, esi
inc esi
cmp dword [ebp - 0x5a4], eax
mov dword [ebx + 0x2f90], esi
je 0x4bac72
cmp dword [ebx + 0x2f98], eax
jne 0x4bad38
cmp dword [ebx + 0x44], eax
je 0x4bac4d
cmp dword [ebx + 0x38], eax
je 0x4bac4d
mov ecx, ebx
call fcn.004bd192
call fcn.004bd186
test eax, eax
je 0x4bac39
mov eax, ebx
call fcn.004b9cad
mov ecx, ebx
call fcn.004bd192
test eax, eax
jne 0x4bac23
lea eax, [ebp - 0x8c]
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.004265da
pop ecx
pop ecx
push str.:0:FYI:_End_Of_Day_process_has_begun.__TAMS_II_
mov dword [ebx + 0x2f98], esi
call fcn.00426c01
pop ecx
jmp 0x4bad38
lea eax, [ebp - 0x8c]
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.004265da
pop ecx
jmp 0x4bac33
lea eax, [ebp - 0x8c]
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.00426c01
pop ecx
pop ecx
mov eax, ebx
call fcn.004b9cad
mov dword [ebx + 0x2f98], esi
jmp 0x4bad38
mov ecx, ebx
mov dword [ebx + 0x2f98], eax
call fcn.004bd192
test eax, eax
je 0x4bad38
lea eax, [ebp - 0x8c]
push eax
push dword [ebx + 0x38]
call fcn.0045feeb
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.004265da
movzx eax, word [0x6d39ac]
add esp, 0xc
push dword [0x6d39b0]
push eax
movzx eax, word [0x6d099c]
push eax
push dword [0x6cd98c]
movzx eax, word [0x6cd9e2]
push eax
movzx eax, word [0x6d09f2]
push eax
push dword [0x6cd9d8]
push dword [0x6d09e8]
push dword [0x6cd9d4]
push dword [0x6d09e4]
push dword [0x6cd9c8]
call fcn.0045feeb
pop ecx
push eax
push dword [0x6d09d8]
call fcn.0045feeb
pop ecx
push eax
push dword [0x6d0920]
mov esi, 0x6cd97c
push dword [0x6d3930]
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.004f0f28
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.004265da
xor esi, esi
add esp, 0x40
inc esi
and dword [0x5c5790], 0
mov eax, esi
jmp 0x4bad60
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x18c]
push eax
push str.:5:FYI:_TAMSii_SA7_FAILED:__s:__s
call fcn.004265da
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051291c
leave
ret