Function at 0x180078170
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 0x180078193
mov r8d, r15d
jmp 0x1800781cb
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 [0x1801767d0]
div dword [r14 + 0x30]
imul r8d, ecx
inc eax
add r8d, 2
cmp r8d, eax
jne 0x1800781cb
inc r8d
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x40], rsi
cmp r8d, edi
je 0x1800784db
mov eax, dword [0x1801767d0]
xor edx, edx
div dword [r14 + 0x30]
inc eax
cmp edi, eax
je 0x1800784db
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 0x18007822a
lea eax, [rcx + 0x65]
jmp 0x180078729
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x80]
mov edx, edi
mov rcx, r14
call fcn.1800751a0
test eax, eax
jne 0x180078729
cmp byte [rsp + 0x80], 1
jne 0x180078279
lea r9, [0x180138514]
lea rdx, str.database_corruption_at_line__d_of___.10s_
lea ecx, [rax + 0xb]
mov r8d, 0xb91b
call fcn.1800663b0
mov eax, 0xb
jmp 0x180078729
cmp byte [rsp + 0x80], 2
jne 0x1800782c6
test r12d, r12d
jne 0x180078727
lea r8, [rsp + 0x80]
lea rdx, [rsp + 0x88]
mov r9d, edi
mov rcx, r14
mov byte [rsp + 0x20], 1
call fcn.18007aa60
test eax, eax
jne 0x180078729
mov rcx, qword [rsp + 0x88]
call fcn.1800764b0
jmp 0x1800784e4
mov rbp, qword [r14]
test edi, edi
jne 0x1800782f5
lea r9, [0x180138514]
lea rdx, str.database_corruption_at_line__d_of___.10s_
lea ecx, [rdi + 0xb]
mov r8d, 0x9878
call fcn.1800663b0
mov ebx, 0xb
mov eax, ebx
jmp 0x180078729
mov ebx, dword [rbp + 0x2c]
test ebx, ebx
jne 0x180078318
mov rcx, qword [rbp + 0xe0]
lea r9, [rsp + 0x88]
lea r8d, [rbx + 1]
mov edx, edi
call fcn.18006b310
mov ebx, eax
test ebx, ebx
jne 0x1800783ef
mov rsi, qword [rsp + 0x88]
cmp qword [rsi + 0x20], r15
jne 0x18007840f
mov qword [rsi + 0x20], rbp
cmp edi, 0x7fffffff
ja 0x18007839a
mov eax, dword [0x1801767d0]
movsxd rcx, dword [rbp + 0xa0]
cdq
idiv ecx
inc eax
cmp edi, eax
je 0x18007839a
cmp byte [rbp + 0x11], r15b
jne 0x18007837c
cmp dword [rbp + 0x1c], edi
jb 0x18007837c
mov rax, qword [rbp + 0x48]
cmp qword [rax], r15
je 0x18007837c
mov rcx, rsi
call fcn.18006e650
mov ebx, eax
test eax, eax
je 0x18007840f
jmp 0x1800783bd
cmp edi, dword [rbp + 0xa4]
jbe 0x18007838b
mov ebx, 0xd
jmp 0x1800783bd
mov r8, rcx
mov rcx, qword [rsi]
xor edx, edx
call sub.MSVCR90.dll_memset
jmp 0x18007840f
lea r9, [0x180138514]
lea rdx, str.database_corruption_at_line__d_of___.10s_
mov r8d, 0x989f
mov ecx, 0xb
call fcn.1800663b0
mov ebx, 0xb
test byte [rsi + 0x28], 2
je 0x1800783cb
mov rcx, rsi
call fcn.18006b2a0
mov rcx, qword [rsi + 0x30]
dec dword [rcx + 0x18]
cmp dword [rsi + 0x18], 1
jne 0x1800783dc
mov qword [rcx + 0x48], r15
mov rcx, qword [rcx + 0x40]
mov r8d, 1
mov rdx, rsi
call qword [0x180176738]
mov rax, qword [rbp + 0xe0]
cmp dword [rax + 0x18], r15d
jne 0x180078404
mov rcx, rbp
call fcn.18006db70
mov rsi, r15
test ebx, ebx
jne 0x1800784d4
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.18007aa60
mov ebx, eax
test eax, eax
jne 0x1800784cc
mov rcx, qword [rsp + 0x38]
call fcn.1800764b0
mov ebx, dword [rsp + 0x88]
test r12d, r12d
je 0x18007847e
cmp ebx, r12d
ja 0x180078440
mov rcx, qword [rbp + 0x78]
call fcn.1800708b0
mov esi, eax
test eax, eax
jne 0x1800784b9
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.180077e90
mov esi, eax
mov rcx, rbp
call fcn.1800764b0
test esi, esi
je 0x1800784db
mov eax, esi
jmp 0x180078729
mov rcx, rbp
call fcn.1800764b0
mov eax, ebx
jmp 0x180078729
test r12d, r12d
jne 0x180078727
mov rbp, qword [rsp + 0x88]
dec edi
lea r12d, [rdi - 2]
nop word [rax + rax]
mov eax, dword [0x1801767d0]
xor edx, edx
div dword [r14 + 0x30]
lea r8d, [rax + 1]
cmp edi, r8d
je 0x18007854b
cmp edi, 2
jae 0x18007851f
mov eax, r15d
jmp 0x180078543
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 0x180078543
inc eax
cmp eax, edi
jne 0x18007871d
cmp edi, 2
jae 0x180078555
mov eax, r15d
jmp 0x180078579
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 0x180078579
inc eax
cmp eax, edi
jne 0x180078713
mov rbx, qword [r14]
test edi, edi
je 0x180078744
mov esi, dword [rbx + 0x2c]
test esi, esi
jne 0x1800785b7
mov rcx, qword [rbx + 0xe0]
lea r9, [rsp + 0x88]
lea r8d, [rsi + 1]
mov edx, edi
call fcn.18006b310
mov rbp, qword [rsp + 0x88]
mov esi, eax
test esi, esi
jne 0x180078687
cmp qword [rbp + 0x20], r15
jne 0x1800786af
mov qword [rbp + 0x20], rbx
cmp edi, 0x7fffffff
ja 0x180078632
mov eax, dword [0x1801767d0]
movsxd rcx, dword [rbx + 0xa0]
cdq
idiv ecx
inc eax
cmp edi, eax
je 0x180078632
cmp byte [rbx + 0x11], r15b
jne 0x180078613
cmp dword [rbx + 0x1c], edi
jb 0x180078613
mov rax, qword [rbx + 0x48]
cmp qword [rax], r15
je 0x180078613
mov rcx, rbp
call fcn.18006e650
mov esi, eax
test eax, eax
je 0x1800786af
jmp 0x180078655
cmp edi, dword [rbx + 0xa4]
jbe 0x180078622
mov esi, 0xd
jmp 0x180078655
mov r8, rcx
mov rcx, qword [rbp]
xor edx, edx
call sub.MSVCR90.dll_memset
jmp 0x1800786af
lea r9, [0x180138514]
lea rdx, str.database_corruption_at_line__d_of___.10s_
mov r8d, 0x989f
mov ecx, 0xb
call fcn.1800663b0
mov esi, 0xb
test byte [rbp + 0x28], 2
je 0x180078663
mov rcx, rbp
call fcn.18006b2a0
mov rcx, qword [rbp + 0x30]
dec dword [rcx + 0x18]
cmp dword [rbp + 0x18], 1
jne 0x180078674
mov qword [rcx + 0x48], r15
mov rcx, qword [rcx + 0x40]
mov r8d, 1
mov rdx, rbp
call qword [0x180176738]
mov rax, qword [rbx + 0xe0]
cmp dword [rax + 0x18], r15d
jne 0x18007869c
mov rcx, rbx
call fcn.18006db70
mov rbp, r15
mov qword [rsp + 0x88], r15
test esi, esi
jne 0x180078767
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.1800708b0
mov rcx, qword [rbx + 0x78]
mov esi, eax
test rcx, rcx
je 0x18007870b
mov rbx, qword [rcx + 0x20]
call fcn.18006b4d0
mov r11, qword [rbx + 0xe0]
cmp dword [r11 + 0x18], r15d
jne 0x18007870b
mov rcx, rbx
call fcn.18006db70
test esi, esi
jne 0x1800784c5
dec edi
dec r12d
jmp 0x180078500
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, [0x180138514]
lea rdx, str.database_corruption_at_line__d_of___.10s_
mov r8d, 0x9878
mov ecx, 0xb
call fcn.1800663b0
mov esi, 0xb
mov eax, esi
jmp 0x180078729