Function at 0x140051280
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x140096fc0]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rbp, qword [0x14009ae88]
lea rcx, str.opengl32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x14009b230], rax
test rax, rax
je 0x14003f7f8
lea rdx, str.wglGetProcAddress
mov qword [rsp + 0x60], r14
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [0x14003f450]
mov qword [0x14009b240], rax
call fcn.140063ea4
xor edi, edi
lea r14, [0x140000000]
mov ebx, edi
nop word [rax + rax]
mov rsi, qword [rbx + r14 + 0x89fd0]
mov rcx, rsi
call qword [0x14009b240]
test rax, rax
jne 0x14003f506
mov rcx, qword [0x14009b230]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + r14 + 0x9aea0], rax
add rbx, 8
cmp rbx, 0x1d8
jb 0x14003f4e0
mov rax, qword [0x14009afb0]
mov r14, qword [rsp + 0x60]
test rax, rax
jne 0x14003f533
mov eax, 0xffffffff
jmp 0x14003f5a5
lea rdx, [0x14009b238]
mov ecx, 0x821b
call rax
lea rdx, [0x14009b23c]
mov ecx, 0x821c
call qword [0x14009afb0]
cmp dword [0x14009b238], edi
jne 0x14003f593
cmp dword [0x14009b23c], edi
jne 0x14003f59c
mov rax, qword [0x14009afd8]
mov ecx, 0x1f02
call rax
test rax, rax
je 0x14003f593
lea r9, [0x14009b23c]
mov rcx, rax
lea r8, [0x14009b238]
lea rdx, str._d._d
call fcn.14000eba0
cmp dword [0x14009b238], 2
jge 0x14003f5a3
mov eax, 0xfffffffd
jmp 0x14003f5a5
mov eax, edi
test eax, eax
jne 0x14003f7f8
mov ecx, 0x68
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r8, qword [0x14009ae88]
mov rbx, rax
test r8, r8
je 0x14003f626
movsx rdx, word [r8 + 0x6228]
lea rax, [r8 + 0x622c]
mov r9d, dword [r8 + 0x3fc0]
lea rax, [rax + rdx*8]
cmp dword [rax], r9d
je 0x14003f61b
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [r8 + 0x6228], cx
movsx rax, cx
lea rax, [rax*8 + 0x622c]
add rax, r8
mov dword [rax], r9d
mov dword [rax + 4], edi
inc word [rax + 4]
inc dword [r8 + 0x6220]
test rbx, rbx
je 0x14003f64d
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbx], xmm0
movups xmmword [rbx + 0x10], xmm0
movups xmmword [rbx + 0x20], xmm0
movups xmmword [rbx + 0x30], xmm0
movups xmmword [rbx + 0x40], xmm0
movups xmmword [rbx + 0x50], xmm0
mov qword [rbx + 0x60], rax
jmp 0x14003f650
mov rbx, rdi
lea rax, str.imgui_impl_opengl3
mov qword [rbp + 0xa0], rbx
mov qword [rbp + 0x90], rax
mov ecx, 0x1f02
mov rax, qword [0x14009afd8]
call rax
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x30], edi
mov ecx, 0x821b
mov dword [rsp + 0x34], edi
mov rsi, rax
call qword [0x14009afb0]
lea rdx, [rsp + 0x34]
mov ecx, 0x821c
call qword [0x14009afb0]
mov ecx, dword [rsp + 0x30]
test ecx, ecx
jne 0x14003f6c9
cmp dword [rsp + 0x34], edi
jne 0x14003f6c9
lea r9, [rsp + 0x34]
mov rcx, rsi
lea r8, [rsp + 0x30]
lea rdx, str._d._d
call fcn.14000eba0
mov ecx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x34]
lea ecx, [rcx + rcx*4]
lea ecx, [rax + rcx*2]
lea eax, [rcx + rcx*4]
add eax, eax
mov dword [rbx], eax
cmp eax, 0x140
jb 0x14003f6f0
lea rdx, [rbx + 0x28]
mov ecx, 0x9126
call qword [0x14009afb0]
mov eax, dword [rbx + 0x28]
lea rdx, str.OpenGL_ES_3
shr eax, 1
mov r8d, 0xb
and al, 1
mov rcx, rsi
mov byte [rbx + 0x26], al
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x14003f718
mov byte [rbx + 0x25], 1
cmp dword [rbx], 0x140
mov byte [rbx + 0x62], dil
jb 0x14003f728
or dword [rbp + 0xc], 8
lea rdx, [rbx + 4]
mov r8, rdx
lea rcx, str.version_130
sub r8, rcx
nop dword [rax]
movzx eax, byte [rcx]
mov byte [r8 + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14003f740
dec rdx
cmp byte [rdx + 1], dil
lea rdx, [rdx + 1]
jne 0x14003f752
movzx eax, word [0x140085590]
mov ecx, 0x8069
mov word [rdx], ax
lea rdx, [rsp + 0x3c]
call qword [0x14009afb0]
cmp byte [rbx + 0x24], dil
jne 0x14003f786
cmp byte [rbx + 0x25], dil
jne 0x14003f786
mov al, 1
jmp 0x14003f788
xor al, al
cmp dword [rbx], 0x1c2
lea rdx, [rsp + 0x38]
mov byte [rbx + 0x60], al
mov ecx, 0x821d
setae al
mov byte [rbx + 0x61], al
mov dword [rsp + 0x38], edi
call qword [0x14009afb0]
cmp dword [rsp + 0x38], edi
jle 0x14003f7f4
nop dword [rax]
nop word [rax + rax]
mov rax, qword [0x14009afe0]
mov edx, edi
mov ecx, 0x1f03
call rax
test rax, rax
je 0x14003f7ec
lea rdx, str.GL_ARB_clip_control
mov rcx, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x14003f7ec
mov byte [rbx + 0x61], 1
inc edi
cmp edi, dword [rsp + 0x38]
jl 0x14003f7c0
mov al, 1
jmp 0x14003f814
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Failed_to_initialize_OpenGL_loader__n
call fcn.14003f400
xor al, al
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140063a30
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
ret
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x30
mov rbx, qword [0x14009ae88]
mov ecx, 0x63b8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r9, rax
mov r8, qword [0x14009ae88]
xor r14d, r14d
test r8, r8
je 0x14005130f
mov r10d, dword [r8 + 0x3fc0]
movsx rdx, word [r8 + 0x6228]
lea rax, [r8 + 0x622c]
lea rax, [rax + rdx*8]
cmp dword [rax], r10d
je 0x140051304
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [r8 + 0x6228], cx
movsx rax, cx
lea rax, [rax*8 + 0x622c]
add rax, r8
mov dword [rax], r10d
mov dword [rax + 4], r14d
inc word [rax + 4]
inc dword [r8 + 0x6220]
mov qword [rsp + 0x68], r9
lea rax, [rsp + 0x60]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], r9
test r9, r9
je 0x140051334
xor edx, edx
mov rcx, r9
call fcn.14000eec0
jmp 0x140051337
mov rax, r14
mov qword [0x14009ae88], rax
call fcn.1400149b0
test rbx, rbx
je 0x140051351
mov qword [0x14009ae88], rbx
jmp 0x140051358
mov rbx, qword [0x14009ae88]
or dword [rbx + 8], 3
mov rcx, qword [rbx + 0x38]
call fcn.140038ef0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdi, rax
mov edx, 0x66
mov r8d, 0xa
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rsi, rax
test rax, rax
jne 0x1400513b7
lea rdx, str.Failed_to_find_resource.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.14000d150
lea rdx, [0x14000d330]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rax, r14
mov edi, r14d
jmp 0x1400513eb
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rbp, rax
test rax, rax
jne 0x1400513d4
lea rdx, str.Failed_to_load_resource.
jmp 0x140051393
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
movss xmm3, dword [0x14008b7e4]
mov r8d, edi
mov rdx, rax
mov rcx, qword [rbx + 0x38]
call fcn.140039060
xor ecx, ecx
call fcn.140034d10
mov rcx, qword [0x14009b088]
call fcn.14003e7a0
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
jmp 0x14003f460