Function at 0x1401d4ba0
Capabilities:
Reference sql statements

Disassembly:
push rsi
push rdi
push r13
sub rsp, 0x480
mov rdi, rdx
mov esi, r8d
mov edx, dword [rdx + 0x30]
mov r13, rcx
test edx, edx
je 0x1401d4e78
mov qword [rsp + 0x20], r9
mov r9d, r8d
mov r8, qword [rdi + 0x40]
call fcn.1401c0b60
mov eax, dword [rdi + 0x24]
and eax, 0xffffffe7
mov dword [rdi + 0x24], eax
test esi, esi
jle 0x1401d4be3
or eax, 8
jmp 0x1401d4be8
jns 0x1401d4beb
or eax, 0x10
mov dword [rdi + 0x24], eax
cmp qword [r13 + 0x18], 0
je 0x1401d4e78
mov r9d, dword [rdi + 0x30]
lea rdx, str.SELECT_ID_FLAGS_FROM_LOG_WHERE_DATA_s_AND_TYPE_u
mov r8, qword [rdi + 0x40]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x4a0], rbx
mov qword [rsp + 0x4b0], rbp
mov qword [rsp + 0x478], r14
mov qword [rsp + 0x470], r15
call fcn.1401c00a0
mov rbx, qword [r13 + 0x18]
xor ebp, ebp
mov r14d, ebp
lea rcx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x1401d4c60
mov rax, qword [rcx]
lea r8, [rsp + 0x30]
xor r9d, r9d
lea rdx, [rsp + 0x60]
call qword [rax]
mov r14d, eax
lea rcx, [rbx + 0x40]
mov qword [rsp + 0x4b8], r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test r14d, r14d
je 0x1401d4dda
mov rcx, qword [rsp + 0x30]
lea r9, [rsp + 0x4a8]
xor r8d, r8d
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x28]
test eax, eax
je 0x1401d4dcc
movabs r12, 0xaaaaaaaaaaaaaa9
nop word [rax + rax]
mov rcx, qword [rsp + 0x4a8]
lea rdx, [rsp + 0x50]
mov r8d, 0xa
call fcn.140251de0
mov rcx, qword [rsp + 0x30]
lea r9, [rsp + 0x4a8]
mov byte [rsp + 0x38], 0
mov r8d, 1
mov edx, ebp
mov ebx, eax
mov r10, qword [rcx]
call qword [r10 + 0x28]
test eax, eax
je 0x1401d4daa
mov rcx, qword [rsp + 0x4a8]
call fcn.1401c1340
and eax, 0xffffffe7
test esi, esi
jle 0x1401d4d0c
or eax, 8
jmp 0x1401d4d11
jns 0x1401d4d11
or eax, 0x10
lea rdx, [rsp + 0x38]
mov ecx, eax
call fcn.1401c1440
mov r9d, ebx
lea r8, [rsp + 0x38]
lea rdx, str.UPDATE_LOG_SET_FLAGS_s_WHERE_ID_u
lea rcx, [rsp + 0x60]
call fcn.1401c00a0
lea rcx, [rsp + 0x60]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x1401d4d42
inc eax
mov ecx, eax
mov ebx, eax
call fcn.140247068
mov r8d, ebx
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x60]
mov rcx, rax
call fcn.1402496a0
mov r14, qword [r13 + 0x30]
lea r9, [rsp + 0x48]
mov rdx, r14
lea rcx, [r13 + 0x30]
mov r15, qword [r14 + 8]
mov r8, r15
call fcn.140009370
mov rdx, qword [r13 + 0x38]
mov rcx, r12
sub rcx, rdx
cmp rcx, 1
jb 0x1401d4e84
lea rcx, [rdx + 1]
mov qword [r13 + 0x38], rcx
mov qword [r14 + 8], rax
mov qword [r15], rax
mov rcx, qword [rsp + 0x30]
lea r9, [rsp + 0x4a8]
inc ebp
xor r8d, r8d
mov edx, ebp
mov rax, qword [rcx]
call qword [rax + 0x28]
test eax, eax
jne 0x1401d4cb0
mov rdx, qword [rsp + 0x30]
mov rcx, qword [r13 + 0x18]
call fcn.140075720
xor edx, edx
mov rcx, r13
call fcn.1401c96c0
mov rcx, qword [r13 + 0x40]
mov rax, qword [rcx]
cmp rax, rcx
je 0x1401d4e50
mov r10, qword [rax + 0x10]
cmp r10, rdi
je 0x1401d4e47
mov ecx, dword [rdi + 0x30]
cmp dword [r10 + 0x30], ecx
jne 0x1401d4e47
mov rcx, qword [r10 + 0x40]
mov r9, qword [rdi + 0x40]
sub r9, rcx
nop dword [rax]
movzx r8d, byte [rcx]
movzx edx, byte [rcx + r9]
sub r8d, edx
jne 0x1401d4e25
inc rcx
test edx, edx
jne 0x1401d4e10
test r8d, r8d
jne 0x1401d4e47
and dword [r10 + 0x24], 0xffffffe7
test esi, esi
jle 0x1401d4e3d
mov rcx, qword [rax + 0x10]
or dword [rcx + 0x24], 8
jmp 0x1401d4e47
jns 0x1401d4e47
mov rcx, qword [rax + 0x10]
or dword [rcx + 0x24], 0x10
mov rax, qword [rax]
cmp rax, qword [r13 + 0x40]
jne 0x1401d4df0
mov r12, qword [rsp + 0x4b8]
mov r14, qword [rsp + 0x478]
mov rbp, qword [rsp + 0x4b0]
mov rbx, qword [rsp + 0x4a0]
mov r15, qword [rsp + 0x470]
add rsp, 0x480
pop r13
pop rdi
pop rsi
ret
lea rcx, str.list_T__too_long
call fcn.1402453d0
int3