Function at 0x401f40
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
sub esp, 0xa30
mov eax, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
lea eax, [0x40b1a6]
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x814], eax
cmp dword [ebp - 0x814], 0
jne 0x401f9e
mov eax, dword [ebp + 8]
lea ecx, str.Error:_Shader_not_found:__s_n
mov dword [esp], ecx
mov dword [esp + 4], eax
call sym._printf_2
mov dword [esp], 1
call sym._prepareForExit
jmp 0x40216a
mov eax, dword [ebp - 0x814]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 2
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0x814]
mov dword [esp], eax
call sub.msvcrt.dll_ftell
mov dword [ebp - 0x818], eax
cmp dword [ebp - 0x818], 0x400
jbe 0x402008
mov eax, dword [ebp + 8]
lea ecx, str.Error:_Shader_is_too_large:__s_n
mov dword [esp], ecx
mov dword [esp + 4], eax
call sym._printf_2
mov dword [esp], 1
call sym._prepareForExit
jmp 0x40216a
mov eax, dword [ebp - 0x814]
mov dword [esp], eax
call sub.msvcrt.dll_rewind
lea edx, [ebp - 0x410]
mov ecx, dword [ebp - 0x818]
shl ecx, 0
mov eax, dword [ebp - 0x814]
mov dword [esp], edx
mov dword [esp + 4], 1
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fread
mov eax, dword [ebp - 0x818]
shl eax, 0
mov byte [ebp + eax - 0x410], 0
mov eax, dword [ebp - 0x814]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
lea eax, [ebp - 0x410]
mov dword [ebp - 0xa20], eax
mov eax, dword [sym.imp.glew32.dll___glewCreateShader]
mov dword [esp], 0x8b31
call dword [eax]
sub esp, 4
mov dword [ebp - 8], eax
mov eax, dword [sym.imp.glew32.dll___glewShaderSource]
mov eax, dword [eax]
mov edx, dword [ebp - 8]
lea ecx, [ebp - 0xa20]
xor esi, esi
mov dword [esp], edx
mov dword [esp + 4], 1
mov dword [esp + 8], ecx
mov dword [esp + 0xc], 0
call eax
sub esp, 0x10
mov eax, dword [sym.imp.glew32.dll___glewCompileShader]
mov eax, dword [eax]
mov ecx, dword [ebp - 8]
mov dword [esp], ecx
call eax
sub esp, 4
mov eax, dword [sym.imp.glew32.dll___glewGetShaderiv]
mov eax, dword [eax]
mov edx, dword [ebp - 8]
lea ecx, [ebp - 0x81c]
mov dword [esp], edx
mov dword [esp + 4], 0x8b81
mov dword [esp + 8], ecx
call eax
sub esp, 0xc
cmp dword [ebp - 0x81c], 0
jne 0x402165
mov eax, dword [sym.imp.glew32.dll___glewGetShaderInfoLog]
mov eax, dword [eax]
mov edx, dword [ebp - 8]
lea ecx, [ebp - 0xa1c]
xor esi, esi
mov dword [esp], edx
mov dword [esp + 4], 0x200
mov dword [esp + 8], 0
mov dword [esp + 0xc], ecx
call eax
sub esp, 0x10
lea eax, [ebp - 0xa1c]
lea ecx, str.Error:_Failed_to_compile_vertex_shader:__s_n
mov dword [esp], ecx
mov dword [esp + 4], eax
call sym._printf_2
lea eax, [ebp - 0xa1c]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0x200
call sub.msvcrt.dll_memset
mov dword [esp], 1
call sym._prepareForExit
jmp 0x40216a
mov ecx, dword [ebp + 0xc]
lea eax, [0x40b1a6]
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x814], eax
cmp dword [ebp - 0x814], 0
jne 0x4021b8
mov eax, dword [ebp + 0xc]
lea ecx, str.Error:_Shader_not_found:__s_n
mov dword [esp], ecx
mov dword [esp + 4], eax
call sym._printf_2
mov dword [esp], 1
call sym._prepareForExit
jmp 0x402384
mov eax, dword [ebp - 0x814]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 2
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0x814]
mov dword [esp], eax
call sub.msvcrt.dll_ftell
mov dword [ebp - 0x818], eax
cmp dword [ebp - 0x818], 0x400
jbe 0x402222
mov eax, dword [ebp + 0xc]
lea ecx, str.Error:_Shader_is_too_large:__s_n
mov dword [esp], ecx
mov dword [esp + 4], eax
call sym._printf_2
mov dword [esp], 1
call sym._prepareForExit
jmp 0x402384
mov eax, dword [ebp - 0x814]
mov dword [esp], eax
call sub.msvcrt.dll_rewind
lea edx, [ebp - 0x810]
mov ecx, dword [ebp - 0x818]
shl ecx, 0
mov eax, dword [ebp - 0x814]
mov dword [esp], edx
mov dword [esp + 4], 1
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fread
mov eax, dword [ebp - 0x818]
shl eax, 0
mov byte [ebp + eax - 0x810], 0
mov eax, dword [ebp - 0x814]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
lea eax, [ebp - 0x810]
mov dword [ebp - 0xa24], eax
mov eax, dword [sym.imp.glew32.dll___glewCreateShader]
mov dword [esp], 0x8b30
call dword [eax]
sub esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [sym.imp.glew32.dll___glewShaderSource]
mov eax, dword [eax]
mov edx, dword [ebp - 0xc]
lea ecx, [ebp - 0xa24]
xor esi, esi
mov dword [esp], edx
mov dword [esp + 4], 1
mov dword [esp + 8], ecx
mov dword [esp + 0xc], 0
call eax
sub esp, 0x10
mov eax, dword [sym.imp.glew32.dll___glewCompileShader]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
mov dword [esp], ecx
call eax
sub esp, 4
mov eax, dword [sym.imp.glew32.dll___glewGetShaderiv]
mov eax, dword [eax]
mov edx, dword [ebp - 0xc]
lea ecx, [ebp - 0x81c]
mov dword [esp], edx
mov dword [esp + 4], 0x8b81
mov dword [esp + 8], ecx
call eax
sub esp, 0xc
cmp dword [ebp - 0x81c], 0
jne 0x40237f
mov eax, dword [sym.imp.glew32.dll___glewGetShaderInfoLog]
mov eax, dword [eax]
mov edx, dword [ebp - 0xc]
lea ecx, [ebp - 0xa1c]
xor esi, esi
mov dword [esp], edx
mov dword [esp + 4], 0x200
mov dword [esp + 8], 0
mov dword [esp + 0xc], ecx
call eax
sub esp, 0x10
lea eax, [ebp - 0xa1c]
lea ecx, str.Error:_Failed_to_compile_fragment_shader:__s_n
mov dword [esp], ecx
mov dword [esp + 4], eax
call sym._printf_2
lea eax, [ebp - 0xa1c]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0x200
call sub.msvcrt.dll_memset
mov dword [esp], 1
call sym._prepareForExit
jmp 0x402384
call sym._exitIfFail
mov eax, dword [sym.imp.glew32.dll___glewCreateProgram]
call dword [eax]
mov dword [ebp - 0x10], eax
mov eax, dword [sym.imp.glew32.dll___glewAttachShader]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
mov dword [esp], edx
mov dword [esp + 4], ecx
call eax
sub esp, 8
mov eax, dword [sym.imp.glew32.dll___glewAttachShader]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword [esp], edx
mov dword [esp + 4], ecx
call eax
sub esp, 8
mov eax, dword [sym.imp.glew32.dll___glewLinkProgram]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x10]
mov dword [esp], ecx
call eax
sub esp, 4
mov eax, dword [sym.imp.glew32.dll___glewGetProgramiv]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
lea ecx, [ebp - 0x81c]
mov dword [esp], edx
mov dword [esp + 4], 0x8b82
mov dword [esp + 8], ecx
call eax
sub esp, 0xc
cmp dword [ebp - 0x81c], 0
jne 0x40245a
mov eax, dword [sym.imp.glew32.dll___glewGetProgramInfoLog]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
lea ecx, [ebp - 0xa1c]
xor esi, esi
mov dword [esp], edx
mov dword [esp + 4], 0x200
mov dword [esp + 8], 0
mov dword [esp + 0xc], ecx
call eax
sub esp, 0x10
lea eax, [ebp - 0xa1c]
lea ecx, str.Error:_Failed_to_link_shader_program:__s_n
mov dword [esp], ecx
mov dword [esp + 4], eax
call sym._printf_2
mov dword [esp], 1
call sym._prepareForExit
call sym._exitIfFail
mov eax, dword [sym.imp.glew32.dll___glewDeleteShader]
mov eax, dword [eax]
mov ecx, dword [ebp - 8]
mov dword [esp], ecx
call eax
sub esp, 4
mov eax, dword [sym.imp.glew32.dll___glewDeleteShader]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
mov dword [esp], ecx
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
add esp, 0xa30
pop esi
pop ebp
ret