Function at 0x18005d04c
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
xor ebx, ebx
mov r15d, r8d
movsxd r12, ecx
mov rsi, rdx
test r8d, r8d
je 0x18005d317
test rdx, rdx
jne 0x18005d09b
call fcn.180052fec
mov dword [rax], ebx
call fcn.18005300c
mov dword [rax], 0x16
call fcn.18004af9c
or eax, 0xffffffff
jmp 0x18005d319
mov rdi, r12
lea rax, [0x1800908b0]
and edi, 0x3f
mov r13, r12
sar r13, 6
shl rdi, 6
mov rcx, qword [rax + r13*8]
movsx r14d, byte [rcx + rdi + 0x39]
lea eax, [r14 - 1]
cmp al, 1
ja 0x18005d0ce
mov eax, r15d
not eax
test al, 1
je 0x18005d07c
test byte [rcx + rdi + 0x38], 0x20
je 0x18005d0e3
xor edx, edx
mov ecx, r12d
lea r8d, [rdx + 2]
call fcn.1800606b0
mov ecx, r12d
mov qword [rbp - 0x20], rbx
call fcn.18005d3e8
test eax, eax
je 0x18005d205
lea rax, [0x1800908b0]
mov rax, qword [rax + r13*8]
cmp byte [rax + rdi + 0x38], bl
jge 0x18005d205
call fcn.1800550f4
mov rcx, qword [rax + 0x90]
cmp qword [rcx + 0x138], rbx
jne 0x18005d136
lea rax, [0x1800908b0]
mov rax, qword [rax + r13*8]
cmp byte [rax + rdi + 0x39], bl
je 0x18005d205
lea rax, [0x1800908b0]
mov rcx, qword [rax + r13*8]
lea rdx, [rbp - 0x10]
mov rcx, qword [rcx + rdi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x18005d205
test r14b, r14b
je 0x18005d1e7
dec r14b
cmp r14b, 1
ja 0x18005d2a1
lea r12, [rsi + r15]
mov qword [rbp - 0x30], rbx
mov r15, rsi
cmp rsi, r12
jae 0x18005d297
mov r14d, dword [rbp - 0x2c]
movzx eax, word [r15]
movzx ecx, ax
mov word [rbp - 0x10], ax
call fcn.1800606b8
movzx ecx, word [rbp - 0x10]
cmp ax, cx
jne 0x18005d1d9
add r14d, 2
mov dword [rbp - 0x2c], r14d
cmp cx, 0xa
jne 0x18005d1ca
mov ecx, 0xd
call fcn.1800606b8
mov ecx, 0xd
cmp ax, cx
jne 0x18005d1d9
inc r14d
mov dword [rbp - 0x2c], r14d
inc ebx
add r15, 2
cmp r15, r12
jae 0x18005d297
jmp 0x18005d186
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x30], eax
jmp 0x18005d297
mov r9d, r15d
lea rcx, [rbp - 0x30]
mov r8, rsi
mov edx, r12d
call fcn.18005c9cc
movsd xmm0, qword [rax]
mov ebx, dword [rax + 8]
jmp 0x18005d29c
lea rax, [0x1800908b0]
mov rcx, qword [rax + r13*8]
cmp byte [rcx + rdi + 0x38], bl
jge 0x18005d264
mov ecx, r14d
test r14b, r14b
je 0x18005d250
sub ecx, 1
je 0x18005d23c
cmp ecx, 1
jne 0x18005d2a1
mov r9d, r15d
lea rcx, [rbp - 0x30]
mov r8, rsi
mov edx, r12d
call fcn.18005ccd4
jmp 0x18005d1f9
mov r9d, r15d
lea rcx, [rbp - 0x30]
mov r8, rsi
mov edx, r12d
call fcn.18005cdf0
jmp 0x18005d1f9
mov r9d, r15d
lea rcx, [rbp - 0x30]
mov r8, rsi
mov edx, r12d
call fcn.18005cbd0
jmp 0x18005d1f9
mov rcx, qword [rcx + rdi + 0x28]
lea r9, [rbp - 0x2c]
xor eax, eax
mov r8d, r15d
and qword [rsp + 0x20], rax
mov rdx, rsi
mov qword [rbp - 0x30], rax
mov dword [rbp - 0x28], eax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x18005d294
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x30], eax
mov ebx, dword [rbp - 0x28]
movsd xmm0, qword [rbp - 0x30]
movsd qword [rbp - 0x20], xmm0
mov rax, qword [rbp - 0x20]
shr rax, 0x20
test eax, eax
jne 0x18005d310
mov eax, dword [rbp - 0x20]
test eax, eax
je 0x18005d2e1
cmp eax, 5
jne 0x18005d2d4
call fcn.18005300c
mov dword [rax], 9
call fcn.180052fec
mov dword [rax], 5
jmp 0x18005d093
mov ecx, dword [rbp - 0x20]
call fcn.180052f9c
jmp 0x18005d093
lea rax, [0x1800908b0]
mov rax, qword [rax + r13*8]
test byte [rax + rdi + 0x38], 0x40
je 0x18005d2f8
cmp byte [rsi], 0x1a
je 0x18005d317
call fcn.18005300c
mov dword [rax], 0x1c
call fcn.180052fec
and dword [rax], 0
jmp 0x18005d093
mov eax, dword [rbp - 0x1c]
sub eax, ebx
jmp 0x18005d319
xor eax, eax
mov rbx, qword [rsp + 0xb8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret