Function at 0x47f810
Capabilities:
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4c62de
push eax
mov dword fs:[0], esp
sub esp, 0x644
lea eax, [esp + 0x2c]
push ebp
push esi
mov esi, dword [esp + 0x65c]
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
push 0xd
mov ebp, ecx
push eax
call edi
push 4
lea ecx, [esp + 0x4c]
push str.GIF8
push ecx
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0x1c
test eax, eax
je 0x47f869
xor al, al
jmp 0x47f91e
mov dl, byte [esp + 0x42]
mov eax, 1
mov cl, dl
and ecx, 7
inc ecx
shl eax, cl
mov cl, dl
sar cl, 3
and cl, 0xe
movsx cx, cl
inc ecx
mov word [esp + 0x34e], ax
test dl, 0x80
mov word [esp + 0x34c], cx
je 0x47f8b3
movsx eax, ax
push esi
push 1
lea edx, [eax + eax*2]
lea eax, [esp + 0x358]
push edx
push eax
call edi
add esp, 0x10
push ebx
xor ebx, ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], 1
push esi
push 1
lea ecx, [esp + 0x1b]
push 1
push ecx
call edi
add esp, 0x10
cmp eax, 1
jne 0x47f91b
mov al, byte [esp + 0x13]
cmp al, 0x21
je 0x47fbd9
cmp al, 0x2c
je 0x47f938
mov edx, dword [esp + 0x20]
mov eax, dword [ebp + 0x158]
cmp eax, edx
je 0x47f91b
mov eax, dword [ebp + 0x19c]
push 1
sub eax, 0x4000
push eax
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [esp + 0x2c]
add esp, 0xc
inc eax
mov dword [esp + 0x20], eax
cmp dword [esp + 0x14], ebx
jne 0x47f8c2
mov al, 1
pop ebx
mov ecx, dword [esp + 0x650]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x650
ret 4
push esi
push 1
lea ecx, [esp + 0x2c]
push 9
push ecx
call edi
mov cl, byte [esp + 0x3c]
add esp, 0x10
test cl, 0x80
je 0x47f97a
and ecx, 7
mov eax, 1
inc ecx
push esi
shl eax, cl
push 1
mov word [esp + 0x35a], ax
movsx eax, ax
lea edx, [eax + eax*2]
lea eax, [esp + 0x35c]
push edx
push eax
call edi
add esp, 0x10
mov ax, word [esp + 0x352]
cmp ax, 2
jg 0x47f98f
mov eax, 1
jmp 0x47f9a1
xor ecx, ecx
cmp ax, 0x10
setg cl
dec ecx
and ecx, 0xfffffffc
add ecx, 8
mov eax, ecx
mov edx, dword [esp + 0x2a]
push ebx
push eax
mov eax, dword [esp + 0x30]
and edx, 0xffff
and eax, 0xffff
push edx
push eax
mov ecx, ebp
call fcn.0047e020
test byte [esp + 0x2c], 0x80
jne 0x47f9d1
test byte [esp + 0x46], 0x80
je 0x47fafd
movsx edi, word [esp + 0x352]
xor eax, eax
cmp edi, ebx
mov dword [esp + 0x18], ebx
jle 0x47fa2f
lea esi, [esp + 0x355]
mov dl, byte [esi]
mov cl, byte [esi - 1]
mov byte [esp + eax + 0x50], dl
mov dl, byte [esi + 1]
xor ebx, ebx
mov byte [esp + eax + 0x150], cl
mov bh, dl
and ecx, 0xff
mov bl, byte [esi]
mov byte [esp + eax + 0x250], dl
shl ebx, 8
or ebx, ecx
cmp ebx, 0xffffff
jne 0x47fa25
mov dword [esp + 0x18], 1
inc eax
add esi, 3
cmp eax, edi
jl 0x47f9ea
xor ebx, ebx
mov ecx, dword [ebp + 0x14c]
cmp ecx, 0xffffffff
je 0x47faa5
cmp eax, 0x100
jge 0x47faa5
mov edx, 0x100
lea ecx, [esp + eax + 0x250]
sub edx, eax
mov dword [esp + 0x30], ecx
mov ecx, edx
lea edi, [esp + eax + 0x150]
mov ebx, ecx
lea esi, [esp + eax + 0x50]
or eax, 0xffffffff
mov dword [esp + 0x18], 1
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, edx
mov edi, esi
mov esi, ecx
or eax, 0xffffffff
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x30]
mov ecx, edx
or eax, 0xffffffff
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
xor ebx, ebx
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x14c]
cmp eax, 0xffffffff
je 0x47fad8
cmp dword [esp + 0x18], ebx
jne 0x47face
mov byte [esp + 0x34f], 0xff
mov byte [esp + 0x14f], 0xff
mov byte [esp + 0x24f], 0xff
cmp eax, 0xffffffff
mov eax, 0x100
jne 0x47fae0
movsx eax, word [esp + 0x352]
lea ecx, [esp + 0x250]
lea edx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x154]
push edx
push ecx
push eax
mov ecx, ebp
call fcn.0047e4a0
push 0x18
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
mov dword [esp + 0x30], esi
cmp esi, ebx
mov dword [esp + 0x65c], ebx
je 0x47fb36
cmp ebp, ebx
mov dword [esi + 0x14], ebp
je 0x47fb29
mov ecx, ebp
call fcn.0047e000
mov dword [esi + 0x10], eax
mov dword [esi + 4], ebx
mov dword [esi], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 8], ebx
jmp 0x47fb38
xor esi, esi
mov ecx, dword [esi + 0x14]
mov dword [esi], ebx
mov dword [esp + 0x65c], 0xffffffff
mov edx, dword [ecx + 0x10]
dec edx
mov dword [esi + 4], edx
mov ebx, dword [ecx + 0x30]
mov edi, dword [ecx + 0x10]
call fcn.0047e000
dec edi
lea edx, [esp + 0x4c]
imul edi, ebx
add eax, edi
push edx
mov dword [esi + 0x10], eax
mov al, byte [esp + 0x30]
mov ecx, dword [esp + 0x2e]
and eax, 0x40
mov dword [ebp + 0x188], eax
xor eax, eax
and ecx, 0xffff
mov dword [ebp + 0x18c], eax
mov dword [ebp + 0x198], eax
mov eax, dword [esp + 0x2c]
mov dword [ebp + 0x194], ecx
mov ecx, dword [esp + 0x668]
push eax
push esi
push ecx
mov ecx, ebp
mov dword [ebp + 0x19c], 0x4001
mov dword [ebp + 0x190], 8
call fcn.004808b0
push esi
call sub.MFC42.DLL_operatordelete
mov edi, dword [sym.imp.MSVCRT.dll_fread]
mov esi, dword [esp + 0x668]
add esp, 4
xor ebx, ebx
jmp 0x47f915
push esi
push 1
lea edx, [esp + 0x1a]
push 1
push edx
call edi
add esp, 0x10
dec eax
neg eax
sbb eax, eax
inc eax
mov dword [esp + 0x14], eax
je 0x47f91b
cmp byte [esp + 0x12], 0xf9
jne 0x47fc72
push esi
push 1
lea eax, [esp + 0x24]
push 1
push eax
call edi
add esp, 0x10
dec eax
neg eax
sbb eax, eax
inc eax
mov dword [esp + 0x14], eax
je 0x47f91b
push esi
push 4
lea ecx, [esp + 0x3c]
push 1
push ecx
call edi
mov edx, dword [esp + 0x2c]
add esp, 0x10
and edx, 0xff
xor ecx, ecx
cmp edx, eax
sete cl
mov eax, ecx
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x47f91b
test byte [esp + 0x34], 1
je 0x47fc63
mov edx, dword [esp + 0x37]
and edx, 0xff
mov dword [ebp + 0x14c], edx
mov eax, dword [esp + 0x35]
and eax, 0xffff
mov dword [ebp + 0x160], eax
push esi
push 1
lea ecx, [esp + 0x24]
push 1
push ecx
call edi
add esp, 0x10
test eax, eax
je 0x47f915
mov eax, dword [esp + 0x1c]
test al, al
je 0x47f915
and eax, 0xff
push 1
push eax
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
jmp 0x47fc72