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

Disassembly:
push rbx
push rbp
push rsi
push r12
push r13
push r14
sub rsp, 0x48
mov r13, qword [rcx + 0x18]
xor ebp, ebp
xor r12d, r12d
mov esi, r8d
mov rbx, rdx
mov r14, rcx
cmp r8d, 2
jb 0x140175d87
cmp r8d, dword [rcx + 0x3c]
ja 0x140175d87
mov qword [rsp + 0x88], rdi
test rdx, rdx
je 0x140175aa2
mov rax, qword [rdx + 0x70]
inc word [rax + 0x36]
mov rax, qword [rax + 0x18]
inc dword [rax + 0x18]
jmp 0x140175aac
mov edx, esi
call fcn.140165910
mov rbx, rax
mov rcx, qword [r13 + 0x70]
call fcn.1401b0330
mov dword [rsp + 0x90], eax
mov edi, eax
test eax, eax
jne 0x140175d57
mov rcx, qword [r13 + 0x50]
mov qword [rsp + 0x40], r15
mov r15d, dword [rcx + 0x24]
bswap r15d
lea eax, [r15 + 1]
bswap eax
mov dword [rcx + 0x24], eax
test byte [r14 + 0x26], 4
je 0x140175b79
test rbx, rbx
jne 0x140175b4c
mov rax, qword [r14]
lea r8, [rsp + 0x80]
xor r9d, r9d
mov edx, esi
mov rcx, rax
call qword [rax + 0x108]
mov edi, eax
test eax, eax
jne 0x140175b44
mov rcx, qword [rsp + 0x80]
mov rbx, qword [rcx + 0x10]
cmp esi, dword [rbx + 4]
je 0x140175b42
mov rax, qword [rcx + 8]
mov qword [rbx + 0x50], rax
xor eax, eax
cmp esi, 1
mov qword [rbx + 0x70], rcx
mov ecx, 0x64
mov qword [rbx + 0x48], r14
cmove eax, ecx
mov dword [rbx + 4], esi
mov byte [rbx + 9], al
xor edi, edi
test edi, edi
jne 0x140175d52
mov rcx, qword [rbx + 0x70]
call fcn.1401b0330
mov dword [rsp + 0x90], eax
mov edi, eax
test eax, eax
jne 0x140175d52
mov rax, qword [rbx + 0x48]
xor edx, edx
mov rcx, qword [rbx + 0x50]
mov r8d, dword [rax + 0x30]
call fcn.14028e7e0
cmp byte [r14 + 0x21], bpl
je 0x140175bab
lea rax, [rsp + 0x90]
xor r9d, r9d
mov r8b, 2
mov qword [rsp + 0x20], rax
mov edx, esi
mov rcx, r14
call fcn.1401849d0
mov edi, dword [rsp + 0x90]
test edi, edi
jne 0x140175d52
test r15d, r15d
je 0x140175cd1
mov rax, qword [r13 + 0x50]
lea r8, [rsp + 0x98]
xor r9d, r9d
mov r12d, dword [rax + 0x20]
mov rax, qword [r14]
bswap r12d
mov edx, r12d
mov rcx, rax
call qword [rax + 0x108]
mov edi, eax
test eax, eax
jne 0x140175c18
mov rcx, qword [rsp + 0x98]
mov rbp, qword [rcx + 0x10]
cmp r12d, dword [rbp + 4]
je 0x140175c16
mov rax, qword [rcx + 8]
mov qword [rbp + 0x50], rax
xor eax, eax
cmp r12d, 1
mov qword [rbp + 0x70], rcx
mov ecx, 0x64
mov qword [rbp + 0x48], r14
cmove eax, ecx
mov dword [rbp + 4], r12d
mov byte [rbp + 9], al
xor edi, edi
test edi, edi
jne 0x140175d52
mov rax, qword [rbp + 0x50]
mov ecx, dword [r14 + 0x34]
shr ecx, 2
mov r15d, dword [rax + 4]
bswap r15d
lea eax, [rcx - 2]
cmp r15d, eax
jbe 0x140175c4b
mov ecx, 0x112e0
call fcn.1401978f0
mov edi, eax
jmp 0x140175d52
lea eax, [rcx - 8]
cmp r15d, eax
jae 0x140175cd1
mov rcx, qword [rbp + 0x70]
call fcn.1401b0330
mov edi, eax
test eax, eax
jne 0x140175d52
mov rax, qword [rbp + 0x50]
lea ecx, [r15 + 1]
mov edx, esi
bswap ecx
bswap edx
mov dword [rax + 4], ecx
lea ecx, [r15*4 + 8]
mov rax, qword [rbp + 0x50]
mov dword [rcx + rax], edx
test rbx, rbx
je 0x140175cc0
test byte [r14 + 0x26], 4
jne 0x140175cc0
mov rcx, qword [rbx + 0x70]
mov rdx, qword [rcx + 0x28]
cmp byte [rdx + 0x10], dil
jne 0x140175cc0
movzx eax, word [rcx + 0x34]
test al, 2
je 0x140175cc0
cmp dword [rdx + 0x80], edi
jne 0x140175cc0
mov edx, 0xfffb
and ax, dx
or ax, 0x10
mov word [rcx + 0x34], ax
mov edx, esi
mov rcx, r14
call fcn.140165ee0
mov edi, eax
jmp 0x140175d52
test rbx, rbx
jne 0x140175d29
mov rax, qword [r14]
lea r8, [rsp + 0x30]
xor r9d, r9d
mov edx, esi
mov rcx, rax
call qword [rax + 0x108]
mov edi, eax
test eax, eax
jne 0x140175d25
mov rcx, qword [rsp + 0x30]
mov rbx, qword [rcx + 0x10]
cmp esi, dword [rbx + 4]
je 0x140175d23
mov rax, qword [rcx + 8]
mov qword [rbx + 0x50], rax
xor eax, eax
cmp esi, 1
mov qword [rbx + 0x70], rcx
mov ecx, 0x64
mov qword [rbx + 0x48], r14
cmove eax, ecx
mov dword [rbx + 4], esi
mov byte [rbx + 9], al
xor edi, edi
test edi, edi
jne 0x140175d52
mov rcx, qword [rbx + 0x70]
call fcn.1401b0330
mov edi, eax
test eax, eax
jne 0x140175d52
mov rax, qword [rbx + 0x50]
bswap r12d
bswap esi
mov dword [rax], r12d
mov rax, qword [rbx + 0x50]
mov dword [rax + 4], edi
mov rax, qword [r13 + 0x50]
mov dword [rax + 0x20], esi
mov r15, qword [rsp + 0x40]
test rbx, rbx
je 0x140175d5f
mov byte [rbx], 0
mov rcx, rbx
call fcn.140186490
mov rcx, rbp
call fcn.140186490
mov eax, edi
mov rdi, qword [rsp + 0x88]
add rsp, 0x48
pop r14
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret
lea rax, [0x140300e94]
mov r9d, 0x112aa
lea r8, str.database_corruption
mov qword [rsp + 0x20], rax
lea rdx, str._s_at_line__d_of___.10s_
mov ecx, listen
call fcn.14014bd30
mov eax, listen
add rsp, 0x48
pop r14
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret