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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
sub rsp, 0x50
xor ebx, ebx
lea rax, [0x180038e28]
mov rdi, rdx
mov qword [rsp + 0x40], rbx
mov rdx, qword [rcx + 8]
mov rsi, rcx
mov qword [rsp + 0x48], rax
mov rbp, r8
mov ecx, dword [rdx]
test ecx, ecx
je 0x180001df3
sub ecx, 1
je 0x180001d65
sub ecx, 2
je 0x180001cf0
cmp ecx, 3
jne 0x180001f05
mov rax, qword [rdi + 8]
cmp dword [rax], ebx
jne 0x180001d97
cmp qword [rsi], rbx
je 0x180001cc0
mov rcx, qword [rdx + 8]
xor r9d, r9d
mov edx, dword [rsi]
xor r8d, r8d
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x180001f05
mov rax, qword [rsi + 8]
lea r9, [rsp + 0x70]
mov rdx, qword [rdi]
mov r8d, ebp
mov qword [rsp + 0x20], rbx
mov rcx, qword [rax + 8]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
mov rax, qword [rdi + 8]
cmp dword [rax], ebx
jne 0x180001d97
mov rax, qword [rdx + 8]
mov r9d, r8d
mov r8, qword [rdi]
mov edx, 0x22c187
mov qword [rsp + 0x38], rbx
mov rcx, qword [rax]
lea rax, [rsp + 0x88]
mov qword [rsp + 0x30], rax
mov rax, qword [rsi]
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov ebx, eax
test eax, eax
jne 0x180001f05
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x22c187
lea rcx, str.ERROR____DeviceIoControl__0x_08x__:_0x_08x_n
mov r8d, eax
call fcn.1800023d0
mov eax, ebx
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
mov rax, qword [rdi + 8]
cmp dword [rax], ebx
jne 0x180001d97
mov rcx, qword [rdx + 8]
mov r9, r8
mov r8, qword [rdi]
mov rdx, qword [rsi]
mov qword [rsp + 0x20], rbx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ebx, eax
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
mov rdx, r8
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x40], rax
test rax, rax
je 0x180001f05
mov r8, rbp
lea rcx, [rsp + 0x40]
mov rdx, rdi
call fcn.180001c40
test eax, eax
je 0x180001dd9
mov r8, rbp
lea rdx, [rsp + 0x40]
mov rcx, rsi
call fcn.180001c40
mov ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, ebx
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
mov rdx, qword [rdi + 8]
mov ecx, dword [rdx]
test ecx, ecx
je 0x180001ef5
sub ecx, 1
je 0x180001ecb
sub ecx, 1
je 0x180001ea7
sub ecx, 1
je 0x180001e6f
cmp ecx, 3
jne 0x180001f05
mov rcx, qword [rdx + 8]
xor r9d, r9d
mov edx, dword [rdi]
xor r8d, r8d
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x180001f05
mov rax, qword [rdi + 8]
lea r9, [rsp + 0x70]
mov rdx, qword [rsi]
mov r8d, ebp
mov qword [rsp + 0x20], rbx
mov rcx, qword [rax + 8]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rdx + 8]
lea rax, [rsp + 0x80]
mov r8, qword [rdi]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov edx, 0x22c183
mov qword [rsp + 0x20], rsi
mov rcx, qword [rcx]
call fcn.180001a90
mov ebx, eax
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rdx + 8]
mov r9, r8
mov r8, qword [rdi]
mov rdx, qword [rsi]
mov rcx, qword [rcx]
call fcn.1800020e0
mov ebx, eax
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rdx + 8]
mov r9, r8
mov r8, qword [rsi]
mov rdx, qword [rdi]
mov qword [rsp + 0x20], rbx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov ebx, eax
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
mov rdx, qword [rdi]
mov rcx, qword [rsi]
call fcn.1800214d0
mov ebx, 1
mov eax, ebx
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret