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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x290
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x2c0], rbx
mov rax, qword [0x1800ff050]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov rbp, r8
mov r13, rdx
mov qword [rsp + 0x68], r8
test r8, r8
je 0x18002104c
mov rax, qword [r8]
mov rcx, r8
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
xor edi, edi
mov word [rsp + 0x70], di
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x72]
call fcn.18006cf60
mov r11, qword [rbp]
mov r8d, 0x104
lea rdx, [rsp + 0x70]
mov rcx, rbp
call qword [r11 + 0xa8]
mov ebx, eax
test eax, eax
js 0x18002127b
cmp eax, 1
je 0x18002127b
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
mov qword [rsp + 0x58], rax
cmp rax, 0xffffffffffffffff
jne 0x1800210de
call fcn.180003180
mov ebx, eax
mov rdx, qword [rbp]
mov rcx, rbp
call qword [rdx + reloc.WS2_32.dll_recv]
mov eax, ebx
jmp 0x180021287
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x180021116
call fcn.180003180
mov ebx, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rbp]
mov rcx, rbp
call qword [rdx + reloc.WS2_32.dll_recv]
mov eax, ebx
jmp 0x180021287
lea rdx, [0x180106f48]
mov ecx, 0x80000
call fcn.18006aaa4
mov rbx, rax
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x40], edi
mov qword [rsp + 0x48], rdi
nop dword [rax + rax]
xor edx, edx
mov r8d, 0x80000
mov rcx, rbx
call fcn.18006cf60
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x44]
mov r8d, 0x80000
mov rdx, rbx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18002124e
mov dword [rsp + 0x40], edi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x40]
mov r8d, dword [rsp + 0x44]
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180021221
mov eax, dword [rsp + 0x40]
add qword [rsp + 0x48], rax
mov rax, qword [rbp]
lea rdx, [rsp + 0x48]
mov rcx, rbp
call qword [rax + 0x78]
mov r12d, eax
test eax, eax
js 0x1800211fa
cmp eax, 1
je 0x1800211fa
cmp dword [rsp + 0x40], 0x80000
je 0x180021140
test rbx, rbx
je 0x1800211df
mov rcx, rbx
call fcn.18006aaac
nop
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rax, qword [rbp]
mov rcx, rbp
call qword [rax + reloc.WS2_32.dll_recv]
xor eax, eax
jmp 0x180021287
test rbx, rbx
je 0x180021208
mov rcx, rbx
call fcn.18006aaac
nop
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rax, qword [rbp]
mov rcx, rbp
call qword [rax + reloc.WS2_32.dll_recv]
mov eax, r12d
jmp 0x180021287
call fcn.180003180
mov edi, eax
test rbx, rbx
je 0x180021236
mov rcx, rbx
call fcn.18006aaac
nop
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rbp]
mov rcx, rbp
call qword [rdx + reloc.WS2_32.dll_recv]
mov eax, edi
jmp 0x180021287
call fcn.180003180
mov edi, eax
test rbx, rbx
je 0x180021263
mov rcx, rbx
call fcn.18006aaac
nop
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rbp]
mov rcx, rbp
call qword [rdx + reloc.WS2_32.dll_recv]
mov eax, edi
jmp 0x180021287
mov rax, qword [rbp]
mov rcx, rbp
call qword [rax + reloc.WS2_32.dll_recv]
mov eax, ebx
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.18006a4f0
mov rbx, qword [rsp + 0x2c0]
add rsp, 0x290
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret