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

Disassembly:
push rbp
push rsi
push rbx
mov eax, 0xf50
sub rax, 0x1000
mov byte [rsp + rax], al
cmp rax, 0xfffffffffffeff50
ja 0x6d1468
sub rsp, 0x100b0
mov rbp, rsp
mov qword [rbp + 0x38], rcx
mov qword [rbp + 0x40], rdx
mov qword [rbp + 0x48], r8
mov qword [rbp + 0x50], 0
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x10088], 0
mov qword [rbp + 0x10080], 0
nop
mov rax, qword [rbp + 0x38]
mov byte [rax + 0x30], 0
mov dword [rax + 0x18], 0
mov rcx, qword [rbp + 0x40]
call fcn.00416c90
mov rax, qword [rbp + 0x38]
cmp dword [rax + 0x40], 0
jbe 0x6d1521
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x28]
lea rdx, [rbp + 0x1006c]
call sub.kernel32.dll_GetCommTimeouts
mov dword [rbp + 0x10070], 0xffffffff
mov rax, qword [rbp + 0x38]
mov eax, dword [rax + 0x40]
mov dword [rbp + 0x10074], eax
mov dword [rbp + 0x1006c], 0xffffffff
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x28]
lea rdx, [rbp + 0x1006c]
call sub.kernel32.dll_SetCommTimeouts
mov rax, qword [rbp + 0x48]
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x20]
mov rax, qword [rax + 0x10]
mov rcx, rax
mov rax, qword [rax]
call qword [rax]
mov qword [rbp + 0x100a0], rax
mov rax, qword [rbp + 0x48]
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x20]
mov rcx, qword [rax + 0x10]
xor edx, edx
call fcn.00502210
mov rcx, qword [rbp + 0x48]
lea rdx, [rbp + 0x58]
mov rax, qword [rbp + 0x48]
mov rbx, qword [rax]
call qword [rbx + 0x18]
mov rax, qword [rbp + 0x58]
xor ecx, ecx
test rax, rax
je 0x6d1579
mov ecx, dword [rax - 4]
add ecx, ecx
movsxd rcx, ecx
mov qword [rbp + 0x10098], rcx
lea rcx, [rbp + 0x10088]
mov rdx, qword [0x006d1418]
mov r8d, 1
mov rax, qword [rbp + 0x10098]
lea r9, [rax + 8]
call fcn.004146b0
lea rcx, [rbp + 0x10098]
mov rdx, qword [rbp + 0x10088]
mov r8d, 8
call fcn.00409900
cmp qword [rbp + 0x10098], 0
jle 0x6d1601
mov rcx, qword [rbp + 0x48]
lea rdx, [rbp + 0x50]
mov rax, qword [rbp + 0x48]
mov rbx, qword [rax]
call qword [rbx + 0x18]
mov rcx, qword [rbp + 0x50]
call fcn.004114d0
mov rcx, rax
mov rax, qword [rbp + 0x10088]
lea rdx, [rax + 8]
mov r8, qword [rbp + 0x10098]
call fcn.00409900
mov rax, qword [rbp + 0x10088]
test rax, rax
je 0x6d1611
mov rax, qword [rax - 8]
mov rcx, qword [rbp + 0x38]
mov rcx, qword [rcx + 0x28]
mov rdx, qword [rbp + 0x10088]
mov r8d, eax
lea r9, [rbp + 0x100ac]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
test eax, eax
jne 0x6d1661
mov rax, qword [rbp + 0x38]
lea rcx, [rax + 0x10]
lea rdx, [0x006d1aac]
call fcn.004106c0
call sub.kernel32.dll_GetLastError
mov rcx, qword [rbp + 0x38]
mov dword [rcx + 0x18], eax
jmp 0x6d1a20
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x28]
lea rdx, [rbp + 0x100a0]
mov r8d, 8
lea r9, [rbp + 0x100ac]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
test eax, eax
jne 0x6d16b4
mov rax, qword [rbp + 0x38]
lea rcx, [rax + 0x10]
lea rdx, [0x006d1b0c]
call fcn.004106c0
call sub.kernel32.dll_GetLastError
mov rcx, qword [rbp + 0x38]
mov dword [rcx + 0x18], eax
jmp 0x6d1a20
mov rax, qword [rbp + 0x48]
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x20]
mov rax, qword [rax + 0x10]
mov rcx, rax
mov rax, qword [rax]
call qword [rax]
test rax, rax
jle 0x6d1796
mov rax, qword [rbp + 0x48]
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x20]
mov rax, qword [rax + 0x10]
mov rcx, rax
lea rdx, [rbp + 0x6c]
mov r8d, 0x10000
mov rax, qword [rax]
call qword [rax + 0x18]
mov dword [rbp + 0x10094], eax
cmp dword [rbp + 0x10094], 0
jbe 0x6d1795
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x28]
lea rdx, [rbp + 0x6c]
mov r8d, dword [rbp + 0x10094]
lea r9, [rbp + 0x100ac]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
test eax, eax
jne 0x6d175e
mov rax, qword [rbp + 0x38]
lea rcx, [rax + 0x10]
lea rdx, [0x006d1b7c]
call fcn.004106c0
call sub.kernel32.dll_GetLastError
mov rcx, qword [rbp + 0x38]
mov dword [rcx + 0x18], eax
jmp 0x6d1a20
mov rax, qword [rbp + 0x48]
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x20]
mov rax, qword [rax + 0x10]
mov rcx, rax
lea rdx, [rbp + 0x6c]
mov r8d, 0x10000
mov rax, qword [rax]
call qword [rax + 0x18]
mov dword [rbp + 0x10094], eax
cmp dword [rbp + 0x10094], 0
ja 0x6d170d
nop
mov rcx, qword [rbp + 0x40]
call fcn.006d0fa0
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x28]
lea rdx, [rbp + 0x10098]
mov r8d, 8
lea r9, [rbp + 0x10094]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_ReadFile
test eax, eax
setne bl
test bl, bl
jne 0x6d1803
call sub.kernel32.dll_GetLastError
cmp eax, 0xea
je 0x6d1803
mov rax, qword [rbp + 0x38]
lea rcx, [rax + 0x10]
lea rdx, [0x006d1be4]
call fcn.004106c0
call sub.kernel32.dll_GetLastError
mov rcx, qword [rbp + 0x38]
mov dword [rcx + 0x18], eax
jmp 0x6d1a20
cmp qword [rbp + 0x10098], 0
jle 0x6d18ec
lea rcx, [rbp + 0x10088]
mov rdx, qword [0x006d1418]
mov r8d, 1
mov r9, qword [rbp + 0x10098]
call fcn.004146b0
lea rcx, [rbp + 0x10080]
mov rdx, qword [rbp + 0x10098]
sar rdx, 1
jns 0x6d1849
adc rdx, 0
call fcn.00411720
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x28]
mov rdx, qword [rbp + 0x10088]
mov r8d, dword [rbp + 0x10098]
lea r9, [rbp + 0x10094]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_ReadFile
test eax, eax
setne bl
test bl, bl
jne 0x6d18b3
call sub.kernel32.dll_GetLastError
cmp eax, 0xea
je 0x6d18b3
mov rax, qword [rbp + 0x38]
lea rcx, [rax + 0x10]
lea rdx, [0x006d1c50]
call fcn.004106c0
call sub.kernel32.dll_GetLastError
mov rcx, qword [rbp + 0x38]
mov dword [rcx + 0x18], eax
jmp 0x6d1a20
lea rcx, [rbp + 0x10080]
call fcn.004109b0
mov rcx, qword [rbp + 0x10088]
mov rdx, rax
mov r8, qword [rbp + 0x10098]
call fcn.00409900
mov rax, qword [rbp + 0x40]
mov rax, qword [rax]
mov rcx, rax
mov rdx, qword [rbp + 0x10080]
mov rbx, qword [rax]
call qword [rbx + 0x28]
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x28]
lea rdx, [rbp + 0x100a0]
mov r8d, 8
lea r9, [rbp + 0x10094]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_ReadFile
test eax, eax
setne bl
test bl, bl
jne 0x6d1950
call sub.kernel32.dll_GetLastError
cmp eax, 0xea
je 0x6d1950
mov rax, qword [rbp + 0x38]
lea rcx, [rax + 0x10]
lea rdx, [0x006d1cb0]
call fcn.004106c0
call sub.kernel32.dll_GetLastError
mov rcx, qword [rbp + 0x38]
mov dword [rcx + 0x18], eax
jmp 0x6d1a20
cmp qword [rbp + 0x100a0], 0
jle 0x6d19fc
xor esi, esi
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x28]
lea rdx, [rbp + 0x6c]
mov r8d, 0x10000
lea r9, [rbp + 0x10094]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_ReadFile
test eax, eax
setne bl
mov rax, qword [rbp + 0x40]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x20]
mov rax, qword [rax + 0x10]
mov rcx, rax
lea rdx, [rbp + 0x6c]
mov r8d, dword [rbp + 0x10094]
mov rax, qword [rax]
call qword [rax + 0x20]
mov eax, dword [rbp + 0x10094]
add rsi, rax
test bl, bl
jne 0x6d19ef
call sub.kernel32.dll_GetLastError
cmp eax, 0xea
je 0x6d19ef
mov rax, qword [rbp + 0x38]
lea rcx, [rax + 0x10]
lea rdx, [0x006d1d1c]
call fcn.004106c0
call sub.kernel32.dll_GetLastError
mov rcx, qword [rbp + 0x38]
mov dword [rcx + 0x18], eax
jmp 0x6d1a20
cmp rsi, qword [rbp + 0x100a0]
jne 0x6d1960
mov rax, qword [rbp + 0x40]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x20]
mov rcx, qword [rax + 0x10]
xor edx, edx
call fcn.00502210
mov rax, qword [rbp + 0x38]
mov byte [rax + 0x30], 1
nop
lea rcx, [rbp + 0x50]
mov edx, 2
call fcn.00410130
lea rcx, [rbp + 0x10080]
call fcn.00410050
lea rcx, [rbp + 0x10088]
mov rdx, qword [0x006d1418]
call fcn.00414880
mov rax, qword [rbp + 0x40]
lea rsp, [rbp + 0x100b0]
pop rbx
pop rsi
pop rbp
ret