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

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x290
push ebx
push esi
push edi
push pe_nt_image_headers32
xor ebx, ebx
lea eax, [ebp - 0x11c]
mov edi, ecx
push ebx
push eax
mov dword [ebp + 0x60], edi
call fcn.0061ad10
push 0x64f55f
mov esi, 0x941728
push esi
call fcn.0061a9b0
add esp, 0x14
test eax, eax
je 0x5743e0
lea eax, [ebp - 0x11c]
push esi
push eax
call fcn.0061aa40
lea eax, [ebp - 0x11c]
push 0x653cb0
push eax
call fcn.0061aa50
add esp, 0x10
lea eax, [edi + 0x10]
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.0061aa50
lea eax, [ebp - 0x11c]
push eax
call fcn.0061a920
lea eax, [ebp + eax - 0x11c]
add esp, 0xc
cmp dword [ebp + 0x7c], ebx
mov byte [eax - 1], 0x73
mov byte [eax - 2], 0x64
mov byte [eax - 3], 0x64
lea eax, [ebp - 0x11c]
je 0x57461b
push 0x65416c
push eax
call fcn.00617c05
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp + 0x68], esi
jne 0x574462
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x21c]
push str.File_not_found__s
push eax
call fcn.0061660d
add esp, 0xc
push ebx
push ebx
lea eax, [ebp - 0x21c]
push eax
push ebx
call dword [sym.imp.user32.dll_MessageBoxA]
push esi
push 1
lea eax, [ebp + 0x64]
push 4
push eax
mov dword [ebp + 0x6c], ebx
call fcn.00617e04
push esi
push 1
lea eax, [ebp - 0x1c]
push 0x7c
push eax
call fcn.00617e04
add esp, 0x20
cmp dword [ebp - 0x1c], 0x7c
je 0x5744a5
push str.CTexture:ReadDDSTexture___This_is_not_dds_format
lea ecx, [ebp - 0x220]
call fcn.00573168
lea ecx, [ebp - 0x220]
call fcn.0057849f
mov eax, dword [ebp - 4]
cmp eax, ebx
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
mov dword [ebp + 0x7c], eax
mov dword [edi + 0x110], edx
mov dword [edi + 0x114], esi
jne 0x5744c8
mov dword [ebp + 0x7c], 1
mov eax, dword [ebp + 0x34]
mov ecx, 0x31545844
cmp eax, ecx
je 0x574577
mov ecx, 0x32545844
cmp eax, ecx
je 0x574577
mov ecx, 0x33545844
cmp eax, ecx
je 0x574577
mov ecx, 0x34545844
cmp eax, ecx
je 0x574577
mov ecx, 0x35545844
cmp eax, ecx
je 0x574577
cmp dword [ebp + 0x30], 0x41
jne 0x574521
cmp dword [ebp + 0x38], 0x20
jne 0x574550
cmp dword [ebp + 0x48], 0xff000000
jne 0x5746b4
push 0x15
jmp 0x574576
cmp dword [ebp + 0x30], 0x40
jne 0x5746b4
cmp dword [ebp + 0x38], 0x18
jne 0x574535
push 0x14
jmp 0x574576
cmp dword [ebp + 0x38], 0x10
jne 0x5746b4
cmp dword [ebp + 0x40], 0x7e0
jne 0x5746b4
push 0x17
jmp 0x574576
cmp dword [ebp + 0x38], 0x10
jne 0x5746b4
cmp dword [ebp + 0x48], 0x8000
jne 0x574567
push 0x19
jmp 0x574576
cmp dword [ebp + 0x48], 0xf000
jne 0x5746b4
push 0x1a
pop ecx
mov eax, dword [0x941828]
mov edi, dword [eax]
lea ebx, [ebp + 0x6c]
push ebx
mov ebx, dword [ebp + 0x7c]
push 1
push ecx
mov ecx, dword [0x94182c]
push 0
shr esi, cl
sub ebx, ecx
push ebx
shr edx, cl
push esi
push edx
push eax
call dword [edi + 0x50]
test eax, eax
jge 0x5745bc
push str.CTexture:ReadDDSTexture___CreateTexture_is_failed
lea ecx, [ebp - 0x220]
call fcn.00573168
lea ecx, [ebp - 0x220]
call fcn.0057849f
push dword [ebp + 0x68]
mov ecx, dword [ebp + 0x60]
push dword [ebp + 0x7c]
push dword [ebp + 0x6c]
call fcn.00573fb1
test eax, eax
jge 0x57460a
mov esi, dword [sym.imp.user32.dll_MessageBoxA]
xor edi, edi
push edi
push edi
push str.LoadAllMipSurface_Load_Failed
push edi
call esi
push edi
push edi
lea eax, [ebp - 0x11c]
push eax
push edi
call esi
push str.CTexture:ReadDDSTexture___LoadAllMipSurfaces_is_failed
lea ecx, [ebp - 0x220]
call fcn.00573168
lea ecx, [ebp - 0x220]
call fcn.0057849f
push dword [ebp + 0x68]
call fcn.0061792d
pop ecx
mov ecx, dword [ebp + 0x6c]
jmp 0x5746af
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x574664
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x21c]
push str.File_not_found__s
push eax
call fcn.0061660d
add esp, 0xc
push ebx
push ebx
lea eax, [ebp - 0x21c]
push eax
push ebx
call dword [sym.imp.user32.dll_MessageBoxA]
push ebx
push esi
call dword [sym.imp.kernel32.dll_GetFileSize]
push ebx
mov edi, eax
lea eax, [ebp + 0x64]
push eax
push edi
push dword [0x941830]
push esi
call dword [sym.imp.kernel32.dll_ReadFile]
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [0x941830]
mov dword [eax], 0x20534444
lea eax, [ebp + 0x7c]
push eax
push edi
push dword [0x941830]
mov dword [ebp + 0x7c], ebx
push dword [0x941828]
call fcn.004fc2f4
mov ecx, dword [ebp + 0x7c]
mov eax, dword [ebp + 0x78]
mov dword [eax], ecx
pop edi
pop esi
pop ebx
add ebp, 0x70
leave
ret 8