Function at 0x180051870
Capabilities:
Create directory
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
lea rbp, [rsp - 0x30]
sub rsp, 0x130
mov rax, qword [0x180179040]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov rbx, rcx
mov rdx, rcx
mov rcx, qword [0x18017b728]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x180051ca6
mov qword [rsp + 0x148], rdi
mov rax, rbx
xor edi, edi
mov ecx, edi
movzx r8d, word [rax]
cmp r8w, 0x5c
jne 0x1800518d4
mov rcx, rax
add rax, 2
jmp 0x1800518c0
add rax, 2
test r8w, r8w
jne 0x1800518c0
test rcx, rcx
je 0x1800518e6
mov word [rcx], di
mov rax, rbx
cmp word [rbx], di
je 0x1800518f9
nop
add rax, 2
cmp word [rax], di
jne 0x1800518f0
lea r8, str..asphyxia_
mov edx, 0x5c
sub r8, rax
nop dword [rax + rax]
mov word [rax], dx
lea rax, [rax + 2]
movzx edx, word [r8 + rax]
test dx, dx
jne 0x180051910
xor edx, edx
mov word [rax], di
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x180051c9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x180051c9c
mov dl, 3
call fcn.1800755f0
movabs rax, 0xaf5543446da2241b
movabs rcx, 0x87f7ac4c6df916ce
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x40], rax
movabs rax, 0x77bb1e3584f5fd9d
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x48], rax
movabs rax, 0xa94a08ba1bd8b29f
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x50], rax
movabs rax, 0x763be0c138803324
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x58], rax
movabs rax, 0xfc6f7880d8896ca1
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x60], rax
movabs rax, 0xe6e09406d650ce34
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x68], rax
movabs rax, 0x51329d6011413ab6
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x70], rax
movabs rax, 0x2d4f21215be304d7
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x78], rax
movabs rax, 0x6a48e4bbee5f718c
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x80], rax
movabs rax, 0x3c94a18b2843d13
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x78], rax
movabs rax, 0x1d87377153412b82
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x70], rax
movabs rax, 0xf18aa55555a72e0c
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x68], rax
movabs rax, 0xccad0e0d9a0b7ff1
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x60], rax
mov qword [rsp + 0x30], rcx
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x58], rax
movabs rax, 0xdb75272101cb457d
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x50], rax
movabs rax, 0x12cf7f50f696ddf2
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x48], rax
movabs rax, 0xdd267ddb7dbdd6bf
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x40], rax
movabs rax, 0x115589aa4aef4404
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x38], rax
movabs rax, 0x931b1be5aae00881
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x30], rax
movabs rax, 0x8783f164f67cb746
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x28], rax
lea rdx, [rsp + 0x40]
movabs rax, 0x7157f30f312449c3
mov r8d, edx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x20], rax
movabs rax, 0xd2a534e36c376b8
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x18], rax
movabs rax, 0xe2d89c98b2b1fe5
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x10], rax
movabs rax, 0x71a02e38d7f05c7a
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 8], rax
movabs rax, 0x6ee25e033c3548e7
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp], rax
movabs rax, 0x94aad1723bc84a2c
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp + 8], rax
movabs rax, 0xccad0e0dee781689
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp + 0x10], rax
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x40]
mov rax, qword [rsp + 0x30]
movdqa xmm0, xmmword [rsp + 0x50]
xorps xmm0, xmmword [rbp - 0x40]
movdqa xmm1, xmmword [rsp + 0x60]
xorps xmm1, xmmword [rbp - 0x30]
movdqa xmm2, xmmword [rsp + 0x40]
xorps xmm2, xmmword [rbp - 0x50]
movdqa xmmword [rsp + 0x50], xmm0
movdqa xmm0, xmmword [rsp + 0x70]
xorps xmm0, xmmword [rbp - 0x20]
movdqa xmmword [rsp + 0x60], xmm1
movdqa xmm1, xmmword [rbp - 0x80]
xorps xmm1, xmmword [rbp - 0x10]
movdqa xmmword [rsp + 0x70], xmm0
movdqa xmm0, xmmword [rbp - 0x70]
xorps xmm0, xmmword [rbp]
movdqa xmmword [rbp - 0x80], xmm1
movdqa xmm1, xmmword [rbp - 0x60]
mov qword [rbp + 0x18], rax
movq rax, xmm2
xorps xmm1, xmmword [rbp + 0x10]
movdqa xmmword [rbp - 0x70], xmm0
movdqa xmmword [rbp - 0x60], xmm1
movdqa xmmword [rsp + 0x40], xmm2
test al, al
je 0x180051c7b
nop dword [rax]
inc rcx
mov r8, rcx
cmp byte [rcx], dil
jne 0x180051c70
mov rcx, qword [0x180179ed8]
sub r8d, edx
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x20], rdi
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor al, al
jmp 0x180051c9e
mov al, 1
mov rdi, qword [rsp + 0x148]
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.1800da510
mov rbx, qword [rsp + 0x150]
add rsp, 0x130
pop rbp
ret