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

Disassembly:
push rbx
push r12
push r15
sub rsp, 0x80
mov rax, qword [0x140020008]
xor rax, rsp
mov qword [rsp + 0x58], rax
xor r10d, r10d
mov qword [rsp + 0x48], rcx
add r9, 0xfffffffffffffff6
mov dword [rsp + 0x50], r10d
mov r15, rdx
mov rbx, rcx
cmp r9, 0x46
ja case.0x1400018a7.11
lea rcx, [0x140000000]
movzx eax, byte [rcx + r9 + 0x1c84]
mov edx, dword [rcx + rax*4 + 0x1c54]
add rdx, rcx
jmp rdx
mov r8, qword [rbx + 0x10]
movabs rax, 0xa3d70a3d70a3d70b
imul r8
lea r12, [r8 + rdx]
sar r12, 6
mov rcx, r12
shr rcx, 0x3f
add r12, rcx
shl r12, 2
jmp 0x140001a8f
mov r8, qword [rbx + 0x10]
movabs rax, 0xa3d70a3d70a3d70b
imul r8
add rdx, r8
sar rdx, 6
mov rcx, rdx
shr rcx, 0x3f
add rdx, rcx
lea r12, [rdx + rdx*4]
jmp 0x140001a8f
mov r8, qword [rbx + 0x10]
movabs rax, 0xa3d70a3d70a3d70b
imul r8
add rdx, r8
sar rdx, 6
mov rcx, rdx
shr rcx, 0x3f
add rdx, rcx
imul r12, rdx, 7
jmp 0x140001a8f
mov r8, qword [rbx + 0x10]
movabs rax, 0xa3d70a3d70a3d70b
imul r8
add rdx, r8
sar rdx, 6
mov rcx, rdx
shr rcx, 0x3f
add rdx, rcx
lea r12, [rdx + rdx*8]
jmp 0x140001a8f
mov r8, qword [rbx + 0x10]
movabs rax, 0xa3d70a3d70a3d70b
imul r8
add rdx, r8
sar rdx, 6
mov rcx, rdx
shr rcx, 0x3f
add rdx, rcx
lea r12, [rdx + rdx*4]
add r12, r12
jmp 0x140001a8f
mov r8, qword [rbx + 0x10]
movabs rax, 0xa3d70a3d70a3d70b
imul r8
add rdx, r8
sar rdx, 6
mov rcx, rdx
shr rcx, 0x3f
add rdx, rcx
lea r12, [rdx + rdx*2]
shl r12, 2
jmp 0x140001a8f
mov r8, qword [rbx + 0x10]
movabs rax, 0xa3d70a3d70a3d70b
imul r8
add rdx, r8
sar rdx, 6
mov rcx, rdx
shr rcx, 0x3f
add rdx, rcx
imul r12, rdx, 0xe
jmp 0x140001a8f
movabs rax, 0xa3d70a3d70a3d70b
mov dword [rsp + 0x30], 5
imul qword [rbx + 0x10]
add rdx, qword [rbx + 0x10]
sar rdx, 6
mov rax, rdx
shr rax, 0x3f
add rdx, rax
lea r12, [rdx + rdx*4]
add r12, r12
mov rax, r12
jmp 0x140001aa9
mov r8, qword [rbx + 0x10]
movabs rax, 0xa3d70a3d70a3d70b
imul r8
add rdx, r8
sar rdx, 6
mov rcx, rdx
shr rcx, 0x3f
add rdx, rcx
lea r12, [rdx + rdx*4]
shl r12, 2
jmp 0x140001a8f
mov r8, qword [rbx + 0x10]
movabs rax, 0xa3d70a3d70a3d70b
imul r8
add rdx, r8
sar rdx, 6
mov rcx, rdx
shr rcx, 0x3f
add rdx, rcx
imul r12, rdx, 0x17
jmp 0x140001a8f
mov r8, qword [rbx + 0x10]
movabs rax, 0xa3d70a3d70a3d70b
imul r8
add rdx, r8
sar rdx, 6
mov rcx, rdx
shr rcx, 0x3f
add rdx, rcx
imul r12, rdx, 0x1b
lea rcx, [r12 + r12*2]
mov dword [rsp + 0x30], 3
sub r8, rcx
mov rax, r8
cqo
sub rax, rdx
sar rax, 1
mov qword [rsp + 0xb0], rbp
mov ecx, 0x500000
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0x70], rdi
mov edi, r10d
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x40], r10d
mov r13, r10
test edi, edi
je 0x140001b04
mov rcx, qword [rbx + 8]
mov r9d, 1
xor r8d, r8d
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140001c15
xor r10d, r10d
mov ecx, 0x500000
test r12, r12
jle 0x140001bf5
nop dword [rax]
mov r8, r12
mov qword [rsp + 0x20], r10
sub r8, r13
lea r9, [rsp + 0x50]
cmp r8, rcx
mov rdx, r15
cmovg r8d, ecx
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140001bf1
mov ebp, dword [rsp + 0x50]
test ebp, ebp
je 0x140001bf1
lea rcx, [rbx + 0x4c]
mov r9d, ebp
mov r8, r15
mov rdx, r15
add r13, rbp
call section..text
mov edx, dword [rsp + 0x50]
mov r9d, 1
mov rcx, qword [rbx + 8]
neg rdx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140001bf1
mov r14, qword [rbx + 8]
xor r10d, r10d
mov dword [rsp + 0x54], r10d
mov ebx, r10d
mov edi, ebp
mov esi, r10d
test ebp, ebp
je 0x140001bd7
nop dword [rax]
nop word [rax + rax]
mov edx, esi
lea r9, [rsp + 0x54]
add rdx, r15
mov qword [rsp + 0x20], r10
mov r8d, edi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140001bec
mov eax, dword [rsp + 0x54]
test eax, eax
je 0x140001bec
add esi, eax
add ebx, eax
sub edi, eax
mov r10d, 0
cmp ebx, ebp
jne 0x140001ba0
mov rbx, qword [rsp + 0x48]
mov ecx, 0x500000
cmp r13, r12
jl 0x140001b10
jmp 0x140001bf1
mov rbx, qword [rsp + 0x48]
mov edi, dword [rsp + 0x40]
mov rax, qword [rsp + 0x38]
inc edi
mov ecx, 0x500000
mov dword [rsp + 0x40], edi
mov r10d, 0
cmp edi, dword [rsp + 0x30]
jl 0x140001ad7
mov r14, qword [rsp + 0x60]
mov eax, 1
mov r13, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
mov rbp, qword [rsp + 0xb0]
jmp 0x140001c3a
xor eax, eax
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140006290
add rsp, 0x80
pop r15
pop r12
pop rbx
ret