Function at 0x42bd71
Capabilities:
Copy file
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd44
push ebx
push esi
push edi
mov dword [0x50210a], 0
mov dword [0x50210e], 0
push 0
push 0x12
lea eax, [ebp - 0xb2]
push eax
call fcn.0043edd0
cmp dword [ebp + 8], 1
jne 0x42bdae
mov ebx, str.Finalise_RZX
jmp 0x42bdb3
mov ebx, str.Clean_up_RZX
push 0x4426b0
push 0x644194
lea eax, [ebp - 0x68]
push eax
push str.RZX_files__.rzx_
push ebx
push dword [0x49ff24]
call fcn.0043a08a
or eax, eax
jne 0x42bddd
pop edi
pop esi
pop ebx
leave
ret 4
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push 0x644194
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
jne 0x42be07
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
mov dword [0x486b3c], eax
mov byte [0x445033], 2
push 0
push 0x49ffb8
push 0xa
lea eax, [ebp - 0x72]
push eax
push dword [0x486b3c]
call sub.kernel32.dll_ReadFile
lea eax, [ebp - 0x72]
cmp dword [eax], 0x21585a52
je 0x42be4b
push 0
push str.Invalid_RZX_file
call fcn.0042a460
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push 0
push 0x49ffb8
push 0x1d
lea eax, [ebp - 0x8f]
push eax
push dword [0x486b3c]
call sub.kernel32.dll_ReadFile
lea esi, [ebp - 0x8a]
push 0x44501f
push esi
call fcn.0043dd80
or eax, eax
jne 0x42be90
push 0
push str.SpecEmu_can_only_clean_up_or_finalise_its_own_recording_files
call fcn.0042a460
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
cmp dword [ebp + 8], 1
jne 0x42bf01
lea esi, [ebp - 0x1b6]
mov byte [esi], 0
lea eax, [ebp - 0x2ba]
push eax
push 0x644194
call fcn.0043ed70
push 0x479e58
lea eax, [ebp - 0x2ba]
push eax
push str.Do_you_really_want_to_finalise_
push str.Finalising_a_recording_prevents_further_recording_to_this_file._r_r
push esi
push 4
call fcn.0043deb0
add esp, 0x18
push 0x134
push str.Warning
push esi
push dword [0x49ff24]
call fcn.0043d57a
cmp eax, 7
jne 0x42bf01
push 0
push str.Finalising_aborted
call fcn.0042a460
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push 0x486b30
call fcn.004012e2
push 0x486b30
call fcn.00429edf
or eax, eax
jne 0x42bf2e
push 0
push 0x479e78
call fcn.0042a460
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push 0x50210a
push 0x502112
call fcn.0043ec10
or eax, eax
jne 0x42bf54
push 0x479e8c
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push 0x50210e
push 0x502216
call fcn.0043ec10
or eax, eax
jne 0x42bf7a
push 0x479e9c
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push 0
push 0x49ffbc
push 0xa
lea eax, [ebp - 0x72]
push eax
push dword [0x50210a]
call sub.kernel32.dll_WriteFile
push 0
push 0x49ffbc
push 0x1d
lea eax, [ebp - 0x8f]
push eax
push dword [0x50210a]
call sub.kernel32.dll_WriteFile
mov dword [ebp - 4], 0x486b30
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov esi, dword [ebp - 4]
mov esi, dword [esi]
push esi
call fcn.0040130a
cmp eax, 1
je 0x42c2c4
mov dword [ebp - 4], esi
inc dword [ebp - 8]
cmp dword [ebp - 8], 1
jne 0x42c002
cmp byte [esi + 0xc], 0x30
je 0x42c002
push str.Invalid_RZX_format
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
movzx eax, byte [esi + 0xc]
cmp eax, 0x30
jne 0x42c1a7
mov edi, dword [ebp - 4]
mov edi, dword [edi]
push edi
call fcn.0040130a
mov ebx, eax
cmp dword [ebp - 8], 1
je 0x42c035
cmp ebx, 1
jne 0x42c2bf
cmp dword [ebp + 8], 0
jne 0x42c2bf
cmp dword [ebp + 8], 0
jne 0x42c05f
push dword [0x50210a]
push dword [ebp - 4]
call fcn.0042c49c
or eax, eax
jne 0x42c1a2
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
mov esi, dword [ebp - 4]
push 0
push 0
push dword [esi + 0xd]
push dword [0x486b3c]
call sub.kernel32.dll_SetFilePointer
push 0
push 0x49ffb8
push 0x11
lea eax, [ebp - 0xa0]
push eax
push dword [0x486b3c]
call sub.kernel32.dll_ReadFile
push 1
push 0
push 0xffffffffffffffef
push dword [0x486b3c]
call sub.kernel32.dll_SetFilePointer
mov ebx, dword [ebp - 0x9f]
push ebx
push 0x40
call sub.kernel32.dll_GlobalAlloc
mov esi, eax
or esi, esi
jne 0x42c0c7
push 0x479ec0
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push 0
push 0x49ffb8
push ebx
push esi
push dword [0x486b3c]
call sub.kernel32.dll_ReadFile
push 1
push 0
push 0
push dword [0x50210a]
call sub.kernel32.dll_SetFilePointer
mov dword [ebp - 0x1c], eax
push 0
push 0x49ffbc
push 0x11
lea eax, [ebp - 0xa0]
push eax
push dword [0x50210a]
call sub.kernel32.dll_WriteFile
lea ecx, [esi + 0x11]
lea edx, [ebx - 0x11]
push 0x42c58c
push edx
push ecx
call sub.szx.dll_LoadSZXStateFromMemory
or eax, eax
jne 0x42c139
push esi
call sub.kernel32.dll_GlobalFree
push str.Error_in_embedded_SZX_snapshot
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push esi
call sub.kernel32.dll_GlobalFree
push 1
push 0
push 0
push dword [0x50210a]
call sub.kernel32.dll_SetFilePointer
mov esi, eax
sub esi, dword [ebp - 0x1c]
mov dword [ebp - 0x9f], esi
sub esi, 0x11
mov dword [ebp - 0x93], esi
push 0
push 0
push dword [ebp - 0x1c]
push dword [0x50210a]
call sub.kernel32.dll_SetFilePointer
push 0
push 0x49ffbc
push 0x11
lea eax, [ebp - 0xa0]
push eax
push dword [0x50210a]
call sub.kernel32.dll_WriteFile
push 2
push 0
push 0
push dword [0x50210a]
call sub.kernel32.dll_SetFilePointer
jmp 0x42c2bf
cmp eax, 0x80
jne 0x42c2ac
inc dword [ebp - 0x10]
cmp dword [ebp + 8], 0
jne 0x42c1df
push dword [0x50210a]
push dword [ebp - 4]
call fcn.0042c49c
or eax, eax
jne 0x42c2bf
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
mov esi, dword [ebp - 4]
push 0
push 0
push dword [esi + 0xd]
push dword [0x486b3c]
call sub.kernel32.dll_SetFilePointer
push 0
push 0x49ffb8
push 0x12
push 0x488c6e
push dword [0x486b3c]
call sub.kernel32.dll_ReadFile
mov eax, dword [0x488c73]
add dword [ebp - 0xc], eax
mov ebx, dword [0x488c6f]
sub ebx, 0x12
push ebx
push 0x40
call sub.kernel32.dll_GlobalAlloc
mov esi, eax
or esi, esi
jne 0x42c23f
push 0x479ef0
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push 0
push 0x49ffb8
push ebx
push esi
push dword [0x486b3c]
call sub.kernel32.dll_ReadFile
mov eax, dword [0x488c7c]
test eax, 2
je 0x42c290
push 2
push dword [0x50210e]
push ebx
push esi
call fcn.0043f5f0
push eax
push esi
call sub.kernel32.dll_GlobalFree
pop eax
cmp eax, 0xffffffff
jne 0x42c2aa
push str.Zlib_decompression_error
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push 0
push 0x49ffbc
push ebx
push esi
push dword [0x50210e]
call sub.kernel32.dll_WriteFile
push esi
call sub.kernel32.dll_GlobalFree
jmp 0x42c2bf
push str.Unknown_RZX_block_type
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
jmp 0x42bfc9
cmp dword [ebp + 8], 1
jne 0x42c403
lea esi, [ebp - 0xb2]
mov byte [esi], 0x80
push dword [ebp - 0xc]
pop dword [esi + 5]
mov dword [esi + 0xe], 2
push 0
push 0
push 0
push dword [0x50210e]
call sub.kernel32.dll_SetFilePointer
push 0
push dword [0x50210e]
call sub.kernel32.dll_GetFileSize
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x42c31c
push 0x479f34
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push ebx
push 0x40
call sub.kernel32.dll_GlobalAlloc
mov esi, eax
or esi, esi
jne 0x42c33d
push 0x479f44
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
mov eax, ebx
add eax, 0x20000
mov dword [ebp - 0x14], eax
push dword [ebp - 0x14]
push 0x40
call sub.kernel32.dll_GlobalAlloc
mov edi, eax
or edi, edi
jne 0x42c370
push esi
call sub.kernel32.dll_GlobalFree
push 0x479f54
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push 0
push 0x49ffb8
push ebx
push esi
push dword [0x50210e]
call sub.kernel32.dll_ReadFile
push dword [ebp - 0x14]
push edi
push ebx
push esi
call fcn.0043f320
cmp eax, 0xffffffff
jne 0x42c3b3
push esi
call sub.kernel32.dll_GlobalFree
push edi
call sub.kernel32.dll_GlobalFree
push str.Zlib_compression_error
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
mov dword [ebp - 0x18], eax
add eax, 0x12
mov dword [ebp - 0xb1], eax
push 0
push 0x49ffbc
push 0x12
lea eax, [ebp - 0xb2]
push eax
push dword [0x50210a]
call sub.kernel32.dll_WriteFile
mov edx, dword [ebp - 0xb1]
sub edx, 0x12
push 0
push 0x49ffbc
push edx
push edi
push dword [0x50210a]
call sub.kernel32.dll_WriteFile
push esi
call sub.kernel32.dll_GlobalFree
push edi
call sub.kernel32.dll_GlobalFree
push dword [0x486b3c]
call sub.kernel32.dll_CloseHandle
push 0
push 0x644194
push 0x502112
call sub.kernel32.dll_CopyFileA
or eax, eax
jne 0x42c436
push str.Internal_Error
call fcn.0042c5d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
cmp dword [ebp + 8], 1
jne 0x42c443
mov ebx, str.Finalise_complete
jmp 0x42c448
mov ebx, str.Clean_up_complete
push eax
push 1
call sub.user32.dll_ShowCursor
mov byte [0x4a0ba7], 1
mov byte [0x4a0ba8], 1
pop eax
push 0x40
push str.RZX_Info
push ebx
push dword [0x49ff24]
call fcn.0043d57a
push eax
mov byte [0x4a0ba7], 0
mov byte [0x4a0ba8], 0
push 0
call sub.user32.dll_ShowCursor
pop eax
push 0
call fcn.0042c5d0
mov eax, 1
pop edi
pop esi
pop ebx
leave
ret 4