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

Disassembly:
push rbx
push r15
sub rsp, 0x28
mov qword [rsp + 0x48], rsi
mov rbx, rcx
mov qword [rsp + 0x50], rdi
mov r15, rdx
movsxd rdi, dword [rdx + 0xc]
mov qword [rsp + 0x20], r14
movsxd r14, dword [rdx + 8]
shl r14, 4
add r14, qword [rcx + 0x50]
mov ecx, 0xb90
call qword [sym.imp.OPENGL32.dll_glEnable]
cmp dword [rbx + 0x84], 0xff
je 0x14002f419
mov ecx, 0xff
mov dword [rbx + 0x84], 0xff
call qword [sym.imp.OPENGL32.dll_glStencilMask]
cmp dword [rbx + 0x88], 0x207
jne 0x14002f43a
cmp dword [rbx + 0x8c], 0
jne 0x14002f43a
cmp dword [rbx + 0x90], 0xff
je 0x14002f462
xor edx, edx
mov qword [rbx + 0x88], 0x207
mov ecx, 0x207
mov dword [rbx + 0x90], 0xff
mov r8d, 0xff
call qword [sym.imp.OPENGL32.dll_glStencilFunc]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.OPENGL32.dll_glColorMask]
movsxd r8, dword [r15 + 0x18]
mov edx, 0xb
add r8, qword [rbx + 0x70]
mov ecx, dword [rbx + 0x14]
call qword [0x1400d4530]
mov edx, dword [rbx + 0x28]
xor eax, eax
test edx, edx
jle 0x14002f4b3
mov r9, qword [rbx + 0x18]
mov r8d, dword [rbx + 0xa4]
mov rcx, r9
nop
cmp dword [rcx], r8d
je 0x14002f6f6
inc eax
add rcx, 0x18
cmp eax, edx
jl 0x14002f4a0
xor edx, edx
cmp dword [rbx + 0x80], edx
je 0x14002f4ce
mov ecx, 0xde1
mov dword [rbx + 0x80], edx
call qword [sym.imp.OPENGL32.dll_glBindTexture]
test byte [rbx + 0x3c], 4
je 0x14002f518
call qword [sym.imp.OPENGL32.dll_glGetError]
test eax, eax
je 0x14002f4f3
lea r8, str.tex_paint_tex
mov edx, eax
lea rcx, str.Error__08x_after__s_n
call fcn.14002e300
test byte [rbx + 0x3c], 4
je 0x14002f518
call qword [sym.imp.OPENGL32.dll_glGetError]
test eax, eax
je 0x14002f518
lea r8, str.fill_simple
mov edx, eax
lea rcx, str.Error__08x_after__s_n
call fcn.14002e300
mov edx, 0x1e00
mov ecx, 0x404
mov r8d, edx
mov r9d, 0x8507
call qword [0x1400d73c0]
mov edx, 0x1e00
mov ecx, 0x405
mov r8d, edx
mov r9d, 0x8508
call qword [0x1400d73c0]
mov ecx, 0xb44
call qword [sym.imp.OPENGL32.dll_glDisable]
mov rsi, rdi
test edi, edi
jle 0x14002f590
mov qword [rsp + 0x40], rbp
mov rdi, r14
mov rbp, rsi
nop word [rax + rax]
mov r8d, dword [rdi + 4]
mov ecx, 6
mov edx, dword [rdi]
call qword [sym.imp.OPENGL32.dll_glDrawArrays]
lea rdi, [rdi + 0x10]
sub rbp, 1
jne 0x14002f570
mov rbp, qword [rsp + 0x40]
mov ecx, 0xb44
call qword [sym.imp.OPENGL32.dll_glEnable]
mov r9b, 1
movzx r8d, r9b
movzx edx, r9b
movzx ecx, r9b
call qword [sym.imp.OPENGL32.dll_glColorMask]
mov edx, dword [rbx + 0x38]
mov rcx, rbx
add edx, dword [r15 + 0x18]
mov r8d, dword [r15 + 4]
call fcn.14002f2c0
test byte [rbx + 0x3c], 4
je 0x14002f5e8
call qword [sym.imp.OPENGL32.dll_glGetError]
test eax, eax
je 0x14002f5e8
lea r8, str.fill_fill
mov edx, eax
lea rcx, str.Error__08x_after__s_n
call fcn.14002e300
test byte [rbx + 0x3c], 1
je 0x14002f66b
cmp dword [rbx + 0x88], 0x202
jne 0x14002f60f
cmp dword [rbx + 0x8c], 0
jne 0x14002f60f
cmp dword [rbx + 0x90], 0xff
je 0x14002f637
xor edx, edx
mov qword [rbx + 0x88], 0x202
mov ecx, 0x202
mov dword [rbx + 0x90], 0xff
mov r8d, 0xff
call qword [sym.imp.OPENGL32.dll_glStencilFunc]
mov edx, 0x1e00
mov ecx, edx
mov r8d, edx
call qword [sym.imp.OPENGL32.dll_glStencilOp]
test rsi, rsi
jle 0x14002f66b
lea rdi, [r14 + 8]
mov r8d, dword [rdi + 4]
mov ecx, 5
mov edx, dword [rdi]
call qword [sym.imp.OPENGL32.dll_glDrawArrays]
lea rdi, [rdi + 0x10]
sub rsi, 1
jne 0x14002f650
cmp dword [rbx + 0x88], 0x205
mov r14, qword [rsp + 0x20]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x48]
jne 0x14002f69b
cmp dword [rbx + 0x8c], 0
jne 0x14002f69b
cmp dword [rbx + 0x90], 0xff
je 0x14002f6c3
xor edx, edx
mov qword [rbx + 0x88], 0x205
mov ecx, 0x205
mov dword [rbx + 0x90], 0xff
mov r8d, 0xff
call qword [sym.imp.OPENGL32.dll_glStencilFunc]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.OPENGL32.dll_glStencilOp]
mov r8d, dword [r15 + 0x14]
mov ecx, 5
mov edx, dword [r15 + 0x10]
call qword [sym.imp.OPENGL32.dll_glDrawArrays]
mov ecx, 0xb90
add rsp, 0x28
pop r15
pop rbx
jmp qword [sym.imp.OPENGL32.dll_glDisable]
lea rcx, [rax + rax*2]
lea rax, [r9 + rcx*8]
test rax, rax
je 0x14002f4b3
mov edx, dword [rax + 4]
jmp 0x14002f4b5