Function at 0x40d640
Capabilities:
Reference sql statements

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c60a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x2abc
call fcn.00419810
mov eax, dword [0x42729c]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x25c0], 0
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x25bc], 0
lea ecx, [ebp - 0x2348]
call fcn.00418f50
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.00417ae0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x25b8]
call fcn.00417ae0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x25b4]
call fcn.00417ae0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x25a8]
call fcn.00417ae0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x234c]
call fcn.00417ae0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x18]
call fcn.00417ae0
mov byte [ebp - 4], 6
mov dword [ebp - 0x25b0], 1
push 0x1b1c
push 0
lea eax, [ebp - 0x2344]
push eax
call sub.MSVCR71.dll_memset
add esp, 0xc
movzx ecx, word [0x428b90]
test ecx, ecx
jne 0x40d73b
push 0x4272b0
push str.SELECT_plan_id__destination_dir__database_subdir_FROM_msdb.dbo.backup_movement_plans_WHERE_plan_name__N_s
lea edx, [ebp - 0x824]
push edx
call dword [sym.imp.MSVCR71.dll_swprintf]
add esp, 0xc
jmp 0x40d755
push 0x428b90
push str.SELECT_plan_name__destination_dir__database_subdir_FROM_msdb.dbo.backup_movement_plans_WHERE_plan_id___s
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.MSVCR71.dll_swprintf]
add esp, 0xc
mov ecx, 0x432214
call fcn.004188a0
mov dword [ebp - 0x2a90], eax
push 0
lea ecx, [ebp - 0x2348]
call fcn.00418fc0
push eax
lea ecx, [ebp - 0x824]
push ecx
mov edx, dword [ebp - 0x2a90]
push edx
mov eax, dword [ebp - 0x2a90]
mov ecx, dword [eax]
call dword [ecx + 0x170]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40d8d4
lea ecx, [ebp - 0x2348]
call fcn.00418fe0
test eax, eax
jne 0x40d8d4
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2a94], eax
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x2a94]
push eax
mov ecx, dword [ebp - 0x2a94]
mov edx, dword [ecx]
call dword [edx + 0x2c]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40d8d4
cmp dword [ebp - 0x10], 1
jne 0x40d8d4
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2a98], eax
lea ecx, [ebp - 0x1c]
call fcn.00417b90
push eax
push 0
push 0
mov eax, dword [ebp - 0x2a98]
push eax
mov ecx, dword [ebp - 0x2a98]
mov edx, dword [ecx]
call dword [edx + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40d8d4
lea ecx, [ebp - 0x1c]
call fcn.00417b50
test eax, eax
je 0x40d8d4
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2a9c], eax
lea ecx, [ebp - 0x25b8]
call fcn.00417b90
push eax
push 1
push 0
mov eax, dword [ebp - 0x2a9c]
push eax
mov ecx, dword [ebp - 0x2a9c]
mov edx, dword [ecx]
call dword [edx + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40d8d4
lea ecx, [ebp - 0x25b8]
call fcn.00417b50
test eax, eax
je 0x40d8d4
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2aa0], eax
lea eax, [ebp - 0x25c0]
push eax
push 2
push 0
mov ecx, dword [ebp - 0x2aa0]
push ecx
mov edx, dword [ebp - 0x2aa0]
mov eax, dword [edx]
call dword [eax + 0x44]
push eax
call fcn.00407110
add esp, 4
test eax, eax
je 0x40d989
mov dword [ebp - 0x1c38], 0
mov ecx, dword [0x428930]
mov dword [ebp - 0x82c], ecx
push 0x427924
lea edx, [ebp - 0x182c]
push edx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
lea eax, [ebp - 0x2344]
push eax
call fcn.0040edd0
add esp, 4
mov dword [ebp - 0x2a84], 1
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x18]
call fcn.00417b00
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x234c]
call fcn.00417b00
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x25a8]
call fcn.00417b00
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x25b4]
call fcn.00417b00
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x25b8]
call fcn.00417b00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.00417b00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2348]
call fcn.00418f70
mov eax, dword [ebp - 0x2a84]
jmp 0x40e1a3
movzx ecx, word [0x428b90]
test ecx, ecx
jne 0x40d9ad
lea ecx, [ebp - 0x1c]
call fcn.00417b70
push eax
push 0x428b90
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
jmp 0x40d9c4
lea ecx, [ebp - 0x1c]
call fcn.00417b70
push eax
push 0x4272b0
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
push 0x104
lea edx, [ebp - 0x22f4]
push edx
push 0x4272b0
call fcn.00409ed0
add esp, 0xc
lea ecx, [ebp - 0x25b8]
call fcn.00417b70
push eax
lea eax, [ebp - 0x2a74]
push eax
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
lea ecx, [ebp - 0x2348]
call fcn.00419020
lea ecx, [ebp - 0x1c]
call fcn.00417b20
lea ecx, [ebp - 0x25b8]
call fcn.00417b20
push 0x428b90
lea ecx, [ebp - 0x2344]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
mov dword [ebp - 0x1c3c], 0
lea edx, [ebp - 0x1830]
push edx
call dword [sym.imp.MSVCR71.dll_time]
add esp, 4
lea eax, [ebp - 0x2344]
push eax
call fcn.0040f090
add esp, 4
lea ecx, [ebp - 0x2a74]
push ecx
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
mov dword [ebp - 0x25ac], eax
mov edx, dword [ebp - 0x25ac]
movzx eax, word [ebp + edx*2 - 0x2a76]
cmp eax, 0x5c
je 0x40da9e
mov ecx, dword [ebp - 0x25ac]
mov word [ebp + ecx*2 - 0x2a74], 0x5c
mov edx, dword [ebp - 0x25ac]
mov word [ebp + edx*2 - 0x2a72], 0
push 0x428b90
push str.SELECT_source_database__destination_database__last_file_loaded__load_delay__load_all__source_server__retention_period_FROM_msdb.dbo.backup_movement_plan_databases_WHERE_plan_id__N_s
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.MSVCR71.dll_swprintf]
add esp, 0xc
mov ecx, 0x432214
call fcn.004188a0
mov dword [ebp - 0x2aa4], eax
push 0
lea ecx, [ebp - 0x2348]
call fcn.00418fc0
push eax
lea ecx, [ebp - 0x824]
push ecx
mov edx, dword [ebp - 0x2aa4]
push edx
mov eax, dword [ebp - 0x2aa4]
mov ecx, dword [eax]
call dword [ecx + 0x170]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40db46
lea ecx, [ebp - 0x2348]
call fcn.00418fe0
test eax, eax
jne 0x40db46
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2aa8], eax
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x2aa8]
push eax
mov ecx, dword [ebp - 0x2aa8]
mov edx, dword [ecx]
call dword [edx + 0x2c]
push eax
call fcn.00407110
add esp, 4
test eax, eax
je 0x40dbfa
mov dword [ebp - 0x1c38], 0
mov eax, dword [0x428930]
mov dword [ebp - 0x82c], eax
push 0x427924
lea ecx, [ebp - 0x182c]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
lea edx, [ebp - 0x2344]
push edx
call fcn.0040edd0
add esp, 4
mov dword [ebp - 0x2a88], 1
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x18]
call fcn.00417b00
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x234c]
call fcn.00417b00
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x25a8]
call fcn.00417b00
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x25b4]
call fcn.00417b00
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x25b8]
call fcn.00417b00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.00417b00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2348]
call fcn.00418f70
mov eax, dword [ebp - 0x2a88]
jmp 0x40e1a3
mov dword [ebp - 0x25b0], 0
mov dword [ebp - 0x2a78], 0
jmp 0x40dc1f
mov eax, dword [ebp - 0x2a78]
add eax, 1
mov dword [ebp - 0x2a78], eax
mov ecx, dword [ebp - 0x2a78]
cmp ecx, dword [ebp - 0x10]
jge 0x40e12b
mov dword [ebp - 0x82c], 0
mov word [ebp - 0x182c], 0
mov dword [ebp - 0x1c38], 1
mov dword [ebp - 0x1c34], 0
mov dword [ebp - 0x2a7c], 0
lea ecx, [ebp - 0x25b4]
call fcn.00417b20
lea ecx, [ebp - 0x25a8]
call fcn.00417b20
lea ecx, [ebp - 0x234c]
call fcn.00417b20
lea ecx, [ebp - 0x18]
call fcn.00417b20
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2aac], eax
lea ecx, [ebp - 0x25b4]
call fcn.00417b90
push eax
push 0
mov edx, dword [ebp - 0x2a78]
push edx
mov eax, dword [ebp - 0x2aac]
push eax
mov ecx, dword [ebp - 0x2aac]
mov edx, dword [ecx]
call dword [edx + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40e0e2
lea ecx, [ebp - 0x25b4]
call fcn.00417b50
test eax, eax
je 0x40e0e2
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2ab0], eax
lea ecx, [ebp - 0x25a8]
call fcn.00417b90
push eax
push 1
mov eax, dword [ebp - 0x2a78]
push eax
mov ecx, dword [ebp - 0x2ab0]
push ecx
mov edx, dword [ebp - 0x2ab0]
mov eax, dword [edx]
call dword [eax + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40e0e2
lea ecx, [ebp - 0x25a8]
call fcn.00417b50
test eax, eax
je 0x40e0e2
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2ab4], eax
lea ecx, [ebp - 0x234c]
call fcn.00417b90
push eax
push 2
mov ecx, dword [ebp - 0x2a78]
push ecx
mov edx, dword [ebp - 0x2ab4]
push edx
mov eax, dword [ebp - 0x2ab4]
mov ecx, dword [eax]
call dword [ecx + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40e0e2
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2ab8], eax
lea edx, [ebp - 0x25bc]
push edx
push 3
mov eax, dword [ebp - 0x2a78]
push eax
mov ecx, dword [ebp - 0x2ab8]
push ecx
mov edx, dword [ebp - 0x2ab8]
mov eax, dword [edx]
call dword [eax + 0x40]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40e0e2
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2abc], eax
lea ecx, [ebp - 0x14]
push ecx
push 4
mov edx, dword [ebp - 0x2a78]
push edx
mov eax, dword [ebp - 0x2abc]
push eax
mov ecx, dword [ebp - 0x2abc]
mov edx, dword [ecx]
call dword [edx + 0x44]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40e0e2
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2ac0], eax
lea ecx, [ebp - 0x18]
call fcn.00417b90
push eax
push 5
mov eax, dword [ebp - 0x2a78]
push eax
mov ecx, dword [ebp - 0x2ac0]
push ecx
mov edx, dword [ebp - 0x2ac0]
mov eax, dword [edx]
call dword [eax + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40e0e2
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2ac4], eax
lea ecx, [ebp - 0x2a7c]
push ecx
push 6
mov edx, dword [ebp - 0x2a78]
push edx
mov eax, dword [ebp - 0x2ac4]
push eax
mov ecx, dword [ebp - 0x2ac4]
mov edx, dword [ecx]
call dword [edx + 0x40]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40e0e2
lea ecx, [ebp - 0x25b4]
call fcn.00417b70
push eax
lea eax, [ebp - 0x209c]
push eax
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
lea ecx, [ebp - 0x25a8]
call fcn.00417b70
push eax
lea ecx, [ebp - 0x1f98]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
push 0x104
lea edx, [ebp - 0x1e94]
push edx
lea ecx, [ebp - 0x18]
call fcn.00417b70
push eax
call fcn.00409ed0
add esp, 0xc
lea ecx, [ebp - 0x234c]
call fcn.00417b50
test eax, eax
je 0x40df1a
lea ecx, [ebp - 0x234c]
call fcn.00417b70
push eax
lea eax, [ebp - 0x25a4]
push eax
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
jmp 0x40df23
mov word [ebp - 0x25a4], 0
mov dword [ebp - 0x2a80], 1
mov ecx, dword [ebp - 0x2a80]
push ecx
mov edx, dword [ebp - 0x25bc]
push edx
lea eax, [ebp - 0x281c]
push eax
lea ecx, [ebp - 0x25a4]
push ecx
lea ecx, [ebp - 0x25a8]
call fcn.00417b70
push eax
lea ecx, [ebp - 0x25b4]
call fcn.00417b70
push eax
mov edx, dword [ebp - 0x25c0]
push edx
lea eax, [ebp - 0x2a74]
push eax
call fcn.0040e530
add esp, 0x20
test eax, eax
jne 0x40dfb5
mov dword [ebp - 0x1c38], 0
mov ecx, dword [0x428930]
mov dword [ebp - 0x82c], ecx
push 0x427924
lea edx, [ebp - 0x182c]
push edx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
mov dword [ebp - 0x25b0], 1
jmp 0x40e0e0
mov dword [ebp - 0x2a80], 0
movzx eax, word [ebp - 0x281c]
test eax, eax
je 0x40e0a7
mov ecx, dword [ebp - 0x25b4]
push ecx
push 0x428b90
lea edx, [ebp - 0x281c]
push edx
push str.UPDATE_msdb.dbo.backup_movement_plan_databases_SET_last_file_loaded__N_s__date_last_loaded__getdate____WHERE_plan_id__N_s_AND_source_database__N_s
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.MSVCR71.dll_swprintf]
add esp, 0x14
mov ecx, 0x432214
call fcn.004188a0
mov dword [ebp - 0x2ac8], eax
push 0
push 0
lea ecx, [ebp - 0x824]
push ecx
mov edx, dword [ebp - 0x2ac8]
push edx
mov eax, dword [ebp - 0x2ac8]
mov ecx, dword [eax]
call dword [ecx + 0x16c]
push eax
call fcn.00407110
add esp, 4
test eax, eax
je 0x40e06a
mov dword [ebp - 0x1c38], 0
mov edx, dword [0x428930]
mov dword [ebp - 0x82c], edx
push 0x427924
lea eax, [ebp - 0x182c]
push eax
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
mov dword [ebp - 0x25b0], 1
jmp 0x40e0e0
lea ecx, [ebp - 0x281c]
push ecx
lea edx, [ebp - 0x25a4]
push edx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
lea eax, [ebp - 0x281c]
push eax
lea ecx, [ebp - 0x1c30]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
mov edx, dword [ebp - 0x1c34]
add edx, 1
mov dword [ebp - 0x1c34], edx
cmp dword [ebp - 0x14], 0
je 0x40e0b8
movzx eax, word [ebp - 0x281c]
test eax, eax
jne 0x40e0db
movzx ecx, word [ebp - 0x1c30]
test ecx, ecx
je 0x40e0d9
mov edx, dword [ebp - 0x2a7c]
push edx
lea eax, [ebp - 0x1c30]
push eax
call fcn.0040f880
add esp, 8
jmp 0x40e0e0
jmp 0x40df2d
jmp 0x40e117
mov dword [ebp - 0x1c38], 0
mov ecx, dword [0x428930]
mov dword [ebp - 0x82c], ecx
push 0x427924
lea edx, [ebp - 0x182c]
push edx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
mov dword [ebp - 0x25b0], 1
lea eax, [ebp - 0x2344]
push eax
call fcn.0040edd0
add esp, 4
jmp 0x40dc10
mov ecx, dword [ebp - 0x25b0]
mov dword [ebp - 0x2a8c], ecx
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x18]
call fcn.00417b00
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x234c]
call fcn.00417b00
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x25a8]
call fcn.00417b00
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x25b4]
call fcn.00417b00
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x25b8]
call fcn.00417b00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.00417b00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2348]
call fcn.00418f70
mov eax, dword [ebp - 0x2a8c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x20]
call fcn.00419641
mov esp, ebp
pop ebp
ret