Function at 0x140318860
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x148
xor r14d, r14d
xor eax, eax
mov rsi, qword [rdx]
movsxd rbp, r8d
mov dword [rsp + 0x70], eax
mov rbx, rcx
mov r13, rdx
mov r12, rbp
shl rbp, 4
mov qword [rsp + 0x1a8], r9
mov qword [rsp + 0xa0], r14
lea r15, [rbp + 0x18]
test r9, r9
je 0x1403188af
mov eax, dword [r9]
mov dword [rsp + 0x70], eax
mov rax, qword [rbx]
mov ecx, 0x1e
lea rdx, [rsi + rbp]
xorps xmm0, xmm0
movups xmmword [rsp + 0xa8], xmm0
mov eax, dword [rax + 0x5c]
mov dword [rsp + 0x7c], eax
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x50], rax
mov rdi, qword [rsp + 0x50]
xor eax, eax
rep stosd dword [rdi], eax
mov r14d, dword [rdx + 0x18]
test r14d, r14d
je 0x140318936
lea rax, [rsi + rbp + 0x28]
mov rcx, rbx
xor edi, edi
add r15, rsi
mov qword [rsp + 0x60], rax
movsxd rax, dword [rdx + 0x2c]
mov rdx, qword [rdx + 0x30]
imul rax, rax, 0xc
lea r13, [rdx + rax - 0xc]
mov rdx, qword [rsp + 0x50]
mov r8d, dword [r13]
call fcn.140323580
mov eax, dword [r13 + 8]
mov dword [rsp + 0x138], edi
inc eax
mov dword [rsp + 0xd0], eax
jmp 0x1403189c4
mov rdx, rsi
mov rcx, rbx
lea r14, [rbx + 0x34]
call fcn.140312e40
mov edi, eax
mov eax, dword [rsi + 0x14]
dec eax
cmp eax, r12d
jne 0x140318960
mov rdx, r13
mov rcx, r14
call fcn.14031f5a0
mov rsi, qword [r13]
xor r9d, r9d
lea r8d, [r12 + 1]
mov rdx, rsi
mov rcx, r14
call fcn.14031f700
cmp dword [rbx + 0x34], 0
jne 0x14031902a
mov rdx, qword [rsp + 0x50]
lea rax, [rsi + rbp + 0x28]
mov r8d, edi
add rbp, rsi
mov rcx, rbx
mov qword [rsp + 0x60], rax
add r15, rsi
call fcn.140323580
movsxd r13, dword [rbp + 0x2c]
mov rax, r13
imul r13, r13, 0xc
add r13, qword [rbp + 0x30]
inc eax
mov dword [rbp + 0x2c], eax
mov dword [r13 + 4], 1
mov dword [r13], edi
inc dword [rsi + 0x10]
mov r14d, dword [rbp + 0x1c]
mov rax, qword [rsp + 0x60]
xor r11d, r11d
mov dword [rsp + 0x78], r11d
cmp dword [rax + 4], 1
jne 0x1403189e9
lea eax, [r12 + 2]
cmp dword [rsi + 0x14], eax
sete al
movzx eax, al
mov dword [rsp + 0x78], eax
xor r9d, r9d
xor r10d, r10d
mov dword [rsp + 0x30], r12d
mov rdx, rsi
lea rax, [rsp + 0xa0]
mov dword [rsp + 0x28], r9d
mov rcx, rbx
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov r8d, 0x20
xor r12d, r12d
mov dword [rsp + 0x38], r14d
mov qword [rsp + 0x20], r10
call fcn.14031ada0
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x80], rax
lea rax, [rbx + 0x34]
mov qword [rsp + 0x50], rax
cmp dword [rbx + 0x34], 0
mov rdi, qword [rsp + 0xa0]
jne 0x140318cb1
cmp byte [rdi + 0x14], 0
jne 0x140318cb1
mov rax, qword [rdi + 0x58]
movzx eax, word [rax + 4]
mov word [rsp + 0x58], ax
mov dword [rsp + 0x68], eax
movzx eax, word [rsp + 0x58]
imul rax, rax, 0x78
add rax, rdi
mov ebp, dword [rax + 0xc0]
mov r9, qword [rax + 0xb8]
cmp dword [rsp + 0xb0], ebp
jne 0x140318aba
test ebp, ebp
jle 0x140318afe
mov rdx, qword [rsp + 0xa8]
mov rcx, r9
movsxd r8, ebp
mov qword [rsp + 0x88], r9
call sub.msvcrt.dll_memcmp
mov r9, qword [rsp + 0x88]
test eax, eax
je 0x140318afe
cmp qword [rsp + 0x1a8], 0
je 0x140318ad6
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x114], eax
jg 0x140318cb1
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x50]
mov r8d, ebp
mov qword [rsp + 0x88], r9
xor r12d, r12d
call fcn.140356f20
mov r9, qword [rsp + 0x88]
movsxd rax, dword [rsp + 0x68]
imul rax, rax, 0x78
add rax, rdi
cmp dword [rax + 0xd0], 0
jne 0x140318b2b
cmp dword [rsp + 0x78], 0
jne 0x140318c9b
cmp byte [rax + 0xd4], 0
je 0x140318c9b
mov eax, r12d
or eax, dword [rbx + 0x34]
jne 0x140318b4c
lea rdx, [rsp + 0xc8]
mov r8d, ebp
mov rcx, rbx
mov r12d, 1
call fcn.140322f30
cmp dword [rbx + 0x34], 0
jne 0x140318bfe
mov rax, qword [rdi + 0x58]
mov rdx, qword [rbx]
movzx eax, word [rax + 4]
imul rax, rax, 0x78
mov rbp, qword [rdi + rax + 0xc8]
mov eax, dword [rsp + 0xf0]
add eax, dword [rsp + 0xe0]
cmp eax, dword [rdx + 0x84]
jl 0x140318b93
lea rdx, [rsp + 0xc8]
mov rcx, rbx
call fcn.1403234c0
cmp byte [rsp + 0x111], 0
je 0x140318bc4
mov eax, dword [rsp + 0xe0]
mov rdx, qword [rsp + 0xd8]
mov r8, rbp
mov rcx, rbx
xchg al, ah
mov word [rdx], ax
lea rdx, [rsp + 0xc8]
call fcn.1403230e0
cmp word [rsp + 0x110], 0
mov r8, rbp
lea rdx, [rsp + 0xd8]
jne 0x140318be2
sub r8, qword [rsp + 0x108]
mov rcx, qword [rsp + 0x50]
call fcn.140356ec0
mov qword [rsp + 0x108], rbp
mov word [rsp + 0x110], 0
movsxd rax, dword [rsp + 0x68]
imul rax, rax, 0x78
cmp dword [rsp + 0x7c], 1
lea rbp, [rdi + rax]
movzx edx, byte [rbp + 0xd4]
jne 0x140318c54
test dl, dl
je 0x140318c9b
mov rcx, qword [rsp + 0x50]
lea rdx, [rsp + 0xd8]
xor r8d, r8d
mov qword [rsp + 0x58], rdx
call fcn.140356ec0
cmp dword [rbp + 0xd0], 0
jle 0x140318c9b
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
xor r8d, r8d
call fcn.140356ec0
jmp 0x140318c9b
mov eax, dword [rbp + 0xd0]
mov rcx, qword [rsp + 0x50]
lea rbp, [rsp + 0xc8]
lea r8d, [rdx + rax*2]
lea rdx, [rsp + 0xd8]
movsxd r8, r8d
call fcn.140356ec0
movzx eax, word [rsp + 0x58]
mov r8, rbp
mov rcx, rbx
lea r9, [0x14031a280]
imul rax, rax, 0x78
lea rdx, [rdi + rax + 0x60]
call fcn.140314600
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, rbx
call fcn.14031b950
jmp 0x140318a40
lea rdx, [rsp + 0xc8]
lea r8, [r13 + 8]
mov rcx, rbx
call fcn.140323310
mov r12d, dword [rbx + 0x34]
test r12d, r12d
je 0x140318cde
lea rax, [rbx + 0x58]
xor ebp, ebp
mov qword [rsp + 0x50], rax
jmp 0x140318da5
cmp byte [rdi + 0x14], 0
jne 0x140318cce
lea rax, [rbx + 0x34]
xorps xmm0, xmm0
lea rsi, [rdi + 0x60]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x9c]
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x58], rax
movups xmmword [rsp + 0xb8], xmm0
jmp 0x140318e1d
imul rax, rbp, 0xc
add rax, qword [r15 + 8]
cmp dword [rbx + 0x34], 0
mov r12d, dword [rax]
jne 0x140318d48
lea eax, [r12 + 1]
mov rdx, r12
mov rcx, rbx
shl rax, 0x25
shl rdx, 0x25
lea r8, [rax - 1]
call fcn.140315220
cmp qword [rbx + 0x58], 0
jne 0x140318d76
mov rax, qword [rbx]
lea rcx, str.DELETE_FROM__q._q_idx_WHERE_segid_
mov rdx, qword [rax + 8]
mov r8, qword [rax + 0x10]
call fcn.140388b60
mov rdx, qword [rsp + 0x50]
mov rcx, rbx
mov r8, rax
call fcn.140319190
cmp dword [rbx + 0x34], 0
jne 0x140318da2
mov rcx, qword [rbx + 0x58]
mov r8d, r12d
mov edx, 1
call fcn.140384b50
mov rcx, qword [rbx + 0x58]
call fcn.14038a2d0
mov rcx, qword [rbx + 0x58]
call fcn.1403895b0
mov dword [rbx + 0x34], eax
inc rbp
cmp r14d, ebp
jg 0x140318d1b
mov r8d, dword [r15 + 4]
cmp r8d, r14d
je 0x140318dd4
sub r8d, r14d
movsxd rdx, r14d
mov rcx, qword [r15 + 8]
imul r8d, r8d, 0xc
imul rdx, rdx, 0xc
movsxd r8, r8d
add rdx, rcx
call sub.msvcrt.dll_memmove
mov eax, dword [rsi + 0x10]
xor r8d, r8d
sub eax, r14d
mov dword [rsi + 0x10], eax
sub dword [r15 + 4], r14d
cmp dword [r13 + 8], 0
mov dword [r15], r8d
jne 0x140318ff9
mov rbx, qword [rsp + 0x60]
dec eax
dec dword [rbx + 4]
mov dword [rsi + 0x10], eax
jmp 0x140318ff9
cmp dword [rbx + 0x34], 0
jne 0x140318fe9
mov rax, qword [rsi]
test rax, rax
jne 0x140318e28
inc r12d
add rsi, 0x78
cmp r12d, dword [rdi + 0x40]
jl 0x140318e04
jmp 0x140318fe9
cmp qword [rsi + 0x10], 0
jne 0x140318e37
xor ecx, ecx
mov qword [rax + 4], rcx
jmp 0x140318e16
mov r13d, dword [rax]
xor edx, edx
mov ecx, dword [rsi + 0x34]
mov dword [rsp + 0x9c], edx
movsxd rax, dword [rsi + 0x30]
shl r13, 0x25
mov dword [rsp + 0x60], ecx
mov rcx, rbx
add rax, r13
mov rdx, rax
mov qword [rsp + 0x68], rax
call fcn.14031a1b0
mov rbp, rax
test rax, rax
je 0x140318e16
mov eax, dword [rsp + 0x60]
cmp eax, dword [rbp + 0xc]
jle 0x140318e82
mov dword [rbx + 0x34], 0x10b
jmp 0x140318fdc
xor eax, eax
mov r8d, dword [rbp + 8]
mov dword [rsp + 0xc0], eax
cmp dword [rsp + 0xc4], r8d
jae 0x140318eab
mov rcx, qword [rsp + 0x50]
lea rdx, [rsp + 0xb8]
call fcn.140356f30
mov r9, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x58]
mov r8d, 4
mov rcx, qword [rsp + 0x50]
call fcn.140356e00
movsxd r8, dword [rsi + 0x60]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
call fcn.140356ec0
mov r9, qword [rsi + 0x58]
mov r8d, dword [rsi + 0x60]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
call fcn.140356e00
mov r8d, dword [rbp + 0xc]
mov eax, dword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
movsxd r9, dword [rsp + 0x60]
sub r8d, eax
add r9, qword [rbp]
call fcn.140356e00
cmp dword [rbx + 0x34], 0
jne 0x140318f2d
mov eax, dword [rsp + 0xc0]
mov rdx, qword [rsp + 0xb8]
xchg al, ah
mov word [rdx + 2], ax
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
mov r8d, 4
call fcn.140356ec0
mov eax, dword [rsi + 0x30]
cmp dword [rsi + 0xc], eax
jne 0x140318f9f
mov ecx, dword [rsi + 0x3c]
mov eax, dword [rbp + 0xc]
cmp ecx, eax
jge 0x140318f9f
mov edx, dword [rbp + 8]
cmp dword [rsi + 0x38], edx
jg 0x140318f9f
movsxd rdx, dword [rsp + 0xc0]
sub eax, ecx
mov rcx, qword [rsp + 0x50]
cdqe
sub rdx, rax
lea r8, [rdx - 5]
mov rdx, qword [rsp + 0x58]
call fcn.140356ec0
movsxd r9, dword [rsi + 0x38]
mov r8d, dword [rbp + 8]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
mov rax, r9
add r9, qword [rbp]
sub r8d, eax
call fcn.140356e00
mov rax, qword [rsi]
mov edx, dword [rsi + 0x30]
cmp dword [rbx + 0x34], 0
mov dword [rax + 4], edx
jne 0x140318fbf
mov r8, qword [rsp + 0x68]
lea rdx, [r13 + 1]
mov rcx, rbx
call fcn.140315220
mov r9d, dword [rsp + 0xc0]
mov r8, qword [rsp + 0xb8]
mov rcx, rbx
mov rdx, qword [rsp + 0x68]
call fcn.1403153d0
mov rcx, rbp
call fcn.140387c00
jmp 0x140318e16
lea rcx, [rsp + 0xb8]
call fcn.140356f00
mov dword [r15], r14d
mov rcx, rdi
call fcn.14031ace0
lea rcx, [rsp + 0xa8]
call fcn.140356f00
cmp qword [rsp + 0x1a8], 0
je 0x14031902a
mov rdi, qword [rsp + 0x1a8]
mov eax, dword [rsp + 0x114]
sub dword [rdi], eax
add rsp, 0x148
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret