Function at 0x4c4660
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d4
push ebx
push esi
push edi
lea edi, [ebp - 0x1d4]
mov ecx, 0x75
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 0x4c46df
mov eax, dword [ebp + 0xc]
push eax
push str.FILEIO:___s__Failed_to_open_DDS_file
push 4
call fcn.0046388e
add esp, 0xc
jmp 0x4c4c1b
xor eax, eax
mov dword [ebp - 0x34], eax
mov esi, esp
mov eax, dword [ebp - 0x28]
push eax
push 1
push 4
lea ecx, [ebp - 0x34]
push ecx
call dword [sym.imp.ucrtbased.dll_fread]
add esp, 0x10
cmp esi, esp
call fcn.00464018
mov eax, 1
imul ecx, eax, 0
movsx edx, byte [ebp + ecx - 0x34]
cmp edx, 0x44
jne 0x4c4749
mov eax, 1
shl eax, 0
movsx ecx, byte [ebp + eax - 0x34]
cmp ecx, 0x44
jne 0x4c4749
mov eax, 1
shl eax, 1
movsx ecx, byte [ebp + eax - 0x34]
cmp ecx, 0x53
jne 0x4c4749
mov eax, 1
imul ecx, eax, 3
movsx edx, byte [ebp + ecx - 0x34]
cmp edx, 0x20
je 0x4c4761
mov eax, dword [ebp + 0xc]
push eax
push str.IMAGE:___s__DDS_file_not_a_valid_image
push 4
call fcn.0046388e
add esp, 0xc
jmp 0x4c4c05
push 0x7c
push 0
lea eax, [ebp - 0xb8]
push eax
call fcn.004639e2
add esp, 0xc
mov esi, esp
mov eax, dword [ebp - 0x28]
push eax
push 1
push 0x7c
lea ecx, [ebp - 0xb8]
push ecx
call dword [sym.imp.ucrtbased.dll_fread]
add esp, 0x10
cmp esi, esp
call fcn.00464018
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0xa0], 0
jne 0x4c47b9
mov dword [ebp - 0x10], 1
jmp 0x4c47c2
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x64], 0x10
jne 0x4c49fa
cmp dword [ebp - 0x6c], 0x40
jne 0x4c4823
mov eax, dword [ebp - 0x18]
imul eax, dword [ebp - 0x14]
shl eax, 1
mov esi, esp
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 - 0x18]
imul ecx, dword [ebp - 0x14]
shl ecx, 1
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
mov dword [ebp - 0xc], 3
jmp 0x4c49f5
cmp dword [ebp - 0x6c], 0x41
jne 0x4c49f5
cmp dword [ebp - 0x54], 0x8000
jne 0x4c4913
mov eax, dword [ebp - 0x18]
imul eax, dword [ebp - 0x14]
shl eax, 1
mov esi, esp
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 - 0x18]
imul ecx, dword [ebp - 0x14]
shl ecx, 1
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
mov byte [ebp - 0xc1], 0
mov dword [ebp - 0xd0], 0
jmp 0x4c48a1
mov eax, dword [ebp - 0xd0]
add eax, 1
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp - 0x18]
imul eax, dword [ebp - 0x14]
cmp dword [ebp - 0xd0], eax
jge 0x4c4907
mov eax, dword [ebp - 0xd0]
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + eax*2]
sar edx, 0xf
mov byte [ebp - 0xc1], dl
mov eax, dword [ebp - 0xd0]
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + eax*2]
shl edx, 1
mov eax, dword [ebp - 0xd0]
mov ecx, dword [ebp - 0x1c]
mov word [ecx + eax*2], dx
movzx eax, byte [ebp - 0xc1]
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ebp - 0x1c]
movzx ecx, word [edx + ecx*2]
add ecx, eax
mov edx, dword [ebp - 0xd0]
mov eax, dword [ebp - 0x1c]
mov word [eax + edx*2], cx
jmp 0x4c4892
mov dword [ebp - 0xc], 5
jmp 0x4c49f5
cmp dword [ebp - 0x54], 0xf000
jne 0x4c49f5
mov eax, dword [ebp - 0x18]
imul eax, dword [ebp - 0x14]
shl eax, 1
mov esi, esp
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 - 0x18]
imul ecx, dword [ebp - 0x14]
shl ecx, 1
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
mov byte [ebp - 0xd9], 0
mov dword [ebp - 0xe8], 0
jmp 0x4c4987
mov eax, dword [ebp - 0xe8]
add eax, 1
mov dword [ebp - 0xe8], eax
mov eax, dword [ebp - 0x18]
imul eax, dword [ebp - 0x14]
cmp dword [ebp - 0xe8], eax
jge 0x4c49ee
mov eax, dword [ebp - 0xe8]
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + eax*2]
sar edx, 0xc
mov byte [ebp - 0xd9], dl
mov eax, dword [ebp - 0xe8]
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + eax*2]
shl edx, 4
mov eax, dword [ebp - 0xe8]
mov ecx, dword [ebp - 0x1c]
mov word [ecx + eax*2], dx
movzx eax, byte [ebp - 0xd9]
mov ecx, dword [ebp - 0xe8]
mov edx, dword [ebp - 0x1c]
movzx ecx, word [edx + ecx*2]
add ecx, eax
mov edx, dword [ebp - 0xe8]
mov eax, dword [ebp - 0x1c]
mov word [eax + edx*2], cx
jmp 0x4c4978
mov dword [ebp - 0xc], 6
jmp 0x4c4c05
cmp dword [ebp - 0x6c], 0x40
jne 0x4c4a59
cmp dword [ebp - 0x64], 0x18
jne 0x4c4a59
mov eax, dword [ebp - 0x18]
imul eax, dword [ebp - 0x14]
imul ecx, eax, 3
mov esi, esp
push ecx
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 - 0x18]
imul ecx, dword [ebp - 0x14]
imul edx, ecx, 3
push edx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ucrtbased.dll_fread]
add esp, 0x10
cmp esi, esp
call fcn.00464018
mov dword [ebp - 0xc], 4
jmp 0x4c4c05
cmp dword [ebp - 0x6c], 0x41
jne 0x4c4b30
cmp dword [ebp - 0x64], 0x20
jne 0x4c4b30
mov eax, dword [ebp - 0x18]
imul eax, dword [ebp - 0x14]
shl eax, 2
mov esi, esp
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 - 0x18]
imul ecx, dword [ebp - 0x14]
shl ecx, 2
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
mov byte [ebp - 0xf1], 0
mov dword [ebp - 0x100], 0
jmp 0x4c4ad6
mov eax, dword [ebp - 0x100]
add eax, 4
mov dword [ebp - 0x100], eax
mov eax, dword [ebp - 0x18]
imul eax, dword [ebp - 0x14]
shl eax, 2
cmp dword [ebp - 0x100], eax
jge 0x4c4b24
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x100]
mov cl, byte [eax]
mov byte [ebp - 0xf1], cl
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x100]
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x100]
mov dl, byte [ecx + 2]
mov byte [eax], dl
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x100]
mov cl, byte [ebp - 0xf1]
mov byte [eax + 2], cl
jmp 0x4c4ac7
mov dword [ebp - 0xc], 7
jmp 0x4c4c05
cmp dword [ebp - 0x6c], 4
je 0x4c4b40
cmp dword [ebp - 0x6c], 5
jne 0x4c4c05
cmp dword [ebp - 0x68], 0
jbe 0x4c4c05
cmp dword [ebp - 0xa0], 1
jbe 0x4c4b63
mov eax, dword [ebp - 0xa8]
shl eax, 1
mov dword [ebp - 0x10c], eax
jmp 0x4c4b6f
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x10c], eax
mov esi, esp
mov eax, dword [ebp - 0x10c]
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 - 0x10c]
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
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x1d4], eax
cmp dword [ebp - 0x1d4], 0x31545844
je 0x4c4bdd
cmp dword [ebp - 0x1d4], 0x33545844
je 0x4c4bf5
cmp dword [ebp - 0x1d4], 0x35545844
je 0x4c4bfe
jmp 0x4c4c05
cmp dword [ebp - 0x6c], 4
jne 0x4c4bec
mov dword [ebp - 0xc], 0xb
jmp 0x4c4bf3
mov dword [ebp - 0xc], 0xc
jmp 0x4c4c05
mov dword [ebp - 0xc], 0xd
jmp 0x4c4c05
mov dword [ebp - 0xc], 0xe
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, [0x4c4c70]
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, 0x1d4
cmp ebp, esp
call fcn.00464018
mov esp, ebp
pop ebp
ret