Function at 0x500280
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x458
mov eax, dword [0x5c4008]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x440], eax
mov byte [ebp - 0x429], 0
mov esi, ecx
test edi, edi
jne 0x50032c
push 0x5b1154
push esi
call fcn.00556c35
mov edi, eax
add esp, 8
test edi, edi
jne 0x500325
lea ecx, [ebp - 0x3f4]
sub ecx, esi
nop word [eax + eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x5002d0
lea ecx, [ebp - 0x3f4]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5002e6
mov eax, dword [str..ogg]
sub ecx, edx
push 0x5b1154
mov dword [ebp + ecx - 0x3f8], eax
mov al, byte [0x5b1e58]
mov byte [ebp + ecx - 0x3f4], al
lea eax, [ebp - 0x3f4]
push eax
call fcn.00556c35
mov edi, eax
add esp, 8
test edi, edi
je 0x500761
mov byte [ebp - 0x429], 1
mov ecx, dword [ebp + 8]
mov eax, ecx
mov edx, dword [ebp + 0xc]
and eax, edx
cmp eax, 0xffffffff
jne 0x500362
push 2
push 0
push edi
call fcn.005575f8
push edi
call fcn.00557be2
push 0
mov esi, eax
push 0
push edi
mov dword [ebp - 0x440], esi
call fcn.005575f8
add esp, 0x1c
jmp 0x500375
push 0
push edx
push ecx
push edi
call fcn.005575dd
mov esi, dword [ebp - 0x440]
add esp, 0x10
push esi
call fcn.00555564
push edi
push esi
mov ebx, eax
push 1
push ebx
mov dword [ebp - 0x430], ebx
call fcn.00557dc6
add esp, 0x14
cmp eax, esi
je 0x5003b0
cmp byte [ebp - 0x429], 0
je 0x500422
push edi
call fcn.005572b0
add esp, 4
push ebx
jmp 0x500759
cmp byte [ebp - 0x429], 0
je 0x5003c2
push edi
call fcn.005572b0
add esp, 4
push 4
push str.RIFF
push ebx
call fcn.00556b10
add esp, 0xc
test eax, eax
je 0x500497
xor ecx, ecx
mov eax, 0x6c36ac
cmp byte [eax - 0x308], 0
je 0x50041d
cmp byte [eax], 0
je 0x50041c
cmp byte [eax + 0x308], 0
je 0x500417
cmp byte [eax + 0x610], 0
je 0x500412
add eax, 0xc20
add ecx, 4
cmp eax, 0x6cf8ac
jl 0x5003e1
jmp 0x50041d
add ecx, 3
jmp 0x50041d
add ecx, 2
jmp 0x50041d
inc ecx
cmp ecx, 0x40
jne 0x500428
push ebx
jmp 0x500759
imul eax, ecx, 0x308
mov dword [eax + 0x6c368c], 0
mov dword [eax + 0x6c3690], esi
mov dword [eax + 0x6c3688], ebx
mov dword [eax + 0x6c3698], 0
mov dword [eax + 0x6c36a0], 0
mov byte [eax + 0x6c33a8], 0
mov word [eax + 0x6c33a5], 0
mov dword [eax + 0x6c3694], 0
mov dword [eax + 0x6c369c], 0
mov byte [eax + 0x6c33a4], 1
lea eax, [ecx + 0x40]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00551170
mov esp, ebp
pop ebp
ret
xor eax, eax
xor edi, edi
xor esi, esi
mov dword [ebp - 0x43c], eax
mov dword [ebp - 0x438], edi
mov dword [ebp - 0x434], esi
lea ebx, [eax + 0xc]
cmp dword [esi*8 + 0x6cf5a0], eax
je 0x5004f7
cmp dword [esi*8 + 0x6cf5a8], eax
je 0x5004f0
cmp dword [esi*8 + 0x6cf5b0], eax
je 0x5004eb
cmp dword [esi*8 + 0x6cf5b8], eax
je 0x5004e6
add esi, 4
mov dword [ebp - 0x434], esi
cmp esi, 0x40
jl 0x5004b2
jmp 0x5004f7
add esi, 3
jmp 0x5004f1
add esi, 2
jmp 0x5004f1
inc esi
mov dword [ebp - 0x434], esi
cmp esi, 0x40
je 0x500753
mov esi, dword [ebp - 0x430]
lea edi, [esi + 0xc]
nop dword [eax]
push 4
push str.fmt
push edi
call fcn.00556b10
add esp, 0xc
test eax, eax
jne 0x50054b
lea edx, [edi + 8]
mov dword [ebp - 0x43c], edx
mov ecx, dword [ebp - 0x438]
mov eax, dword [edi + 4]
add eax, 8
add ebx, eax
lea eax, [ebx + 8]
cmp eax, dword [ebp - 0x440]
jge 0x500579
lea edi, [ebx + esi]
jmp 0x500510
push 4
push str.data
push edi
call fcn.00556b10
mov edx, dword [ebp - 0x43c]
add esp, 0xc
test eax, eax
jne 0x50052d
mov eax, dword [edi + 4]
lea ecx, [edi + 8]
mov dword [ebp - 0x438], ecx
mov dword [ebp - 0x448], eax
jmp 0x500533
mov esi, dword [ebp - 0x434]
test edx, edx
je 0x500748
test ecx, ecx
je 0x500748
xorps xmm0, xmm0
lea ebx, [esi*8 + 0x6cf5a0]
movups xmmword [ebp - 0x404], xmm0
mov eax, 1
mov word [ebp - 0x404], ax
movzx eax, word [edx + 2]
mov word [ebp - 0x402], ax
mov ecx, dword [edx + 4]
movups xmm0, xmmword [0x5806e0]
mov dword [ebp - 0x400], ecx
movzx eax, word [edx + 0xc]
mov edx, eax
mov word [ebp - 0x3f8], ax
mov eax, dword [ebp - 0x43c]
imul edx, ecx
lea ecx, [ebp - 0x428]
push 0
push ebx
push ecx
mov dword [ebp - 0x3fc], edx
movzx eax, word [eax + 0xe]
mov word [ebp - 0x3f6], ax
mov eax, 0x10624dd3
mul edx
movups xmmword [ebp - 0x414], xmm0
mov eax, dword [ebp - 0x448]
mov dword [ebp - 0x420], eax
lea eax, [ebp - 0x404]
mov dword [ebp - 0x418], eax
mov eax, dword [0x5cf158]
shr edx, 6
mov dword [esi*8 + 0x6cf5a4], edx
mov dword [ebp - 0x41c], 0
mov dword [ebp - 0x428], 0x24
mov dword [ebp - 0x424], 0x80
mov edi, dword [eax]
push eax
mov edi, dword [edi + 0xc]
mov ecx, edi
call dword [0x579378]
call edi
test eax, eax
js 0x5006ad
mov eax, dword [ebx]
lea ecx, [ebp - 0x44c]
push 0
push ecx
lea ecx, [ebp - 0x450]
mov edi, dword [eax]
push ecx
lea ecx, [ebp - 0x444]
push ecx
mov edi, dword [edi + 0x2c]
lea ecx, [ebp - 0x454]
push ecx
push dword [ebp - 0x448]
mov ecx, edi
push 0
push eax
call dword [0x579378]
call edi
test eax, eax
je 0x5006b8
mov eax, dword [ebx]
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x579378]
call esi
mov dword [ebx], 0
jmp 0x500753
mov ecx, dword [ebp - 0x444]
mov edi, dword [ebp - 0x438]
test ecx, ecx
je 0x5006de
push ecx
push edi
push dword [ebp - 0x454]
call fcn.00554b70
mov ecx, dword [ebp - 0x444]
add esp, 0xc
mov edx, dword [ebp - 0x44c]
test edx, edx
je 0x500707
push edx
lea eax, [ecx + edi]
push eax
push dword [ebp - 0x450]
call fcn.00554b70
mov edx, dword [ebp - 0x44c]
add esp, 0xc
mov ecx, dword [ebp - 0x444]
mov eax, dword [ebx]
push edx
push dword [ebp - 0x450]
mov edi, dword [eax]
push ecx
push dword [ebp - 0x454]
mov edi, dword [edi + 0x4c]
mov ecx, edi
push eax
call dword [0x579378]
call edi
push dword [ebp - 0x430]
call fcn.005550e4
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00551170
mov esp, ebp
pop ebp
ret
mov dword [esi*8 + 0x6cf5a0], 0
push dword [ebp - 0x430]
call fcn.005550e4
add esp, 4
mov ecx, dword [ebp - 8]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00551170
mov esp, ebp
pop ebp
ret