Function at 0x4c5830
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
push ebx
push esi
push edi
lea edi, [ebp - 0x158]
mov ecx, 0x56
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x56666c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, 0x574237
call fcn.0046464e
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov esi, esp
push 0x52ec84
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.ucrtbased.dll_fopen]
add esp, 8
cmp esi, esp
call fcn.00464018
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x4c58af
mov eax, dword [ebp + 0xc]
push eax
push str.FILEIO:___s__Failed_to_load_KTX_file
push 4
call fcn.0046388e
add esp, 0xc
jmp 0x4c5a68
push 0x40
push 0
lea eax, [ebp - 0x70]
push eax
call fcn.004639e2
add esp, 0xc
mov esi, esp
mov eax, dword [ebp - 0x28]
push eax
push 1
push 0x40
lea ecx, [ebp - 0x70]
push ecx
call dword [sym.imp.ucrtbased.dll_fread]
add esp, 0x10
cmp esi, esp
call fcn.00464018
mov eax, 1
shl eax, 0
movsx ecx, byte [ebp + eax - 0x70]
cmp ecx, 0x4b
jne 0x4c5948
mov eax, 1
shl eax, 1
movsx ecx, byte [ebp + eax - 0x70]
cmp ecx, 0x54
jne 0x4c5948
mov eax, 1
imul ecx, eax, 3
movsx edx, byte [ebp + ecx - 0x70]
cmp edx, 0x58
jne 0x4c5948
mov eax, 1
shl eax, 2
movsx ecx, byte [ebp + eax - 0x70]
cmp ecx, 0x20
jne 0x4c5948
mov eax, 1
imul ecx, eax, 5
movsx edx, byte [ebp + ecx - 0x70]
cmp edx, 0x31
jne 0x4c5948
mov eax, 1
imul ecx, eax, 6
movsx edx, byte [ebp + ecx - 0x70]
cmp edx, 0x31
je 0x4c5960
mov eax, dword [ebp + 0xc]
push eax
push str.IMAGE:___s__KTX_file_not_a_valid_image
push 4
call fcn.0046388e
add esp, 0xc
jmp 0x4c5a52
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x34], 0
jbe 0x4c59be
mov dword [ebp - 0x88], 0
jmp 0x4c5993
mov eax, dword [ebp - 0x88]
add eax, 1
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x88]
cmp eax, dword [ebp - 0x34]
jae 0x4c59be
mov esi, esp
mov eax, dword [ebp - 0x28]
push eax
push 1
push 1
lea ecx, [ebp - 0x79]
push ecx
call dword [sym.imp.ucrtbased.dll_fread]
add esp, 0x10
cmp esi, esp
call fcn.00464018
jmp 0x4c5984
mov esi, esp
mov eax, dword [ebp - 0x28]
push eax
push 1
push 4
lea ecx, [ebp - 0x94]
push ecx
call dword [sym.imp.ucrtbased.dll_fread]
add esp, 0x10
cmp esi, esp
call fcn.00464018
mov esi, esp
mov eax, dword [ebp - 0x94]
push eax
call dword [sym.imp.ucrtbased.dll_malloc]
add esp, 4
cmp esi, esp
call fcn.00464018
mov dword [ebp - 0x1c], eax
mov esi, esp
mov eax, dword [ebp - 0x28]
push eax
push 1
mov ecx, dword [ebp - 0x94]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ucrtbased.dll_fread]
add esp, 0x10
cmp esi, esp
call fcn.00464018
cmp dword [ebp - 0x54], 0x8d64
jne 0x4c5a30
mov dword [ebp - 0xc], 0xf
jmp 0x4c5a52
cmp dword [ebp - 0x54], 0x9274
jne 0x4c5a42
mov dword [ebp - 0xc], 0x10
jmp 0x4c5a52
cmp dword [ebp - 0x54], 0x9278
jne 0x4c5a52
mov dword [ebp - 0xc], 0x11
mov esi, esp
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.ucrtbased.dll_fclose]
add esp, 4
cmp esi, esp
call fcn.00464018
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
mov edx, dword [ebp - 0x18]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x14]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x10]
mov dword [eax + 0xc], edx
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0x10], ecx
mov eax, dword [ebp + 8]
push edx
mov ecx, ebp
push eax
lea edx, [0x4c5abc]
call fcn.00463dd4
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046399c
add esp, 0x158
cmp ebp, esp
call fcn.00464018
mov esp, ebp
pop ebp
ret