Function at 0x4029e6
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x41fa7c
call fcn.0041f4e0
sub esp, 0x328
push ebx
push esi
push dword [ebp + 8]
mov esi, ecx
lea ecx, [ebp - 0x18]
call fcn.0041ef98
mov eax, dword [ebp - 0x18]
and dword [ebp - 4], 0
cmp dword [eax - 8], 0
jne 0x402a26
push str.No_Name_Given
lea ecx, [esi + 0xc]
call sub.MFC42.DLL_CString::operator_1
xor esi, esi
jmp 0x402da8
push 0x425620
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
pop ecx
test ebx, ebx
pop ecx
mov dword [ebp + 8], ebx
jne 0x402a6b
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 8]
push str.Cant_open_GIF_:_n
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esi + 0xc]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::operator
and byte [ebp - 4], bl
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
jmp 0x402a1f
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push ebx
push 1
lea eax, [ebp - 0x28]
push 6
push eax
call edi
add esp, 0x10
test eax, eax
jne 0x402aac
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 0xc]
push str.Error_reading_GIF_Magic__n
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esi + 0xc]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::operator
and byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
jmp 0x402b09
push 3
lea eax, [ebp - 0x28]
push 0x4255ec
push eax
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x402b13
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 0x10]
push str.Error_
push eax
call sub.MFC42.DLL_operator_1
push str._is_not_a_valid_.GIF_file
push eax
lea eax, [ebp + 0xc]
mov byte [ebp - 4], 3
push eax
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [esi + 0xc]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp + 0x10]
call sub.MFC42.DLL_CString::CString
jmp 0x402d9b
lea eax, [ebp - 0x25]
push 3
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
and byte [ebp - 0x29], 0
lea eax, [ebp - 0x2c]
push 0x4255c4
push eax
call sub.MSVCRT.dll_strcmp
add esp, 0x14
test eax, eax
je 0x402b5a
lea eax, [ebp - 0x2c]
push 0x4255c0
push eax
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x402b5a
push str.Error__Bad_GIF_Version_number
jmp 0x402d93
push ebx
push 1
lea eax, [ebp - 0x28]
push 7
push eax
call edi
add esp, 0x10
test eax, eax
jne 0x402b76
push str.Error__failed_to_GIF_read_screen_descriptor._nGiving_up
jmp 0x402d93
movzx eax, byte [ebp - 0x27]
movzx ecx, byte [ebp - 0x28]
shl eax, 8
or eax, ecx
mov bl, byte [ebp - 0x24]
movzx ecx, byte [ebp - 0x26]
mov dword [0x438ba0], eax
push 2
movzx eax, byte [ebp - 0x25]
shl eax, 8
or eax, ecx
pop edx
mov dword [0x438ba4], eax
movzx eax, bl
mov ecx, eax
and bl, 0x80
shr eax, 3
and ecx, 7
and eax, 0xe
shl edx, cl
inc eax
cmp bl, 0x80
mov dword [0x438eac], eax
movzx eax, byte [ebp - 0x23]
mov dword [0x438eb0], eax
mov dword [0x438ea8], edx
movzx eax, byte [ebp - 0x22]
mov dword [0x438eb4], eax
jne 0x402bf9
push 0x438ba8
push edx
push dword [ebp + 8]
mov ecx, esi
call fcn.00402dc6
test eax, eax
jne 0x402bf4
push str.Error_reading_GIF_colormap
jmp 0x402d93
mov eax, dword [0x438eb4]
test eax, eax
je 0x402c0f
cmp eax, 0x31
je 0x402c0f
push str.Non_square_pixels_in_GIF_image._nIgnoring_that_fact...
lea ecx, [esi + 0xc]
call sub.MFC42.DLL_CString::operator_1
push dword [ebp + 8]
push 1
pop ebx
push ebx
lea eax, [ebp - 0xd]
push ebx
push eax
call edi
add esp, 0x10
test eax, eax
je 0x402c58
cmp byte [ebp - 0xd], 0x21
jne 0x402c4d
push dword [ebp + 8]
lea eax, [ebp - 0xd]
push ebx
push ebx
push eax
call edi
add esp, 0x10
test eax, eax
je 0x402c62
movzx eax, byte [ebp - 0xd]
push eax
mov ecx, esi
push dword [ebp + 8]
call fcn.00402e1a
jmp 0x402c53
cmp byte [ebp - 0xd], 0x2c
je 0x402c6c
push dword [ebp + 8]
jmp 0x402c15
push str.Unexpected_EOF_in_GIF._nGiving_up
jmp 0x402d93
push str.Error_on_extension_read._nGiving_up
jmp 0x402d93
push dword [ebp + 8]
lea eax, [ebp - 0x28]
push ebx
push 9
push eax
call edi
add esp, 0x10
test eax, eax
jne 0x402c89
push str.Error_on_dimension_read_nGiving_up
jmp 0x402d93
mov cl, byte [ebp - 0x20]
xor edx, edx
mov al, cl
and al, 0x80
cmp al, 0x80
mov eax, ebx
setne dl
and ecx, 7
mov dword [ebp - 0x30], edx
movzx edi, byte [ebp - 0x23]
inc ecx
shl eax, cl
movzx ebx, byte [ebp - 0x21]
mov dword [ebp - 0x34], eax
movzx eax, byte [ebp - 0x24]
shl edi, 8
or edi, eax
movzx eax, byte [ebp - 0x22]
shl ebx, 8
or ebx, eax
test edi, edi
jl 0x402d8e
test ebx, ebx
jl 0x402d8e
mov eax, ebx
imul eax, edi
lea eax, [eax + eax*2]
push eax
call sub.MFC42.DLL_operatornew
test eax, eax
pop ecx
mov dword [ebp - 0x14], eax
jne 0x402cef
push str.Out_of_Memory_in_GIFRead
jmp 0x402d93
cmp dword [ebp - 0x30], 0
jne 0x402d42
lea eax, [ebp - 0x334]
mov ecx, esi
push eax
push dword [ebp - 0x34]
push dword [ebp + 8]
call fcn.00402dc6
test eax, eax
jne 0x402d14
push str.Error_reading_GIF_colormap_nGiving_up
jmp 0x402d6c
mov al, byte [ebp - 0x20]
mov ecx, esi
and al, 0x40
sub al, 0x40
neg al
sbb eax, eax
inc eax
push eax
lea eax, [ebp - 0x334]
push eax
push ebx
push edi
push dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.00403367
test eax, eax
jne 0x402d7f
push str.Error_reading_GIF_file_nLocalColorMap_nGiving_up
jmp 0x402d6c
mov cl, byte [ebp - 0x20]
and cl, 0x40
sub cl, 0x40
neg cl
sbb ecx, ecx
inc ecx
push ecx
push 0x438ba8
push ebx
push edi
push eax
mov ecx, esi
push dword [ebp + 8]
call fcn.00403367
test eax, eax
jne 0x402d7f
push str.Error_reading_GIF_file_nGIFScreen_Colormap_nGiving_up
lea ecx, [esi + 0xc]
call sub.MFC42.DLL_CString::operator_1
push dword [ebp - 0x14]
call sub.MFC42.DLL_operatordelete
pop ecx
jmp 0x402d9b
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp - 0x14]
mov dword [eax], edi
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
jmp 0x402d9d
push str.Negative_image_dimensions__nGiving_up
lea ecx, [esi + 0xc]
call sub.MFC42.DLL_CString::operator_1
xor esi, esi
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
pop edi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc