Function at 0x140020310
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 0x14002038e
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 [0x140132cd8]
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 0x1400205f2
mov eax, dword [0x140132cd8]
xor edx, edx
div dword [r12]
lea r8d, [rax + 1]
cmp ebx, r8d
je 0x1400205f2
mov rax, qword [rsi + 0x18]
mov rcx, qword [rax + 0x50]
mov eax, dword [rcx + 0x24]
bswap eax
test eax, eax
jne 0x1400203d8
mov eax, 0x65
jmp 0x140020699
mov r15d, ebp
cmp ebx, 2
jb 0x14002040b
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.140017b40
mov edi, eax
test eax, eax
jne 0x140020659
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 0x14002044f
call fcn.1400181b0
mov r9d, 0xe9db
jmp 0x140020633
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.1400181b0
lea eax, [rdi - 1]
cmp al, 4
ja 0x14002062d
cmp dil, 1
jne 0x1400204b3
lea rax, [0x14010eb54]
mov edi, reloc.WS2_32.dll_inet_addr
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.140009250
mov eax, edi
jmp 0x140020699
cmp dil, 2
jne 0x140020503
test r14d, r14d
jne 0x140020697
mov r9d, ebx
mov byte [rsp + 0x20], 1
lea r8, [rsp + 0xb0]
mov rcx, rsi
lea rdx, [rsp + 0x48]
call fcn.140022ac0
test eax, eax
jne 0x140020699
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400205fb
mov rcx, qword [rcx + 0x70]
call fcn.1400181b0
jmp 0x1400205fb
mov rcx, qword [rsi]
lea r8, [rsp + 0x38]
xor r9d, r9d
mov edx, ebx
call fcn.140017b40
test eax, eax
jne 0x140020699
mov rcx, qword [rsp + 0x38]
mov r15, qword [rcx + 0x10]
cmp ebx, dword [r15 + 0x88]
je 0x140020557
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.140022ac0
mov edi, eax
test eax, eax
jne 0x140020620
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400205a6
mov rcx, qword [rcx + 0x70]
call fcn.1400181b0
mov eax, dword [rsp + 0x30]
test r14d, r14d
je 0x1400205bc
mov ecx, dword [rsp + 0x38]
cmp eax, dword [rsp + 0xa8]
ja 0x140020570
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.140020140
mov rcx, qword [r15 + 0x70]
mov edi, eax
call fcn.1400181b0
test edi, edi
jne 0x140020659
mov r12, qword [rsp + 0x48]
test r14d, r14d
jne 0x140020697
mov eax, dword [0x140132cd8]
xor edx, edx
div dword [r12]
mov r10, qword [rsp + 0x50]
lea r9d, [rax + 1]
dec ebx
cmp ebx, r9d
je 0x140020610
cmp ebx, 2
jae 0x14002065d
mov ecx, ebp
jmp 0x14002068c
mov rcx, qword [r15 + 0x70]
call fcn.1400181b0
mov eax, edi
jmp 0x140020699
mov r9d, 0xe9e3
lea rax, [0x14010eb54]
mov edi, reloc.WS2_32.dll_inet_addr
mov ecx, edi
mov qword [rsp + 0x20], rax
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call fcn.140009250
mov eax, edi
jmp 0x140020699
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 0x140020610
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