; Listing generated by Microsoft (R) Optimizing Compiler Version 19.39.33523.0 include listing.inc INCLUDELIB OLDNAMES PUBLIC infolog PUBLIC ??_C@_05JMLLFKBP@?$CFllu?6@ ; `string' PUBLIC ??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@ ; `string' PUBLIC ??_C@_03OFAPEBGM@?$CFs?6@ ; `string' EXTRN glfwGetProcAddress:PROC EXTRN glfwWindowHint:PROC EXTRN __imp___stdio_common_vfprintf:PROC EXTRN __imp___acrt_iob_func:PROC EXTRN __report_rangecheckfailure:PROC infolog DB 0200H DUP (?) _BSS ENDS ; COMDAT ??_C@_03OFAPEBGM@?$CFs?6@ CONST SEGMENT ??_C@_03OFAPEBGM@?$CFs?6@ DB '%s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@ CONST SEGMENT ??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@ DB 'Failed to load Op' DB 'enGL api:', 00H ; `string' CONST ENDS ; COMDAT ??_C@_05JMLLFKBP@?$CFllu?6@ CONST SEGMENT ??_C@_05JMLLFKBP@?$CFllu?6@ DB '%llu', 0aH, 00H ; `string' PUBLIC readLog PUBLIC unloadImageData PUBLIC loadImageData PUBLIC linkShaderProgram PUBLIC loadGlfuncDefault PUBLIC initGL PUBLIC printf PUBLIC _vfprintf_l PUBLIC __local_stdio_printf_options ; COMDAT pdata pdata SEGMENT $pdata$loadImageData DD imagerel $LN5 DD imagerel $LN5+54 DD imagerel $unwind$loadImageData pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$linkShaderProgram DD imagerel $LN7 DD imagerel $LN7+116 DD imagerel $unwind$linkShaderProgram pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$loadGlfuncDefault DD imagerel $LN19 DD imagerel $LN19+31 DD imagerel $unwind$loadGlfuncDefault pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$initGL DD imagerel $LN4 DD imagerel $LN4+52 DD imagerel $unwind$initGL pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$printf DD imagerel $LN6 DD imagerel $LN6+85 DD imagerel $unwind$printf pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$_vfprintf_l DD imagerel $LN4 DD imagerel $LN4+68 DD imagerel $unwind$_vfprintf_l pdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$_vfprintf_l DD 060f01H DD 09640fH DD 08340fH DD 0700b520fH xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$printf DD 041b01H DD 07017521bH DD 030156016H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$initGL DD 020601H DD 030023206H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$loadGlfuncDefault DD 010401H DD 04204H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$linkShaderProgram DD 041919H DD 0a340aH DD 07006520aH DD imagerel __GSHandlerCheck DD 028H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$loadImageData DD 020601H DD 030025206H ; Function compile flags: /Ogtpy ; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_stdio_config.h ; COMDAT __local_stdio_printf_options _TEXT SEGMENT __local_stdio_printf_options PROC ; COMDAT ; 91 : static unsigned __int64 _OptionsStorage; ; 92 : return &_OptionsStorage; 00000 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:?_OptionsStorage@?1??__local_stdio_printf_options@@9@9 ; `__local_stdio_printf_options'::`2'::_OptionsStorage ; 93 : } 00007 c3 ret 0 __local_stdio_printf_options ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\stdio.h ; COMDAT _vfprintf_l _TEXT SEGMENT _Stream$ = 64 _Format$ = 72 _Locale$dead$ = 80 _ArgList$ = 88 _vfprintf_l PROC ; COMDAT ; 644 : { $LN4: 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 74 24 10 mov QWORD PTR [rsp+16], rsi 0000a 57 push rdi 0000b 48 83 ec 30 sub rsp, 48 ; 00000030H 0000f 49 8b d9 mov rbx, r9 00012 48 8b fa mov rdi, rdx 00015 48 8b f1 mov rsi, rcx ; 645 : return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Stream, _Format, _Locale, _ArgList); 00018 e8 00 00 00 00 call __local_stdio_printf_options 0001d 45 33 c9 xor r9d, r9d 00020 48 89 5c 24 20 mov QWORD PTR [rsp+32], rbx 00025 4c 8b c7 mov r8, rdi 00028 48 8b d6 mov rdx, rsi 0002b 48 8b 08 mov rcx, QWORD PTR [rax] 0002e ff 15 00 00 00 00 call QWORD PTR __imp___stdio_common_vfprintf ; 646 : } 00034 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 00039 48 8b 74 24 48 mov rsi, QWORD PTR [rsp+72] 0003e 48 83 c4 30 add rsp, 48 ; 00000030H 00042 5f pop rdi 00043 c3 ret 0 _vfprintf_l ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\stdio.h ; COMDAT printf _TEXT SEGMENT _Format$ = 80 printf PROC ; COMDAT ; 956 : { $LN6: 00000 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx 00005 48 89 54 24 10 mov QWORD PTR [rsp+16], rdx 0000a 4c 89 44 24 18 mov QWORD PTR [rsp+24], r8 0000f 4c 89 4c 24 20 mov QWORD PTR [rsp+32], r9 00014 53 push rbx 00015 56 push rsi 00016 57 push rdi 00017 48 83 ec 30 sub rsp, 48 ; 00000030H 0001b 48 8b f9 mov rdi, rcx ; 957 : int _Result; ; 958 : va_list _ArgList; ; 959 : __crt_va_start(_ArgList, _Format); 0001e 48 8d 74 24 58 lea rsi, QWORD PTR _Format$[rsp+8] ; 960 : _Result = _vfprintf_l(stdout, _Format, NULL, _ArgList); 00023 b9 01 00 00 00 mov ecx, 1 00028 ff 15 00 00 00 00 call QWORD PTR __imp___acrt_iob_func 0002e 48 8b d8 mov rbx, rax ; 645 : return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Stream, _Format, _Locale, _ArgList); 00031 e8 00 00 00 00 call __local_stdio_printf_options 00036 45 33 c9 xor r9d, r9d 00039 48 89 74 24 20 mov QWORD PTR [rsp+32], rsi 0003e 4c 8b c7 mov r8, rdi 00041 48 8b d3 mov rdx, rbx 00044 48 8b 08 mov rcx, QWORD PTR [rax] 00047 ff 15 00 00 00 00 call QWORD PTR __imp___stdio_common_vfprintf ; 961 : __crt_va_end(_ArgList); ; 962 : return _Result; ; 963 : } 0004d 48 83 c4 30 add rsp, 48 ; 00000030H 00051 5f pop rdi 00052 5e pop rsi 00053 5b pop rbx 00054 c3 ret 0 printf ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c ; COMDAT initGL _TEXT SEGMENT majorVersion$ = 48 minorVersion$ = 56 initGL PROC ; COMDAT ; 11 : { $LN4: 00000 40 53 push rbx 00002 48 83 ec 20 sub rsp, 32 ; 00000020H 00006 8b da mov ebx, edx ; 12 : glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion); 00008 8b d1 mov edx, ecx 0000a b9 02 20 02 00 mov ecx, 139266 ; 00022002H 0000f e8 00 00 00 00 call glfwWindowHint ; 13 : glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion); 00014 8b d3 mov edx, ebx 00016 b9 03 20 02 00 mov ecx, 139267 ; 00022003H 0001b e8 00 00 00 00 call glfwWindowHint ; 14 : glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); 00020 ba 01 20 03 00 mov edx, 204801 ; 00032001H 00025 b9 08 20 02 00 mov ecx, 139272 ; 00022008H ; 15 : } 0002a 48 83 c4 20 add rsp, 32 ; 00000020H 0002e 5b pop rbx ; 14 : glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); 0002f e9 00 00 00 00 jmp glfwWindowHint initGL ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c ; COMDAT loadGlfuncDefault _TEXT SEGMENT procName$ = 48 loadGlfuncDefault PROC ; COMDAT ; 18 : { $LN19: 00000 48 83 ec 28 sub rsp, 40 ; 00000028H ; 19 : void* ret = glfwGetProcAddress(procName); 00004 e8 00 00 00 00 call glfwGetProcAddress ; 20 : printf("%llu\n", (uint64_t)ret); 00009 48 8b d0 mov rdx, rax 0000c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_05JMLLFKBP@?$CFllu?6@ 00013 e8 00 00 00 00 call printf ; 21 : if (ret = NULL) ; 22 : { ; 23 : *infolog = "Failed to load OpenGL api:"; ; 24 : for (size_t i = 0; i < sizeof(procName); i++) ; 25 : { ; 26 : infolog[30 + i] = procName[i]; ; 27 : } ; 28 : printf("%s\n", infolog); ; 29 : } ; 30 : return (GLFWglproc)ret; 00018 33 c0 xor eax, eax ; 31 : } 0001a 48 83 c4 28 add rsp, 40 ; 00000028H 0001e c3 ret 0 loadGlfuncDefault ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c ; COMDAT linkShaderProgram _TEXT SEGMENT success$ = 32 __$ArrayPad$ = 40 context$ = 64 shaderProgram$ = 72 linkShaderProgram PROC ; COMDAT ; 34 : { $LN7: 00000 48 89 5c 24 18 mov QWORD PTR [rsp+24], rbx 00005 57 push rdi 00006 48 83 ec 30 sub rsp, 48 ; 00000030H 0000a 48 8b 05 00 00 00 00 mov rax, QWORD PTR __security_cookie 00011 48 33 c4 xor rax, rsp 00014 48 89 44 24 28 mov QWORD PTR __$ArrayPad$[rsp], rax 00019 48 8b f9 mov rdi, rcx 0001c 8b da mov ebx, edx ; 35 : context->LinkProgram(shaderProgram); 0001e 8b ca mov ecx, edx 00020 ff 97 80 22 00 00 call QWORD PTR [rdi+8832] ; 36 : ; 37 : int success; ; 38 : context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success); 00026 4c 8d 44 24 20 lea r8, QWORD PTR success$[rsp] 0002b ba 82 8b 00 00 mov edx, 35714 ; 00008b82H 00030 8b cb mov ecx, ebx 00032 ff 97 48 1a 00 00 call QWORD PTR [rdi+6728] ; 39 : if (!success) 00038 83 7c 24 20 00 cmp DWORD PTR success$[rsp], 0 0003d 75 1b jne SHORT $LN2@linkShader ; 40 : { ; 41 : context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog); 0003f 4c 8d 0d 00 00 00 00 lea r9, OFFSET FLAT:infolog 00046 45 33 c0 xor r8d, r8d 00049 ba 00 02 00 00 mov edx, 512 ; 00000200H 0004e 8b cb mov ecx, ebx 00050 ff 97 98 19 00 00 call QWORD PTR [rdi+6552] ; 42 : return 0; 00056 33 c0 xor eax, eax 00058 eb 02 jmp SHORT $LN3@linkShader $LN2@linkShader: ; 43 : } ; 44 : else ; 45 : { ; 46 : return shaderProgram; 0005a 8b c3 mov eax, ebx $LN3@linkShader: ; 47 : } ; 48 : } 0005c 48 8b 4c 24 28 mov rcx, QWORD PTR __$ArrayPad$[rsp] 00061 48 33 cc xor rcx, rsp 00064 e8 00 00 00 00 call __security_check_cookie 00069 48 8b 5c 24 50 mov rbx, QWORD PTR [rsp+80] 0006e 48 83 c4 30 add rsp, 48 ; 00000030H 00072 5f pop rdi 00073 c3 ret 0 linkShaderProgram ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c ; COMDAT loadImageData _TEXT SEGMENT location$ = 64 out$ = 72 loader$ = 80 loadImageData PROC ; COMDAT ; 51 : { $LN5: 00000 40 53 push rbx 00002 48 83 ec 30 sub rsp, 48 ; 00000030H 00006 4d 8b d0 mov r10, r8 ; 52 : if (loader == NULL) ; 53 : { ; 54 : loader = stbi_load; ; 55 : } ; 56 : out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0); 00009 c7 44 24 20 00 00 00 00 mov DWORD PTR [rsp+32], 0 00011 4d 85 d2 test r10, r10 00014 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:stbi_load 0001b 4c 8d 4a 08 lea r9, QWORD PTR [rdx+8] 0001f 48 8b da mov rbx, rdx 00022 49 0f 45 c2 cmovne rax, r10 00026 4c 8d 42 04 lea r8, QWORD PTR [rdx+4] 0002a ff d0 call rax 0002c 48 89 43 10 mov QWORD PTR [rbx+16], rax ; 57 : } 00030 48 83 c4 30 add rsp, 48 ; 00000030H 00034 5b pop rbx 00035 c3 ret 0 loadImageData ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c ; COMDAT unloadImageData _TEXT SEGMENT out$ = 8 unloadImageData PROC ; COMDAT ; 61 : free(out->pixelPtr); 00000 48 8b 49 10 mov rcx, QWORD PTR [rcx+16] 00004 48 ff 25 00 00 00 00 rex_jmp QWORD PTR __imp_free unloadImageData ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c ; COMDAT readLog _TEXT SEGMENT readLog PROC ; COMDAT ; 66 : infolog[511] = '\0'; 00000 c6 05 ff 01 00 00 00 mov BYTE PTR infolog+511, 0 ; 67 : return &infolog; 00007 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:infolog ; 68 : } 0000e c3 ret 0 readLog ENDP _TEXT ENDS END