Function at 0x180005390
Capabilities:
Reference sql statements

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1eb8]
mov eax, 0x1fb8
call fcn.180026e30
sub rsp, rax
mov rax, qword [0x180065038]
xor rax, rsp
mov qword [rbp + 0x1ea0], rax
mov r13, r9
mov rdi, rdx
mov rbx, rcx
mov qword [rsp + 0x58], r8
test rdx, rdx
jne 0x180005437
mov rbx, qword [rcx + 0x10]
lea rax, str.failed
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x101
lea rax, str.COrganizationManagerBase::getUnitsOfParent
mov qword [rsp + 0x20], rax
lea r9, str._s:_d__s.
mov edx, 0x7d0
lea r8d, [rdx - 1]
lea rcx, [rbp + 0x10f0]
call fcn.18001f990
mov rax, qword [rbx]
xor r9d, r9d
lea r8, [rbp + 0x10f0]
lea edx, [rdi + 3]
mov rcx, rbx
call qword [rax + 0x1a8]
lea eax, [rdi - 8]
jmp 0x180005f0b
lea rcx, [rsp + 0x60]
call fcn.18001f860
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x40], xmm1
xor r12d, r12d
mov esi, r12d
mov qword [rsp + 0x50], r12
mov dword [rbp + 0xd10], 0x244
lea rax, [rsp + 0x58]
mov qword [rbp + 0xd18], rax
mov dword [rbp + 0xd20], 8
mov qword [rbp + 0xd28], r12
mov dword [rbp + 0xd30], 0x244
lea rax, [rbp + 0x1f28]
mov qword [rbp + 0xd38], rax
mov dword [rbp + 0xd40], 8
mov qword [rbp + 0xd48], r12
mov dword [rbp + 0xd50], 0x244
lea rax, [rsp + 0x60]
mov qword [rbp + 0xd58], rax
mov dword [rbp + 0xd60], 8
mov qword [rbp + 0xd68], r12
mov dword [rbp + 0xd70], 0x244
lea rax, [rsp + 0x70]
mov qword [rbp + 0xd78], rax
mov dword [rbp + 0xd80], 8
mov qword [rbp + 0xd88], r12
mov dword [rbp + 0xd90], 0x244
lea rax, [rsp + 0x78]
mov qword [rbp + 0xd98], rax
mov dword [rbp + 0xda0], 8
mov qword [rbp + 0xda8], r12
mov dword [rbp + 0xdb0], 0x244
lea rax, [rsp + 0x68]
mov qword [rbp + 0xdb8], rax
mov dword [rbp + 0xdc0], 8
mov qword [rbp + 0xdc8], r12
mov dword [rbp + 0xdd0], 0x244
lea rax, [rbp - 0x70]
mov qword [rbp + 0xdd8], rax
mov dword [rbp + 0xde0], 8
mov qword [rbp + 0xde8], r12
mov dword [rbp + 0xdf0], 0x244
lea rax, [rbp - 0x68]
mov qword [rbp + 0xdf8], rax
mov dword [rbp + 0xe00], 8
mov qword [rbp + 0xe08], r12
mov dword [rbp + 0xe10], 0x244
lea rax, [rbp - 0x80]
mov qword [rbp + 0xe18], rax
mov dword [rbp + 0xe20], 8
mov qword [rbp + 0xe28], r12
mov dword [rbp + 0xe30], 0x1c4
lea rax, [rbp - 0x60]
mov qword [rbp + 0xe38], rax
mov dword [rbp + 0xe40], 0x32
mov qword [rbp + 0xe48], r12
mov dword [rbp + 0xe50], 0x1c4
lea rax, [rbp - 0x2e]
mov qword [rbp + 0xe58], rax
mov dword [rbp + 0xe60], 0x1f4
mov qword [rbp + 0xe68], r12
mov dword [rbp + 0xe70], 0x1c4
lea rax, [rbp + 0x28e]
mov qword [rbp + 0xe78], rax
mov dword [rbp + 0xe80], 0xc8
mov qword [rbp + 0xe88], r12
mov dword [rbp + 0xe90], 0x1c4
lea rax, [rbp + 0x1c6]
mov qword [rbp + 0xe98], rax
mov dword [rbp + 0xea0], 0xc8
mov qword [rbp + 0xea8], r12
mov dword [rbp + 0xeb0], 0x1c4
lea rax, [rbp + 0x768]
mov qword [rbp + 0xeb8], rax
mov dword [rbp + 0xec0], 0x64
mov qword [rbp + 0xec8], r12
mov dword [rbp + 0xed0], 0x1c4
lea rax, [rbp + 0x7cc]
mov qword [rbp + 0xed8], rax
mov dword [rbp + 0xee0], 0x64
mov qword [rbp + 0xee8], r12
mov dword [rbp + 0xef0], 0x1c4
lea rax, [rbp + 0x356]
mov qword [rbp + 0xef8], rax
mov dword [rbp + 0xf00], 0x3e8
mov qword [rbp + 0xf08], r12
mov dword [rbp + 0xf10], 0x244
lea rax, [rbp - 0x78]
mov qword [rbp + 0xf18], rax
mov dword [rbp + 0xf20], 8
mov qword [rbp + 0xf28], r12
mov dword [rbp + 0xf30], 0x1c4
lea rax, [rbp + 0xb50]
mov qword [rbp + 0xf38], rax
mov dword [rbp + 0xf40], 0x190
mov qword [rbp + 0xf48], r12
mov dword [rbp + 0xf50], 0x1f0
lea rax, [rbp + 0xd00]
mov qword [rbp + 0xf58], rax
mov dword [rbp + 0xf60], 4
mov qword [rbp + 0xf68], r12
mov dword [rbp + 0xf70], 0x244
lea rax, [rbp + 0x748]
mov qword [rbp + 0xf78], rax
mov dword [rbp + 0xf80], 8
mov qword [rbp + 0xf88], r12
mov dword [rbp + 0xf90], 0x244
lea rax, [rbp + 0x750]
mov qword [rbp + 0xf98], rax
mov dword [rbp + 0xfa0], 8
mov qword [rbp + 0xfa8], r12
mov dword [rbp + 0xfb0], 0x244
lea rax, [rbp + 0x758]
mov qword [rbp + 0xfb8], rax
mov dword [rbp + 0xfc0], 8
mov qword [rbp + 0xfc8], r12
mov dword [rbp + 0xfd0], 0x1c4
lea rax, [rbp + 0x830]
mov qword [rbp + 0xfd8], rax
mov dword [rbp + 0xfe0], 0x190
mov qword [rbp + 0xfe8], r12
mov dword [rbp + 0xff0], 0x244
lea rax, [rbp + 0x760]
mov qword [rbp + 0xff8], rax
mov dword [rbp + 0x1000], 8
mov qword [rbp + 0x1008], r12
mov dword [rbp + 0x1010], 0x1c4
lea rax, [rbp + 0x9c0]
mov qword [rbp + 0x1018], rax
mov dword [rbp + 0x1020], 0x190
mov qword [rbp + 0x1028], r12
mov dword [rbp + 0x1030], 0x244
lea rax, [rbp + 0xce0]
mov qword [rbp + 0x1038], rax
mov dword [rbp + 0x1040], 8
mov qword [rbp + 0x1048], r12
mov dword [rbp + 0x1050], 0x244
lea rax, [rbp + 0xce8]
mov qword [rbp + 0x1058], rax
mov dword [rbp + 0x1060], 8
mov qword [rbp + 0x1068], r12
mov dword [rbp + 0x1070], 0x1f0
lea rax, [rbp + 0xcf0]
mov qword [rbp + 0x1078], rax
mov dword [rbp + 0x1080], 4
mov qword [rbp + 0x1088], r12
mov dword [rbp + 0x1090], 0x1f0
lea rax, [rbp + 0xcf4]
mov qword [rbp + 0x1098], rax
mov dword [rbp + 0x10a0], 4
mov qword [rbp + 0x10a8], r12
mov dword [rbp + 0x10b0], 0x1f0
lea rax, [rbp + 0xcf8]
mov qword [rbp + 0x10b8], rax
mov dword [rbp + 0x10c0], 4
mov qword [rbp + 0x10c8], r12
mov dword [rbp + 0x10d0], 0x1f0
lea rax, [rbp + 0xcfc]
mov qword [rbp + 0x10d8], rax
mov dword [rbp + 0x10e0], 4
mov qword [rbp + 0x10e8], r12
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov rcx, rax
mov rax, qword [rax]
mov dword [rsp + 0x28], 0x1d
lea rdx, [rbp + 0xd50]
mov qword [rsp + 0x20], rdx
lea r9d, [r12 + 2]
lea r8, [rbp + 0xd10]
lea rdx, str.WITH_cte_as_select_M.ID___M.FULLNAME_from_PROFILE_MAIN_M_JOIN_PROFILE_MODULE_STATUS_MS_ON_M.IDMS.PROFILE_ID_WHERE_M.TYPE1_AND_MS.MODULE_ID3___cte_profile_as_select_M.ID___M.FULLNAME__MS.STATUS_from_PROFILE_MAIN_M_JOIN_PROFILE_MODULE_STATUS_MS_ON_M.IDMS.PROFILE_ID_WHERE_M.TYPE1_AND_MS.MODULE_ID13_SELECT_u.ID_ou.ID_ou.SORT_ID_ou.ORG_ID_u.SECTION_u.CATEGORY_u.PARENT_ID_u.PREFIX_u.NAME_u.CITY_u.STATE_u.WS_CODE_u.TFN_u.DISCRIPTION_u.MANAGER_P.FULLNAME_P.STATUS__u.CREATED_DATE_u.MODIFIED_DATE_u.AUTHOR_ID_UC.FULLNAME_u.MODIFIER_PA.FULLNAME_u.INSURANCE_ACC_u.TAX_ACC_u.INSURANCE_D1_u.INSURANCE_D2__u.WORK_PLACE_STATUS__u.SHOW_IN_CHART_FROM_ORG_UNITS_u_JOIN_ORG_ORGANIZATION_UNIT_ou_ON_ou.UNIT_ID__u.ID_LEFT_JOIN_cte_UC_ON_UC.ID_u.AUTHOR_ID_LEFT_JOIN_cte_PA_ON_PA.ID_u.MODIFIER__LEFT_JOIN_cte_profile_P_ON_P.ID_u.MANAGER_WHERE_u.PARENT_ID__and_ou.ORG_ID__ORDER_BY_ou.SORT_ID
call qword [rax + 0x48]
test al, al
jne 0x1800059d5
mov rbx, qword [rbx + 0x10]
lea rax, str.failed_query_for_get_units
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x131
lea rax, str.COrganizationManagerBase::getUnitsOfParent
mov qword [rsp + 0x20], rax
lea r9, str._s:_d__s.
mov edx, 0x7d0
lea r8d, [rdx - 1]
lea rcx, [rbp + 0x10f0]
call fcn.18001f990
mov rax, qword [rbx]
mov r9, rdi
lea r8, [rbp + 0x10f0]
lea edx, [r12 + 3]
mov rcx, rbx
call qword [rax + 0x1a8]
lea r12d, [rsi - 7]
mov r14, qword [rsp + 0x40]
jmp 0x180005eb2
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov rcx, rax
mov rax, qword [rax]
xor edx, edx
call qword [rax + 0x50]
test al, al
je 0x180005a6d
mov rbx, qword [rsp + 0x48]
cmp rbx, rsi
je 0x180005a1b
mov rcx, rbx
lea rdx, [rsp + 0x60]
mov r8d, 0xda8
call fcn.1800283c0
add rbx, 0xda8
mov qword [rsp + 0x48], rbx
jmp 0x180005a37
lea r8, [rsp + 0x60]
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.180017000
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x48]
lea rcx, [rbp + 0x10f0]
call fcn.18001f860
lea rcx, [rsp + 0x60]
mov rdx, rax
mov r8d, 0xda8
call fcn.1800283c0
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov rcx, rax
mov rax, qword [rax]
xor edx, edx
call qword [rax + 0x50]
test al, al
jne 0x1800059f5
mov r11d, r12d
mov r14, qword [rsp + 0x40]
mov r15d, dword [rbp + 0x1f20]
test r15d, r15d
jle 0x180005ea0
mov rbx, r12
nop dword [rax + rax]
imul rax, rbx, 0xda8
lea rdx, [r14 + rax]
lea rcx, [rax + r13]
mov rax, qword [rdx]
mov qword [rcx], rax
mov rax, qword [rdx + 0x10]
mov qword [rcx + 0x10], rax
mov rax, qword [rdx + 0x18]
mov qword [rcx + 0x18], rax
mov rax, qword [rdx + 8]
mov qword [rcx + 8], rax
mov rax, qword [rdx + 0x30]
mov qword [rcx + 0x30], rax
mov rax, qword [rdx + 0x38]
mov qword [rcx + 0x38], rax
mov rax, qword [rdx + 0x20]
mov qword [rcx + 0x20], rax
mov rax, qword [rdx + 0x28]
mov qword [rcx + 0x28], rax
mov eax, dword [rdx + 0xda0]
mov dword [rcx + 0xda0], eax
mov rax, qword [rdx + 0x7e8]
mov qword [rcx + 0x7e8], rax
mov rax, qword [rdx + 0x7f0]
mov qword [rcx + 0x7f0], rax
mov rax, qword [rdx + 0x7f8]
mov qword [rcx + 0x7f8], rax
mov rax, qword [rdx + 0x800]
mov qword [rcx + 0x800], rax
mov rax, qword [rdx + 0xd80]
mov qword [rcx + 0xd80], rax
mov rax, qword [rdx + 0xd88]
mov qword [rcx + 0xd88], rax
mov eax, dword [rdx + 0xd90]
mov dword [rcx + 0xd90], eax
mov eax, dword [rdx + 0xd94]
mov dword [rcx + 0xd94], eax
mov eax, dword [rdx + 0xd98]
mov dword [rcx + 0xd98], eax
mov eax, dword [rdx + 0xd9c]
mov dword [rcx + 0xd9c], eax
mov eax, r11d
imul rcx, rax, 0xda8
lea r9, [r14 + rcx]
lea rdx, [r9 + 0x72]
lea r10, [rcx + r13]
lea rcx, [r10 + 0x72]
lea r8, [rcx + 0x1f3]
cmp rcx, r8
jae 0x180005ba8
movzx eax, byte [rdx]
mov byte [rcx], al
cmp byte [rdx], 0
je 0x180005bd0
inc rcx
inc rdx
cmp rcx, r8
jb 0x180005b93
movzx eax, byte [rdx]
lea rdx, [0x18005e2f0]
jmp 0x180005bc7
lea rcx, [rcx - 1]
movzx eax, byte [rcx]
cmp byte [rax + rdx], 0
jl 0x180005bc0
mov byte [rcx], 0
lea rdx, [r9 + 0x32e]
lea rcx, [r10 + 0x32e]
lea r8, [rcx + 0xc7]
cmp rcx, r8
jae 0x180005c05
nop word [rax + rax]
movzx eax, byte [rdx]
mov byte [rcx], al
cmp byte [rdx], 0
je 0x180005c21
inc rcx
inc rdx
cmp rcx, r8
jb 0x180005bf0
movzx eax, byte [rdx]
lea rdx, [0x18005e2f0]
jmp 0x180005c18
lea rcx, [rcx - 1]
movzx eax, byte [rcx]
cmp byte [rax + rdx], 0
jl 0x180005c11
mov byte [rcx], 0
lea rdx, [r9 + 0x266]
lea rcx, [r10 + 0x266]
lea r8, [rcx + 0xc7]
cmp rcx, r8
jae 0x180005c55
nop dword [rax + rax]
movzx eax, byte [rdx]
mov byte [rcx], al
cmp byte [rdx], 0
je 0x180005c71
inc rcx
inc rdx
cmp rcx, r8
jb 0x180005c40
movzx eax, byte [rdx]
lea rdx, [0x18005e2f0]
jmp 0x180005c68
lea rcx, [rcx - 1]
movzx eax, byte [rcx]
cmp byte [rax + rdx], 0
jl 0x180005c61
mov byte [rcx], 0
lea rdx, [r9 + 0x40]
lea rcx, [r10 + 0x40]
lea r8, [rcx + 0x31]
cmp rcx, r8
jae 0x180005c97
movzx eax, byte [rdx]
mov byte [rcx], al
cmp byte [rdx], 0
je 0x180005cb3
inc rcx
inc rdx
cmp rcx, r8
jb 0x180005c82
movzx eax, byte [rdx]
lea rdx, [0x18005e2f0]
jmp 0x180005caa
lea rcx, [rcx - 1]
movzx eax, byte [rcx]
cmp byte [rax + rdx], 0
jl 0x180005ca3
mov byte [rcx], 0
lea rdx, [r9 + 0x3f6]
lea rcx, [r10 + 0x3f6]
lea r8, [rcx + 0x3e7]
cmp rcx, r8
jae 0x180005ce5
nop dword [rax]
movzx eax, byte [rdx]
mov byte [rcx], al
cmp byte [rdx], 0
je 0x180005d01
inc rcx
inc rdx
cmp rcx, r8
jb 0x180005cd0
movzx eax, byte [rdx]
lea rdx, [0x18005e2f0]
jmp 0x180005cf8
lea rcx, [rcx - 1]
movzx eax, byte [rcx]
cmp byte [rax + rdx], 0
jl 0x180005cf1
mov byte [rcx], 0
lea rdx, [r9 + 0x808]
lea rcx, [r10 + 0x808]
lea r8, [rcx + 0x63]
cmp rcx, r8
jae 0x180005d35
nop dword [rax + rax]
movzx eax, byte [rdx]
mov byte [rcx], al
cmp byte [rdx], 0
je 0x180005d51
inc rcx
inc rdx
cmp rcx, r8
jb 0x180005d20
movzx eax, byte [rdx]
lea rdx, [0x18005e2f0]
jmp 0x180005d48
lea rcx, [rcx - 1]
movzx eax, byte [rcx]
cmp byte [rax + rdx], 0
jl 0x180005d41
mov byte [rcx], 0
lea rdx, [r9 + 0x86c]
lea rcx, [r10 + 0x86c]
lea r8, [rcx + 0x63]
cmp rcx, r8
jae 0x180005d85
nop dword [rax + rax]
movzx eax, byte [rdx]
mov byte [rcx], al
cmp byte [rdx], 0
je 0x180005da1
inc rcx
inc rdx
cmp rcx, r8
jb 0x180005d70
movzx eax, byte [rdx]
lea rdx, [0x18005e2f0]
jmp 0x180005d98
lea rcx, [rcx - 1]
movzx eax, byte [rcx]
cmp byte [rax + rdx], 0
jl 0x180005d91
mov byte [rcx], 0
lea rdx, [r9 + 0xbf0]
lea rcx, [r10 + 0xbf0]
lea r8, [rcx + 0x18f]
cmp rcx, r8
jae 0x180005dd5
nop dword [rax + rax]
movzx eax, byte [rdx]
mov byte [rcx], al
cmp byte [rdx], 0
je 0x180005df1
inc rcx
inc rdx
cmp rcx, r8
jb 0x180005dc0
movzx eax, byte [rdx]
lea rdx, [0x18005e2f0]
jmp 0x180005de8
lea rcx, [rcx - 1]
movzx eax, byte [rcx]
cmp byte [rax + rdx], 0
jl 0x180005de1
mov byte [rcx], 0
lea rdx, [r9 + 0x8d0]
lea rcx, [r10 + 0x8d0]
lea r8, [rcx + 0x18f]
cmp rcx, r8
jae 0x180005e25
nop dword [rax + rax]
movzx eax, byte [rdx]
mov byte [rcx], al
cmp byte [rdx], 0
je 0x180005e41
inc rcx
inc rdx
cmp rcx, r8
jb 0x180005e10
movzx eax, byte [rdx]
lea rdx, [0x18005e2f0]
jmp 0x180005e38
lea rcx, [rcx - 1]
movzx eax, byte [rcx]
cmp byte [rax + rdx], 0
jl 0x180005e31
mov byte [rcx], 0
lea rdx, [r9 + 0xa60]
lea rax, [r10 + 0xa60]
lea r8, [rax + 0x18f]
cmp rax, r8
jae 0x180005e75
nop dword [rax + rax]
movzx ecx, byte [rdx]
mov byte [rax], cl
cmp byte [rdx], 0
je 0x180005e91
inc rax
inc rdx
cmp rax, r8
jb 0x180005e60
movzx ecx, byte [rdx]
lea rdx, [0x18005e2f0]
jmp 0x180005e88
lea rax, [rax - 1]
movzx ecx, byte [rax]
cmp byte [rcx + rdx], 0
jl 0x180005e81
mov byte [rax], 0
inc r11d
inc rbx
cmp r11d, r15d
jl 0x180005a90
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x60]
nop
test r14, r14
je 0x180005f08
sub rsi, r14
movabs rax, 0x95f7cc72d1b887e9
imul rsi
add rdx, rsi
sar rdx, 0xb
mov rax, rdx
shr rax, 0x3f
add rdx, rax
imul rdx, rdx, 0xda8
mov rax, r14
cmp rdx, 0x1000
jb 0x180005f00
add rdx, 0x27
mov r14, qword [r14 - 8]
sub rax, r14
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180005f2e
mov rcx, r14
call fcn.180026340
mov eax, r12d
mov rcx, qword [rbp + 0x1ea0]
xor rcx, rsp
call fcn.180026320
add rsp, 0x1fb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.18002ce64
int3