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

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x2c0
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x2b0], rbx
mov qword [rbp + 0x2b8], rsi
mov qword [rbp + 0x2c0], rdi
mov rax, qword [0x18015f040]
xor rax, rbp
mov qword [rbp + 0x270], rax
mov rcx, qword [0x18015f480]
mov rax, qword [0x18015f488]
mov rdx, qword [rax + rcx*8]
lea rax, [rbp + 0x60]
movzx ecx, word [0x18015fb90]
test cx, cx
je 0x18005bee0
lea rdi, [0x18015fb90]
lea rsi, [rbp + 0x60]
sub rdi, rsi
nop dword [rax]
mov word [rax], cx
add rax, 2
movzx ecx, word [rdi + rax]
test cx, cx
jne 0x18005bed0
xor r14d, r14d
mov word [rax], r14w
movzx ecx, word [rdx]
test cx, cx
je 0x18005bf10
sub rdx, rax
nop dword [rax]
nop word [rax + rax]
mov word [rax], cx
add rax, 2
movzx ecx, word [rdx + rax]
test cx, cx
jne 0x18005bf00
mov qword [rsp + 0x30], r14
lea rcx, [rbp + 0x60]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
mov r8d, 1
mov word [rax], r14w
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp + 0x20], rax
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x18005bf6d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x18005c09c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movabs rax, 0x71649d8c56e205db
movabs rcx, 0x9fe74ab83cc32036
mov qword [rbp], rax
movabs rdi, 0x533253dc5763c53a
mov rax, qword [rbp]
movabs rdx, 0x544f9e93a8b64bd
movabs rax, 0xfcc72ed953af0059
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0x836e95b82b10f1f8
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0x4fb67fc66961296c
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0xe6f325d644b32c4
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp], rdi
mov rax, qword [rbp]
mov qword [rbp], rdx
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
movabs rax, 0xe21ce0df42769f97
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0x23df19e6070e4018
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0xe6f325d466b08a1
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp], rdi
mov rax, qword [rbp]
movabs rax, 0x544f9e93a8b649f
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
mov qword [rbp], rdx
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
xor al, al
mov rcx, qword [rbp + 0x270]
xor rcx, rbp
call fcn.1800e1360
mov rbx, qword [rbp + 0x2b0]
mov rsi, qword [rbp + 0x2b8]
mov rdi, qword [rbp + 0x2c0]
lea rsp, [rbp + 0x280]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
mov qword [rbp + 0x10], rdi
mov rcx, rax
xor edx, edx
mov rsi, rdi
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor r9d, r9d
mov qword [rsp + 0x20], r14
mov rdx, rax
mov qword [rbp + 0x18], rax
mov r8d, edi
mov rcx, rbx
mov r15, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18005c104
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r15, r15
je 0x18005bf6d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r15
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x18005bf6d
movabs rax, 0xbb62c62c9808ea37
mov dword [rbp + 8], 0x3e8
movabs r14, 0x2b9fff192bd4c83e
mov qword [rbp + 0x38], rax
xor edi, edi
mov qword [rbp + 0x40], r14
lea rdx, [rbp + 8]
mov qword [rbp + 0x50], rdi
lea rcx, [rbp + 0x38]
mov qword [rbp + 0x48], 4
call fcn.18005a3f0
mov rax, qword [r15]
lea rdx, [r15 + 8]
mov qword [rbp + 0x38], rax
movabs r8, 0x889f8b4975721ba3
mov rcx, qword [rdx]
movabs rax, 0x8cb0c9a388179fe5
add rdx, 8
mov qword [rbp + 0x40], rcx
movabs r10, 0x566c1c811e86d8fd
movabs r11, 0x8012fbb270cb163d
movabs r12, 0xa00a62a942b20165
movabs r13, 0xbaaedcff023465cb
movabs r9, 0x26efb703382e92fd
cmp rcx, rax
ja 0x18005c1d8
je 0x18005c3f2
cmp rcx, r9
je 0x18005c3f6
cmp rcx, r14
je 0x18005c3f6
cmp rcx, r10
je 0x18005c3f2
cmp rcx, r11
je 0x18005c3f2
cmp rcx, r8
je 0x18005c3f6
jmp 0x18005c223
cmp rcx, r12
je 0x18005c3f6
cmp rcx, r13
je 0x18005c3f6
movabs rax, 0xbf1d25349b935bb7
cmp rcx, rax
je 0x18005c3f2
movabs rax, 0xcd2fd49bc6b014bd
cmp rcx, rax
je 0x18005c3f6
movabs rax, 0xfb0ce58f438fe2a6
cmp rcx, rax
je 0x18005c3f2
cmp qword [rbp + 0x48], 8
lea r10, [rbp + 0x50]
mov rax, qword [0x18015f4a0]
mov rdi, qword [0x18015f4a8]
cmova r10, qword [rbp + 0x50]
cmp rax, rdi
je 0x18005c2c5
cmp qword [rax], rcx
je 0x18005c258
add rax, 0x20
cmp rax, rdi
jne 0x18005c248
jmp 0x18005c2c5
mov r8, qword [rax + 8]
add rdx, 8
mov r9, qword [rax + 0x10]
cmp r8, r9
je 0x18005c2c5
nop dword [rax]
mov rax, qword [rdx]
mov rcx, qword [rdx + 8]
add rdx, 0x10
cmp rax, qword [r8]
jne 0x18005c2c1
cmp rcx, qword [r8 + 8]
jne 0x18005c2c1
mov rcx, qword [r8 + 0x10]
mov rsi, rdx
mov rdi, qword [r8 + 0x18]
mov rax, rcx
add rdi, r10
and eax, 3
jne 0x18005c2a4
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x18005c2b4
cmp rax, 2
jne 0x18005c2b2
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x18005c2b4
rep movsb byte [rdi], byte [rsi]
add rdx, qword [r8 + 0x10]
add r8, 0x20
cmp r8, r9
jne 0x18005c270
mov rsi, qword [rbp + 0x10]
xor edi, edi
mov rax, qword [0x18015f4c0]
mov r12, qword [0x18015f4b8]
mov qword [rbp], rax
cmp r12, rax
je 0x18005c7e2
lea r13, [r12 + 0x18]
mov r14, r13
mov qword [rbp + 8], r13
nop
mov rax, qword [r12]
lea r8, [rbp + 0x28]
mov qword [rbp + 0x28], rax
mov r9d, 0x10
mov rax, qword [r12 + 8]
mov rdx, rsi
mov rcx, r15
mov qword [rbp + 0x30], rax
mov qword [rsp + 0x20], rdi
call fcn.18007e920
mov rdx, rax
test rax, rax
jne 0x18005c69f
cmp qword [rbp + 0x48], 8
lea rax, [rbp + 0x50]
cmova rax, qword [rbp + 0x50]
cmp dword [rax], 0x3e8
jge 0x18005c7c4
mov r9d, 2
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x18005c7c4
mov rcx, r12
call fcn.18005a4b0
add rax, 0x10
mov rdx, rdi
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
test rdx, rdx
je 0x18005c435
mov rcx, r12
call fcn.18005a4b0
add rax, 0x10
mov rdx, rdi
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
mov rcx, r12
cmp rdx, 0x400
ja 0x18005c404
call fcn.18005a4b0
add rax, 0x10
mov rdx, rdi
lea rcx, [rax + 0x10]
cmp rcx, rax
cmova rdx, rcx
lea rax, [rdx + 0xf]
cmp rax, rdx
ja 0x18005c3cf
movabs rax, 0xffffffffffffff0
and rax, 0xfffffffffffffff0
call fcn.1800e1b80
sub rsp, rax
lea r15, [rsp + 0x40]
test r15, r15
je 0x18005c438
mov dword [r15], 0xcccc
add r15, 0x10
jmp 0x18005c438
add rdx, 8
lea rcx, [rbp + 0x38]
call fcn.18005a3f0
jmp 0x18005c2c7
call fcn.18005a4b0
add rax, 0x10
mov rcx, rdi
lea rdx, [rax + 0x10]
cmp rdx, rax
cmova rcx, rdx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r15, rax
test rax, rax
je 0x18005c438
mov dword [rax], 0xdddd
add r15, 0x10
jmp 0x18005c438
mov r15, rdi
mov rax, qword [r12]
lea rbx, [r15 + 0x10]
mov qword [r15], rax
movabs rcx, 0x8cb0c9a388179fe5
mov rax, qword [r12 + 8]
mov qword [r15 + 8], rax
mov rax, qword [r12 + 8]
cmp rax, rcx
ja 0x18005c4d5
je 0x18005c645
movabs rcx, 0x26efb703382e92fd
cmp rax, rcx
je 0x18005c4b9
movabs rcx, 0x2b9fff192bd4c83e
cmp rax, rcx
je 0x18005c4b9
movabs rcx, 0x566c1c811e86d8fd
cmp rax, rcx
je 0x18005c645
movabs rcx, 0x8012fbb270cb163d
cmp rax, rcx
je 0x18005c645
movabs rcx, 0x889f8b4975721ba3
cmp rax, rcx
jne 0x18005c528
mov rcx, qword [r12 + 0x10]
lea rsi, [r12 + 0x18]
cmp rcx, 8
jbe 0x18005c662
mov rsi, qword [rsi]
jmp 0x18005c662
movabs rcx, 0xa00a62a942b20165
cmp rax, rcx
je 0x18005c4b9
movabs rcx, 0xbaaedcff023465cb
cmp rax, rcx
je 0x18005c4b9
movabs rcx, 0xbf1d25349b935bb7
cmp rax, rcx
je 0x18005c645
movabs rcx, 0xcd2fd49bc6b014bd
cmp rax, rcx
je 0x18005c4b9
movabs rcx, 0xfb0ce58f438fe2a6
cmp rax, rcx
je 0x18005c645
cmp qword [r12 + 0x10], 8
mov r14, r13
jbe 0x18005c537
mov r14, qword [r13]
mov rdi, qword [0x18015f4a0]
mov rcx, qword [0x18015f4a8]
cmp rdi, rcx
je 0x18005c55e
nop word [rax + rax]
cmp qword [rdi], rax
je 0x18005c5cc
add rdi, 0x20
cmp rdi, rcx
jne 0x18005c550
mov r14, qword [rbp + 8]
sub ebx, r15d
xor edi, edi
mov r8d, ebx
mov qword [rsp + 0x20], rdi
mov rbx, qword [rbp + 0x20]
xor r9d, r9d
mov rcx, rbx
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x10
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x18005c5c3
lea rcx, [rbp + 0x38]
mov dword [rbp + 8], 0x3e8
call fcn.18005a4b0
mov r8, rax
mov qword [rsp + 0x20], rdi
xor r9d, r9d
lea rdx, [rbp + 8]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r15, qword [rbp + 0x18]
jmp 0x18005c7c4
mov rcx, r12
call fcn.18005a4b0
mov qword [rbx], rax
add rbx, 8
mov r9, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
cmp rdx, r9
je 0x18005c55e
nop dword [rax]
mov rax, qword [rdx]
lea r8, [rbx + 0x10]
mov qword [rbx], rax
mov rdi, r8
mov rax, qword [rdx + 8]
mov qword [rbx + 8], rax
mov rcx, qword [rdx + 0x10]
mov rsi, qword [rdx + 0x18]
mov rax, rcx
add rsi, r14
and eax, 3
jne 0x18005c620
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x18005c630
cmp rax, 2
jne 0x18005c62e
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x18005c630
rep movsb byte [rdi], byte [rsi]
mov rbx, qword [rdx + 0x10]
add rdx, 0x20
add rbx, r8
cmp rdx, r9
jne 0x18005c5f0
jmp 0x18005c55e
mov rax, qword [r12 + 0x10]
mov rsi, r14
mov qword [rbx], rax
add rbx, 8
mov rcx, qword [r12 + 0x10]
cmp rcx, 8
jbe 0x18005c662
mov rsi, qword [r14]
mov rax, rcx
mov rdi, rbx
and eax, 3
jne 0x18005c689
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
add rbx, qword [r12 + 0x10]
jmp 0x18005c562
rep movsb byte [rdi], byte [rsi]
add rbx, qword [r12 + 0x10]
jmp 0x18005c562
cmp rax, 2
jne 0x18005c67d
shr rcx, 1
rep movsw word [rdi], word [rsi]
add rbx, qword [r12 + 0x10]
jmp 0x18005c562
mov rax, qword [rax]
movabs rcx, 0x8cb0c9a388179fe5
mov qword [r12], rax
mov rax, qword [rdx + 8]
add rdx, 0x10
mov qword [r12 + 8], rax
cmp rax, rcx
ja 0x18005c729
je 0x18005c93e
movabs rcx, 0x26efb703382e92fd
cmp rax, rcx
je 0x18005c942
movabs rcx, 0x2b9fff192bd4c83e
cmp rax, rcx
je 0x18005c942
movabs rcx, 0x566c1c811e86d8fd
cmp rax, rcx
je 0x18005c93e
movabs rcx, 0x8012fbb270cb163d
cmp rax, rcx
je 0x18005c93e
movabs rcx, 0x889f8b4975721ba3
cmp rax, rcx
je 0x18005c942
jmp 0x18005c788
movabs rcx, 0xa00a62a942b20165
cmp rax, rcx
je 0x18005c942
movabs rcx, 0xbaaedcff023465cb
cmp rax, rcx
je 0x18005c942
movabs rcx, 0xbf1d25349b935bb7
cmp rax, rcx
je 0x18005c93e
movabs rcx, 0xcd2fd49bc6b014bd
cmp rax, rcx
je 0x18005c942
movabs rcx, 0xfb0ce58f438fe2a6
cmp rax, rcx
je 0x18005c93e
cmp qword [r12 + 0x10], 8
lea r10, [r12 + 0x18]
jbe 0x18005c798
mov r10, qword [r10]
mov rax, qword [0x18015f4a0]
mov rcx, qword [0x18015f4a8]
cmp rax, rcx
je 0x18005c7c4
mov rdi, qword [r12 + 8]
cmp qword [rax], rdi
je 0x18005c8c9
add rax, 0x20
cmp rax, rcx
jne 0x18005c7b0
xor edi, edi
mov rsi, qword [rbp + 0x10]
add r14, 0x20
add r12, 0x20
mov qword [rbp + 8], r14
add r13, 0x20
cmp r12, qword [rbp]
jne 0x18005c2f0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r15
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rcx, [rbp + 0x38]
call fcn.180051290
movabs rcx, 0x9fe74ab83cc32036
movabs rax, 0x66649d8c5eea0bd1
mov qword [rbp], rax
movabs rdx, 0x544f9e93a8b64bd
mov rax, qword [rbp]
movabs rax, 0xfe953fdf55a54e59
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0x8e7586ff2c19f6e3
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0x23df19e6252e7a7d
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp], rdx
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
movabs rax, 0xe21ce0df42769f97
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0x23df19e6070e4018
mov qword [rbp], rax
mov rax, qword [rbp]
movabs rax, 0x544f9e93a8b649f
mov qword [rbp], rax
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
mov qword [rbp], rdx
mov rax, qword [rbp]
mov qword [rbp], rcx
mov rax, qword [rbp]
mov al, 1
jmp 0x18005c067
mov r8, qword [rax + 8]
add rdx, 8
mov r9, qword [rax + 0x10]
cmp r8, r9
je 0x18005c7c2
nop
mov rax, qword [rdx]
mov rcx, qword [rdx + 8]
add rdx, 0x10
cmp rax, qword [r8]
jne 0x18005c7c2
cmp rcx, qword [r8 + 8]
jne 0x18005c7c2
mov rcx, qword [r8 + 0x10]
mov rsi, rdx
mov rdi, qword [r8 + 0x18]
mov rax, rcx
add rdi, r10
and eax, 3
jne 0x18005c91c
shr rcx, 2
rep movsd dword [rdi], dword [rsi]
jmp 0x18005c92c
cmp rax, 2
jne 0x18005c92a
shr rcx, 1
rep movsw word [rdi], word [rsi]
jmp 0x18005c92c
rep movsb byte [rdi], byte [rsi]
add rdx, qword [r8 + 0x10]
add r8, 0x20
cmp r8, r9
jne 0x18005c8e0
jmp 0x18005c7c2
add rdx, 8
mov rcx, r12
call fcn.18005a3f0
jmp 0x18005c7c4