Function at 0x1400579e8
Capabilities:
Check for peb beingdebugged flag

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
xor edi, edi
mov r15, r8
mov ebp, edx
mov rsi, rcx
mov ebx, edi
mov r12d, edi
test rcx, rcx
je 0x140057cd1
cmp word [rcx], di
je 0x140057cd1
lea r8d, [rdi + 4]
lea rdx, [0x1400b0360]
call qword [sym.imp.msvcrt.dll_wcsncmp]
nop dword [rax + rax]
mov rcx, rsi
test eax, eax
je 0x140057c69
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
nop dword [rax + rax]
mov r14d, eax
test eax, eax
je 0x140057ccc
inc r14d
mov r13d, edi
test ebp, ebp
jne 0x140057a71
cmp r14d, 0xf8
jbe 0x140057a7b
mov r13d, 1
add r14d, 4
mov ebx, r14d
add rbx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
je 0x140057ccc
mov qword [rsp + 0xb8], rdi
mov rbp, rdi
test r13d, r13d
je 0x140057bd1
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], di
jne 0x140057ac8
mov edx, 0x5c
lea rcx, [rsi + 2]
cmp dx, word [rsi]
mov edx, 8
cmovne rcx, rsi
mov qword [rsp + 0x40], rcx
lea ecx, [rax - 1]
cmovne ecx, eax
mov dword [rsp + 0xa0], ecx
lea eax, [rcx + 5]
mov rcx, qword gs:[0x60]
lea r8, [rax*2]
mov r13d, eax
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
nop dword [rax + rax]
mov rbp, rax
test rax, rax
jne 0x140057b3c
mov rax, qword gs:[0x30]
mov dword [rax + 0x68], 8
jmp 0x140057bce
lea rax, [rsp + 0x48]
mov r9d, 4
mov qword [rsp + 0x28], rax
lea r8, [0x1400b0360]
lea rax, [rsp + 0x50]
mov rdx, r13
mov rcx, rbp
mov qword [rsp + 0x20], rax
call fcn.14002ef38
mov r13d, eax
test eax, eax
js 0x140057ba0
mov r9d, dword [rsp + 0xa0]
mov r8, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
call fcn.14000274c
mov r13d, eax
test eax, eax
js 0x140057ba0
mov rax, qword gs:[0x30]
mov dword [rax + 0x68], edi
jmp 0x140057bd1
mov rcx, qword gs:[0x60]
mov r8, rbp
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
nop dword [rax + rax]
mov rax, qword gs:[0x30]
movzx ecx, r13w
mov dword [rax + 0x68], ecx
mov rbp, rdi
test rbp, rbp
lea r9, [rsp + 0xb8]
mov r8, rbx
mov edx, r14d
cmovne rsi, rbp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
nop dword [rax + rax]
test eax, eax
je 0x140057c10
cmp word [rbx], di
je 0x140057c10
test r15, r15
je 0x140057c42
mov rax, qword [rsp + 0xb8]
mov qword [r15], rax
jmp 0x140057c42
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov rbx, rdi
test rbp, rbp
je 0x140057cb8
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
jmp 0x140057cb8
call fcn.14005a378
mov rbx, rax
test rax, rax
je 0x140057ca9
test r15, r15
je 0x140057ccc
cmp word [rax], di
je 0x140057ca4
mov edx, 0x5c
mov rcx, rax
call qword [sym.imp.msvcrt.dll_wcsrchr]
nop dword [rax + rax]
test rax, rax
je 0x140057ca4
add rax, 2
cmp word [rax], di
cmovne rdi, rax
mov qword [r15], rdi
jmp 0x140057ccc
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r12d, eax
test r12d, r12d
je 0x140057ccc
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov rax, rbx
jmp 0x140057ce4
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
xor eax, eax
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret