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

Disassembly:
push rbx
push rbp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov r13, qword [rcx + 0x18]
xor r15d, r15d
xor r12d, r12d
mov qword [rsp + 0x88], r15
mov r14d, r8d
mov rdi, rdx
mov rbp, rcx
cmp r8d, 2
jb 0x180068687
cmp r8d, dword [rcx + 0x3c]
ja 0x180068687
test rdx, rdx
je 0x180068305
mov rax, qword [rdx + 0x70]
inc word [rax + 0x36]
mov rax, qword [rax + 0x18]
inc dword [rax + 0x18]
jmp 0x180068310
mov edx, r14d
call fcn.180063040
mov rdi, rax
mov rcx, qword [r13 + 0x70]
mov qword [rsp + 0x70], rdi
test byte [rcx + 0x34], 4
mov r8, qword [rcx + 0x28]
je 0x180068346
mov edx, dword [rcx + 0x30]
cmp dword [r8 + 0x1c], edx
jb 0x180068346
cmp dword [r8 + 0x80], r12d
je 0x18006833c
call fcn.18005b6b0
jmp 0x18006836a
mov dword [rsp + 0x80], r12d
jmp 0x18006837b
mov ebx, dword [r8 + 0x2c]
test ebx, ebx
jne 0x18006836c
mov eax, dword [r8 + 0xbc]
cmp dword [r8 + 0xb8], eax
jbe 0x180068365
call fcn.18005d1e0
jmp 0x18006836a
call fcn.18005cfc0
mov ebx, eax
mov dword [rsp + 0x80], ebx
test ebx, ebx
jne 0x1800685c3
mov rcx, qword [r13 + 0x50]
mov qword [rsp + 0x78], rsi
mov esi, dword [rcx + 0x24]
bswap esi
lea eax, [rsi + 1]
bswap eax
mov dword [rcx + 0x24], eax
test byte [rbp + 0x26], 4
je 0x1800683eb
test rdi, rdi
jne 0x1800683be
xor r9d, r9d
lea r8, [rsp + 0x70]
mov edx, r14d
mov rcx, rbp
call fcn.180062fc0
mov ebx, eax
test eax, eax
jne 0x180068618
mov rdi, qword [rsp + 0x70]
mov rcx, qword [rdi + 0x70]
call fcn.18005d460
mov dword [rsp + 0x80], eax
mov ebx, eax
test eax, eax
jne 0x1800685be
mov rax, qword [rdi + 0x48]
xor edx, edx
mov rcx, qword [rdi + 0x50]
mov r8d, dword [rax + 0x30]
call fcn.180113150
cmp byte [rbp + 0x21], r12b
je 0x18006841e
lea rax, [rsp + 0x80]
xor r9d, r9d
mov r8b, 2
mov qword [rsp + 0x20], rax
mov edx, r14d
mov rcx, rbp
call fcn.180061b40
mov ebx, dword [rsp + 0x80]
test ebx, ebx
jne 0x1800685be
test esi, esi
je 0x18006856c
mov rax, qword [r13 + 0x50]
lea r8, [rsp + 0x88]
xor r9d, r9d
mov rcx, rbp
mov r12d, dword [rax + 0x20]
bswap r12d
mov edx, r12d
call fcn.180062fc0
mov r15, qword [rsp + 0x88]
mov ebx, eax
test eax, eax
jne 0x1800685be
mov rax, qword [r15 + 0x50]
mov ecx, dword [rbp + 0x34]
shr ecx, 2
mov esi, dword [rax + 4]
bswap esi
lea eax, [rcx - 2]
cmp esi, eax
jbe 0x1800684a0
lea rax, [0x180160304]
mov ebx, 0xb
mov ecx, ebx
mov qword [rsp + 0x20], rax
mov r9d, 0x10f2e
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call fcn.18004f880
jmp 0x1800685be
lea eax, [rcx - 8]
cmp esi, eax
jae 0x18006856c
mov rcx, qword [r15 + 0x70]
call fcn.18005d460
mov ebx, eax
test eax, eax
jne 0x1800685be
mov rax, qword [r15 + 0x50]
lea ecx, [rsi + 1]
mov edx, r14d
bswap ecx
bswap edx
mov dword [rax + 4], ecx
lea ecx, [rsi*4 + 8]
mov rax, qword [r15 + 0x50]
mov dword [rcx + rax], edx
test rdi, rdi
je 0x180068515
test byte [rbp + 0x26], 4
jne 0x180068515
mov rcx, qword [rdi + 0x70]
mov rdx, qword [rcx + 0x28]
cmp byte [rdx + 0x10], bl
jne 0x180068515
movzx eax, word [rcx + 0x34]
test al, 2
je 0x180068515
cmp dword [rdx + 0x80], ebx
jne 0x180068515
mov edx, 0xfffb
and ax, dx
or ax, 0x10
mov word [rcx + 0x34], ax
mov rsi, qword [rbp + 0x58]
xor ebx, ebx
test rsi, rsi
jne 0x180068558
mov r12d, dword [rbp + 0x3c]
mov ecx, 0x200
call fcn.18004cc10
mov rsi, rax
test rax, rax
je 0x18006854a
lea rcx, [rax + 4]
xor edx, edx
mov r8d, 0x1fc
call fcn.180113150
mov dword [rsi], r12d
mov qword [rbp + 0x58], rsi
test rsi, rsi
jne 0x180068558
lea ebx, [rsi + 7]
jmp 0x1800685be
cmp r14d, dword [rsi]
ja 0x1800685be
mov edx, r14d
mov rcx, rsi
call fcn.180056510
mov ebx, eax
jmp 0x1800685be
test rdi, rdi
jne 0x180068593
xor r9d, r9d
lea r8, [rsp + 0x70]
mov edx, r14d
mov rcx, rbp
call fcn.180062fc0
mov ebx, eax
test eax, eax
jne 0x180068618
mov rdi, qword [rsp + 0x70]
mov rcx, qword [rdi + 0x70]
call fcn.18005d460
mov ebx, eax
test eax, eax
jne 0x1800685be
mov rax, qword [rdi + 0x50]
bswap r12d
bswap r14d
mov dword [rax], r12d
mov rax, qword [rdi + 0x50]
mov dword [rax + 4], ebx
mov rax, qword [r13 + 0x50]
mov dword [rax + 0x20], r14d
mov rsi, qword [rsp + 0x78]
test rdi, rdi
je 0x180068627
mov byte [rdi], 0
mov r8, qword [rdi + 0x70]
test byte [r8 + 0x34], 0x20
je 0x18006861f
mov r10, qword [r8 + 0x28]
dec dword [r10 + 0x98]
mov rax, qword [r10 + 0xa8]
mov qword [r8 + 0x20], rax
movsxd rax, dword [r10 + 0xbc]
mov rcx, qword [r10 + 0x48]
mov qword [r10 + 0xa8], r8
mov edx, dword [r8 + 0x30]
mov r8, qword [r8 + 8]
dec edx
mov r9, qword [rcx]
imul rdx, rax
call qword [r9 + 0x90]
jmp 0x180068627
mov rdi, qword [rsp + 0x70]
jmp 0x1800685be
mov rcx, r8
call fcn.180056f90
test r15, r15
je 0x1800686b3
mov r8, qword [r15 + 0x70]
test byte [r8 + 0x34], 0x20
je 0x18006867d
mov r10, qword [r8 + 0x28]
dec dword [r10 + 0x98]
mov rax, qword [r10 + 0xa8]
mov qword [r8 + 0x20], rax
movsxd rax, dword [r10 + 0xbc]
mov rcx, qword [r10 + 0x48]
mov qword [r10 + 0xa8], r8
mov edx, dword [r8 + 0x30]
mov r8, qword [r8 + 8]
dec edx
mov r9, qword [rcx]
imul rdx, rax
call qword [r9 + 0x90]
jmp 0x1800686b3
mov rcx, r8
call fcn.180056f90
jmp 0x1800686b3
lea rax, [0x180160304]
mov ebx, 0xb
mov ecx, ebx
mov qword [rsp + 0x20], rax
mov r9d, 0x10ef8
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call fcn.18004f880
mov eax, ebx
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbp
pop rbx
ret