Function at 0x50bca0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp + 8]
push dword [edi]
push 1
push 4
push eax
call fcn.00595b79
add esp, 0x10
test eax, eax
jne 0x50bcc5
mov eax, 4
pop edi
pop ebp
ret
cmp dword [ebp + 8], 0x20534444
je 0x50bcd6
mov eax, 2
pop edi
pop ebp
ret
push esi
push edi
call fcn.0045d030
mov esi, dword [ebp + 0x10]
push edi
mov dword [esi], eax
call fcn.0045d030
push edi
mov dword [esi + 4], eax
call fcn.0045d030
push edi
mov dword [esi + 8], eax
call fcn.0045d030
push edi
mov dword [esi + 0xc], eax
call fcn.0045d030
push edi
mov dword [esi + 0x10], eax
call fcn.0045d030
push edi
mov dword [esi + 0x14], eax
call fcn.0045d030
push edi
mov dword [esi + 0x18], eax
call fcn.0045d030
mov dword [esi + 0x1c], eax
lea eax, [esi + 0x20]
push dword [edi]
push 1
push 0x28
push eax
call fcn.00595b79
push edi
call fcn.0045d030
push edi
mov dword [esi + 0x48], eax
call fcn.0045d030
push edi
mov dword [esi + 0x4c], eax
call fcn.0045d030
push edi
mov dword [esi + 0x50], eax
call fcn.0045d030
add esp, 0x40
mov dword [esi + 0x54], eax
push edi
call fcn.0045d030
push edi
mov dword [esi + 0x58], eax
call fcn.0045d030
push edi
mov dword [esi + 0x5c], eax
call fcn.0045d030
push edi
mov dword [esi + 0x60], eax
call fcn.0045d030
push edi
mov dword [esi + 0x64], eax
call fcn.0045d030
push edi
mov dword [esi + 0x68], eax
call fcn.0045d030
push edi
mov dword [esi + 0x6c], eax
call fcn.0045d030
push edi
mov dword [esi + 0x70], eax
call fcn.0045d030
push edi
mov dword [esi + 0x74], eax
call fcn.0045d030
push esi
mov dword [esi + 0x78], eax
call fcn.0050a310
add esp, 0x28
test byte [esi + 4], 4
je 0x50be36
cmp dword [esi + 0x50], 0x30315844
jne 0x50be36
push edi
call fcn.0045d030
push edi
mov dword [esi + 0x90], eax
call fcn.0045d030
push edi
mov dword [esi + 0x94], eax
call fcn.0045d030
push edi
mov dword [esi + 0x98], eax
call fcn.0045d030
push edi
mov dword [esi + 0x9c], eax
call fcn.0045d030
mov dword [esi + 0xa0], eax
add esp, 0x14
mov eax, dword [esi + 0x90]
cmp eax, 0x47
jne 0x50be16
mov dword [esi + 0x80], 1
jmp 0x50be36
cmp eax, 0x4a
jne 0x50be27
mov dword [esi + 0x80], 3
jmp 0x50be36
cmp eax, 0x4d
jne 0x50be36
mov dword [esi + 0x80], 5
mov ecx, dword [esi + 0x80]
cmp ecx, 1
je 0x50be84
cmp ecx, 2
je 0x50be7f
cmp ecx, 3
je 0x50be7f
cmp ecx, 4
je 0x50be7f
cmp ecx, 5
je 0x50be7f
test ecx, ecx
je 0x50be7f
cmp ecx, 6
je 0x50be7f
mov ecx, dword [ebp + 0xc]
movdqu xmm0, xmmword [str.DDS_:_Unknown_Type_]
pop esi
pop edi
movdqu xmmword [ecx + 0x44], xmm0
mov eax, dword [0x5ee288]
mov dword [ecx + 0x54], eax
mov eax, 9
pop ebp
ret
cmp ecx, 1
jne 0x50bea6
mov edx, dword [esi + 0xc]
cmp dword [esi + 0x10], edx
jae 0x50bea6
mov eax, dword [esi + 8]
or dword [esi + 4], 0x80000
imul eax, edx
mov dword [esi + 0x54], 0x20
shl eax, 2
mov dword [esi + 0x10], eax
cmp dword [esi + 0x54], 0
jne 0x50bedb
cmp dword [esi + 0x10], 0
jne 0x50bedb
or dword [esi + 4], 0x80000
test dword [esi + 4], 0x80000
mov dword [esi + 0x54], 0x20
je 0x50bed2
mov eax, dword [esi + 8]
imul eax, dword [esi + 0xc]
jmp 0x50bed5
mov eax, dword [esi + 0xc]
shl eax, 2
mov dword [esi + 0x10], eax
mov edx, dword [esi + 0x7c]
cmp edx, 0xffffffff
je 0x50bf27
or dword [esi + 4], 0x80000
cmp ecx, 1
je 0x50bf1a
cmp ecx, 3
je 0x50bf1a
cmp ecx, 5
je 0x50bf1a
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0xc]
add ecx, 3
add eax, 3
shr ecx, 2
shr eax, 2
imul ecx, eax
imul ecx, edx
xor eax, eax
mov dword [esi + 0x10], ecx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi + 8]
imul eax, edx
imul eax, dword [esi + 0xc]
mov dword [esi + 0x10], eax
pop esi
xor eax, eax
pop edi
pop ebp
ret