Function at 0x5179a0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x750
mov eax, dword [0x6fb448]
xor eax, ebp
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x14], 0
cmp dword [ebp + 8], 0
je 0x5179e2
cmp dword [ebp + 0xc], 0
jne 0x5179e9
xor eax, eax
jmp 0x518f38
xor eax, eax
je 0x5179f4
xor eax, eax
jmp 0x518f38
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
call fcn.00402211
add esp, 4
test eax, eax
jne 0x517a14
mov eax, 1
test eax, eax
je 0x51861e
mov word [ebp - 0x5c0], 0
xor ecx, ecx
mov dword [ebp - 0x5be], ecx
mov dword [ebp - 0x5ba], ecx
mov dword [ebp - 0x5b6], ecx
mov word [ebp - 0x5b2], cx
mov byte [ebp - 0x5b0], 0
push 0x3ff
push 0
lea edx, [ebp - 0x5af]
push edx
call fcn.005b02a0
add esp, 0xc
mov byte [ebp - 0x1b0], 0
push 0x7f
push 0
lea eax, [ebp - 0x1af]
push eax
call fcn.005b02a0
add esp, 0xc
mov byte [ebp - 0x130], 0
push 0xff
push 0
lea ecx, [ebp - 0x12f]
push ecx
call fcn.005b02a0
add esp, 0xc
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], 0
xor edx, edx
mov word [ebp - 0x26], dx
mov word [ebp - 0x5c4], 0
xor eax, eax
mov word [ebp - 0x5c2], ax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
push 0
push 1
call fcn.0051c170
add esp, 8
push 1
call fcn.0051c2b0
add esp, 4
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0x2f94], 0
jne 0x517b01
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
push eax
call fcn.004020d6
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x14], 0
push 0
push 0
call fcn.0051acf0
add esp, 8
test eax, eax
je 0x517b44
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
push eax
call fcn.00402211
add esp, 4
test eax, eax
je 0x517b3d
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
call fcn.00401a28
add esp, 4
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x14], 0
xor eax, eax
jmp 0x518f38
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
call fcn.00402211
add esp, 4
test eax, eax
jne 0x517b7b
push 0
call fcn.0040184d
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x14], eax
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x2f94], 1
mov dword [ebp - 0x1c], 1
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 0
jne 0x517b98
push str.:5:Need_to_handle_TAMS_II_SA7_login_failure_
call fcn.00401014
add esp, 4
xor eax, eax
jmp 0x518f38
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
call fcn.0040240a
add esp, 4
push 0xc04
push 0x6bd4d4
lea eax, [ebp - 0x5c0]
push eax
call fcn.00402036
add esp, 0xfffffffc
mov ecx, esp
mov edx, dword [ebp - 0x5c0]
mov dword [ecx], edx
mov eax, dword [ebp - 0x5bc]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x5b8]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x5b4]
mov dword [ecx + 0xc], eax
call fcn.004031b1
add esp, 0x10
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x25], 1
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x5c4], ecx
mov dl, byte [ebp - 0x5c2]
add dl, 1
mov byte [ebp - 0x5c2], dl
movzx eax, byte [ebp - 0x5c2]
cmp eax, 0xc
jle 0x517c31
mov byte [ebp - 0x5c2], 1
mov cx, word [ebp - 0x5c4]
add cx, 1
mov word [ebp - 0x5c4], cx
mov dword [ebp - 0x24], 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, dword [ebp - 0x24]
push edx
call fcn.00402987
add esp, 8
add eax, 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.00401bdb
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0
cmp dword [0x6bd4a0], 0
je 0x517cca
mov edx, dword [0x6bd4a0]
mov dword [ebp - 0x734], edx
mov eax, dword [0x6bd4a0]
add eax, 1
mov dword [0x6bd4a0], eax
mov ecx, dword [ebp - 0x14]
push ecx
movzx edx, byte [ebp - 0x5c1]
push edx
movzx eax, byte [ebp - 0x5c2]
push eax
movzx ecx, word [ebp - 0x5c4]
push ecx
movzx edx, byte [ebp - 0x25]
push edx
movzx eax, byte [ebp - 0x26]
push eax
movzx ecx, word [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x734]
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.004018ca
add esp, 0x28
mov ecx, dword [ebp - 0x14]
push ecx
movzx edx, byte [ebp - 0x5c1]
push edx
movzx eax, byte [ebp - 0x5c2]
push eax
movzx ecx, word [ebp - 0x5c4]
push ecx
movzx edx, byte [ebp - 0x25]
push edx
movzx eax, byte [ebp - 0x26]
push eax
movzx ecx, word [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x24]
push edx
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
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.00401703
add esp, 0x28
test eax, eax
je 0x518368
mov dword [ebp - 0x5c8], 0
mov edx, dword [ebp - 0x20]
push edx
push 9
push 0x3ff
lea eax, [ebp - 0x5b0]
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
call fcn.00402e6e
add esp, 0x14
test eax, eax
je 0x517d88
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x5b0]
push ecx
call fcn.00519010
add esp, 8
mov dword [ebp - 0x5c8], eax
cmp dword [ebp - 0x5c8], 0
jne 0x517d86
lea edx, [ebp - 0x5b0]
push edx
push str.:5:RefreshSales___EAP:_Sales_line___s__is_invalid.
push 0x100
lea eax, [ebp - 0x130]
push eax
call fcn.00402dc9
add esp, 0x10
jmp 0x517df4
movzx ecx, byte [ebp - 0x25]
cmp ecx, 1
je 0x517d9a
movzx edx, byte [ebp - 0x25]
cmp edx, 2
jne 0x517db0
mov eax, dword [ebp + 0xc]
push eax
push 0
call fcn.00519010
add esp, 8
mov dword [ebp - 0x5c8], eax
jmp 0x517df4
mov ecx, dword [ebp - 0x14]
push ecx
movzx edx, byte [ebp - 0x5c1]
push edx
movzx eax, byte [ebp - 0x5c2]
push eax
movzx ecx, word [ebp - 0x5c4]
push ecx
movzx edx, byte [ebp - 0x25]
push edx
movzx eax, byte [ebp - 0x26]
push eax
movzx ecx, word [ebp - 0x28]
push ecx
push str.:5:RefreshSales___EAP:_FetchRowODBC___04d__02d__02d_OR__04d__02d__02d_AND_LOC_d___returned_an_empty_set.__This_should_only_happen_if_not_a_single_invoice_has_yet_been_billed_this_month.
push 0x100
lea edx, [ebp - 0x130]
push edx
call fcn.00402dc9
add esp, 0x28
cmp dword [0x6bd4a0], 0
je 0x517e32
mov eax, dword [0x6bd4a0]
mov dword [ebp - 0x738], eax
mov ecx, dword [0x6bd4a0]
add ecx, 1
mov dword [0x6bd4a0], ecx
lea edx, [ebp - 0x5b0]
push edx
mov eax, dword [ebp - 0x738]
push eax
push 0x6bd860
call fcn.004018ca
add esp, 0xc
cmp dword [ebp - 0x5c8], 0
jle 0x518366
mov dword [ebp - 0x24], str.EOD_STARTED_DATE_NEW_DAY_STARTED_DATE_SALES_YEAR_MONTH_ACCT_DAY_STARTED_BY_IP_ADDRESS_STARTED_BY_EMPLOYEE_ID
push 0x2c
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00402987
add esp, 8
add eax, 1
mov dword [ebp - 0x20], eax
cmp dword [0x6bd4a0], 0
je 0x517e98
mov edx, dword [0x6bd4a0]
mov dword [ebp - 0x73c], edx
mov eax, dword [0x6bd4a0]
add eax, 1
mov dword [0x6bd4a0], eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x73c]
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.004018ca
add esp, 0x10
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x24]
push edx
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_
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.00401703
add esp, 0x10
test eax, eax
je 0x518342
mov word [ebp - 0x5e8], 0
xor edx, edx
mov dword [ebp - 0x5e6], edx
mov dword [ebp - 0x5e2], edx
mov dword [ebp - 0x5de], edx
mov word [ebp - 0x5da], dx
mov word [ebp - 0x5d8], 0
xor eax, eax
mov dword [ebp - 0x5d6], eax
mov dword [ebp - 0x5d2], eax
mov dword [ebp - 0x5ce], eax
mov word [ebp - 0x5ca], ax
mov dword [ebp - 0x5ec], 0
mov ecx, dword [ebp - 0x20]
push ecx
push 9
push 0x3ff
lea edx, [ebp - 0x5b0]
push edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.00402e6e
add esp, 0x14
test eax, eax
je 0x5180d9
mov dword [ebp - 0x5f0], 0
mov dword [ebp - 0x5f4], 0
push 0x80
lea edx, [ebp - 0x5b0]
push edx
lea eax, [ebp - 0x1b0]
push eax
call fcn.00402725
add esp, 0xc
cmp dword [0x6bd4a0], 0
je 0x517fa5
mov ecx, dword [0x6bd4a0]
mov dword [ebp - 0x740], ecx
mov edx, dword [0x6bd4a0]
add edx, 1
mov dword [0x6bd4a0], edx
lea eax, [ebp - 0x5b0]
push eax
mov ecx, dword [ebp - 0x740]
push ecx
push str.SA7_DBG__d:__s
call fcn.004018ca
add esp, 0xc
lea edx, [ebp - 0x5f4]
push edx
push 0x6bd60c
lea eax, [ebp - 0x5b0]
push eax
call fcn.004024f0
add esp, 0xc
mov dword [ebp - 0x5f0], eax
mov ecx, dword [ebp - 0x5f0]
push ecx
lea edx, [ebp - 0x720]
push edx
call fcn.00401f19
add esp, 8
mov ecx, dword [eax]
mov dword [ebp - 0x5e8], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0x5e4], edx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x5e0], ecx
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x5dc], edx
lea eax, [ebp - 0x5f4]
push eax
push str._t_t_t_t_t
push 0
call fcn.004024f0
add esp, 0xc
mov dword [ebp - 0x5f0], eax
mov ecx, dword [ebp - 0x5f0]
push ecx
lea edx, [ebp - 0x730]
push edx
call fcn.00401f19
add esp, 8
mov ecx, dword [eax]
mov dword [ebp - 0x5d8], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0x5d4], edx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x5d0], ecx
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x5cc], edx
lea eax, [ebp - 0x5f4]
push eax
push 0x6bda18
push 0
call fcn.004024f0
add esp, 0xc
mov dword [ebp - 0x5f0], eax
lea ecx, [ebp - 0x5f4]
push ecx
push 0x6bda1c
push 0
call fcn.004024f0
add esp, 0xc
mov dword [ebp - 0x5f0], eax
mov edx, dword [ebp - 0x5f0]
push edx
call fcn.00402ec3
add esp, 4
mov dword [ebp - 0x5ec], eax
lea eax, [ebp - 0x5f4]
push eax
push 0x6bda20
push 0
call fcn.004024f0
add esp, 0xc
mov dword [ebp - 0x5f0], eax
lea ecx, [ebp - 0x5f4]
push ecx
push 0x6bda24
push 0
call fcn.004024f0
add esp, 0xc
mov dword [ebp - 0x5f0], eax
push 0
sub esp, 0x10
mov edx, esp
mov eax, dword [ebp - 0x5e8]
mov dword [edx], eax
mov ecx, dword [ebp - 0x5e4]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x5e0]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x5dc]
mov dword [edx + 0xc], ecx
call fcn.004021a8
add esp, 0x14
test eax, eax
jne 0x518149
push 0
sub esp, 0x10
mov edx, esp
mov eax, dword [ebp - 0x5d8]
mov dword [edx], eax
mov ecx, dword [ebp - 0x5d4]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x5d0]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x5cc]
mov dword [edx + 0xc], ecx
call fcn.004021a8
add esp, 0x14
test eax, eax
je 0x5182b0
mov edx, dword [ebp - 0x5c8]
mov dword [ebp - 0x18], edx
push 0xc7d
push 0x6bda28
mov eax, dword [ebp + 0xc]
add eax, 0x4c
push eax
call fcn.00402036
add esp, 0xc
mov ecx, dword [ebp + 0xc]
add ecx, 0x5c
mov edx, dword [ebp - 0x5e8]
mov dword [ecx], edx
mov eax, dword [ebp - 0x5e4]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x5e0]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x5dc]
mov dword [ecx + 0xc], eax
movzx ecx, word [ebp - 0x5e4]
shl ecx, 4
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx + 0x2f9c]
mov ecx, dword [ebp - 0x5e8]
mov dword [eax], ecx
mov edx, dword [ebp - 0x5e4]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x5e0]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x5dc]
mov dword [eax + 0xc], edx
sub esp, 0x10
mov eax, esp
mov ecx, dword [ebp - 0x5d8]
mov dword [eax], ecx
mov edx, dword [ebp - 0x5d4]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x5d0]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x5cc]
mov dword [eax + 0xc], edx
call fcn.00402e4b
add esp, 0x10
test eax, eax
jne 0x51825b
sub esp, 0x10
mov eax, esp
mov ecx, dword [ebp - 0x5e8]
mov dword [eax], ecx
mov edx, dword [ebp - 0x5e4]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x5e0]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x5dc]
mov dword [eax + 0xc], edx
sub esp, 0x10
mov eax, esp
mov ecx, dword [ebp - 0x5d8]
mov dword [eax], ecx
mov edx, dword [ebp - 0x5d4]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x5d0]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x5cc]
mov dword [eax + 0xc], edx
call fcn.004025d6
add esp, 0x20
test eax, eax
je 0x518264
mov dword [ebp - 0x10], 1
jmp 0x5182ab
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x5ec]
cmp eax, dword [ebp - 0x5c8]
jg 0x51828b
cmp dword [ebp - 0x5ec], 1
jne 0x5182ab
cmp dword [ebp - 0x5c8], 0x14
jle 0x5182ab
mov dword [ebp - 0x18], 0
push str.Yesterday_sales_catch_test.
push 0x100
lea ecx, [ebp - 0x130]
push ecx
call fcn.00402dc9
add esp, 0xc
jmp 0x518340
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
lea edx, [ebp - 0x1b0]
push edx
sub esp, 0x10
mov eax, esp
mov ecx, dword [ebp - 0x5d8]
mov dword [eax], ecx
mov edx, dword [ebp - 0x5d4]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x5d0]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x5cc]
mov dword [eax + 0xc], edx
call fcn.00402fea
add esp, 0x10
push eax
sub esp, 0x10
mov eax, esp
mov ecx, dword [ebp - 0x5e8]
mov dword [eax], ecx
mov edx, dword [ebp - 0x5e4]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x5e0]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x5dc]
mov dword [eax + 0xc], edx
call fcn.00402fea
add esp, 0x10
push eax
push str.:7:RefreshSales___EAP:_Sales_CANNOT_be_posted:_stEODTime___s__stNewDayTime___s:__s
push 0x100
lea eax, [ebp - 0x130]
push eax
call fcn.00402dc9
add esp, 0x18
jmp 0x518366
lea ecx, [ebp - 0x1b0]
push ecx
mov edx, dword [ebp - 0x14]
push edx
push str.:7:RefreshSales___EAP:_ExecuteODBCFormat_LOC_d__FAILED:_EOD_cannot_be_determined:__s
push 0x100
lea eax, [ebp - 0x130]
push eax
call fcn.00402dc9
add esp, 0x14
jmp 0x5183b3
lea ecx, [ebp - 0x1b0]
push ecx
mov edx, dword [ebp - 0x14]
push edx
movzx eax, byte [ebp - 0x5c1]
push eax
movzx ecx, byte [ebp - 0x5c2]
push ecx
movzx edx, word [ebp - 0x5c4]
push edx
movzx eax, byte [ebp - 0x25]
push eax
movzx ecx, byte [ebp - 0x26]
push ecx
movzx edx, word [ebp - 0x28]
push edx
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
lea eax, [ebp - 0x130]
push eax
call fcn.00402dc9
add esp, 0x2c
cmp dword [ebp - 0x18], 0
jle 0x5185b0
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x2f90], 1
cmp dword [ebp - 0x10], 0
je 0x51849f
mov edx, dword [ebp + 0xc]
cmp dword [edx + 0x2f98], 0
jne 0x51849a
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x44], 0
je 0x5183f6
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0x38], 0
jne 0x518425
lea edx, [ebp - 0x1b0]
push edx
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.004018ca
add esp, 8
mov eax, dword [ebp + 0xc]
push eax
call fcn.00518fa0
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x2f98], 1
jmp 0x51849a
mov edx, dword [ebp + 0xc]
push edx
call fcn.0051aea0
add esp, 4
call fcn.0051ae80
test eax, eax
je 0x518486
mov eax, dword [ebp + 0xc]
push eax
call fcn.00518fa0
add esp, 4
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0051aea0
add esp, 4
test eax, eax
jne 0x51846a
lea edx, [ebp - 0x1b0]
push edx
push str.:8:RefreshSales___Critical_Exception_:_PostSales___says_EOD_has_NOT_been_encountered__This_will_result_in_EOD_never_being_posted___s
call fcn.00401014
add esp, 8
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x2f98], 1
push str.:0:FYI:_End_Of_Day_process_has_begun.__TAMS_II_
call fcn.004018ca
add esp, 4
jmp 0x51849a
lea ecx, [ebp - 0x1b0]
push ecx
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.00401014
add esp, 8
jmp 0x51859a
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x2f98], 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.0051aea0
add esp, 4
test eax, eax
je 0x51859a
lea ecx, [ebp - 0x1b0]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x38]
push eax
call fcn.0040109b
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.00401014
add esp, 0xc
mov ecx, dword [0x826478]
push ecx
movzx edx, word [0x826474]
push edx
movzx eax, word [0x823464]
push eax
mov ecx, dword [0x820454]
push ecx
movzx edx, word [0x8204aa]
push edx
movzx eax, word [0x8234ba]
push eax
mov ecx, dword [0x8204a0]
push ecx
mov edx, dword [0x8234b0]
push edx
mov eax, dword [0x82049c]
push eax
mov ecx, dword [0x8234ac]
push ecx
mov edx, dword [0x820490]
push edx
call fcn.0040109b
add esp, 4
push eax
mov eax, dword [0x8234a0]
push eax
call fcn.0040109b
add esp, 4
push eax
mov ecx, dword [0x8233e8]
push ecx
mov edx, dword [0x8263f8]
push edx
push 0
sub esp, 0x10
mov eax, esp
mov ecx, dword [0x820444]
mov dword [eax], ecx
mov edx, dword [0x820448]
mov dword [eax + 4], edx
mov ecx, dword [0x82044c]
mov dword [eax + 8], ecx
mov edx, dword [0x820450]
mov dword [eax + 0xc], edx
call fcn.004010a5
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.00401014
add esp, 0x40
mov dword [0x6bd4a0], 0
mov eax, 1
jmp 0x518f38
cmp dword [ebp - 0x1c], 0
jne 0x5185fc
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.00401a28
add esp, 4
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x14], 0
lea eax, [ebp - 0x1b0]
push eax
push str.:5:RefreshSales___EOP:_The_recycled_connection_failed._Trying_again_with_new_connection...___s
call fcn.00401014
add esp, 8
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.005179a0
add esp, 0xc
jmp 0x518f38
lea ecx, [ebp - 0x1b0]
push ecx
lea edx, [ebp - 0x130]
push edx
push str.:5:FYI:_TAMSii_SA7_FAILED:__s:__s
call fcn.00401014
add esp, 0xc
xor eax, eax
jmp 0x518f38
mov dword [ebp - 8], 0
push 0x6bdf50
push 0xcf1
push 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.00402f09
add esp, 0x10
test eax, eax
jne 0x5189c9
push 0
push 0
call fcn.0051acf0
add esp, 8
test eax, eax
jne 0x5189c7
cmp dword [0x8264cc], 0
je 0x51867c
call fcn.0040323d
sub eax, dword [0x826534]
cmp eax, dword [0x8264cc]
jbe 0x518985
cmp dword [0x826538], 0
je 0x5186bf
push 0x6bdf60
mov edx, dword [ebp + 8]
push edx
call fcn.0040176c
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x5186b5
mov eax, dword [ebp - 4]
push eax
push 0x6bdf68
push str.:5:LoadConfigSettings__s__FAILED_in_PaulaServer_during_Invalid_LOGIN_Password_reload_attempt_because___s_
call fcn.004018ca
add esp, 0xc
mov dword [0x826538], 0
mov ecx, dword [ebp + 8]
add ecx, 0x1094
push ecx
call fcn.004019e2
add esp, 4
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x14], eax
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 0
jne 0x51870e
push 0
mov ecx, dword [ebp + 8]
add ecx, 0x1094
push ecx
call fcn.00401ec9
add esp, 8
push eax
mov edx, dword [ebp + 8]
add edx, 0x1094
push edx
push str.:4:RefreshSales___FAILED_to_connect_to___s_:_PingHost___u
call fcn.00401014
add esp, 0xc
jmp 0x518724
mov eax, dword [ebp + 8]
add eax, 0x1094
push eax
push str.:0:FYI:_RefreshSales___has_opened_a_connection_to___s_.
call fcn.004018ca
add esp, 8
push 1
push 0x4b
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
call fcn.00401a23
add esp, 0xc
push 1
push 0xa
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.0040234c
add esp, 0xc
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
push eax
call fcn.004020c7
add esp, 4
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x744], ecx
cmp dword [ebp - 0x744], 0xd
ja case.0x51877c.5
mov edx, dword [ebp - 0x744]
jmp dword [edx*4 + 0x518f48]
mov dword [0x8264cc], 0
mov dword [0x826534], 0
jmp 0x518983
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x28], 0
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x2c], 0
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x30], 0
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x34], 0
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x38], 0
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x3c], 0
mov eax, dword [ebp + 0xc]
fldz
fstp dword [eax + 0x40]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x44], 0
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x48], 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.0051aea0
add esp, 4
mov dword [ebp - 0x10], eax
push 0
push 1
call fcn.0051acf0
add esp, 8
push str.:0:FYI:_EOM_process_has_begun.
call fcn.004018ca
add esp, 4
mov dword [0x8264cc], 0
mov dword [0x826534], 0
jmp 0x518983
mov ecx, dword [ebp + 8]
add ecx, 0x149c
push ecx
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.004018ca
add esp, 8
mov dword [0x8264cc], 0x5265c0
call fcn.0040323d
mov dword [0x826534], eax
mov dword [0x826538], 1
jmp 0x518983
mov edx, dword [ebp + 8]
add edx, 0x149c
push edx
push str.:7:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED_because_a_login_password_is_required.___s_
call fcn.004018ca
add esp, 8
mov dword [0x8264cc], 0x36ee80
call fcn.0040323d
mov dword [0x826534], eax
mov dword [0x826538], 1
jmp 0x518983
push str.:3:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_System_maintenance_is_in_progress...
call fcn.004018ca
add esp, 4
mov dword [0x8264cc], 0xdbba0
call fcn.0040323d
mov dword [0x826534], eax
jmp 0x518983
push str.:3:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_Start_new_day_hang_up...
call fcn.004018ca
add esp, 4
mov dword [0x8264cc], 0x927c0
call fcn.0040323d
mov dword [0x826534], eax
jmp 0x518983
push str.:3:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_EOD_needs_to_be_restarted...
call fcn.004018ca
add esp, 4
mov dword [0x8264cc], 0x36ee80
call fcn.0040323d
mov dword [0x826534], eax
jmp 0x518983
push str.:3:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_TAMS_backup_failed...
call fcn.004018ca
add esp, 4
mov dword [0x8264cc], 0x36ee80
call fcn.0040323d
mov dword [0x826534], eax
jmp 0x518983
push str.:6:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_Max_users_has_been_exceeded.
call fcn.004018ca
add esp, 4
mov dword [0x8264cc], 0x5265c0
call fcn.0040323d
mov dword [0x826534], eax
jmp 0x518983
mov eax, dword [ebp - 0xc]
push eax
push str.:6:RefreshSales___FAILED:_TelNetTAMSLogon___FAILED:_Unknown_error__u.
call fcn.004018ca
add esp, 8
mov dword [0x8264cc], 0x927c0
call fcn.0040323d
mov dword [0x826534], eax
jmp 0x5189c7
call fcn.0040323d
sub eax, dword [0x826534]
mov ecx, dword [0x8264cc]
sub ecx, eax
mov dword [ebp - 0x74c], ecx
mov dword [ebp - 0x748], 0
fild qword [ebp - 0x74c]
fdiv qword [0x62a178]
sub esp, 8
fstp qword [esp]
push str.:3:RefreshSales___FAILED:_TelNetTAMSLogon___cannot_logon_for__.02fmin
call fcn.004018ca
add esp, 0xc
jmp 0x518a3a
push 0
push 0
call fcn.0051acf0
add esp, 8
test eax, eax
je 0x518a3a
mov edx, 1
test edx, edx
je 0x5189f8
push 0x6be3d0
push 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.00401a55
add esp, 0xc
push 0x4b
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x6be3d8
push 5
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
push eax
call fcn.00401a55
add esp, 0xc
push 0xaf
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
call fcn.004020d6
add esp, 4
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x14], 0
push 0x6be3e0
push 0xd9d
push 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
call fcn.00402f09
add esp, 0x10
test eax, eax
je 0x518f35
cmp dword [0x82653c], 0
je 0x518a7d
call fcn.0040323d
sub eax, dword [0x826540]
cmp eax, dword [0x82653c]
jbe 0x518f35
mov eax, 1
test eax, eax
je 0x518adb
push str.ww
push 5
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
call fcn.00401a55
add esp, 0xc
push str.byM
push 5
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.00401a55
add esp, 0xc
push 0x96
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
push eax
call fcn.004020d6
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x14], 0
jmp 0x518f35
cmp dword [0x826544], 0
je 0x518b1e
push 0x6be404
mov edx, dword [ebp + 8]
push edx
call fcn.0040176c
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x518b14
mov eax, dword [ebp - 4]
push eax
push 0x6be40c
push str.:5:LoadConfigSettings__s__FAILED_in_PaulaServer_during_Invalid_SA7_Password_reload_attempt_because___s_
call fcn.004018ca
add esp, 0xc
mov dword [0x826544], 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x206c]
mov dword [ecx + 8], eax
mov ecx, dword [ebp + 8]
add ecx, 0x159c
mov edx, dword [ebp + 0xc]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp + 8]
add eax, 0x189c
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x10], eax
mov dword [0x6be400], 0
cmp dword [0x6be400], 0
je 0x518c64
mov byte [ebp - 0x700], 0
push 0x103
push 0
lea edx, [ebp - 0x6ff]
push edx
call fcn.005b02a0
add esp, 0xc
push 0
push 0
call fcn.00401474
add esp, 8
push eax
push str._sSA7Debug_TelNetDebug.txt
push 0x104
lea eax, [ebp - 0x700]
push eax
call fcn.00402dc9
add esp, 0x10
lea ecx, [ebp - 0x700]
push ecx
call fcn.004028ab
add esp, 4
test eax, eax
jne 0x518c64
mov word [ebp - 0x710], 0
xor edx, edx
mov dword [ebp - 0x70e], edx
mov dword [ebp - 0x70a], edx
mov dword [ebp - 0x706], edx
mov word [ebp - 0x702], dx
push 0xdc6
push 0x6be49c
lea eax, [ebp - 0x710]
push eax
call fcn.00402036
add esp, 0xc
movzx ecx, word [ebp - 0x704]
push ecx
movzx edx, word [ebp - 0x706]
push edx
movzx eax, word [ebp - 0x708]
push eax
movzx ecx, word [ebp - 0x70a]
push ecx
movzx edx, word [ebp - 0x70e]
push edx
movzx eax, word [ebp - 0x710]
push eax
push 0
push 0
call fcn.00401474
add esp, 8
push eax
push str._s_04d__02d__02d___02d__02d__02d_SA7Debug_TelNetDebug.txt
push 0x104
lea ecx, [ebp - 0x700]
push ecx
call fcn.00402dc9
add esp, 0x28
lea edx, [ebp - 0x700]
push edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.0040246e
add esp, 8
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004024b9
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [0x6be400], 0
je 0x518c9b
push 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
call fcn.0040246e
add esp, 8
mov dword [0x6be400], 0
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x750], eax
cmp dword [ebp - 0x750], 5
ja case.0x518cb7.3
mov ecx, dword [ebp - 0x750]
jmp dword [ecx*4 + 0x518f80]
push 0
push 1
call fcn.0051c170
add esp, 8
push 1
call fcn.0051c2b0
add esp, 4
mov dword [ebp - 8], 1
mov dword [0x82653c], 0
mov dword [0x826540], 0
jmp 0x518e8c
push 0
call fcn.0051c2b0
add esp, 4
cmp dword [ebp - 0xc], 5
jne 0x518d1d
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x206c]
push eax
push str.:6:The_PAULA_Server_has_determined_by_TelNetGetSalesSA7___that_the_PAULA_employee_number__d_is_setup_to_require_a_password_
call fcn.00401014
add esp, 8
jmp 0x518d34
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x206c]
push edx
push str.:6:The_PAULA_Server_has_determined_by_TelNetGetSalesSA7___that_the_PAULA_employee_number__d_is_invalid_
call fcn.00401014
add esp, 8
mov dword [0x82653c], 0x1b7740
call fcn.0040323d
mov dword [0x826540], eax
mov dword [0x826544], 1
jmp 0x518e8c
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x10], 0
je 0x518d6d
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
movsx eax, byte [edx]
test eax, eax
jne 0x518d7b
push 1
push 0
call fcn.0051c170
add esp, 8
jmp 0x518d87
push 0
push 0
call fcn.0051c170
add esp, 8
push str.:2:SA7_parsing_failed_because_of_an_in_valid_SA7_password.
call fcn.004018ca
add esp, 4
mov ecx, dword [0x826548]
add ecx, 1
mov dword [0x826548], ecx
cmp dword [0x826548], 1
jne 0x518db6
push 0
call fcn.00401140
add esp, 4
mov dword [0x82653c], 0x1b7740
call fcn.0040323d
mov dword [0x826540], eax
mov dword [0x826544], 1
jmp 0x518e8c
push str.:2:SA7_parsing_failed_because_of_an_in_valid_SA_submenu_password.
call fcn.004018ca
add esp, 4
mov dword [0x82653c], 0x1b7740
call fcn.0040323d
mov dword [0x826540], eax
mov dword [0x826544], 1
jmp 0x518e8c
mov edx, dword [0x82654c]
mov eax, dword [0x82654c]
add eax, 1
mov dword [0x82654c], eax
cmp edx, 2
jle 0x518e8c
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [0x82654c]
push edx
push str.:4:TelNetGetSalesSA7___has_failed__d_times_consecutively:_error__u
call fcn.004018ca
add esp, 0xc
cmp dword [0x82654c], 5
jg 0x518e4e
mov dword [0x82653c], 0x493e0
jmp 0x518e82
cmp dword [0x82654c], 0xa
jg 0x518e63
mov dword [0x82653c], 0x927c0
jmp 0x518e82
cmp dword [0x82654c], 0xf
jg 0x518e78
mov dword [0x82653c], 0x1b7740
jmp 0x518e82
mov dword [0x82653c], 0x36ee80
call fcn.0040323d
mov dword [0x826540], eax
call fcn.0040323d
sub eax, dword [0x826550]
cmp eax, 0x1b7740
jbe 0x518ebb
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
call fcn.004031b6
add esp, 8
call fcn.0040323d
mov dword [0x826550], eax
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x2f90], 0
cmp dword [ebp - 0xc], 0
jne 0x518edf
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0051aea0
add esp, 4
mov dword [ebp - 0x10], eax
jmp 0x518ee6
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x10], 0
je 0x518ef9
push str.:0:FYI:_End_Of_Day_process_has_begun.
call fcn.004018ca
add esp, 4
cmp dword [0x8264cc], 0
ja 0x518f0b
cmp dword [0x82653c], 0
jbe 0x518f35
xor edx, edx
je 0x518f35
cmp dword [0x8264cc], 0
jbe 0x518f22
mov dword [0x8264cc], 0xdbba00
cmp dword [0x82653c], 0
jbe 0x518f35
mov dword [0x82653c], 0x2255100
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x2c]
xor ecx, ebp
call fcn.005b0290
mov esp, ebp
pop ebp
ret