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

Disassembly:
mov dword [rsp + 0x10], edx
push rbx
push rbp
push rsi
push r12
push r13
push r14
sub rsp, 0x68
xor ebp, ebp
lea r10, [rcx + 0x34]
mov r14d, r9d
mov qword [rsp + 0x50], r10
lea r12, [rcx + 0x30]
cmp r8d, 2
mov ebx, r8d
mov qword [rsp + 0x48], r12
lea r9d, [r8 - 2]
mov r13d, edx
mov r8d, ebp
mov rsi, rcx
jb 0x1400374de
mov eax, 0xcccccccd
mov qword [rsp + 0x48], r12
mul dword [r10]
mov eax, r9d
mov qword [rsp + 0x50], r10
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
mov eax, dword [0x1401b3448]
mov ecx, r9d
sub ecx, edx
xor edx, edx
div dword [r12]
dec eax
cmp ecx, eax
sete r8b
add r8d, 2
add r8d, ecx
mov qword [rsp + 0xa0], rdi
mov qword [rsp + 0x60], r15
cmp r8d, ebx
je 0x140037742
mov eax, dword [0x1401b3448]
xor edx, edx
div dword [r12]
lea r8d, [rax + 1]
cmp ebx, r8d
je 0x140037742
mov rax, qword [rsi + 0x18]
mov rcx, qword [rax + 0x50]
mov eax, dword [rcx + 0x24]
bswap eax
test eax, eax
jne 0x140037528
mov eax, 0x65
jmp 0x1400377e9
mov r15d, ebp
cmp ebx, 2
jb 0x14003755b
mov eax, 0xcccccccd
mul dword [r10]
mov eax, r9d
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
sub r9d, edx
lea eax, [r9 + 2]
cmp eax, r8d
sete r15b
add r15d, 2
add r15d, r9d
mov rcx, qword [rsi]
lea r8, [rsp + 0x40]
xor r9d, r9d
mov edx, r15d
call fcn.14002ecf0
mov edi, eax
test eax, eax
jne 0x1400377a9
mov rcx, qword [rsp + 0x40]
mov eax, ebx
sub eax, r15d
dec eax
mov r8, qword [rcx + 8]
lea edx, [rax + rax*4]
test edx, edx
jns 0x14003759f
call fcn.14002f370
mov r9d, 0xe9db
jmp 0x140037783
movsxd rax, edx
movzx edi, byte [rax + r8]
mov eax, dword [rax + r8 + 1]
bswap eax
mov dword [rsp + 0x40], eax
mov byte [rsp + 0xb0], dil
call fcn.14002f370
lea eax, [rdi - 1]
cmp al, 4
ja 0x14003777d
cmp dil, 1
jne 0x140037603
lea rax, [0x140190d34]
mov edi, listen
mov ecx, edi
mov qword [rsp + 0x20], rax
mov r9d, 0xf3c5
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call fcn.140020650
mov eax, edi
jmp 0x1400377e9
cmp dil, 2
jne 0x140037653
test r14d, r14d
jne 0x1400377e7
mov r9d, ebx
mov byte [rsp + 0x20], 1
lea r8, [rsp + 0xb0]
mov rcx, rsi
lea rdx, [rsp + 0x48]
call fcn.140039b00
test eax, eax
jne 0x1400377e9
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14003774b
mov rcx, qword [rcx + 0x70]
call fcn.14002f370
jmp 0x14003774b
mov rcx, qword [rsi]
lea r8, [rsp + 0x38]
xor r9d, r9d
mov edx, ebx
call fcn.14002ecf0
test eax, eax
jne 0x1400377e9
mov rcx, qword [rsp + 0x38]
mov r15, qword [rcx + 0x10]
cmp ebx, dword [r15 + 0x88]
je 0x1400376a7
mov rax, qword [rcx + 8]
cmp ebx, 1
mov qword [r15 + 0x50], rax
mov eax, ebp
mov qword [r15 + 0x70], rcx
mov ecx, 0x64
cmove eax, ecx
mov qword [r15 + 0x48], rsi
mov byte [r15 + 5], al
mov dword [r15 + 0x88], ebx
test r14d, r14d
mov ecx, 2
cmovne ecx, ebp
cmovne r13d, ebp
mov dword [rsp + 0x38], ecx
nop word [rax + rax]
mov byte [rsp + 0x20], cl
lea r8, [rsp + 0x30]
mov rcx, rsi
lea rdx, [rsp + 0x58]
mov r9d, r13d
call fcn.140039b00
mov edi, eax
test eax, eax
jne 0x140037770
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400376f6
mov rcx, qword [rcx + 0x70]
call fcn.14002f370
mov eax, dword [rsp + 0x30]
test r14d, r14d
je 0x14003770c
mov ecx, dword [rsp + 0x38]
cmp eax, dword [rsp + 0xa8]
ja 0x1400376c0
mov r9d, dword [rsp + 0x40]
mov rdx, r15
movzx r8d, byte [rsp + 0xb0]
mov rcx, rsi
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], eax
call fcn.1400372e0
mov rcx, qword [r15 + 0x70]
mov edi, eax
call fcn.14002f370
test edi, edi
jne 0x1400377a9
mov r12, qword [rsp + 0x48]
test r14d, r14d
jne 0x1400377e7
mov eax, dword [0x1401b3448]
xor edx, edx
div dword [r12]
mov r10, qword [rsp + 0x50]
lea r9d, [rax + 1]
dec ebx
cmp ebx, r9d
je 0x140037760
cmp ebx, 2
jae 0x1400377ad
mov ecx, ebp
jmp 0x1400377dc
mov rcx, qword [r15 + 0x70]
call fcn.14002f370
mov eax, edi
jmp 0x1400377e9
mov r9d, 0xe9e3
lea rax, [0x140190d34]
mov edi, listen
mov ecx, edi
mov qword [rsp + 0x20], rax
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call fcn.140020650
mov eax, edi
jmp 0x1400377e9
lea r8d, [rbx - 2]
mov eax, 0xcccccccd
mul dword [r10]
mov eax, r8d
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
mov ecx, ebp
sub r8d, edx
lea eax, [r8 + 2]
cmp eax, r9d
sete cl
add ecx, 2
add ecx, r8d
cmp ecx, ebx
je 0x140037760
mov byte [rsi + 0x23], 1
mov dword [rsi + 0x3c], ebx
xor eax, eax
mov r15, qword [rsp + 0x60]
mov rdi, qword [rsp + 0xa0]
add rsp, 0x68
pop r14
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret