Function at 0x140087d50
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x328
mov rax, qword [0x1408fa960]
xor rax, rsp
mov qword [rsp + 0x310], rax
mov rax, qword [rsp + 0x330]
movzx eax, byte [rax + 0xd0]
test eax, eax
je 0x140087d9a
mov rax, qword [rsp + 0x330]
mov dword [rax + 0x48], 0
jmp 0x1400881e5
mov rax, qword [rsp + 0x330]
add rax, 0xc0
mov rcx, rax
call fcn.14000e130
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x168]
mov rcx, qword [rsp + 0x58]
call fcn.140091e00
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x68], rax
xor edx, edx
mov rcx, qword [rsp + 0x68]
call fcn.140100210
nop
lea rcx, [rsp + 0x168]
call fcn.14000a800
mov rax, qword [rsp + 0x330]
mov dword [rax + 0x48], 2
mov rax, qword [rsp + 0x330]
movzx edx, byte [rax + 0xd1]
lea rcx, [rsp + 0x1b0]
call fcn.140017ec0
nop
lea rcx, [rsp + 0x1b0]
call fcn.1401a7970
movzx eax, al
test eax, eax
jne 0x140087fc1
lea rcx, [rsp + 0x108]
call fcn.14000a280
nop
lea rcx, [rsp + 0x1b0]
call fcn.14002d1c0
movzx eax, al
test eax, eax
je 0x140087eb1
lea rcx, [rsp + 0x1b0]
call fcn.14000e130
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov rax, qword [rax]
mov rax, qword [rax + 0xf0]
mov qword [rsp + 0x70], rax
lea rdx, [rsp + 0x188]
mov rcx, qword [rsp + 0x40]
call qword [rsp + MsiRecordGetStringA]
mov qword [rsp + 0x78], rax
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x108]
call fcn.14001e7a0
lea rcx, [rsp + 0x188]
call fcn.14000a800
lea rcx, [rsp + 0x2e8]
call fcn.1400165c0
movzx eax, al
test eax, eax
jne 0x140087eda
lea rdx, [rsp + 0x2e8]
lea rcx, [rsp + 0x108]
call fcn.14008c280
lea rcx, [rsp + 0x108]
call fcn.1400165c0
movzx eax, al
test eax, eax
je 0x140087f02
lea rdx, [0x1402fab00]
lea rcx, [rsp + 0x108]
call fcn.140015550
mov rax, qword [rsp + 0x330]
mov dword [rax + 0x48], 2
lea rcx, [rsp + 0x220]
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0xa8]
call fcn.14001e490
lea rcx, [rsp + 0x200]
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0xb8]
call fcn.14001e490
lea rcx, [rsp + 0x108]
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0xc8]
call fcn.14001e490
mov rax, qword [rsp + 0x330]
add rax, 8
lea rcx, [rsp + 0xa8]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0xb8]
lea r8, [rsp + 0xc8]
lea rdx, [0x1402fab40]
mov rcx, rax
call fcn.140070040
nop
lea rcx, [rsp + 0x108]
call fcn.14000a800
nop
lea rcx, [rsp + 0x1b0]
call fcn.140018400
jmp 0x1400881e5
lea rcx, [rsp + 0x90]
call fcn.14000df30
nop
lea rcx, [rsp + 0x1b0]
call fcn.14000e130
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
mov rax, qword [rax + 0x178]
mov qword [rsp + 0x80], rax
mov rdx, qword [str.WITH__orphans__AS_______SELECT__grpacctid__FROM__xwstnuser______WHERE_NOT_EXISTS_________SELECT_1_FROM__wstnuser________WHERE__wstnuser_._tokensid____xwstnuser_._grpacctid________________hashes__AS_______SELECT__resid____longid____hostid___UPPER__substring__CONVERT__NVARCHAR_32___HashBytes__MD5__ISNULL__resmng_._resid___ISNULL__account_._longid_______2____1__32_____AS__tokensid__FROM__account______CROSS_JOIN__resmng_________SELECT__hostid____longid____resid_____FROM__hashes____INNER_JOIN__orphans__ON____orphans_._grpacctid____hashes_._tokensid______INNER_JOIN__wstn__ON____wstn_._workstnid____hashes_._hostid______INNER_JOIN__xwstnuser__ON____hashes_._tokensid____xwstnuser_._grpacctid__AND__wstn_._wstntoken____xwstnuser_._wstntoken______WHERE_NOT_EXISTS________SELECT_1_FROM__wstnuser______WHERE__wstnuser_._tokensid____hashes_._tokensid_____]
lea rcx, [rsp + 0x148]
call fcn.1400179b0
nop
lea r9, [rsp + 0x90]
mov r8d, 3
lea rdx, [rsp + 0x148]
mov rcx, qword [rsp + 0x48]
call qword [rsp + 0x80]
nop
lea rcx, [rsp + 0x148]
call fcn.14000a800
lea rcx, [rsp + 0x90]
call fcn.1400204f0
movzx eax, al
test eax, eax
je 0x140088065
mov rax, qword [rsp + 0x330]
mov dword [rax + 0x48], 0
jmp 0x1400881ca
mov rax, qword [rsp + 0x330]
mov dword [rax + 0x48], 2
mov rax, qword [rsp + 0x330]
add rax, 8
lea rdx, str.One_or_more_managed_accounts_are_orphaned._If_you_wish_to_retain_any_of_these_accounts__you_should_assign_them_managed_system_policies_before_proceeding_with_the_upgrade._If_you_do_not_want_to_retain_them__including_password_history__if_any___you_may_run_setup_again_with_the_option_IGNOREMAORPHANS_set_to_1._The_affected_accounts_are:_n
mov rcx, rax
call fcn.140015550
lea rax, [rsp + 0x90]
mov qword [rsp + 0x50], rax
mov rcx, qword [rsp + 0x50]
call fcn.140009d90
mov qword [rsp + 0x30], rax
mov rcx, qword [rsp + 0x50]
call fcn.14000af40
mov qword [rsp + 0x88], rax
jmp 0x1400880cd
mov rax, qword [rsp + 0x30]
add rax, 0x18
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x88]
cmp qword [rsp + 0x30], rax
je 0x1400881ca
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x128]
call fcn.14000a280
nop
mov edx, 2
mov rcx, qword [rsp + 0x38]
call fcn.140071750
mov rcx, rax
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0xd8]
call fcn.14001e490
mov edx, 1
mov rcx, qword [rsp + 0x38]
call fcn.140071750
mov rcx, rax
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0xe8]
call fcn.14001e490
xor edx, edx
mov rcx, qword [rsp + 0x38]
call fcn.140071750
mov rcx, rax
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0xf8]
call fcn.14001e490
lea rax, [rsp + 0xd8]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xe8]
lea r8, [rsp + 0xf8]
lea rdx, str.Host:__S__longid:__S__policy_before_becoming_orphaned:__S
lea rcx, [rsp + 0x128]
call fcn.140070040
mov rax, qword [rsp + 0x330]
add rax, 8
lea rdx, [rsp + 0x128]
mov rcx, rax
call fcn.14008c280
nop
lea rcx, [rsp + 0x128]
call fcn.14000a800
jmp 0x1400880bf
lea rcx, [rsp + 0x90]
call fcn.140057b10
nop
lea rcx, [rsp + 0x1b0]
call fcn.140018400
mov rcx, qword [rsp + 0x310]
xor rcx, rsp
call fcn.140222a60
add rsp, 0x328
ret