Function at 0x40ba20
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x30c24
call fcn.00424c90
mov eax, dword [0x449928]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
test ebx, ebx
jne 0x40ba5a
pop esi
mov eax, 0x80070057
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00424839
mov esp, ebp
pop ebp
ret 0x10
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x40ba85
mov al, byte [ebp + 0x10]
test al, al
je 0x40ba85
cmp al, 1
je 0x40ba85
pop edi
pop esi
mov eax, 0x80070057
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00424839
mov esp, ebp
pop ebp
ret 0x10
xor eax, eax
push 0xfe
push eax
mov word [ebp - 0x118], ax
lea eax, [ebp - 0x116]
push eax
call fcn.00424e90
push dword [esi + 8]
call fcn.0041a960
add esp, 0x10
mov dword [ebp - 0x20c08], eax
test eax, eax
je 0x40c3db
mov ecx, dword [eax]
cmp ecx, 2
jl 0x40c3c3
cmp ecx, 5
jle 0x40bad2
cmp ecx, 0xb
jne 0x40c3c3
push 0xa4
xorps xmm0, xmm0
lea eax, [ebp - 0x201c8]
push 0
push eax
mov byte [ebp - 0x18], 0
movq qword [ebp - 0x17], xmm0
movq qword [ebp - 0xf], xmm0
mov word [ebp - 7], 0
call fcn.00424e90
add esp, 0xc
cmp word [esi + 0x30], 0xffff
jne 0x40bb34
lea eax, [ebp - 0x201c8]
push eax
push 0xff
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x20c08]
call fcn.0041ca00
add esp, 0x10
test eax, eax
je 0x40bb34
push 0xffffffffffffffff
push str.Fail:_GetSlotDetails_Interlaken___Physical
jmp 0x40c3e2
mov al, byte [ebp - 0x201c3]
mov cl, byte [ebp - 0x20173]
not al
not cl
and al, 1
and cl, 1
cmp word [esi + 0x30], 0
mov byte [ebp - 0x20be7], al
mov byte [ebp - 0x20be6], cl
jne 0x40bb6c
xor al, al
mov cl, 1
mov byte [ebp - 0x20be7], al
mov byte [ebp - 0x20be6], cl
test edi, edi
je 0x40bc2d
mov dl, byte [ebp + 0x10]
test dl, dl
jne 0x40bc10
test al, al
jne 0x40bc21
mov eax, dword [ebp - 0x20c08]
mov ecx, dword [eax + 0x10]
cmp ecx, 0xffffffff
je 0x40c3db
mov esi, dword [0x473b74]
imul ecx, ecx, 0xa1c
lea eax, [ebp - 0x20c1c]
push eax
lea eax, [ebp - 0x20bf0]
push eax
lea eax, [ebp - 0x20c20]
push eax
add esi, 0x79618
lea eax, [ebp - 0x18]
add esi, ecx
push eax
lea eax, [ebp - 0x20be4]
mov ecx, 0x287
lea edi, [ebp - 0x20be4]
rep movsd dword es:[edi], dword [esi]
push eax
mov dword [ebp - 0x20c20], 0
mov dword [ebp - 0x20bf0], 0
mov dword [ebp - 0x20c1c], 0
call fcn.0041d440
add esp, 0x14
test eax, eax
je 0x40bc49
push 0xffffffffffffffff
push str.Fail:_ReadSESVirtualCDCapacity
jmp 0x40c3e2
cmp dl, 1
jne 0x40bb87
test cl, cl
je 0x40bb87
push 0xffffffffffffffff
push str.Fail:_Empty_destination_slot
jmp 0x40c3e2
test al, al
je 0x40bb87
test cl, cl
je 0x40bb87
push 0xffffffffffffffff
push str.Fail:_All_slots_are_empty
jmp 0x40c3e2
mov eax, dword [ebp - 0x20c20]
inc eax
mov esi, eax
imul esi, dword [ebp - 0x20bf0]
push ebx
lea ecx, [ebp - 0x20c0c]
mov dword [ebp - 0x20c18], eax
mov dword [ebp - 0x20c04], 0xffffffff
mov dword [ebp - 0x20bf4], esi
xor edi, edi
call fcn.00407fb0
lea eax, [ebp - 0x20c0c]
push str.BLANKVCD
push eax
call fcn.004080b0
add esp, 8
mov byte [ebp - 0x20be5], al
test al, al
jne 0x40bd35
push 0
push 0x8000080
push 3
push 0
push 1
push SysReAllocString
push dword [ebp - 0x20c0c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x20c04], ebx
cmp ebx, 0xffffffff
jne 0x40bcd5
push eax
push str.Fail:_CreateFile
jmp 0x40c33a
lea eax, [ebp - 0x20c14]
push eax
push ebx
mov dword [ebp - 0x20c14], edi
mov dword [ebp - 0x20c10], edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x40bd06
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
push str.Fail:_GetFileSizeEx
jmp 0x40c33a
mov edi, dword [ebp - 0x20c10]
mov eax, dword [ebp - 0x20c14]
mov dword [ebp - 0x20bf4], eax
test edi, edi
jb 0x40bd38
ja 0x40bd22
cmp eax, esi
jbe 0x40bd38
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
push str.Fail:_Image_size_too_big
jmp 0x40c33a
or ebx, 0xffffffff
mov esi, dword [ebp - 0x20c08]
lea eax, [ebp - 0x20124]
push eax
push 0
lea eax, [ebp - 0x18]
push eax
xorps xmm0, xmm0
push esi
movq qword [ebp - 0x20124], xmm0
mov dword [ebp - 0x2011c], 0
call fcn.0041cf20
add esp, 0x10
test eax, eax
je 0x40bd89
cmp byte [ebp - 0x20be5], 0
jne 0x40bd7d
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
push str.Fail:_read_Operations_Page
jmp 0x40c33a
and byte [ebp - 0x20124], 0x7f
and byte [ebp - 0x2011f], 0xfd
lea eax, [ebp - 0x20124]
push eax
lea eax, [ebp - 0x18]
push eax
push esi
call fcn.0041d060
add esp, 0xc
test eax, eax
je 0x40bdc8
cmp byte [ebp - 0x20be5], 0
jne 0x40c333
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40c333
xor edx, edx
mov eax, 0x10000
div dword [ebp - 0x20bf0]
mov ecx, dword [ebp - 0x20c1c]
movzx ebx, cx
cmp cx, ax
jb 0x40bde6
movzx ebx, ax
mov eax, dword [ebp - 0x20bf4]
mov dword [ebp - 0x20bfc], eax
mov eax, edi
and edi, 0x7fffffff
mov dword [ebp - 0x20bf8], edi
fild qword [ebp - 0x20bfc]
and eax, 0x80000000
mov dword [ebp - 0x20bf8], eax
mov dword [ebp - 0x20bfc], 0
fild qword [ebp - 0x20bfc]
sub esp, 8
fchs
faddp st(1)
fstp qword [ebp - 0x20bfc]
fld qword [ebp - 0x20bfc]
mov eax, dword [ebp - 0x20bf0]
movd xmm0, eax
fstp qword [ebp - 0x20bfc]
movsd xmm1, qword [ebp - 0x20bfc]
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x438f40]
divsd xmm1, xmm0
movsd qword [esp], xmm1
call fcn.004250c0
fnstcw word [ebp - 0x20bea]
movzx eax, word [ebp - 0x20bea]
or eax, 0xc00
mov dword [ebp - 0x20c00], eax
movzx esi, bx
fldcw word [ebp - 0x20c00]
movd xmm1, esi
cvtdq2pd xmm1, xmm1
fistp qword [ebp - 0x20bfc]
mov eax, dword [ebp - 0x20bfc]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
fldcw word [ebp - 0x20bea]
shr eax, 0x1f
mov dword [ebp - 0x20bf4], esi
addsd xmm0, qword [eax*8 + 0x438f40]
divsd xmm0, xmm1
movsd qword [esp], xmm0
call fcn.004250c0
fstp qword [ebp - 0x20bfc]
cvttsd2si ecx, qword [ebp - 0x20bfc]
xor eax, eax
xor edi, edi
add esp, 8
mov dword [ebp - 0x20bec], eax
mov dword [ebp - 0x20c00], edi
test ecx, ecx
js 0x40c12d
jmp 0x40bf00
push 0x10000
lea eax, [ebp - 0x10118]
push 0
push eax
call fcn.00424e90
cvttsd2si eax, qword [ebp - 0x20bfc]
add esp, 0xc
cmp byte [ebp - 0x20be5], 0
jne 0x40bfc7
cmp edi, eax
jge 0x40bfa0
push 0
lea eax, [ebp - 0x20c24]
push eax
mov eax, esi
imul eax, dword [ebp - 0x20bf0]
push eax
lea eax, [ebp - 0x10118]
push eax
push dword [ebp - 0x20c04]
mov dword [ebp - 0x20c24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40c1eb
test edi, edi
jne 0x40bfcf
push 0x10000
lea eax, [ebp - 0x10118]
push eax
lea eax, [ebp - 0x30c24]
push eax
call fcn.00425220
push 0x10000
lea eax, [ebp - 0x10118]
push edi
push eax
call fcn.00424e90
mov ecx, dword [ebp - 0x20bec]
add esp, 0x18
jmp 0x40bfe6
push 0x10000
lea eax, [ebp - 0x30c24]
push eax
lea eax, [ebp - 0x10118]
push eax
call fcn.00425220
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x20bec], ecx
xor edi, edi
jmp 0x40bfe6
cmp edi, eax
je 0x40c12d
mov ecx, dword [ebp - 0x20bec]
xor edi, edi
jmp 0x40bfe6
mov ecx, dword [ebp - 0x20bec]
cmp dword [ebp + 0xc], 0
je 0x40bff4
movzx eax, byte [ebp + 0x10]
cmp edi, eax
jmp 0x40c00d
test edi, edi
jne 0x40c001
cmp byte [ebp - 0x20be7], 0
jmp 0x40c00d
cmp edi, 1
jne 0x40c013
cmp byte [ebp - 0x20be6], 0
jne 0x40c100
mov eax, esi
imul eax, dword [ebp - 0x20bf0]
push eax
lea eax, [ebp - 0x10118]
push eax
push ebx
push edi
push 1
push ecx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x20be4]
push eax
call fcn.0041f450
add esp, 0x20
test eax, eax
jne 0x40c245
push 0x10000
push eax
lea eax, [ebp - 0x20118]
push eax
call fcn.00424e90
mov eax, esi
imul eax, dword [ebp - 0x20bf0]
push eax
lea eax, [ebp - 0x20118]
push eax
mov eax, dword [ebp - 0x20bec]
push ebx
push edi
push 1
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x20be4]
push eax
call fcn.0041d370
add esp, 0x2c
test eax, eax
jne 0x40c224
mov ecx, esi
imul ecx, dword [ebp - 0x20bf0]
lea edx, [ebp - 0x10118]
lea esi, [ebp - 0x20118]
sub ecx, 4
jb 0x40c0b8
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x40c0bd
add edx, 4
add esi, 4
sub ecx, 4
jae 0x40c0a7
cmp ecx, 0xfffffffc
je 0x40c0fa
mov al, byte [edx]
cmp al, byte [esi]
jne 0x40c203
cmp ecx, 0xfffffffd
je 0x40c0fa
mov al, byte [edx + 1]
cmp al, byte [esi + 1]
jne 0x40c203
cmp ecx, 0xfffffffe
je 0x40c0fa
mov al, byte [edx + 2]
cmp al, byte [esi + 2]
jne 0x40c203
cmp ecx, 0xffffffff
je 0x40c0fa
mov al, byte [edx + 3]
cmp al, byte [esi + 3]
jne 0x40c203
mov esi, dword [ebp - 0x20bf4]
inc edi
cmp edi, 2
jl 0x40bfe0
cvttsd2si eax, qword [ebp - 0x20bfc]
mov edi, dword [ebp - 0x20c00]
add dword [ebp - 0x20bec], esi
inc edi
mov dword [ebp - 0x20c00], edi
cmp edi, eax
jle 0x40bf00
cmp byte [ebp - 0x20be5], 0
jne 0x40c142
push dword [ebp - 0x20c04]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cvttsd2si eax, qword [ebp - 0x20bfc]
mov edi, esi
imul edi, eax
mov eax, dword [ebp - 0x20c18]
sub eax, edi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movd xmm1, esi
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm0, qword [eax*8 + 0x438f40]
sub esp, 8
divsd xmm0, xmm1
movsd qword [esp], xmm0
call fcn.004250c0
fstp qword [ebp - 0x20c14]
cvttsd2si eax, qword [ebp - 0x20c14]
push 0x10000
mov dword [ebp - 0x20c00], eax
lea eax, [ebp - 0x10118]
push 0
push eax
call fcn.00424e90
cvttsd2si eax, qword [ebp - 0x20c14]
add esp, 0x14
test eax, eax
jle 0x40c2c6
mov edi, edi
mov ecx, dword [ebp - 0x20c18]
lea eax, [esi + edi]
cmp eax, ecx
jbe 0x40c1d4
mov eax, ecx
sub eax, edi
movzx ebx, ax
xor esi, esi
cmp dword [ebp + 0xc], 0
je 0x40c266
movzx eax, byte [ebp + 0x10]
cmp esi, eax
jmp 0x40c27f
push dword [ebp - 0x20c04]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
push str.Fail:_ReadFile
jmp 0x40c33a
cmp byte [ebp - 0x20be5], 0
jne 0x40c218
push dword [ebp - 0x20c04]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
push str.Fail:_Verify
jmp 0x40c33a
cmp byte [ebp - 0x20be5], 0
jne 0x40c239
push dword [ebp - 0x20c04]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
push str.Fail:_ReadSESVirtualCD
jmp 0x40c33a
cmp byte [ebp - 0x20be5], 0
jne 0x40c25a
push dword [ebp - 0x20c04]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
push str.Fail:_WriteSESVirtualCD
jmp 0x40c33a
test esi, esi
jne 0x40c273
cmp byte [ebp - 0x20be7], 0
jmp 0x40c27f
cmp esi, 1
jne 0x40c281
cmp byte [ebp - 0x20be6], 0
jne 0x40c2ab
movzx eax, bx
imul eax, dword [ebp - 0x20bf0]
push eax
lea eax, [ebp - 0x10118]
push eax
push ebx
push esi
push 1
push edi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x20be4]
push eax
call fcn.0041f450
add esp, 0x20
inc esi
cmp esi, 2
jl 0x40c1d6
movzx esi, bx
add edi, esi
dec dword [ebp - 0x20c00]
jne 0x40c1c0
mov ebx, dword [ebp - 0x20c08]
lea eax, [ebp - 0x20124]
push eax
push 0
lea eax, [ebp - 0x18]
push eax
xorps xmm0, xmm0
push ebx
movq qword [ebp - 0x20124], xmm0
mov dword [ebp - 0x2011c], 0
call fcn.0041cf20
add esp, 0x10
test eax, eax
je 0x40c304
push 0xffffffffffffffff
push str.Fail:_read_Operations_Page
jmp 0x40c33a
mov al, byte [ebp - 0x2011f]
and byte [ebp - 0x20124], 0x7f
and al, 0xfe
or al, 2
mov byte [ebp - 0x2011f], al
lea eax, [ebp - 0x20124]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
call fcn.0041d060
add esp, 0xc
test eax, eax
je 0x40c3a3
push 0xffffffffffffffff
push str.Fail:_Set_the_CD_MEDIA_VALID_bit
lea eax, [ebp - 0x118]
push 0x80
push eax
call fcn.004244e4
add esp, 0x10
lea eax, [ebp - 0x118]
push 0
push 0
push 0x43ca34
push 0
push 0
push eax
push 0x43cac4
call fcn.00408180
mov edi, dword [ebp - 0x20c0c]
add edi, 0xfffffff0
mov esi, eax
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c38e
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00424839
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [ebp - 0x20c0c]
call fcn.00413410
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00424839
mov esp, ebp
pop ebp
ret 0x10
pop edi
pop esi
mov eax, 0x80004002
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00424839
mov esp, ebp
pop ebp
ret 0x10
push 0xffffffffffffffff
push str.Device_does_not_exist
lea eax, [ebp - 0x118]
push 0x80
push eax
call fcn.004244e4
add esp, 0x10
lea eax, [ebp - 0x118]
push 0
push 0
push 0x43ca34
push 0
push 0
push eax
push 0x43cac4
call fcn.00408180
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00424839
mov esp, ebp
pop ebp
ret 0x10