Function at 0x663480
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
mov eax, dword [0x766480]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x100
mov dword [ebp - 0x290], eax
mov ebx, ecx
lea eax, [ebp - 0x104]
mov dword [ebp - 0x288], ebx
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, 0x700992
mov eax, 0x1a4e678
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x6634e7
test dl, dl
je 0x6634e3
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x6634e7
add eax, 2
add ecx, 2
test dl, dl
jne 0x6634c7
xor eax, eax
jmp 0x6634ec
sbb eax, eax
or eax, 1
test eax, eax
je 0x663533
xor ecx, ecx
nop dword [eax]
nop word [eax + eax]
mov al, byte [ecx + 0x1a4e678]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x105], al
test al, al
jne 0x663500
lea edi, [ebp - 0x104]
dec edi
nop dword [eax + eax]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x663520
mov ax, word [0x705c64]
mov word [edi], ax
lea edx, [ebx + 0x10]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x663538
lea edi, [ebp - 0x104]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x663548
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x104]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x663567
sub ecx, edx
lea eax, [ebp - 0x104]
cmp dword [ebp + 0xc], 0
mov word [ebp + ecx - 0x106], 0x7364
mov byte [ebp + ecx - 0x107], 0x64
je 0x663854
push 0x7062c4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
jne 0x6635d2
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x280]
push str.File_not_found__s
push eax
call fcn.0044f6e0
add esp, 0xc
lea eax, [ebp - 0x280]
push edi
push edi
push eax
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
lea eax, [ebp - 0x294]
push edi
push 1
push 4
push eax
mov dword [ebp - 0x28c], 0
call esi
push edi
push 1
lea eax, [ebp - 0x180]
push 0x7c
push eax
call esi
add esp, 0x20
cmp dword [ebp - 0x180], 0x7c
je 0x66364f
lea ecx, [ebp - 0x284]
call fcn.0065d560
mov dword [ebp - method.CGraphicLayerError.virtual_0], vtable.CGraphicLayerError.0
xor ecx, ecx
nop dword [eax]
nop word [eax + eax]
mov al, byte [ecx + str.CTexture:ReadDDSTexture___This_is_not_dds_format]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x281], al
test al, al
jne 0x663630
lea ecx, [ebp - 0x284]
call fcn.0065da10
mov ecx, dword [ebp - 0x288]
mov eax, dword [ebp - 0x174]
mov ebx, dword [ebp - 0x168]
test ebx, ebx
mov dword [ecx + 0x110], eax
mov eax, dword [ebp - 0x178]
mov dword [ecx + 0x114], eax
mov eax, 1
cmove ebx, eax
mov eax, dword [ebp - 0x130]
cmp eax, 0x31545844
jne 0x66368f
jmp 0x663755
cmp eax, 0x32545844
jne 0x66369b
jmp 0x663755
cmp eax, 0x33545844
jne 0x6636a7
jmp 0x663755
cmp eax, 0x34545844
jne 0x6636b3
jmp 0x663755
cmp eax, 0x35545844
jne 0x6636bf
jmp 0x663755
mov eax, dword [ebp - 0x134]
mov ecx, dword [ebp - 0x12c]
cmp eax, 0x41
jne 0x6636ea
cmp ecx, 0x20
jne 0x66372a
cmp dword [ebp - 0x11c], 0xff000000
jne 0x663904
lea eax, [ecx - 0xb]
jmp 0x663755
cmp eax, 0x40
jne 0x663721
mov eax, dword [ebp - 0x12c]
cmp eax, 0x18
jne 0x663701
mov eax, 0x14
jmp 0x663755
cmp eax, 0x10
jne 0x663904
cmp dword [ebp - 0x124], 0x7e0
jne 0x663904
mov eax, 0x17
jmp 0x663755
cmp eax, 0x41
jne 0x663904
cmp ecx, 0x10
jne 0x663904
mov eax, dword [ebp - 0x11c]
cmp eax, 0x8000
jne 0x663745
lea eax, [ecx + 9]
jmp 0x663755
cmp eax, 0xf000
jne 0x663904
mov eax, 0x1a
mov edx, dword [0x1a4e670]
lea ecx, [ebp - 0x28c]
push ecx
mov ecx, dword [0x1a4e674]
push 1
mov esi, dword [edx]
push eax
push 0
mov eax, ebx
sub eax, ecx
push eax
mov eax, dword [ebp - 0x178]
shr eax, cl
push eax
mov eax, dword [ebp - 0x174]
shr eax, cl
push eax
push edx
call dword [esi + 0x50]
test eax, eax
jns 0x6637cf
lea ecx, [ebp - 0x284]
call fcn.0065d560
mov dword [ebp - method.CGraphicLayerError.virtual_0], vtable.CGraphicLayerError.0
xor ecx, ecx
nop word [eax + eax]
mov al, byte [ecx + str.CTexture:ReadDDSTexture___CreateTexture_is_failed]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x281], al
test al, al
jne 0x6637b0
lea ecx, [ebp - 0x284]
call fcn.0065da10
mov ecx, dword [ebp - 0x288]
push edi
push ebx
push dword [ebp - 0x28c]
call fcn.006632c0
test eax, eax
jns 0x66383f
mov esi, dword [sym.imp.USER32.dll_MessageBoxA]
push 0
push 0
push str.LoadAllMipSurface_Load_Failed
push 0
call esi
push 0
push 0
lea eax, [ebp - 0x104]
push eax
push 0
call esi
lea ecx, [ebp - 0x284]
call fcn.0065d560
mov dword [ebp - method.CGraphicLayerError.virtual_0], vtable.CGraphicLayerError.0
xor ecx, ecx
nop
mov al, byte [ecx + str.CTexture:ReadDDSTexture___LoadAllMipSurfaces_is_failed]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x281], al
test al, al
jne 0x663820
lea ecx, [ebp - 0x284]
call fcn.0065da10
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, dword [ebp - 0x28c]
add esp, 4
jmp 0x6638fc
push 0
push 0x80
push 3
push 0
push 1
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x6638a2
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x280]
push str.File_not_found__s
push eax
call fcn.0044f6e0
add esp, 0xc
lea eax, [ebp - 0x280]
push 0
push 0
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
mov esi, eax
lea eax, [ebp - 0x294]
push eax
push esi
push 0x14f8eb0
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x288]
mov dword [0x14f8eb0], 0x20534444
push eax
push esi
push 0x14f8eb0
push dword [0x1a4e670]
mov dword [ebp - 0x288], 0
call fcn.0040277d
mov eax, dword [ebp - 0x288]
mov ecx, dword [ebp - 0x290]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006dfb52
mov esp, ebp
pop ebp
ret 8