Function at 0x140013748
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x190
mov rax, qword [0x140163470]
xor rax, rsp
mov qword [rsp + 0x180], rax
xor r14d, r14d
mov rdi, rcx
mov ebx, 1
cmp byte [rcx + 0x31c], r14b
jne 0x1400137bf
cmp byte [rcx + 0x31b], r14b
je 0x1400137bf
cmp byte [rcx + 0x31a], r14b
je 0x1400137bf
mov rax, qword [rcx + 0x348]
sub rax, qword [rcx + 0x340]
sar rax, 3
test rax, rax
je 0x1400137bf
mov r15b, bl
mov byte [rsp + 0x40], bl
jmp 0x1400137c7
mov r15b, r14b
mov byte [rsp + 0x40], r14b
mov dword [rsp + 0x44], r14d
mov dword [rsp + 0x48], r14d
call fcn.140013d90
test al, al
je 0x140013aff
test r15b, r15b
je 0x140013801
mov rax, qword [rdi + 0x340]
lea rcx, [rdi + 0x32e]
lea rdx, [rsp + 0x70]
mov eax, dword [rax]
mov dword [rsp + 0x48], eax
call fcn.14009144c
mov qword [rsp + 0x30], r14
lea rsi, [rdi + 0x102]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rsi
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
jne 0x14001387b
lea r8d, [rax + 0x37]
lea rcx, [0x14016e4d2]
mov edx, 0x58f7e603
call fcn.1400016a4
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rdi + 0x360]
mov r9, rsi
mov rdx, rbx
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfW]
mov bl, r14b
jmp 0x140013af5
mov r13d, dword [rdi + 0x568]
mov ebp, r14d
mov qword [rsp + 0x50], r14
cmp byte [rdi + 0x318], r14b
jne 0x140013ae9
mov esi, 0x20
cmp r13d, esi
cmovbe esi, r13d
test esi, esi
je 0x140013aec
mov r9, qword [rdi + 0x590]
mov rcx, qword [rdi + 0x588]
mov r8d, esi
mov edx, ebp
call fcn.140056db8
mov r14d, eax
cmp eax, esi
jne 0x140013aa6
test r15b, r15b
je 0x1400139ce
cmp ebp, dword [rsp + 0x48]
jb 0x1400139ce
mov rax, qword [rdi + 0x590]
lea ecx, [rsi + rbp]
mov r14d, ebp
cmp ebp, ecx
jae 0x1400139ce
movsxd r8, dword [rsp + 0x44]
lea r12, [rax + 0x10]
lea r15d, [rsi + rbp]
mov rdx, r8
mov qword [rsp + 0x58], rdx
mov rax, qword [rdi + 0x340]
mov rcx, qword [rdi + 0x348]
sub rcx, rax
sar rcx, 3
cmp rdx, rcx
jae 0x1400139b1
mov r9, qword [rsp + 0x50]
lea rax, [rax + r9*8]
cmp dword [rax], r14d
ja 0x1400139b1
cmp dword [rax + 4], r14d
ja 0x140013960
add r8d, ebx
add r9, rbx
add rax, 8
movsxd rdx, r8d
mov dword [rsp + 0x44], r8d
mov qword [rsp + 0x50], r9
mov qword [rsp + 0x58], rdx
cmp rdx, rcx
jb 0x140013932
jmp 0x1400139b1
movabs rax, 0xb31fa6feddf8a00b
lea r9, [rsp + 0x170]
mov r8d, 0x7f0
mov qword [rsp + 0x170], rax
movabs rax, 0x780f056a569fdfd8
mov rdx, r12
mov qword [rsp + 0x178], rax
lea rax, [rsp + 0x70]
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.140092b04
mov rdx, qword [rsp + 0x58]
mov r8d, dword [rsp + 0x44]
add r14d, ebx
add r12, 0x800
cmp r14d, r15d
jb 0x14001390b
mov r15b, byte [rsp + 0x40]
mov r12, qword [rsp + 0x60]
test ebp, ebp
jne 0x140013a23
cmp byte [rdi + 0x31a], bpl
je 0x140013a23
cmp byte [rdi + 0x31d], bpl
je 0x140013a23
xor ecx, ecx
mov rax, qword [rdi + 0x590]
mov byte [rcx + rax], 0x41
add rcx, rbx
cmp rcx, 2
jl 0x1400139e6
mov rax, qword [rdi + 0x590]
mov byte [rax + 2], 0x43
mov rax, qword [rdi + 0x590]
mov byte [rax + 3], 0x53
mov rax, qword [rdi + 0x590]
movups xmm0, xmmword [rdi + 0x31e]
movdqu xmmword [rax + 0x10], xmm0
mov rdx, qword [rdi + 0x590]
and qword [rsp + 0x20], 0
mov r14d, esi
shl r14d, 0xb
lea r9, [rsp + 0x4c]
mov rcx, r12
mov r8d, r14d
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140013a66
cmp r14d, dword [rsp + 0x4c]
jne 0x140013a66
add dword [rdi + 0x56c], esi
sub r13d, esi
add ebp, esi
xor r14d, r14d
jmp 0x14001388a
lea rcx, [0x14016e54e]
mov edx, 0x1ae8c98e
mov r8d, 0x3a
call fcn.1400016a4
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [rsp + 0x4c]
mov dword [rsp + 0x20], edx
lea rcx, [rdi + 0x360]
mov r9d, r14d
mov rdx, rbx
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x140013ae5
lea rcx, [0x14016e50a]
mov edx, 0x58dad58
mov r8d, 0x42
call fcn.1400016a4
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rdi + 0x360]
mov r8d, ebp
mov rdx, rbx
mov r9d, eax
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], r14d
call qword [sym.imp.USER32.dll_wsprintfW]
xor bl, bl
jmp 0x140013aec
mov bl, r14b
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.140013dec
mov al, bl
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.1400e8bc0
lea r11, [rsp + 0x190]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret