Function at 0x1802d4890
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xd0
mov qword [rbp - 0x51], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1806c4cd8]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r15, rcx
xor r13d, r13d
mov qword [rbp - 0x19], r13
lea rdi, [rcx + 8]
mov rbx, rdi
mov qword [rbp - 0x19], rbx
test rdi, rdi
je 0x1802d48f2
mov rcx, qword [rdi]
test rcx, rcx
je 0x1802d48f2
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [r15 + 0x30], 0
jne 0x1802d4c03
lea rdx, [rbp - 0x11]
mov rcx, r15
call fcn.1802d5760
nop
cmp qword [rbp - 1], 0
je 0x1802d4baf
xor eax, eax
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x41], r13
mov qword [rbp - 0x39], r13
xor r8d, r8d
xor edx, edx
call fcn.1802d5b10
mov r12, rax
mov qword [rbp - 0x41], rax
lea rsi, [r15 + 0x10]
lea rcx, [rbp - 0x41]
cmp rcx, rsi
je 0x1802d4961
mov r12, qword [rsi]
mov qword [rbp - 0x41], r12
mov qword [rsi], rax
mov rax, qword [rbp - 0x39]
mov r13, qword [rsi + 8]
mov qword [rbp - 0x39], r13
mov qword [rsi + 8], rax
jmp 0x1802d4965
mov r13, qword [rbp - 0x39]
test r13, r13
je 0x1802d4b93
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 8
cmovae rcx, qword [rbp - 0x11]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
mov qword [rbp - 0x49], 0
cmp byte [r15], 0
jne 0x1802d4a21
cmp r14, 0xffffffffffffffff
jne 0x1802d4a2b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x1802d4b74
lea ecx, [rax + 0x12]
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 8
cmovae rcx, qword [rbp - 0x11]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
mov rax, qword [rbp - 0x49]
inc rax
mov qword [rbp - 0x49], rax
cmp rax, 0xa
jb 0x1802d49b1
cmp r14, 0xffffffffffffffff
je 0x1802d4b74
test r14, r14
je 0x1802d4b74
test rbx, rbx
je 0x1802d4a53
mov rcx, qword [rdi]
test rcx, rcx
je 0x1802d4a47
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r13d, r13d
mov ebx, r13d
mov qword [rbp - 0x19], rbx
jmp 0x1802d4a56
xor r13d, r13d
xor eax, eax
mov qword [rbp - 0x31], rax
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x21], rax
mov qword [rbp - 0x31], r13
mov qword [rbp - 0x29], r13
mov qword [rbp - 0x21], r13
lea rdx, [rbp - 0x31]
lea rcx, [rbp - 0x41]
call fcn.1802e13e0
xor eax, eax
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], rax
mov qword [rbp + 0x1f], rax
mov qword [rbp + 0xf], r13
mov qword [rbp + 0x17], r13
mov qword [rbp + 0x1f], r13
lea r9d, [rax + 2]
xor r8d, r8d
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rdx, qword [rbp - 0x31]
mov rax, qword [rbp - 0x29]
cmp rdx, rax
je 0x1802d4ad6
mov dword [rbp - 0x49], r13d
sub rax, rdx
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x49]
mov r8d, eax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1802d4b1f
mov qword [rbp - 0x49], r13
mov qword [rbp - 0x49], rdi
test rdi, rdi
je 0x1802d4af2
mov rcx, qword [rdi]
test rcx, rcx
je 0x1802d4af2
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rdx, qword [rsi]
mov r9, r12
mov r8, qword [r12]
mov rdx, qword [rdx]
mov rcx, rsi
call fcn.1802d5c00
nop
test rdi, rdi
je 0x1802d4b1f
mov rcx, qword [rdi]
test rcx, rcx
je 0x1802d4b1b
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x49], r13
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x1802d4b96
mov rdx, qword [rbp - 0x21]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1802d4b61
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1802d4b61
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180468ddc
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x31], xmm0
mov qword [rbp - 0x21], r13
jmp 0x1802d4b96
lea rax, [rbp - 0x41]
cmp rsi, rax
je 0x1802d4b93
mov rax, qword [rsi]
mov qword [rsi], r12
mov qword [rbp - 0x41], rax
mov rax, qword [rsi + 8]
mov qword [rsi + 8], r13
mov qword [rbp - 0x39], rax
xor r13d, r13d
lea rcx, [rbp - 0x41]
call fcn.1802d5980
nop
mov edx, 0x88
mov rcx, qword [rbp - 0x41]
call fcn.180468ddc
nop
mov rdx, qword [rbp + 7]
cmp rdx, 8
jb 0x1802d4bf2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x11]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1802d4bed
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1802d4bed
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180468ddc
mov qword [rbp - 1], r13
mov qword [rbp + 7], 7
mov word [rbp - 0x11], r13w
test rbx, rbx
je 0x1802d4c1a
mov rcx, qword [rbx]
test rcx, rcx
je 0x1802d4c16
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x19], r13
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1804688c0
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret