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

Disassembly:
mov qword [rsp + 0x10], rbx
mov dword [rsp + 0x18], r8d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov r10, qword [rcx + 0x30]
mov r15d, 1
xor ecx, ecx
mov dword [rdx], r15d
mov rdi, rdx
mov qword [rbp + 0x40], r10
mov eax, r15d
mov r12d, r9d
cpuid
mov esi, ecx
mov r11d, r8d
mov ecx, ebx
mov r9d, eax
shr ecx, 0x18
mov dword [rdi + 4], ecx
bt edx, 0x1c
jae 0x1400161ed
shr ebx, 0x10
movzx ebx, bl
sub ebx, r15d
jne 0x140016184
xor ecx, ecx
mov ebx, r15d
shl ebx, cl
jmp 0x1400161f0
mov eax, ebx
mov edx, setsockopt
and eax, 0xffff0000
mov ecx, ebx
cmove edx, r15d
shr ecx, 0x10
test eax, eax
cmove ecx, ebx
test ecx, 0xff00
je 0x1400161ac
shr ecx, 8
add edx, 8
mov eax, ecx
lea ebx, [rdx + 4]
and eax, 0xf0
mov r8d, ecx
cmove ebx, edx
shr r8d, 4
test eax, eax
cmove r8d, ecx
lea edx, [rbx + 2]
mov ecx, r8d
and ecx, 0xc
mov eax, r8d
cmove edx, ebx
shr eax, 2
test ecx, ecx
mov ebx, r15d
cmove eax, r8d
test al, 2
lea ecx, [rdx + 1]
cmove ecx, edx
shl ebx, cl
jmp 0x1400161f0
mov ebx, r15d
mov r13d, dword [rbp + 0x68]
xor edx, edx
mov dword [rdi + 8], ebx
mov ecx, r9d
mov eax, dword [rdi + 4]
div ebx
xor edx, edx
shr ecx, 0x10
mov dword [rdi + 0x14], eax
mov ebx, r9d
mov eax, dword [rdi + 4]
and ecx, 0xf
div dword [rdi + 8]
shr ebx, 4
mov eax, r9d
mov dword [rdi + 0x20], edx
and ebx, 0xf
shr eax, 0x14
mov edx, r9d
shr edx, 8
and edx, 0xf
movzx eax, al
cmp r13d, r15d
ja 0x14001623e
cmp edx, 0xf
jne 0x14001623e
add eax, edx
jmp 0x140016240
mov eax, edx
mov dword [rdi + 0x90], eax
test r13d, r13d
jne 0x140016341
cmp edx, 6
je 0x140016353
cmp edx, 0xf
je 0x140016353
mov ecx, ebx
and r9d, 0xf
mov dword [rdi + 0x8c], ecx
mov dword [rdi + 0x88], r9d
test r13d, r13d
jne 0x140016290
cmp eax, 6
jne 0x140016290
mov eax, ecx
cmp ecx, 0x57
je 0x14001628c
cmp eax, 0x85
jne 0x140016290
mov dword [r10 + 0x14], r15d
xor eax, eax
xor r9d, r9d
mov qword [rbp - 0x18], rax
mov ecx, dword [rbp - 0x14]
mov qword [rbp - 0x20], rax
cpuid
mov dword [rbp - 0x1c], ebx
mov dword [rbp - 0x18], edx
movsd xmm0, qword [rbp - 0x1c]
movsd qword [rdi + 0x48], xmm0
mov dword [rdi + 0x50], ecx
cmp r12d, 0x80000004
jb 0x140016312
mov eax, 0x80000002
mov ecx, r9d
cpuid
mov dword [rbp - 0x20], eax
mov eax, 0x80000003
mov dword [rbp - 0x1c], ebx
mov dword [rbp - 0x18], ecx
mov dword [rbp - 0x14], edx
movaps xmm0, xmmword [rbp - 0x20]
cpuid
mov dword [rbp - 0x20], eax
mov eax, 0x80000004
mov dword [rbp - 0x1c], ebx
mov dword [rbp - 0x18], ecx
mov dword [rbp - 0x14], edx
cpuid
movups xmmword [rdi + 0x55], xmm0
movaps xmm0, xmmword [rbp - 0x20]
mov dword [rbp - 0x20], eax
mov dword [rbp - 0x1c], ebx
mov dword [rbp - 0x18], ecx
mov dword [rbp - 0x14], edx
movups xmmword [rdi + 0x65], xmm0
movaps xmm0, xmmword [rbp - 0x20]
movups xmmword [rdi + 0x75], xmm0
test r13d, r13d
je 0x14001637e
cmp r12d, 0x80000008
jb 0x14001637e
mov ecx, esi
mov eax, 0x80000008
cpuid
mov esi, ecx
mov dword [rbp - 0x1c], ebx
shr ecx, 0xc
mov dword [rbp - 0x14], edx
and ecx, 0xf
jne 0x14001635d
movzx eax, sil
inc eax
jmp 0x140016362
cmp r13d, r15d
jne 0x140016261
cmp edx, 0xf
jne 0x140016261
shl ecx, 4
add ecx, ebx
jmp 0x140016263
mov eax, r15d
shl eax, cl
mov dword [rdi + 0xc], eax
xor edx, edx
mov eax, dword [rdi + 4]
div dword [rdi + 0xc]
mov dword [rdi + 0x10], r15d
mov dword [rdi + 0x14], eax
mov dword [rdi + 0x20], edx
mov dword [rdi + 0x28], edx
mov dword [rdi + 0x24], r9d
mov rax, qword [rbp + 0x60]
mov dword [rdi + 0x3c], r9d
mov qword [rdi + 0x40], r9
test r13d, r13d
je 0x1400164f1
test dword [rax + 0x18], 0x400000
je 0x140016662
cmp dword [rdi + 0x90], 0x16
mov eax, 0x8000001e
mov ecx, esi
cpuid
mov dword [rdi + 4], eax
mov eax, r9d
mov dword [rbp - 0x1c], ebx
je 0x1400163be
movzx eax, cl
mov dword [rdi + 0x18], eax
movzx eax, byte [rbp - 0x1c]
ja 0x1400163cc
mov dword [rdi + 0x1c], eax
jmp 0x1400163cf
mov dword [rdi + 0x28], eax
xor ecx, ecx
mov eax, 0x8000001d
cpuid
mov r8d, r9d
test al, 0x1f
je 0x140016408
xor r9d, r9d
nop dword [rax]
nop word [rax + rax]
inc r8d
mov eax, 0x8000001d
mov ecx, r8d
inc r9d
cpuid
test al, 0x1f
jne 0x1400163f0
mov dword [rdi + 0x3c], r9d
mov eax, r9d
lea rcx, [rax + rax*4]
shl rcx, 3
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rdi + 0x40], rax
xor ecx, ecx
mov r8, rax
xor r11d, r11d
mov eax, 0x8000001d
cpuid
mov r9d, eax
mov esi, edx
mov r14d, ecx
mov r10d, eax
and r9d, 0x1f
je 0x1400164e6
lea r12d, [r11 - 1]
nop word [rax + rax]
mov ecx, ebx
mov dword [r8], r9d
shr ecx, 0xc
lea r8, [r8 + 0x28]
and ecx, 0x3ff
mov edx, ebx
inc ecx
shr ebx, 0x16
inc ebx
mov dword [r8 - 0x14], ecx
and edx, 0xfff
mov eax, r10d
shr eax, 5
inc edx
and eax, 7
mov dword [r8 - 0x18], edx
mov dword [r8 - 0x24], eax
mov eax, r10d
shr eax, 0xe
and eax, 0xfff
inc eax
mov dword [r8 - 0x20], eax
bt r10d, 9
mov eax, ebx
cmovb eax, r12d
and esi, 2
mov dword [r8 - 0xc], eax
inc r11d
lea eax, [r14 + 1]
mov dword [r8 - 0x10], esi
mov dword [r8 - 8], eax
imul eax, ebx
imul eax, ecx
mov ecx, r11d
imul eax, edx
mov dword [r8 - 4], eax
mov eax, 0x8000001d
cpuid
mov r9d, eax
mov esi, edx
mov r14d, ecx
mov r10d, eax
and r9d, 0x1f
jne 0x140016450
xor r9d, r9d
mov r10, qword [rbp + 0x40]
mov r11d, dword [rbp + 0x50]
cmp r13d, r15d
je 0x1400168cd
cmp r11d, 4
jb 0x1400168cd
xor ecx, ecx
mov eax, 4
cpuid
mov r8d, eax
test al, 0x1f
je 0x140016567
cmp dword [r10 + 0x14], 0
je 0x140016527
mov eax, r8d
and eax, 0xe0
cmp al, 0x60
je 0x140016567
inc dword [rdi + 0x3c]
test r9d, r9d
jne 0x140016553
mov eax, dword [rdi + 8]
xor edx, edx
shr r8d, 0x1a
lea ecx, [r8 + 1]
div ecx
mov dword [rdi + 0xc], ecx
xor edx, edx
mov ecx, eax
mov dword [rdi + 0x10], eax
mov eax, dword [rdi + 0x20]
div ecx
mov dword [rdi + 0x24], edx
mov dword [rdi + 0x28], eax
inc r9d
mov eax, 4
mov ecx, r9d
cpuid
mov r8d, eax
test al, 0x1f
jne 0x140016514
mov eax, dword [rdi + 0x3c]
lea rcx, [rax + rax*4]
shl rcx, 3
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r12, qword [rbp + 0x40]
xor ecx, ecx
mov r9, rax
mov qword [rdi + 0x40], rax
mov eax, 4
xor r11d, r11d
cpuid
mov r10d, eax
mov esi, edx
mov r14d, ecx
mov r8d, eax
and r10d, 0x1f
je 0x1400168d1
lea r15d, [r11 - 1]
nop dword [rax + rax]
mov eax, r8d
shr eax, 5
and eax, 7
cmp dword [r12 + 0x14], 0
je 0x1400165ca
cmp eax, 3
je 0x140016657
mov dword [r9 + 4], eax
mov ecx, ebx
shr ecx, 0xc
mov edx, ebx
and ecx, 0x3ff
shr ebx, 0x16
inc ecx
mov dword [r9], r10d
inc ebx
mov dword [r9 + 0x14], ecx
and edx, 0xfff
mov eax, r8d
shr eax, 0xe
inc edx
and eax, 0xfff
mov dword [r9 + 0x10], edx
inc eax
mov dword [r9 + 8], eax
bt r8d, 9
mov eax, ebx
cmovb eax, r15d
and esi, 2
mov dword [r9 + 0x1c], eax
inc r11d
lea eax, [r14 + 1]
mov dword [r9 + 0x18], esi
mov dword [r9 + 0x20], eax
imul eax, ebx
imul eax, ecx
mov ecx, r11d
imul eax, edx
mov dword [r9 + 0x24], eax
mov eax, 4
cpuid
mov r10d, eax
add r9, 0x28
mov esi, edx
mov r14d, ecx
mov r8d, eax
and r10d, 0x1f
jne 0x1400165b0
mov r15d, 1
jmp 0x1400168d1
cmp r12d, 0x80000005
jb 0x140016778
mov ecx, esi
mov eax, 0x80000005
cpuid
mov ebx, ecx
mov r14d, edx
shr ebx, 0xe
mov esi, ecx
and ebx, 0x3fc00
je 0x1400166f4
mov edx, 0x28
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
xor r9d, r9d
mov r8, rax
test rax, rax
je 0x1400166f4
mov edx, dword [rdi + 0x3c]
mov qword [rdi + 0x40], rax
lea ecx, [rdx + 1]
mov dword [rdi + 0x3c], ecx
lea rdx, [rdx + rdx*4]
mov dword [rax + rdx*8], r15d
mov dword [rax + rdx*8 + 4], r15d
mov dword [rax + rdx*8 + 8], r15d
movzx eax, sil
mov dword [r8 + rdx*8 + 0x10], eax
mov eax, esi
shr eax, 0x10
movzx ecx, al
mov eax, 0xffffffff
cmp ecx, 0xff
mov qword [r8 + rdx*8 + 0x14], r9
mov dword [r8 + rdx*8 + 0x24], ebx
cmove ecx, eax
mov dword [r8 + rdx*8 + 0x20], r9d
mov dword [r8 + rdx*8 + 0x1c], ecx
mov ebx, r14d
shr ebx, 0xe
and ebx, 0x3fc00
je 0x140016778
mov eax, dword [rdi + 0x3c]
mov rcx, qword [rdi + 0x40]
inc eax
lea rdx, [rax + rax*4]
shl rdx, 3
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
xor r9d, r9d
mov r8, rax
test rax, rax
je 0x140016778
mov edx, dword [rdi + 0x3c]
mov qword [rdi + 0x40], rax
lea ecx, [rdx + 1]
mov dword [rdi + 0x3c], ecx
lea rdx, [rdx + rdx*4]
mov dword [rax + rdx*8], 2
mov ecx, 0xffffffff
mov dword [rax + rdx*8 + 4], r15d
mov dword [rax + rdx*8 + 8], r15d
movzx eax, r14b
shr r14d, 0x10
mov dword [r8 + rdx*8 + 0x10], eax
movzx eax, r14b
cmp eax, 0xff
mov qword [r8 + rdx*8 + 0x14], r9
mov dword [r8 + rdx*8 + 0x24], ebx
cmove eax, ecx
mov dword [r8 + rdx*8 + 0x20], r9d
mov dword [r8 + rdx*8 + 0x1c], eax
cmp r12d, 0x80000006
jb 0x1400164e9
mov ecx, esi
lea r12, [0x140055c60]
mov eax, 0x80000006
cpuid
mov dword [rbp - 0x18], ecx
mov esi, edx
mov dword [rbp - 0x14], edx
mov r14d, ecx
test ecx, 0xf000
je 0x14001682c
mov ebx, ecx
shr ebx, 6
and ebx, 0x3fffc00
je 0x14001682c
mov eax, dword [rdi + 0x3c]
mov rcx, qword [rdi + 0x40]
inc eax
lea rdx, [rax + rax*4]
shl rdx, 3
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
xor r9d, r9d
mov r8, rax
test rax, rax
je 0x14001682c
mov edx, dword [rdi + 0x3c]
mov qword [rdi + 0x40], rax
lea ecx, [rdx + 1]
lea rdx, [rdx + rdx*4]
mov dword [rdi + 0x3c], ecx
mov dword [rax + rdx*8], 3
mov dword [rax + rdx*8 + 4], 2
mov dword [rax + rdx*8 + 8], r15d
movzx eax, r14b
mov dword [r8 + rdx*8 + 0x10], eax
mov rax, qword [rbp - 0x18]
shr rax, 0xc
and eax, 0xf
mov qword [r8 + rdx*8 + 0x14], r9
mov dword [r8 + rdx*8 + 0x24], ebx
mov dword [r8 + rdx*8 + 0x20], r9d
mov eax, dword [r12 + rax*4]
mov dword [r8 + rdx*8 + 0x1c], eax
test esi, 0xf000
je 0x1400164e9
mov ebx, esi
and ebx, 0xfffc0000
add ebx, ebx
je 0x1400164e9
mov eax, dword [rdi + 0x3c]
mov rcx, qword [rdi + 0x40]
inc eax
lea rdx, [rax + rax*4]
shl rdx, 3
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov r10, qword [rbp + 0x40]
xor r9d, r9d
mov r11d, dword [rbp + 0x50]
mov r8, rax
test rax, rax
je 0x1400164f1
mov edx, dword [rdi + 0x3c]
mov qword [rdi + 0x40], rax
lea ecx, [rdx + 1]
lea rdx, [rdx + rdx*4]
mov dword [rdi + 0x3c], ecx
mov dword [rax + rdx*8], 3
mov dword [rax + rdx*8 + 4], 3
mov eax, dword [rdi + 8]
mov dword [r8 + rdx*8 + 8], eax
movzx eax, sil
mov dword [r8 + rdx*8 + 0x10], eax
mov eax, esi
shr rax, 0xc
and eax, 0xf
mov qword [r8 + rdx*8 + 0x14], r9
mov dword [r8 + rdx*8 + 0x24], ebx
mov dword [r8 + rdx*8 + 0x20], r9d
mov eax, dword [r12 + rax*4]
mov dword [r8 + rdx*8 + 0x1c], eax
jmp 0x1400164f1
mov r12, qword [rbp + 0x40]
test r13d, r13d
jne 0x1400169d5
cmp dword [rbp + 0x50], 0xb
jb 0x1400169d5
mov rax, qword [rbp + 0x60]
test dword [rax + 0x10], 0x200000
je 0x1400169d5
xor r14d, r14d
xor esi, esi
xor r8d, r8d
nop dword [rax]
mov eax, 0xb
mov ecx, r8d
cpuid
test eax, eax
jne 0x140016912
test ebx, ebx
je 0x140016917
inc r8d
jmp 0x140016900
test r8d, r8d
je 0x1400169d5
mov ecx, r8d
shl rcx, 2
mov dword [rdi + 0x38], r8d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rdi + 0x30], rax
xor r9d, r9d
nop dword [rax + rax]
mov eax, 0xb
mov ecx, r9d
cpuid
mov r11d, edx
mov r10d, ecx
mov r8d, eax
test eax, eax
jne 0x14001695b
test ebx, ebx
je 0x1400169c8
mov rax, qword [rdi + 0x30]
mov ecx, esi
and r8d, 0x1f
shr r10d, 8
mov ebx, r11d
mov dword [rdi + 4], r11d
shr ebx, cl
mov edx, r15d
mov ecx, r8d
mov r14d, r11d
sub ecx, esi
shl edx, cl
lea rcx, [r9*4]
dec edx
mov dword [rcx + rax], 0xffffffff
and edx, ebx
movzx eax, r10b
sub eax, 1
je 0x1400169ba
cmp eax, 1
je 0x1400169af
mov rax, qword [rdi + 0x30]
mov esi, r8d
inc r9d
mov dword [rcx + rax], ebx
jmp 0x140016940
mov dword [rdi + 0x28], edx
mov esi, r8d
inc r9d
jmp 0x140016940
mov dword [rdi + 0x24], edx
mov esi, r8d
inc r9d
jmp 0x140016940
mov ecx, esi
mov dword [rdi + 4], r14d
shr r14d, cl
mov dword [rdi + 0x14], r14d
xor r10d, r10d
cmp dword [rdi + 0x3c], r10d
jbe 0x140016aca
lea r11d, [r10 + 0xc]
nop word [rax + rax]
mov rax, qword [rdi + 0x40]
lea rcx, [r10 + r10*4]
mov r9d, dword [rax + rcx*8 + 8]
lea r8, [rax + rcx*8]
mov eax, dword [rdi + 4]
xor edx, edx
div r9d
mov dword [r8 + 0xc], eax
cmp r13d, 1
jne 0x140016abd
mov ecx, dword [rdi + 0x90]
cmp ecx, 0x10
jne 0x140016a83
cmp dword [rdi + 0x8c], 9
jne 0x140016a83
cmp dword [r8 + 4], 3
jne 0x140016a83
mov eax, dword [r8 + 0x1c]
cmp eax, 0xffffffff
je 0x140016a40
test r13b, al
jne 0x140016a83
cmp r9d, 8
jb 0x140016a83
cmp r9d, 0x10
cmove r9d, r11d
shr dword [r8 + 0x24], 1
shr r9d, 1
mov dword [r8 + 8], r9d
cmp eax, 0xffffffff
je 0x140016a67
cdq
sub eax, edx
sar eax, 1
mov dword [r8 + 0x1c], eax
mov eax, dword [rdi + 4]
xor edx, edx
div dword [rdi + 8]
mov ecx, edx
mov ebx, eax
mov eax, ecx
xor edx, edx
div r9d
lea ecx, [rax + rbx*2]
mov dword [r8 + 0xc], ecx
jmp 0x140016abd
cmp ecx, 0x15
jne 0x140016abd
mov eax, dword [rdi + 0x8c]
dec eax
cmp eax, 1
ja 0x140016abd
cmp dword [r8 + 4], 3
jne 0x140016abd
cmp r9d, 6
jne 0x140016abd
mov eax, dword [rdi + 4]
xor edx, edx
div dword [rdi + 8]
mov ecx, eax
mov eax, 0xaaaaaaab
mul edx
shr edx, 2
lea eax, [rdx + rcx*2]
mov dword [r8 + 0xc], eax
inc r10d
cmp r10d, dword [rdi + 0x3c]
jb 0x1400169f0
mov r8d, dword [rdi + 4]
mov edi, r8d
mov rbx, qword [r12 + 8]
shr edi, 5
mov r10d, dword [rbx]
cmp edi, r10d
jae 0x140016aea
mov rax, qword [rbx + 8]
mov edx, dword [rax + rdi*4]
jmp 0x140016af1
mov eax, dword [rbx + 0x10]
neg eax
sbb edx, edx
mov r14d, r8d
and r14d, 0x1f
bt edx, r14d
jae 0x140016b0c
mov dword [r12 + 0x10], 0
jmp 0x140016b9c
cmp dword [rbx + 0x10], 0
je 0x140016b21
mov eax, r10d
shl eax, 5
cmp r8d, eax
jae 0x140016b9c
lea esi, [rdi + 1]
cmp esi, r10d
jbe 0x140016b8b
mov ecx, edi
call fcn.1400076c0
mov ecx, eax
shl r15d, cl
cmp r15d, dword [rbx + 4]
jbe 0x140016b57
mov rcx, qword [rbx + 8]
mov edx, r15d
shl rdx, 2
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov r10d, dword [rbx]
mov qword [rbx + 8], rax
mov dword [rbx + 4], r15d
cmp r10d, esi
jae 0x140016b89
mov eax, r10d
mov r8d, esi
sub r8d, r10d
lea rdx, [rax*4]
nop dword [rax]
mov eax, dword [rbx + 0x10]
lea rdx, [rdx + 4]
neg eax
mov rax, qword [rbx + 8]
sbb ecx, ecx
mov dword [rdx + rax - 4], ecx
sub r8, 1
jne 0x140016b70
mov dword [rbx], esi
mov rax, qword [rbx + 8]
lea rdx, [rax + rdi*4]
mov eax, dword [rax + rdi*4]
bts eax, r14d
mov dword [rdx], eax
mov rbx, qword [rsp + 0x88]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret