Function at 0x6adc57a0
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 0x6adc5350
mov dword [esp], eax
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
sub esp, 4
cmp eax, 3
je 0x6adc5382
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 0x6adc5390
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], eax
mov eax, 0x100000
cmp esi, eax
mov dword [esp + 0x5c], 0
cmova esi, eax
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 0x6adc5300
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x6adc53e3
cmp esi, dword [esp + 0x3c]
jb 0x6adc5360
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 0x6adc53aa
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 0x6adc52b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, 0x6adef7bc
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.6add80c9
test ebx, ebx
jne 0x6adc53d7
lea esi, [esi]
mov eax, 0xffffffff
jmp 0x6adc52f6
mov dword [esp + 8], 0x208
mov dword [esp + 4], str.src_win32_replacements.c
mov dword [esp], str.result___count
call dword [0x6add9074]
jmp 0x6adc52c2
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0x1d
jmp 0x6adc5350
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.6add80c9
jmp 0x6adc5342
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.6add80c9
jmp 0x6adc5342
mov eax, ebx
call fcn.6adc5190
jmp 0x6adc5350
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, 0x6adef7c2
jmp 0x6adc531a
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 0x6adc51b0