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

Disassembly:
push rbp
push r13
push r14
lea rbp, [rsp - 0xffa0]
mov eax, 0x100a0
call fcn.18001eed0
sub rsp, rax
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x100c0], rbx
mov qword [rsp + 0x100d0], rsi
mov qword [rsp + 0x100d8], rdi
mov rax, qword [0x180055228]
xor rax, rsp
mov qword [rbp + 0xff90], rax
movsxd rcx, dword [rbp + 0xffe0]
xor r13d, r13d
xor eax, eax
lock cmpxchg dword [section..HKT], r13d
jne 0x18000cdad
test ecx, ecx
jle 0x18000cdad
cmp qword [0x180055c00], 0xffffffffffffffff
je 0x18000cdad
lea rbx, [0x18005d030]
or rdi, 0xffffffffffffffff
mov rax, rdi
nop dword [rax]
inc rax
cmp byte [rbx + rax], r13b
jne 0x18000ca60
test rax, rax
je 0x18000cdad
mov qword [rsp + 0x58], 0xf
mov qword [rsp + 0x50], r13
mov byte [rsp + 0x40], r13b
mov r8, rcx
lea rcx, [rsp + 0x40]
call fcn.180018b30
nop
xor eax, eax
lock cmpxchg dword [0x18005d018], r13d
jne 0x18000caed
lea rdx, [0x18005dc30]
mov r9, rdi
nop word [rax + rax]
inc r9
cmp byte [rdx + r9], 0
jne 0x18000cab0
test r9, r9
je 0x18000caed
cmp byte [0x18005dc30], 0
cmove r9, r13
xor r8d, r8d
lea rcx, [rsp + 0x40]
call fcn.180010f40
cmp rax, 0xffffffffffffffff
je 0x18000caed
mov esi, 1
xchg dword [section..HKT], esi
jmp 0x18000cda3
cmp byte [0x18005d030], 0
jne 0x18000cafb
mov r9, r13
jmp 0x18000cb0a
mov r9, rdi
nop
inc r9
cmp byte [rbx + r9], 0
jne 0x18000cb00
xor r8d, r8d
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.180010f40
mov esi, 1
cmp rax, 0xffffffffffffffff
je 0x18000cc63
mov r9d, esi
mov r8, rax
lea rdx, [0x18004c3e8]
lea rcx, [rsp + 0x40]
call fcn.180010f40
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x18000cc63
mov rdx, qword [rsp + 0x50]
cmp rdx, rsi
jb 0x18000cc63
dec rdx
cmp rdx, 0xffffffffffffffff
cmova rdx, rdi
lea rbx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rbx, qword [rsp + 0x40]
add rbx, rdx
nop word [rax + rax]
cmp byte [rbx], 0x7d
sete al
test al, al
je 0x18000cba2
movzx eax, byte [rbx]
cmp al, byte [0x18004c3ec]
jne 0x18000cb9a
mov eax, r13d
jmp 0x18000cb9e
sbb eax, eax
or eax, esi
test eax, eax
je 0x18000cbba
lea rcx, [rsp + 0x40]
call fcn.1800187c0
cmp rbx, rax
je 0x18000cc63
dec rbx
jmp 0x18000cb80
lea rax, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rax, qword [rsp + 0x40]
sub rbx, rax
cmp rbx, 0xffffffffffffffff
je 0x18000cc63
sub rbx, r14
inc rbx
mov r9, rbx
mov r8, r14
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x40]
call fcn.18000d8e0
mov rcx, qword [0x180055c00]
cmp rcx, 0xffffffffffffffff
je 0x18000cc59
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [0x180055c00]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [rsp + 0x60], r13d
lea rdx, [rsp + 0x68]
cmp qword [rbp - 0x80], 0x10
cmovae rdx, qword [rsp + 0x68]
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x60]
mov r8d, dword [rsp + 0x78]
mov rcx, qword [0x180055c00]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x180055c00]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea rcx, [rsp + 0x68]
call fcn.180018d80
lea rdx, [0x18005e030]
mov r9, rdi
nop dword [rax]
inc r9
cmp byte [rdx + r9], 0
jne 0x18000cc70
test r9, r9
je 0x18000cda3
cmp byte [0x18005e030], 0
cmove r9, r13
xor r8d, r8d
lea rcx, [rsp + 0x40]
call fcn.180010f40
cmp rax, 0xffffffffffffffff
je 0x18000cda3
mov rcx, qword [0x180055c00]
cmp rcx, 0xffffffffffffffff
je 0x18000cda3
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [0x180055c00]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor bl, bl
mov rcx, qword [0x180055bf8]
cmp rcx, 0xffffffffffffffff
je 0x18000cd66
mov dword [rsp + 0x38], r13d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x38]
mov r8d, 0x10000
lea rdx, [rbp - 0x70]
mov rcx, qword [0x180055bf8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18000cd66
mov r8d, dword [rsp + 0x38]
test r8d, r8d
je 0x18000cd66
mov dword [rsp + 0x3c], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x3c]
lea rdx, [rbp - 0x70]
mov rcx, qword [0x180055c00]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18000cd55
movzx ebx, bl
cmp dword [rsp + 0x3c], 0
cmova ebx, esi
mov rcx, qword [0x180055c00]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test bl, bl
jne 0x18000cda3
mov dword [rsp + 0x64], r13d
lea rdx, [0x18005ec30]
inc rdi
cmp byte [rdx + rdi], 0
jne 0x18000cd72
mov r8, rdi
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x64]
mov rcx, qword [0x180055c00]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x180055c00]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
nop
lea rcx, [rsp + 0x40]
call fcn.180018d80
mov rcx, qword [rbp + 0xff90]
xor rcx, rsp
call fcn.18001e280
lea r11, [rsp + 0x100a0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop rbp
ret