Function at 0x140182ea0
Capabilities:
Write file on windows

Disassembly:
mov byte [rsp + 0x18], r8b
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
mov eax, 0x1700
call fcn.1401d4c90
sub rsp, rax
mov rax, qword [0x1402a15c0]
xor rax, rsp
mov qword [rsp + 0x16f8], rax
mov rax, qword [rsp + 0x1710]
cmp qword [rax + 8], 0
jne 0x140182ee5
xor al, al
jmp 0x140183226
cmp qword [rsp + 0x1718], 0
jne 0x140182f04
mov rax, qword [rsp + 0x1710]
add rax, 0x10
mov qword [rsp + 0x1718], rax
xor eax, eax
mov word [rsp + 0x850], ax
lea rdi, [rsp + 0x852]
xor eax, eax
mov ecx, 0x206
rep stosb byte [rdi], al
xor r9d, r9d
lea r8, [rsp + 0x850]
mov edx, 0x104
mov rcx, qword [rsp + 0x1718]
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea rcx, [rsp + 0x850]
call fcn.140182b40
movzx eax, al
test eax, eax
jne 0x140182f58
xor al, al
jmp 0x140183226
lea rdx, [rsp + 0xc80]
mov rcx, qword [rsp + 0x1710]
call fcn.140182c90
xor edx, edx
mov word [rsp + 0xa70], dx
lea rdi, [rsp + 0xa72]
xor eax, eax
mov ecx, 0x206
rep stosb byte [rdi], al
mov r8d, 0x104
lea rdx, [rsp + 0xa70]
lea rcx, [rsp + 0xc80]
call fcn.140012540
movzx eax, byte [rsp + 0xeb0]
test eax, eax
je 0x14018301d
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xa70]
mov r8, qword [rsp + 0x1718]
xor edx, edx
lea rcx, [rsp + 0x10e0]
call fcn.1400ab9fc
lea rcx, [rsp + 0x10e0]
call fcn.1400a8204
movzx eax, word [rsp + rax*2 + 0x10de]
cmp eax, 0x5c
jne 0x14018300b
lea rcx, [rsp + 0x10e0]
call fcn.1400a8204
mov rdx, rax
xor eax, eax
mov word [rsp + rdx*2 + 0x10de], ax
lea rcx, [rsp + 0x10e0]
call fcn.140182b40
jmp 0x140183226
movzx eax, byte [rsp + 0x1720]
test eax, eax
je 0x140183077
lea rax, [rsp + 0x14f0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x12f0]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xa70]
call fcn.1400ab96c
lea rdx, [rsp + 0x14f0]
mov qword [rsp + 0x20], rdx
lea r9, [rsp + 0x12f0]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xa70]
call fcn.1400ab9fc
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xa70]
lea r8, [rsp + 0x850]
xor edx, edx
lea rcx, [rsp + 0xed0]
call fcn.1400ab9fc
lea rcx, [rsp + 0xed0]
call fcn.140182c20
movzx eax, al
test eax, eax
jne 0x1401830ba
xor al, al
jmp 0x140183226
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0xed0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0xec0], rax
cmp qword [rsp + 0xec0], 0xffffffffffffffff
jne 0x140183106
xor al, al
jmp 0x140183226
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.140062550
test eax, eax
je 0x140183122
xor al, al
jmp 0x140183226
mov dword [rsp + 0xa60], 0
mov r8d, 0x800
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.140062580
mov dword [rsp + 0xa60], eax
cmp dword [rsp + 0xa60], 0
jle 0x1401831b2
mov dword [rsp + 0x16f0], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x16f0]
mov r8d, dword [rsp + 0xa60]
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0xec0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1401831a5
mov eax, dword [rsp + 0xa60]
cmp dword [rsp + 0x16f0], eax
je 0x1401831b2
mov dword [rsp + 0xa60], 0xffffffff
jmp 0x1401831c0
cmp dword [rsp + 0xa60], 0
jg 0x14018312d
mov rcx, qword [rsp + 0xec0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.140062af0
cmp dword [rsp + 0xa60], 0
jne 0x1401831fd
mov edx, dword [rsp + 0xe98]
lea rcx, [rsp + 0xed0]
call fcn.1401826b0
cmp dword [rsp + 0xa60], 0
jne 0x140183214
mov dword [rsp + 0x16f4], 1
jmp 0x14018321f
mov dword [rsp + 0x16f4], 0
mov al, byte [rsp + 0x16f4]
mov rcx, qword [rsp + 0x16f8]
xor rcx, rsp
call fcn.1400a8050
add rsp, 0x1700
pop rdi
ret