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

Disassembly:
push rdi
push r12
push r14
push r15
sub rsp, 0x48
xor r15d, r15d
mov edi, r8d
mov r12d, edx
mov r14, rcx
cmp r8d, 2
jae 0x180077e43
mov r8d, r15d
jmp 0x180077e7b
mov eax, 0xcccccccd
mul dword [rcx + 0x34]
lea eax, [r8 - 2]
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
xor edx, edx
mov r8d, eax
mov eax, dword [0x1801757d0]
div dword [r14 + 0x30]
imul r8d, ecx
inc eax
add r8d, 2
cmp r8d, eax
jne 0x180077e7b
inc r8d
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x40], rsi
cmp r8d, edi
je 0x18007818b
mov eax, dword [0x1801757d0]
xor edx, edx
div dword [r14 + 0x30]
inc eax
cmp edi, eax
je 0x18007818b
mov rax, qword [r14 + 0x18]
mov rdx, qword [rax + 0x70]
movzx eax, byte [rdx + 0x25]
movzx ecx, byte [rdx + 0x24]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdx + 0x26]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdx + 0x27]
shl ecx, 8
or ecx, eax
jne 0x180077eda
lea eax, [rcx + 0x65]
jmp 0x1800783d9
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x80]
mov edx, edi
mov rcx, r14
call fcn.180074e50
test eax, eax
jne 0x1800783d9
cmp byte [rsp + 0x80], 1
jne 0x180077f29
lea r9, [0x180137514]
lea rdx, str.database_corruption_at_line__d_of___.10s_
lea ecx, [rax + 0xb]
mov r8d, 0xb91b
call fcn.180066060
mov eax, 0xb
jmp 0x1800783d9
cmp byte [rsp + 0x80], 2
jne 0x180077f76
test r12d, r12d
jne 0x1800783d7
lea r8, [rsp + 0x80]
lea rdx, [rsp + 0x88]
mov r9d, edi
mov rcx, r14
mov byte [rsp + 0x20], 1
call fcn.18007a710
test eax, eax
jne 0x1800783d9
mov rcx, qword [rsp + 0x88]
call fcn.180076160
jmp 0x180078194
mov rbp, qword [r14]
test edi, edi
jne 0x180077fa5
lea r9, [0x180137514]
lea rdx, str.database_corruption_at_line__d_of___.10s_
lea ecx, [rdi + 0xb]
mov r8d, 0x9878
call fcn.180066060
mov ebx, 0xb
mov eax, ebx
jmp 0x1800783d9
mov ebx, dword [rbp + 0x2c]
test ebx, ebx
jne 0x180077fc8
mov rcx, qword [rbp + 0xe0]
lea r9, [rsp + 0x88]
lea r8d, [rbx + 1]
mov edx, edi
call fcn.18006afc0
mov ebx, eax
test ebx, ebx
jne 0x18007809f
mov rsi, qword [rsp + 0x88]
cmp qword [rsi + 0x20], r15
jne 0x1800780bf
mov qword [rsi + 0x20], rbp
cmp edi, 0x7fffffff
ja 0x18007804a
mov eax, dword [0x1801757d0]
movsxd rcx, dword [rbp + 0xa0]
cdq
idiv ecx
inc eax
cmp edi, eax
je 0x18007804a
cmp byte [rbp + 0x11], r15b
jne 0x18007802c
cmp dword [rbp + 0x1c], edi
jb 0x18007802c
mov rax, qword [rbp + 0x48]
cmp qword [rax], r15
je 0x18007802c
mov rcx, rsi
call fcn.18006e300
mov ebx, eax
test eax, eax
je 0x1800780bf
jmp 0x18007806d
cmp edi, dword [rbp + 0xa4]
jbe 0x18007803b
mov ebx, 0xd
jmp 0x18007806d
mov r8, rcx
mov rcx, qword [rsi]
xor edx, edx
call sub.MSVCR90.dll_memset
jmp 0x1800780bf
lea r9, [0x180137514]
lea rdx, str.database_corruption_at_line__d_of___.10s_
mov r8d, 0x989f
mov ecx, 0xb
call fcn.180066060
mov ebx, 0xb
test byte [rsi + 0x28], 2
je 0x18007807b
mov rcx, rsi
call fcn.18006af50
mov rcx, qword [rsi + 0x30]
dec dword [rcx + 0x18]
cmp dword [rsi + 0x18], 1
jne 0x18007808c
mov qword [rcx + 0x48], r15
mov rcx, qword [rcx + 0x40]
mov r8d, 1
mov rdx, rsi
call qword [0x180175738]
mov rax, qword [rbp + 0xe0]
cmp dword [rax + 0x18], r15d
jne 0x1800780b4
mov rcx, rbp
call fcn.18006d820
mov rsi, r15
test ebx, ebx
jne 0x180078184
mov rax, qword [rsi]
mov rbp, qword [rsi + 8]
cmp edi, 1
mov qword [rbp + 0x70], rax
mov eax, r15d
mov ecx, 0x64
cmove eax, ecx
mov qword [rbp + 0x78], rsi
mov qword [rbp + 0x68], r14
mov byte [rbp + 5], al
mov dword [rbp + 0x80], edi
nop dword [rax]
lea r8, [rsp + 0x88]
lea rdx, [rsp + 0x38]
xor r9d, r9d
mov rcx, r14
mov byte [rsp + 0x20], r15b
call fcn.18007a710
mov ebx, eax
test eax, eax
jne 0x18007817c
mov rcx, qword [rsp + 0x38]
call fcn.180076160
mov ebx, dword [rsp + 0x88]
test r12d, r12d
je 0x18007812e
cmp ebx, r12d
ja 0x1800780f0
mov rcx, qword [rbp + 0x78]
call fcn.180070560
mov esi, eax
test eax, eax
jne 0x180078169
mov r9d, dword [rsp + 0x30]
movzx r8d, byte [rsp + 0x80]
mov eax, r15d
test r12d, r12d
mov rdx, rbp
mov rcx, r14
setne al
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ebx
call fcn.180077b40
mov esi, eax
mov rcx, rbp
call fcn.180076160
test esi, esi
je 0x18007818b
mov eax, esi
jmp 0x1800783d9
mov rcx, rbp
call fcn.180076160
mov eax, ebx
jmp 0x1800783d9
test r12d, r12d
jne 0x1800783d7
mov rbp, qword [rsp + 0x88]
dec edi
lea r12d, [rdi - 2]
nop word [rax + rax]
mov eax, dword [0x1801757d0]
xor edx, edx
div dword [r14 + 0x30]
lea r8d, [rax + 1]
cmp edi, r8d
je 0x1800781fb
cmp edi, 2
jae 0x1800781cf
mov eax, r15d
jmp 0x1800781f3
mov eax, 0xcccccccd
mul dword [r14 + 0x34]
mov eax, r12d
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
imul eax, ecx
add eax, 2
cmp eax, r8d
jne 0x1800781f3
inc eax
cmp eax, edi
jne 0x1800783cd
cmp edi, 2
jae 0x180078205
mov eax, r15d
jmp 0x180078229
mov eax, 0xcccccccd
mul dword [r14 + 0x34]
mov eax, r12d
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
imul eax, ecx
add eax, 2
cmp eax, r8d
jne 0x180078229
inc eax
cmp eax, edi
jne 0x1800783c3
mov rbx, qword [r14]
test edi, edi
je 0x1800783f4
mov esi, dword [rbx + 0x2c]
test esi, esi
jne 0x180078267
mov rcx, qword [rbx + 0xe0]
lea r9, [rsp + 0x88]
lea r8d, [rsi + 1]
mov edx, edi
call fcn.18006afc0
mov rbp, qword [rsp + 0x88]
mov esi, eax
test esi, esi
jne 0x180078337
cmp qword [rbp + 0x20], r15
jne 0x18007835f
mov qword [rbp + 0x20], rbx
cmp edi, 0x7fffffff
ja 0x1800782e2
mov eax, dword [0x1801757d0]
movsxd rcx, dword [rbx + 0xa0]
cdq
idiv ecx
inc eax
cmp edi, eax
je 0x1800782e2
cmp byte [rbx + 0x11], r15b
jne 0x1800782c3
cmp dword [rbx + 0x1c], edi
jb 0x1800782c3
mov rax, qword [rbx + 0x48]
cmp qword [rax], r15
je 0x1800782c3
mov rcx, rbp
call fcn.18006e300
mov esi, eax
test eax, eax
je 0x18007835f
jmp 0x180078305
cmp edi, dword [rbx + 0xa4]
jbe 0x1800782d2
mov esi, 0xd
jmp 0x180078305
mov r8, rcx
mov rcx, qword [rbp]
xor edx, edx
call sub.MSVCR90.dll_memset
jmp 0x18007835f
lea r9, [0x180137514]
lea rdx, str.database_corruption_at_line__d_of___.10s_
mov r8d, 0x989f
mov ecx, 0xb
call fcn.180066060
mov esi, 0xb
test byte [rbp + 0x28], 2
je 0x180078313
mov rcx, rbp
call fcn.18006af50
mov rcx, qword [rbp + 0x30]
dec dword [rcx + 0x18]
cmp dword [rbp + 0x18], 1
jne 0x180078324
mov qword [rcx + 0x48], r15
mov rcx, qword [rcx + 0x40]
mov r8d, 1
mov rdx, rbp
call qword [0x180175738]
mov rax, qword [rbx + 0xe0]
cmp dword [rax + 0x18], r15d
jne 0x18007834c
mov rcx, rbx
call fcn.18006d820
mov rbp, r15
mov qword [rsp + 0x88], r15
test esi, esi
jne 0x180078417
mov rax, qword [rbp]
mov rbx, qword [rbp + 8]
mov ecx, 0x64
mov qword [rbx + 0x70], rax
mov eax, r15d
cmp edi, 1
cmove eax, ecx
mov rcx, rbp
mov qword [rbx + 0x78], rbp
mov qword [rbx + 0x68], r14
mov dword [rbx + 0x80], edi
mov byte [rbx + 5], al
call fcn.180070560
mov rcx, qword [rbx + 0x78]
mov esi, eax
test rcx, rcx
je 0x1800783bb
mov rbx, qword [rcx + 0x20]
call fcn.18006b180
mov r11, qword [rbx + 0xe0]
cmp dword [r11 + 0x18], r15d
jne 0x1800783bb
mov rcx, rbx
call fcn.18006d820
test esi, esi
jne 0x180078175
dec edi
dec r12d
jmp 0x1800781b0
mov rax, qword [r14]
mov dword [rax + 0x1c], edi
mov dword [r14 + 0x3c], edi
xor eax, eax
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
add rsp, 0x48
pop r15
pop r14
pop r12
pop rdi
ret
lea r9, [0x180137514]
lea rdx, str.database_corruption_at_line__d_of___.10s_
mov r8d, 0x9878
mov ecx, 0xb
call fcn.180066060
mov esi, 0xb
mov eax, esi
jmp 0x1800783d9