Function at 0x6adc0390
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, edx
push edi
push esi
mov esi, ecx
push ebx
sub esp, 0x6c
mov edx, dword [esp + 0x80]
mov ecx, dword [esp + 0x84]
mov dword [esp], eax
mov edi, dword [esp + 0x88]
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], edi
call dword [sym.imp.msvcrt.dll__get_osfhandle]
cmp eax, 0xffffffff
je 0x6adbff73
mov dword [esp], eax
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
sub esp, 4
cmp eax, 3
je 0x6adbff67
lea eax, [esp + 0x40]
mov dword [esp + 0x10], 1
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], ebx
call edi
sub esp, 0x14
test eax, eax
je 0x6adbff7a
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
cmp esi, 0x100000
mov ecx, 0x100000
cmova esi, ecx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], edx
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
lea eax, [esp + 0x4c]
cmp byte [esp + 0x2c], 0
mov dword [esp + 8], esi
mov dword [esp + 0x10], eax
lea eax, [esp + 0x3c]
mov dword [esp + 0xc], eax
mov dword [esp + 4], ebp
mov dword [esp], ebx
jne 0x6adbff30
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x6adbffcc
cmp dword [esp + 0x3c], esi
ja 0x6adbff48
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov dword [esp], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call edi
sub esp, 0x14
test eax, eax
je 0x6adbffa2
mov eax, dword [esp + 0x3c]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
jne 0x6adbfeec
jmp 0x6ae0e93e
mov dword [esp + 8], 0x218
mov dword [esp + 4], str.src_win32_replacements.c
mov dword [esp], str.result___count
call dword [0x6ae0f298]
jmp 0x6adbfef2
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0x1d
mov eax, 0xffffffff
jmp 0x6adbff26
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.Failed_to_get_original_file_position
mov dword [esp], eax
mov ebx, eax
call fcn.6ae0df2f
test ebx, ebx
je 0x6adbff73
mov eax, ebx
call fcn.6adbfdc0
or eax, 0xffffffff
jmp 0x6adbff26
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x24]
mov dword [esp + 4], str.Failed_to_restore_file_position_to__llu
mov ebx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.6ae0df2f
jmp 0x6adbff92
jmp 0x6ae0e904
push esi
push ebx
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], esi
pop ebx
pop esi
jmp 0x6adbfde0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, 0x6ae2532c
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ebp
mov dword [esp + 4], str.Failed_to__s__zu_bytes_at_offset__llu
mov dword [esp], ebx
call fcn.6ae0df2f
jmp 0x6adbff92
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, str.write
jmp 0x6ae0e911