Function at 0x180023ba0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [0x180208090]
xor rax, rsp
mov qword [rbp - 0x10], rax
xor r15d, r15d
mov rdi, rdx
mov dword [rdx], r15d
mov rbx, rcx
mov qword [rdx + 8], r15
cmp qword [rcx + 8], r15
je 0x180023e97
cmp dword [rdx + 4], r15d
lea r14, [rdx + 4]
je 0x180023e97
mov rcx, rdx
call fcn.180024040
test al, al
je 0x180023e97
mov rcx, qword [rbx + 8]
mov esi, r15d
test rcx, rcx
je 0x180023e97
mov rcx, qword [rcx]
test rcx, rcx
je 0x180023e97
cmp qword [rcx], 0xffffffffffffffff
jne 0x180023c1f
xor al, al
jmp 0x180023c54
mov qword [rbp - 0x18], r15
lea r8, [rbp - 0x14]
mov rcx, qword [rcx]
mov r9d, 1
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp - 0x18], eax
cmp eax, 0xffffffff
jne 0x180023c4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x180023c4e
xor al, al
jmp 0x180023c54
mov rsi, qword [rbp - 0x18]
mov al, 1
test al, al
je 0x180023e97
cmp rsi, 0x20
jb 0x180023e97
mov rdx, rdi
call fcn.180023f80
mov dword [rbp - 0x1c], eax
mov rax, qword [rbx + 8]
mov dword [rbp - 0x20], r15d
test rax, rax
je 0x180023e8c
mov dword [rbp - 0x18], r15d
mov rax, qword [rax]
test rax, rax
je 0x180023e8c
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x180023e8c
lea r9, [rbp - 0x18]
mov qword [rsp + 0x20], r15
mov r8d, 4
lea rdx, [rbp - 0x1c]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180023e8c
cmp dword [rbp - 0x18], 4
jne 0x180023e8c
add dword [rbp - 0x20], 4
mov rax, qword [rbx + 8]
test rax, rax
je 0x180023e8c
test r14, r14
je 0x180023e8c
mov dword [rbp - 0x18], r15d
mov rax, qword [rax]
test rax, rax
je 0x180023e8c
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x180023e8c
lea r9, [rbp - 0x18]
mov qword [rsp + 0x20], r15
mov r8d, 4
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180023e8c
cmp dword [rbp - 0x18], 4
jne 0x180023e8c
add dword [rbp - 0x20], 4
mov dword [rbp - 0x18], r15d
cmp qword [rbx + 8], r15
je 0x180023e8c
lea rdx, [rdi + 0x10]
mov rcx, rbx
lea r8, [rbp - 0x18]
call fcn.180024380
test al, al
je 0x180023e8c
mov eax, dword [rbp - 0x18]
add dword [rbp - 0x20], eax
mov dword [rbp - 0x18], r15d
cmp qword [rbx + 8], r15
je 0x180023e8c
lea rdx, [rdi + 0x30]
mov rcx, rbx
lea r8, [rbp - 0x18]
call fcn.180024560
test al, al
je 0x180023e8c
mov eax, dword [rbp - 0x18]
add dword [rbp - 0x20], eax
mov dword [rbp - 0x18], r15d
cmp qword [rbx + 8], r15
je 0x180023e8c
lea rdx, [rdi + 0x48]
mov rcx, rbx
lea r8, [rbp - 0x18]
call fcn.180024560
test al, al
je 0x180023e8c
mov eax, dword [rbp - 0x18]
lea rdx, [rdi + 0x60]
add dword [rbp - 0x20], eax
mov r8d, 0x14
mov rcx, rbx
call fcn.180024170
test al, al
je 0x180023e8c
mov eax, dword [rbp - 0x20]
add eax, 0x14
mov dword [rbp - 0x20], eax
cmp eax, dword [rbp - 0x1c]
je 0x180023e82
mov rcx, qword [rbx + 8]
mov r14, r15
test rcx, rcx
je 0x180023e28
mov rcx, qword [rcx]
test rcx, rcx
je 0x180023e28
cmp qword [rcx], 0xffffffffffffffff
je 0x180023e28
mov qword [rbp - 0x18], r15
lea r8, [rbp - 0x14]
mov rcx, qword [rcx]
mov r9d, 1
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp - 0x18], eax
cmp eax, 0xffffffff
jne 0x180023e24
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x180023e28
mov r14, qword [rbp - 0x18]
mov rdx, rsi
mov rcx, rbx
call fcn.180023890
mov rax, qword [rbx + 8]
test rax, rax
je 0x180023e8c
mov dword [rbp - 0x18], r15d
mov rax, qword [rax]
test rax, rax
je 0x180023e8c
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x180023e8c
lea r9, [rbp - 0x18]
mov qword [rsp + 0x20], r15
mov r8d, 4
lea rdx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180023e8c
cmp dword [rbp - 0x18], 4
jne 0x180023e8c
mov rdx, r14
mov rcx, rbx
call fcn.180023890
mov eax, dword [rbp - 0x20]
mov dword [rdi], eax
mov al, 1
mov qword [rdi + 8], rsi
jmp 0x180023e99
mov rdx, rsi
mov rcx, rbx
call fcn.180023890
xor al, al
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.1800d8050
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret