Function at 0x40cb70
Capabilities:
Reference sql statements

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c5b9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x2aac
call fcn.00419810
mov eax, dword [0x42729c]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x25c0], 0
mov dword [ebp - 0x14], 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 - 0x10]
call fcn.00417ae0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x25bc]
call fcn.00417ae0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x25b4]
call fcn.00417ae0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x25a8]
call fcn.00417ae0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x25ac]
call fcn.00417ae0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x18]
call fcn.00417ae0
mov byte [ebp - 4], 7
mov dword [ebp - 0x25b8], 1
push 0x1b1c
push 0
lea eax, [ebp - 0x2344]
push eax
call sub.MSVCR71.dll_memset
add esp, 0xc
movzx ecx, word [0x427640]
test ecx, ecx
jne 0x40cc66
push 0x427690
push str.SELECT_plan_id__source_dir__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 0x40cc80
push 0x427640
push str.SELECT_plan_name__source_dir__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 - 0x2a88], eax
push 0
lea ecx, [ebp - 0x2348]
call fcn.00418fc0
push eax
lea ecx, [ebp - 0x824]
push ecx
mov edx, dword [ebp - 0x2a88]
push edx
mov eax, dword [ebp - 0x2a88]
mov ecx, dword [eax]
call dword [ecx + 0x170]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40ce50
lea ecx, [ebp - 0x2348]
call fcn.00418fe0
test eax, eax
jne 0x40ce50
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2a8c], eax
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x2a8c]
push eax
mov ecx, dword [ebp - 0x2a8c]
mov edx, dword [ecx]
call dword [edx + 0x2c]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40ce50
cmp dword [ebp - 0x14], 1
jne 0x40ce50
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2a90], eax
lea ecx, [ebp - 0x1c]
call fcn.00417b90
push eax
push 0
push 0
mov eax, dword [ebp - 0x2a90]
push eax
mov ecx, dword [ebp - 0x2a90]
mov edx, dword [ecx]
call dword [edx + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40ce50
lea ecx, [ebp - 0x1c]
call fcn.00417b50
test eax, eax
je 0x40ce50
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2a94], eax
lea ecx, [ebp - 0x10]
call fcn.00417b90
push eax
push 1
push 0
mov eax, dword [ebp - 0x2a94]
push eax
mov ecx, dword [ebp - 0x2a94]
mov edx, dword [ecx]
call dword [edx + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40ce50
lea ecx, [ebp - 0x10]
call fcn.00417b50
test eax, eax
je 0x40ce50
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2a98], eax
lea ecx, [ebp - 0x25bc]
call fcn.00417b90
push eax
push 2
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 0x40ce50
lea ecx, [ebp - 0x25bc]
call fcn.00417b50
test eax, eax
je 0x40ce50
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2a9c], eax
lea eax, [ebp - 0x25c0]
push eax
push 3
push 0
mov ecx, dword [ebp - 0x2a9c]
push ecx
mov edx, dword [ebp - 0x2a9c]
mov eax, dword [edx]
call dword [eax + 0x44]
push eax
call fcn.00407110
add esp, 4
test eax, eax
je 0x40cf11
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 - 0x2a7c], 1
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x18]
call fcn.00417b00
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x25ac]
call fcn.00417b00
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x25a8]
call fcn.00417b00
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x25b4]
call fcn.00417b00
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x25bc]
call fcn.00417b00
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10]
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 - 0x2a7c]
jmp 0x40d625
movzx ecx, word [0x427640]
test ecx, ecx
jne 0x40cf35
lea ecx, [ebp - 0x1c]
call fcn.00417b70
push eax
push 0x427640
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
jmp 0x40cf4c
lea ecx, [ebp - 0x1c]
call fcn.00417b70
push eax
push 0x427690
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
push 0x104
lea edx, [ebp - 0x22f4]
push edx
push 0x427690
call fcn.00409ed0
add esp, 0xc
lea ecx, [ebp - 0x10]
call fcn.00417b70
push eax
lea eax, [ebp - 0x25a4]
push eax
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
lea ecx, [ebp - 0x25bc]
call fcn.00417b70
push eax
lea ecx, [ebp - 0x2a74]
push ecx
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 - 0x10]
call fcn.00417b20
lea ecx, [ebp - 0x25bc]
call fcn.00417b20
push 0x427640
lea edx, [ebp - 0x2344]
push edx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
mov dword [ebp - 0x1c3c], 1
lea eax, [ebp - 0x1830]
push eax
call dword [sym.imp.MSVCR71.dll_time]
add esp, 4
lea ecx, [ebp - 0x2344]
push ecx
call fcn.0040f090
add esp, 4
lea edx, [ebp - 0x25a4]
push edx
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
mov dword [ebp - 0x25b0], eax
mov eax, dword [ebp - 0x25b0]
movzx ecx, word [ebp + eax*2 - 0x25a6]
cmp ecx, 0x5c
je 0x40d047
mov edx, dword [ebp - 0x25b0]
mov word [ebp + edx*2 - 0x25a4], 0x5c
mov eax, dword [ebp - 0x25b0]
mov word [ebp + eax*2 - 0x25a2], 0
lea ecx, [ebp - 0x2a74]
push ecx
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
mov dword [ebp - 0x25b0], eax
mov edx, dword [ebp - 0x25b0]
movzx eax, word [ebp + edx*2 - 0x2a76]
cmp eax, 0x5c
je 0x40d090
mov ecx, dword [ebp - 0x25b0]
mov word [ebp + ecx*2 - 0x2a74], 0x5c
mov edx, dword [ebp - 0x25b0]
mov word [ebp + edx*2 - 0x2a72], 0
push 0x427640
push str.SELECT_source_database__last_file_copied__destination_database__source_server_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 - 0x2aa0], eax
push 0
lea ecx, [ebp - 0x2348]
call fcn.00418fc0
push eax
lea ecx, [ebp - 0x824]
push ecx
mov edx, dword [ebp - 0x2aa0]
push edx
mov eax, dword [ebp - 0x2aa0]
mov ecx, dword [eax]
call dword [ecx + 0x170]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40d138
lea ecx, [ebp - 0x2348]
call fcn.00418fe0
test eax, eax
jne 0x40d138
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2aa4], eax
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x2aa4]
push eax
mov ecx, dword [ebp - 0x2aa4]
mov edx, dword [ecx]
call dword [edx + 0x2c]
push eax
call fcn.00407110
add esp, 4
test eax, eax
je 0x40d1f8
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 - 0x2a80], 1
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x18]
call fcn.00417b00
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x25ac]
call fcn.00417b00
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x25a8]
call fcn.00417b00
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x25b4]
call fcn.00417b00
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x25bc]
call fcn.00417b00
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10]
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 - 0x2a80]
jmp 0x40d625
mov dword [ebp - 0x25b8], 0
mov dword [ebp - 0x2a78], 0
jmp 0x40d21d
mov eax, dword [ebp - 0x2a78]
add eax, 1
mov dword [ebp - 0x2a78], eax
mov ecx, dword [ebp - 0x2a78]
cmp ecx, dword [ebp - 0x14]
jge 0x40d58c
mov dword [ebp - 0x82c], 0
mov word [ebp - 0x182c], 0
mov dword [ebp - 0x1c38], 1
mov dword [ebp - 0x1c34], 0
lea ecx, [ebp - 0x25b4]
call fcn.00417b20
lea ecx, [ebp - 0x25a8]
call fcn.00417b20
lea ecx, [ebp - 0x25ac]
call fcn.00417b20
lea ecx, [ebp - 0x18]
call fcn.00417b20
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2aa8], eax
lea ecx, [ebp - 0x25b4]
call fcn.00417b90
push eax
push 0
mov edx, dword [ebp - 0x2a78]
push edx
mov eax, dword [ebp - 0x2aa8]
push eax
mov ecx, dword [ebp - 0x2aa8]
mov edx, dword [ecx]
call dword [edx + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40d543
lea ecx, [ebp - 0x25b4]
call fcn.00417b50
test eax, eax
je 0x40d543
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2aac], eax
lea ecx, [ebp - 0x25a8]
call fcn.00417b90
push eax
push 1
mov eax, dword [ebp - 0x2a78]
push eax
mov ecx, dword [ebp - 0x2aac]
push ecx
mov edx, dword [ebp - 0x2aac]
mov eax, dword [edx]
call dword [eax + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40d543
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2ab0], eax
lea ecx, [ebp - 0x25ac]
call fcn.00417b90
push eax
push 2
mov ecx, dword [ebp - 0x2a78]
push ecx
mov edx, dword [ebp - 0x2ab0]
push edx
mov eax, dword [ebp - 0x2ab0]
mov ecx, dword [eax]
call dword [ecx + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40d543
lea ecx, [ebp - 0x2348]
call fcn.00419000
mov dword [ebp - 0x2ab4], eax
lea ecx, [ebp - 0x18]
call fcn.00417b90
push eax
push 3
mov edx, dword [ebp - 0x2a78]
push edx
mov eax, dword [ebp - 0x2ab4]
push eax
mov ecx, dword [ebp - 0x2ab4]
mov edx, dword [ecx]
call dword [edx + 0x50]
push eax
call fcn.00407110
add esp, 4
test eax, eax
jne 0x40d543
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
push 0x104
lea ecx, [ebp - 0x1e94]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00417b70
push eax
call fcn.00409ed0
add esp, 0xc
lea ecx, [ebp - 0x25ac]
call fcn.00417b50
test eax, eax
je 0x40d416
lea ecx, [ebp - 0x25ac]
call fcn.00417b70
push eax
lea edx, [ebp - 0x1f98]
push edx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
jmp 0x40d41f
mov word [ebp - 0x1f98], 0
mov word [ebp - 0x281c], 0
lea eax, [ebp - 0x2344]
push eax
lea ecx, [ebp - 0x281c]
push ecx
lea ecx, [ebp - 0x25a8]
call fcn.00417b70
push eax
mov edx, dword [ebp - 0x25c0]
push edx
lea ecx, [ebp - 0x25b4]
call fcn.00417b70
push eax
lea eax, [ebp - 0x2a74]
push eax
lea ecx, [ebp - 0x25a4]
push ecx
call fcn.0040e1c0
add esp, 0x1c
test eax, eax
jne 0x40d479
mov dword [ebp - 0x25b8], 1
cmp dword [ebp - 0x1c34], 0
je 0x40d499
lea edx, [ebp - 0x281c]
push edx
lea eax, [ebp - 0x1c30]
push eax
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
movzx ecx, word [ebp - 0x281c]
test ecx, ecx
je 0x40d541
mov edx, dword [ebp - 0x25b4]
push edx
push 0x427640
lea eax, [ebp - 0x281c]
push eax
push str.UPDATE_msdb.dbo.backup_movement_plan_databases_SET_last_file_copied__N_s__date_last_copied__getdate___WHERE_plan_id__N_s_AND_source_database__N_s
lea ecx, [ebp - 0x824]
push ecx
call dword [sym.imp.MSVCR71.dll_swprintf]
add esp, 0x14
mov ecx, 0x432214
call fcn.004188a0
mov dword [ebp - 0x2ab8], eax
push 0
push 0
lea edx, [ebp - 0x824]
push edx
mov eax, dword [ebp - 0x2ab8]
push eax
mov ecx, dword [ebp - 0x2ab8]
mov edx, dword [ecx]
call dword [edx + 0x16c]
push eax
call fcn.00407110
add esp, 4
test eax, eax
je 0x40d541
mov dword [ebp - 0x25b8], 1
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
mov dword [ebp - 0x1c38], 0
jmp 0x40d578
mov dword [ebp - 0x25b8], 1
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
lea ecx, [ebp - 0x2344]
push ecx
call fcn.0040edd0
add esp, 4
jmp 0x40d20e
cmp dword [ebp - 0x14], 0
jne 0x40d5a1
lea edx, [ebp - 0x2344]
push edx
call fcn.0040edd0
add esp, 4
mov eax, dword [ebp - 0x25b8]
mov dword [ebp - 0x2a84], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x18]
call fcn.00417b00
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x25ac]
call fcn.00417b00
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x25a8]
call fcn.00417b00
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x25b4]
call fcn.00417b00
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x25bc]
call fcn.00417b00
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10]
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]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x20]
call fcn.00419641
mov esp, ebp
pop ebp
ret