Function at 0x10000d218
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x30
xor r15d, r15d
mov rdi, rcx
mov ecx, 0xfffffff5
mov ebx, r15d
mov rbp, rdx
mov rsi, r15
mov dword [rsp + 0x70], ebx
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x10000d454
cmp rax, r15
je 0x10000d454
cmp rbp, r15
je 0x10000d280
lea r8, [rsp + 0x70]
mov rdx, rdi
mov rcx, rbp
call fcn.10000d100
cmp eax, r15d
mov ebx, eax
jl 0x10000d482
mov ebx, dword [rsp + 0x70]
mov rcx, r14
call fcn.10000e114
cmp eax, r15d
je 0x10000d32c
mov edi, 0x2000
mov r8d, edi
cmp ebx, edi
lea r9, [rsp + 0x70]
mov rdx, rbp
mov rcx, r14
cmovb r8d, ebx
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteConsoleW]
cmp eax, r15d
je 0x10000d2bf
mov ecx, r15d
jmp 0x10000d2e5
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, r15d
je 0x10000d2db
movzx ecx, ax
or ecx, 0x80070000
cmp eax, r15d
cmovle ecx, eax
jmp 0x10000d2e0
mov ecx, 0x80004005
cmp ecx, r15d
jl 0x10000d2fb
mov eax, dword [rsp + 0x70]
cmp eax, ebx
ja 0x10000d2f6
sub ebx, eax
lea rbp, [rbp + rax*2]
jne 0x10000d296
cmp ecx, r15d
je 0x10000d303
mov ebx, r15d
jmp 0x10000d482
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, r15d
je 0x10000d322
movzx ebx, ax
or ebx, 0x80070000
cmp eax, r15d
cmovle ebx, eax
jmp 0x10000d482
mov ebx, 0x80004005
jmp 0x10000d482
lea ecx, [rbx + 1]
mov eax, 2
mul rcx
mov rdi, rax
cmp rdx, r15
jne 0x10000d344
mov ebx, r15d
jmp 0x10000d34d
or rdi, 0xffffffffffffffff
mov ebx, 0x80070216
cmp ebx, r15d
jl 0x10000d482
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
cmp rax, r15
jne 0x10000d37c
mov ebx, 0x8007000e
jmp 0x10000d469
mov rdx, rax
mov rcx, rbp
mov byte [rax], r15b
call qword [sym.imp.USER32.dll_CharToOemW]
cmp eax, r15d
jne 0x10000d3ba
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, r15d
je 0x10000d3ac
movzx ebx, ax
or ebx, 0x80070000
cmp eax, r15d
cmovle ebx, eax
jmp 0x10000d3b1
mov ebx, 0x80004005
cmp ebx, r15d
jl 0x10000d469
cmp rdi, 0x7fffffff
ja 0x10000d3ee
mov rax, rdi
mov rcx, rsi
mov ebx, r15d
cmp rdi, r15
je 0x10000d3e9
cmp byte [rcx], r15b
je 0x10000d3df
inc rcx
sub rax, 1
jne 0x10000d3d1
cmp rax, r15
je 0x10000d3e9
sub rdi, rax
jmp 0x10000d3f8
mov rdi, r15
jmp 0x10000d3f3
mov rdi, qword [rsp + 0x70]
mov ebx, 0x80070057
cmp ebx, r15d
cmovl rdi, r15
cmp ebx, r15d
jl 0x10000d469
mov eax, 0xffffffff
cmp rdi, rax
ja 0x10000d413
mov ebx, r15d
jmp 0x10000d41a
mov edi, eax
mov ebx, 0x80070216
cmp ebx, r15d
jl 0x10000d469
lea r9, [rsp + 0x78]
mov r8d, edi
mov rdx, rsi
mov rcx, r14
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, r15d
je 0x10000d442
mov ebx, r15d
jmp 0x10000d469
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, r15d
jne 0x10000d45a
mov ebx, 0x80004005
jmp 0x10000d469
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
cmp eax, r15d
cmovle ebx, eax
cmp rsi, r15
je 0x10000d482
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret