Function at 0x4240d8
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4f24
call fcn.00430730
push esi
push edi
mov ecx, 0xc
mov esi, str.DownloadMSXInstructions
lea edi, [ebp - 0x2308]
rep movsd dword es:[edi], dword [esi]
mov ax, word [0x449754]
mov word [ebp - 0x3f0c], ax
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x3f0a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov cx, word [0x44975c]
mov word [ebp - 0xdd0], cx
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0xdce]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dx, word [0x449764]
mov word [ebp - 0x4f1c], dx
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x4f1a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ax, word [0x44976c]
mov word [ebp - 0x3b0c], ax
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x3b0a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov cx, word [0x449774]
mov word [ebp - 0x2b08], cx
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0x2b06]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dx, word [0x44977c]
mov word [ebp - 0x22a0], dx
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0x229e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ax, word [0x449784]
mov word [ebp - 0x1aa0], ax
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0x1a9e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0x22d8], 0
mov dword [ebp - 0xdd4], 0
mov dword [ebp - 0xde0], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x3f14], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x22ac], 0
mov dword [ebp - 0x22a8], 0
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x22d4], 0
mov dword [ebp - 0xddc], 0
mov dword [ebp - 0x22b0], 0
mov dword [ebp - 0x3f10], 0
mov dword [ebp - 0x3f18], 0
mov dword [ebp - 0x2b0c], 0
mov dword [ebp - 0xdd8], 0
mov dword [ebp - 0x3f1c], 0
mov dword [ebp - 0x4f20], 0
mov dword [ebp - 0x22a4], 0
mov ecx, dword [ebp + 8]
push ecx
push str.DownloadMSXInstructions__s__n
call fcn.0042fc9e
add esp, 8
cmp dword [ebp + 8], 0
je 0x4242b7
mov edx, dword [ebp + 8]
xor eax, eax
mov ax, word [edx]
test eax, eax
je 0x4242b7
cmp dword [0x4496a8], 0
je 0x4242be
xor eax, eax
jmp 0x424d37
push 0x441bf0
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x19a0]
push edx
call fcn.00426dd1
add esp, 0xc
test eax, eax
je 0x424b3f
push 0xa
push 0x1c
lea eax, [ebp - 0x22d0]
push eax
call dword [sym.imp.SQLSVC.dll_SHRecMemInit]
add esp, 0xc
cmp dword [0x4496ac], 0
jne 0x4243ea
cmp dword [0x44b3b0], 0
jne 0x4243ea
push 0x200
lea ecx, [ebp - 0x3f0c]
push ecx
push 0x18f
mov edx, dword [0x4492ac]
push edx
call dword [sym.imp.SQLUNIRL.dll__LoadString_16]
push str.7.0.594
push 0x441c3c
lea eax, [ebp - 0x3f0c]
push eax
lea ecx, [ebp - 0x22a0]
push ecx
mov edx, dword [0x449ba0]
call dword [edx + 0x4cc]
add esp, 0x10
lea eax, [ebp - 0x22a0]
push eax
push str.0x07000252
push str.IF__EXISTS__SELECT__FROM_msdb.dbo.sysobjects_WHERE__name__Nsp_sqlagent_check_msx_version__AND__type__P____EXECUTE_msdb.dbo.sp_sqlagent_check_msx_version__required_microsoft_version___s_ELSE_________________________________________________BEGIN_DECLARE__msx_version_NVARCHAR_16__SELECT__msx_version__CONVERT_NVARCHAR_2___CONVERT_INT__CONVERT_BINARY_1____CONVERT_BINARY_2_____microsoftversion___0xffff____256______N.__CONVERT_NVARCHAR_2___CONVERT_INT__CONVERT_BINARY_1____CONVERT_BINARY_2_____microsoftversion___0xffff_____256______N.__CONVERT_NVARCHAR_4_____microsoftversion__0xffff__RAISERROR_N_s__16__1___msx_version__END
lea ecx, [ebp - 0x4f1c]
push ecx
mov edx, dword [0x449ba0]
call dword [edx + 0x4cc]
add esp, 0x10
lea eax, [ebp - 0x2308]
push eax
lea ecx, [ebp - 0x3b0c]
push ecx
lea edx, [ebp - 0x3f10]
push edx
push 1
push 1
lea eax, [ebp - 0x4f1c]
push eax
lea ecx, [ebp - 0x19a0]
push ecx
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4243b9
cmp dword [ebp - 0x3f10], 0
je 0x4243e0
cmp dword [ebp - 0x3f10], 0x38cd
je 0x4243d1
cmp dword [ebp - 0x3f10], 0xc350
jne 0x4243db
mov dword [0x4496a8], 1
jmp 0x424b1f
mov dword [0x4496ac], 1
push 0
lea edx, [ebp - 0xdd8]
push edx
lea eax, [ebp - 0x2b0c]
push eax
call fcn.00421080
add esp, 0xc
mov eax, dword [ebp - 0xdd8]
cdq
mov ecx, 0x64
idiv ecx
push edx
mov eax, dword [ebp - 0xdd8]
cdq
mov ecx, 0x2710
idiv ecx
mov eax, edx
cdq
mov ecx, 0x64
idiv ecx
push eax
mov eax, dword [ebp - 0xdd8]
cdq
mov ecx, 0x2710
idiv ecx
push eax
mov eax, dword [ebp - 0x2b0c]
cdq
mov ecx, 0x64
idiv ecx
push edx
mov eax, dword [ebp - 0x2b0c]
cdq
mov ecx, 0x2710
idiv ecx
mov eax, edx
cdq
mov ecx, 0x64
idiv ecx
push eax
mov eax, dword [ebp - 0x2b0c]
cdq
mov ecx, 0x2710
idiv ecx
push eax
push str._ld__02ld__02ld__02ld:_02ld:_02ld
lea edx, [ebp - 0xdd0]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0x20
lea ecx, [ebp - 0x1aa0]
push ecx
call fcn.004278a5
add esp, 4
lea edx, [ebp - 0x1aa0]
push edx
mov eax, dword [0x44b6f4]
push eax
lea ecx, [ebp - 0xdd0]
push ecx
push 0x449194
push str.EXECUTE_msdb.dbo.sp_sqlagent_probe_msx__server_name__N_s___local_time__N_s___poll_interval___ld___time_zone_adjustment___s
lea edx, [ebp - 0x4f1c]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0x18
lea ecx, [ebp - 0x2308]
push ecx
lea edx, [ebp - 0x3b0c]
push edx
lea eax, [ebp - 0x3f10]
push eax
push 0
push 1
lea ecx, [ebp - 0x4f1c]
push ecx
lea edx, [ebp - 0x19a0]
push edx
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x424632
cmp dword [ebp - 0x3f10], 0
jne 0x424632
lea eax, [ebp - 0x22a4]
push eax
lea ecx, [ebp - 0x22a8]
push ecx
push 4
push 0xfffffffffffffff0
push 1
lea edx, [ebp - 0x19a0]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
lea eax, [ebp - 0x22a4]
push eax
lea ecx, [ebp - 8]
push ecx
push 4
push 0xfffffffffffffff0
push 2
lea edx, [ebp - 0x19a0]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
lea eax, [ebp - 0x22a4]
push eax
lea ecx, [ebp - 4]
push ecx
push 4
push 0xfffffffffffffff0
push 3
lea edx, [ebp - 0x19a0]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
lea eax, [ebp - 0x19a0]
push eax
call dword [sym.imp.SQLSVC.dll_QSQLNextRow]
add esp, 4
cmp eax, 0xffffffff
jne 0x424592
jmp 0x42457b
lea ecx, [ebp - 0x19a0]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLResults]
add esp, 4
cmp eax, 1
je 0x424515
lea edx, [ebp - 0x19a0]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLPurgeResults]
add esp, 4
cmp dword [ebp - 0x22a8], 0
jne 0x4245ca
cmp dword [ebp - 8], 0
je 0x424625
cmp dword [0x4401f0], 0
je 0x424620
cmp dword [ebp - 0x22a8], 0
je 0x4245f6
mov eax, dword [ebp + 8]
push eax
push 0x449194
push 0x122
push 0
push 1
call fcn.0041b8d1
add esp, 0x14
cmp dword [ebp - 8], 0
je 0x424616
mov ecx, dword [ebp + 8]
push ecx
push 0x449194
push 0x123
push 0
push 1
call fcn.0041b8d1
add esp, 0x14
mov dword [0x4401f0], 0
jmp 0x424b1f
cmp dword [ebp - 4], 0
jne 0x424630
jmp 0x424b1f
jmp 0x424647
lea edx, [ebp - 0x19a0]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLPurgeResults]
add esp, 4
jmp 0x424b1f
mov dword [0x4401f0], 1
mov eax, dword [0x44b920]
push eax
lea ecx, [ebp - 0x22d0]
push ecx
lea edx, [ebp - 0x19a0]
push edx
call fcn.0040bf45
add esp, 0xc
mov dword [ebp - 0x22d4], eax
cmp dword [ebp - 0x22d4], 0
je 0x424a66
push str.SQLAgent___MSX_Op_Servicer
lea eax, [ebp - 0xbd0]
push eax
call fcn.00407820
add esp, 8
lea ecx, [ebp - 0x2308]
push ecx
push 1
lea edx, [ebp - 0xbd0]
push edx
call fcn.004078f6
add esp, 0xc
test eax, eax
jne 0x4246b5
jmp 0x424b1f
mov dword [ebp - 0x3f14], 1
mov dword [ebp - 0x3f18], 0
jmp 0x4246da
mov eax, dword [ebp - 0x3f18]
add eax, 1
mov dword [ebp - 0x3f18], eax
mov ecx, dword [ebp - 0x3f18]
cmp ecx, dword [ebp - 0x22c8]
jge 0x424a66
push 0
mov edx, dword [0x44b940]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x424707
jmp 0x424a66
mov dword [ebp - 0x22ac], 0
mov eax, dword [ebp - 0x22ac]
mov dword [ebp - 0xde0], eax
mov ecx, dword [ebp - 0xde0]
mov dword [ebp - 0xdd4], ecx
mov word [ebp - 0x2b08], 0
mov dword [ebp - 0x4f20], 0
mov edx, dword [ebp - 0x4f20]
mov dword [ebp - 0x3f10], edx
mov eax, dword [ebp - 0x3f18]
push eax
lea ecx, [ebp - 0x22d0]
push ecx
call dword [sym.imp.SQLSVC.dll_SHRecMemLock]
add esp, 8
mov dword [ebp - 0x22d8], eax
cmp dword [ebp - 0x22d8], 0
je 0x424a61
mov edx, dword [ebp - 0x22d8]
mov eax, dword [edx + 8]
mov dword [ebp - 0x4f24], eax
cmp dword [ebp - 0x4f24], 1
je 0x424798
cmp dword [ebp - 0x4f24], 2
je 0x4247e3
jmp 0x424838
lea ecx, [ebp - 0x22b0]
push ecx
lea edx, [ebp - 0xde0]
push edx
lea eax, [ebp - 0x4f20]
push eax
push 0x400
lea ecx, [ebp - 0x2b08]
push ecx
mov edx, dword [ebp - 0x22d8]
push edx
lea eax, [ebp - 0xbd0]
push eax
lea ecx, [ebp - 0x19a0]
push ecx
call fcn.00424d3d
add esp, 0x20
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0xdd4], eax
jmp 0x424860
lea edx, [ebp - 0x22ac]
push edx
lea eax, [ebp - 0xc]
push eax
push 0x400
lea ecx, [ebp - 0x2b08]
push ecx
mov edx, dword [ebp - 0x22d8]
push edx
lea eax, [ebp - 0xbd0]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0042553a
add esp, 0x1c
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0xdd4], eax
cmp dword [ebp - 0x22ac], 0
je 0x424836
mov edx, dword [ebp - 0x22d8]
mov eax, dword [edx]
mov dword [ebp - 0x3f1c], eax
jmp 0x424860
push 0x400
lea ecx, [ebp - 0x2b08]
push ecx
push 0x125
mov edx, dword [0x4492ac]
push edx
call dword [sym.imp.SQLUNIRL.dll__LoadString_16]
mov dword [ebp - 0xdd4], 1
cmp dword [ebp - 0x22ac], 0
je 0x42486e
jmp 0x424a66
cmp dword [ebp - 0xdd4], 0
jne 0x424981
mov eax, dword [ebp - 0x22d8]
mov ecx, dword [eax]
push ecx
push str.UPDATE_msdb.dbo.sysdownloadlist_SET_date_downloaded__GETDATE____status__1_WHERE__instance_id___ld_
lea edx, [ebp - 0x4f1c]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0xc
lea ecx, [ebp - 0x2308]
push ecx
lea edx, [ebp - 0x3b0c]
push edx
lea eax, [ebp - 0x3f10]
push eax
push 1
push 1
lea ecx, [ebp - 0x4f1c]
push ecx
lea edx, [ebp - 0x19a0]
push edx
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4248df
cmp dword [ebp - 0x3f10], 0
je 0x4248f4
mov eax, dword [ebp - 0x22d8]
cmp dword [eax + 4], 7
jne 0x42493e
cmp dword [ebp - 0x3f10], 0
jne 0x42493e
cmp dword [ebp - 0xde0], 0
je 0x42492d
lea ecx, [ebp - 0x2308]
push ecx
lea edx, [ebp - 0x3b0c]
push edx
lea eax, [ebp - 0x3f10]
push eax
push 1
push 1
push str.IF____trancount___0__COMMIT_TRANSACTION
lea ecx, [ebp - 0xbd0]
push ecx
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0xddc]
add edx, 1
mov dword [ebp - 0xddc], edx
jmp 0x42497c
cmp dword [ebp - 0xde0], 0
je 0x424977
lea eax, [ebp - 0x2308]
push eax
lea ecx, [ebp - 0x3b0c]
push ecx
lea edx, [ebp - 0x3f10]
push edx
push 1
push 1
push 0x442404
lea eax, [ebp - 0xbd0]
push eax
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
jmp 0x424a66
jmp 0x424a61
cmp dword [ebp - 0xde0], 0
je 0x4249ba
lea ecx, [ebp - 0x2308]
push ecx
lea edx, [ebp - 0x3b0c]
push edx
lea eax, [ebp - 0x3f10]
push eax
push 1
push 1
push str.IF____trancount___0__ROLLBACK_TRANSACTION
lea ecx, [ebp - 0xbd0]
push ecx
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x2b08]
and edx, 0xffff
test edx, edx
je 0x424a5f
cmp dword [ebp - 0x4f20], 0x21cb
je 0x424a5f
push 0x800
lea eax, [ebp - 0x22a0]
push eax
push 0x4424ac
push 0x4424b4
lea ecx, [ebp - 0x2b08]
push ecx
call fcn.0042f530
add esp, 0x14
mov edx, dword [ebp - 0x22d8]
mov eax, dword [edx]
push eax
lea ecx, [ebp - 0x22a0]
push ecx
push 0x4424b8
lea edx, [ebp - 0x4f1c]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0x10
lea ecx, [ebp - 0x2308]
push ecx
lea edx, [ebp - 0x3b0c]
push edx
lea eax, [ebp - 0x3f10]
push eax
push 1
push 1
lea ecx, [ebp - 0x4f1c]
push ecx
lea edx, [ebp - 0x19a0]
push edx
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
jmp 0x424a66
jmp 0x4246cb
cmp dword [ebp - 0xddc], 0
je 0x424ac1
push 0x449194
push str.EXECUTE_msdb.dbo.sp_downloaded_row_limiter__server_name__N_s
lea eax, [ebp - 0x4f1c]
push eax
mov ecx, dword [0x449ba0]
call dword [ecx + 0x4cc]
add esp, 0xc
lea edx, [ebp - 0x2308]
push edx
lea eax, [ebp - 0x3b0c]
push eax
lea ecx, [ebp - 0x3f10]
push ecx
push 1
push 1
lea edx, [ebp - 0x4f1c]
push edx
lea eax, [ebp - 0x19a0]
push eax
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0xc], 0
je 0x424b1f
push 0x449194
mov ecx, dword [0x44b6f4]
push ecx
push str.UPDATE_msdb.dbo.systargetservers_SET_poll_interval___ld_WHERE__server_name__N_s_
lea edx, [ebp - 0x4f1c]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0x10
lea ecx, [ebp - 0x2308]
push ecx
lea edx, [ebp - 0x3b0c]
push edx
lea eax, [ebp - 0x3f10]
push eax
push 1
push 1
lea ecx, [ebp - 0x4f1c]
push ecx
lea edx, [ebp - 0x19a0]
push edx
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x22d0]
push eax
call dword [sym.imp.SQLSVC.dll_SHRecMemFree]
add esp, 4
lea ecx, [ebp - 0x19a0]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLLogoff]
add esp, 4
cmp dword [ebp - 0x3f14], 0
je 0x424d09
cmp dword [ebp - 0x22b0], 0
je 0x424bcd
push 0
call fcn.00426ca2
add esp, 4
test eax, eax
jne 0x424bcd
mov edx, dword [ebp + 8]
push edx
push 0x44268c
lea eax, [ebp - 0x4f1c]
push eax
mov ecx, dword [0x449ba0]
call dword [ecx + 0x4cc]
add esp, 0xc
lea edx, [ebp - 0x2308]
push edx
lea eax, [ebp - 0x3b0c]
push eax
lea ecx, [ebp - 0x3f10]
push ecx
push 1
push 1
lea edx, [ebp - 0x4f1c]
push edx
lea eax, [ebp - 0xbd0]
push eax
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x424bcd
cmp dword [ebp - 0x3f10], 0
jne 0x424bcd
mov dword [ebp - 0x22b0], 0
cmp dword [ebp - 0x22ac], 0
je 0x424cf9
lea ecx, [ebp - 0x2308]
push ecx
lea edx, [ebp - 0x3b0c]
push edx
lea eax, [ebp - 0x3f10]
push eax
push 1
push 1
push str.EXECUTE_msdb.dbo.sp_msx_defect
lea ecx, [ebp - 0xbd0]
push ecx
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x3f10], 0
je 0x424cea
mov edx, dword [ebp - 0x3b0c]
and edx, 0xffff
test edx, edx
je 0x424cea
cmp dword [ebp - 0x3f1c], 0
je 0x424cea
push str.Target_SQLAgent___Downloader
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x19a0]
push ecx
call fcn.00426dd1
add esp, 0xc
test eax, eax
je 0x424ce8
push 0x800
lea edx, [ebp - 0x22a0]
push edx
push 0x442780
push 0x442788
lea eax, [ebp - 0x3b0c]
push eax
call fcn.0042f530
add esp, 0x14
mov ecx, dword [ebp - 0x3f1c]
push ecx
lea edx, [ebp - 0x22a0]
push edx
push 0x44278c
lea eax, [ebp - 0x4f1c]
push eax
mov ecx, dword [0x449ba0]
call dword [ecx + 0x4cc]
add esp, 0x10
lea edx, [ebp - 0x2308]
push edx
lea eax, [ebp - 0x3b0c]
push eax
lea ecx, [ebp - 0x3f10]
push ecx
push 1
push 1
lea edx, [ebp - 0x4f1c]
push edx
lea eax, [ebp - 0x19a0]
push eax
call fcn.00407c09
add esp, 0x1c
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x19a0]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLLogoff]
add esp, 4
jmp 0x424cf9
mov edx, dword [ebp - 0xddc]
add edx, 1
mov dword [ebp - 0xddc], edx
lea eax, [ebp - 0xbd0]
push eax
call dword [sym.imp.SQLSVC.dll_QSQLLogoff]
add esp, 4
cmp dword [ebp - 0x22d4], 0
je 0x424d31
mov ecx, dword [ebp - 0x22d4]
push ecx
mov edx, dword [ebp - 0xddc]
push edx
push 0x121
push 0
push 3
call fcn.0041b8d1
add esp, 0x14
mov eax, dword [ebp - 0xddc]
pop edi
pop esi
mov esp, ebp
pop ebp
ret