Function at 0x140056dd0
Capabilities:
Set file attributes
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xc0]
sub rsp, 0x1c0
mov rax, qword [0x1400c4a20]
xor rax, rsp
mov qword [rbp + 0xb0], rax
mov r9, r8
mov r14, rdx
mov qword [rsp + 0x58], rdx
mov r15, rcx
cmp byte [rcx + 0x28], 0
jne 0x140056e1c
mov eax, dword [rcx + 0x48]
jmp 0x14005730e
cmp qword [r8 + 0x10], 0
jne 0x140056e32
call fcn.140057c10
mov eax, 3
jmp 0x14005730e
xor r12d, r12d
mov r13d, r12d
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], 7
cmp qword [r8 + 0x18], 8
jb 0x140056e52
mov r9, qword [r8]
mov rdx, qword [r8 + 0x10]
cmp rdx, 7
ja 0x140056e8b
mov rdi, qword [rbp - 0x68]
add rdi, rdx
mov qword [rbp - 0x68], rdi
lea rbx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rbx, qword [rbp - 0x78]
lea r8, [rdx + rdx]
mov rdx, r9
mov rcx, rbx
call fcn.140085820
mov word [rbx + rdi*2], r12w
jmp 0x140056e99
mov qword [rsp + 0x20], rdx
lea rcx, [rbp - 0x78]
call fcn.1400058ac
mov rcx, qword [rbp - 0x68]
mov rdx, qword [rbp - 0x60]
cmp rcx, rdx
jae 0x140056ec4
lea rax, [rcx + 1]
mov qword [rbp - 0x68], rax
lea rax, [rbp - 0x78]
cmp rdx, 8
cmovae rax, qword [rbp - 0x78]
mov dword [rax + rcx*2], 0x5c
jmp 0x140056ed3
mov r9d, 0x5c
lea rcx, [rbp - 0x78]
call fcn.140055180
lea r9, [r14 + 8]
cmp qword [r14 + 0x20], 8
jb 0x140056ee2
mov r9, qword [r14 + 8]
mov rdx, qword [r14 + 0x18]
mov rcx, qword [rbp - 0x68]
mov r8, qword [rbp - 0x60]
mov rax, r8
sub rax, rcx
cmp rdx, rax
ja 0x140056f25
lea rdi, [rcx + rdx]
mov qword [rbp - 0x68], rdi
lea rbx, [rbp - 0x78]
cmp r8, 8
cmovae rbx, qword [rbp - 0x78]
lea rcx, [rbx + rcx*2]
lea r8, [rdx + rdx]
mov rdx, r9
call fcn.140085820
mov word [rbx + rdi*2], r12w
jmp 0x140056f33
mov qword [rsp + 0x20], rdx
lea rcx, [rbp - 0x78]
call fcn.1400058ac
cmp dword [r14 + 4], 1
jne 0x140056f4e
lea rdx, [rbp - 0x78]
mov rcx, r15
call fcn.140056c00
mov r13d, eax
jmp 0x1400572be
mov qword [rbp - 0x80], r12
mov qword [rsp + 0x50], r12
lea rcx, [0x1400b3d60]
call fcn.140065fe4
mov rsi, rax
lea rbx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rbx, qword [rbp - 0x78]
test rax, rax
je 0x1400570e2
mov rdi, qword [rbp - 0x68]
test rdi, rdi
je 0x1400570e2
mov r12d, 0x100
mov r8d, r12d
xor edx, edx
lea rcx, [rbp - 0x50]
call main
lea r10, [0x1400b3d60]
mov rcx, r10
lea rdx, [r10 + rsi*2]
cmp r10, rdx
je 0x140056fcb
movzx eax, word [rcx]
cmp ax, r12w
jae 0x140057001
movzx eax, al
mov byte [rbp + rax - 0x50], 1
add rcx, 2
cmp rcx, rdx
jne 0x140056fb1
lea rax, [rdi - 1]
mov r8, 0xffffffffffffffff
cmp rax, r8
cmovb r8, rax
lea r9, [rbx + r8*2]
movzx eax, word [r9]
cmp ax, r12w
jae 0x140056ff2
cmp byte [rbp + rax - 0x50], 0
jne 0x14005704f
cmp r9, rbx
je 0x1400570df
sub r9, 2
jmp 0x140056fe1
lea rcx, [rdi - 1]
mov r8, 0xffffffffffffffff
mov rax, r8
cmp rcx, r8
cmovb rax, rcx
lea r9, [rbx + rax*2]
nop word [rax + rax]
mov rcx, rsi
mov rax, r10
test rsi, rsi
je 0x14005703f
movzx edx, word [r9]
nop
cmp word [rax], dx
je 0x14005704f
add rax, 2
sub rcx, 1
jne 0x140057030
cmp r9, rbx
je 0x14005704a
sub r9, 2
jmp 0x140057020
mov r9, r8
jmp 0x140057055
sub r9, rbx
sar r9, 1
cmp r9, 0xffffffffffffffff
je 0x1400570df
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x78]
call fcn.140036ef4
mov rdx, rax
mov rcx, r15
call fcn.140056c00
mov r13d, eax
mov rdx, qword [rsp + 0x78]
cmp rdx, 8
jb 0x1400570bd
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400570b8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005733e
call fcn.1400222c0
xor r12d, r12d
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], 7
mov word [rsp + 0x60], r12w
test r13d, r13d
jne 0x1400572a2
jmp 0x1400570e2
xor r12d, r12d
lea rdi, [r15 + 0x1b8]
lea rax, [r15 + 0x1c0]
lea r9, [r15 + 0x1c8]
lea rdx, [r15 + 0x90]
lea rcx, [r15 + 0xd8]
lea r8, [rsp + 0x50]
mov qword [rsp + 0x38], r8
lea r8, [rbp - 0x80]
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
mov r8d, dword [r14]
call fcn.14005c800
test eax, eax
je 0x140057152
lea rdx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rdx, qword [rbp - 0x78]
mov r8d, eax
mov rcx, r15
call fcn.1400586a0
mov r13d, 6
jmp 0x1400572a2
lea rcx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rcx, qword [rbp - 0x78]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x1400571b9
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1400571b9
lea rdx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rdx, qword [rbp - 0x78]
mov rcx, r15
call fcn.140058860
lea r13d, [rbx + 9]
jmp 0x1400572a2
mov r14, qword [rbp - 0x80]
add r14, qword [rdi]
mov r12, qword [rsp + 0x50]
mov rdi, r12
xor eax, eax
mov esi, eax
test r12, r12
je 0x140057242
mov ecx, 0x400000
mov r8d, edi
cmp rdi, rcx
cmova r8d, ecx
mov dword [rbp - 0x80], eax
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x80]
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [rbp - 0x80]
add r14, rdx
sub rdi, rdx
add rsi, rdx
test eax, eax
je 0x140057215
test edx, edx
je 0x14005721f
test rdi, rdi
je 0x14005721f
xor eax, eax
jmp 0x1400571d1
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140057224
cmp rsi, r12
je 0x140057242
lea rdx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rdx, qword [rbp - 0x78]
mov rcx, r15
call fcn.140058a20
mov r13d, 9
jmp 0x1400572a2
cmp rbx, 0xffffffffffffffff
je 0x14005727d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x14005727d
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x14005727d
lea rdx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rdx, qword [rbp - 0x78]
mov rcx, r15
call fcn.140058be0
mov r13d, 0xa
jmp 0x1400572a2
mov rax, qword [rsp + 0x58]
mov edx, dword [rax + 0x30]
test edx, edx
je 0x14005729d
lea rcx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test r13d, r13d
je 0x1400572bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x70
jne 0x1400572bb
mov rcx, r15
call fcn.140058da0
mov r13d, 1
xor r12d, r12d
mov rdx, qword [rbp - 0x60]
cmp rdx, 8
jb 0x1400572fa
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400572f5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140057338
call fcn.1400222c0
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], 7
mov word [rbp - 0x78], r12w
mov eax, r13d
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.140080bf0
mov rbx, qword [rsp + 0x218]
add rsp, 0x1c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.140065e1c
nop
call fcn.140065e1c
int3