Function at 0x597070
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x48
push ebp
push edi
mov edi, dword [esp + 0x58]
test edi, edi
jne 0x597081
lea edi, [esp + 0x24]
mov ebp, dword [esp + 0x54]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0xc]
push ecx
push ebp
call sym.vidcap60.exe__iff_IsAIFFFileEx_12
test eax, eax
jne 0x5970ad
pop edi
mov dword [esp + 0x54], 0x8004e00b
mov eax, dword [esp + 0x54]
pop ebp
add esp, 0x48
ret 0x10
lea edx, [esp + 0x10]
push edx
push ebp
call sym.vidcap60.exe__riff_SaveLocation_8
mov eax, dword [esp + 8]
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x18]
push edx
push 0x434f4d4d
push ebp
mov dword [esp + 0x68], eax
call sym.vidcap60.exe__iff_FindChunkHeader_16
test eax, eax
mov dword [esp + 0x58], eax
jl 0x597322
mov eax, dword [esp + 0xc]
test eax, eax
push 0
je 0x59711d
lea eax, [esp + 0x58]
push eax
push 0x16
lea ecx, [esp + 0x44]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x597109
cmp dword [esp + 0x54], 0x16
je 0x59714f
pop edi
mov dword [esp + 0x54], 0x8004e008
mov eax, dword [esp + 0x54]
pop ebp
add esp, 0x48
ret 0x10
lea edx, [esp + 0x58]
push edx
push 0x12
lea eax, [esp + 0x44]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x597109
cmp dword [esp + 0x54], 0x12
je 0x59714f
pop edi
mov dword [esp + 0x54], 0x8004e008
mov eax, dword [esp + 0x54]
pop ebp
add esp, 0x48
ret 0x10
mov al, byte [esp + 0x39]
mov cl, byte [esp + 0x38]
mov dl, byte [esp + 0x3a]
mov byte [esp + 0x38], al
mov al, byte [esp + 0x3d]
mov byte [esp + 0x3a], al
mov al, byte [esp + 0x3c]
mov byte [esp + 0x39], cl
mov cl, byte [esp + 0x3b]
mov byte [esp + 0x3b], al
mov al, byte [esp + 0x3f]
mov byte [esp + 0x3d], dl
mov dl, byte [esp + 0x3e]
push ebx
mov byte [esp + 0x42], al
mov byte [esp + 0x40], cl
mov byte [esp + 0x43], dl
lea eax, [esp + 0x44]
push esi
mov dl, byte [eax + 1]
mov ecx, eax
mov bl, byte [ecx]
lea esi, [eax + 1]
mov byte [ecx], dl
add eax, 2
lea ecx, [esp + 0x52]
cmp eax, ecx
mov byte [esi], bl
jb 0x597195
mov ax, word [esp + 0x4c]
mov dx, word [esp + 0x4a]
mov cx, word [esp + 0x4e]
mov word [esp + 0x1e], ax
lea eax, [esp + 0x1c]
mov word [esp + 0x20], cx
mov ecx, dword [esp + 0x48]
mov word [esp + 0x1c], dx
mov dx, word [esp + 0x50]
push eax
push ecx
mov word [esp + 0x2a], dx
call sym.vidcap60.exe__aiff_ConvertRate_8
mov cx, word [esp + 0x46]
mov dx, word [esp + 0x40]
mov word [edi + 2], dx
xor edx, edx
mov esi, 8
cmp cx, si
setne dl
mov word [edi + 0xe], cx
shr cx, 3
mov dword [edi + 4], eax
add edx, 0xfe01
mov word [edi], dx
imul ecx, dword [esp + 0x40]
movzx edx, cx
mov ebx, edx
imul ebx, eax
cmp cx, 1
mov word [edi + 0xc], cx
mov dword [edi + 8], ebx
jae 0x597233
mov edx, 1
mov eax, dword [esp + 0x18]
push eax
push ebp
mov word [edi + 0xc], dx
call sym.vidcap60.exe__riff_RestoreLocation_8
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x14]
push eax
push 0x53534e44
push ebp
mov dword [esp + 0x70], ecx
call sym.vidcap60.exe__iff_FindChunkHeader_16
test eax, eax
mov dword [esp + 0x60], eax
jl 0x597320
mov eax, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x60]
push ecx
push esi
lea edx, [esp + 0x30]
push edx
sub eax, esi
push ebp
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x597293
cmp dword [esp + 0x5c], esi
je 0x5972a9
pop esi
pop ebx
pop edi
mov dword [esp + 0x54], 0x8004e008
mov eax, dword [esp + 0x54]
pop ebp
add esp, 0x48
ret 0x10
lea ecx, [esp + 0x24]
lea ecx, [ecx]
mov dl, byte [ecx + 3]
mov eax, ecx
mov bl, byte [eax]
lea esi, [ecx + 3]
mov byte [eax], dl
mov dl, byte [eax + 2]
mov byte [esi], bl
mov bl, byte [eax + 1]
mov byte [eax + 2], bl
mov byte [eax + 1], dl
add ecx, 4
lea eax, [esp + 0x2c]
cmp ecx, eax
jb 0x5972b0
mov eax, dword [esp + 0x24]
test eax, eax
je 0x5972e1
sub dword [esp + 0x10], eax
mov esi, dword [esp + 0x64]
test esi, esi
je 0x597303
movzx ecx, word [edi + 0xc]
mov eax, dword [esp + 0x10]
xor edx, edx
div ecx
mov ecx, dword [esp + 0x42]
cmp eax, ecx
mov dword [esi], eax
jb 0x597301
mov eax, ecx
mov dword [esi], eax
mov esi, dword [esp + 0x68]
test esi, esi
je 0x597320
push 1
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x24]
add eax, edx
mov dword [esi], eax
pop esi
pop ebx
mov eax, dword [esp + 0x58]
pop edi
pop ebp
add esp, 0x48
ret 0x10