Function at 0x140003840
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push rbp
sub rsp, 0x240
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x230], rax
xor ebp, ebp
lea rcx, str.Animal_list.txt
cmp dword [0x1401a702c], ebp
mov r8d, ebp
setne r8b
call fcn.1400426b0
mov dword [0x1401777d0], eax
test eax, eax
je 0x140003c26
xor edx, edx
mov ecx, eax
call fcn.140042ab0
mov r8d, dword [0x1401777d0]
lea rcx, [rsp + 0x20]
call fcn.140042e00
mov eax, 0xfffffeff
cmp word [rsp + 0x20], ax
jne 0x140003c32
mov qword [rsp + 0x268], r14
mov edx, ebp
mov qword [rsp + 0x250], rbx
lea r14d, [rbp + 2]
mov qword [rsp + 0x258], rsi
mov qword [rsp + 0x260], rdi
mov dword [0x1401777d4], edx
nop word [rax + rax]
cmp dword [0x14024abf8], ebp
mov r8d, dword [0x1401777d0]
je 0x140003a5c
test r8d, r8d
js 0x140003a5c
mov eax, r8d
and eax, 0x7c000000
cmp eax, dword [0x14024ac48]
jne 0x140003a5c
mov eax, r8d
and eax, 0x3ffff
cmp eax, dword [0x14024ac50]
jge 0x140003a5c
mov rbx, qword [0x14024ac00]
mov eax, r8d
and eax, 0x3ffff
lea rdi, [rax*8]
mov rbx, qword [rdi + rbx]
test rbx, rbx
je 0x140003a5c
mov ecx, dword [rbx]
mov eax, r8d
shl ecx, 0x12
and eax, 0x3fc0000
cmp ecx, eax
jne 0x140003a5c
mov eax, dword [rbx + 0x18]
test eax, eax
je 0x140003998
cmp eax, 1
jg 0x140003977
mov ecx, dword [rbx + 0x20]
test ecx, ecx
js 0x140003977
call fcn.1400713b0
jmp 0x14000397f
mov ecx, r8d
call fcn.140073420
test eax, eax
js 0x140003a56
mov rax, qword [0x14024ac00]
cmp qword [rdi + rax], rbp
je 0x140003a56
mov rcx, qword [rbx + 0xb8]
call qword [rbx + 0x88]
mov rcx, qword [rbx + 0xb8]
xor edx, edx
mov rsi, rax
lea r8d, [rdx + 2]
call qword [rbx + 0x90]
mov rcx, qword [rbx + 0xb8]
call qword [rbx + 0x88]
mov rcx, qword [rbx + 0xb8]
xor r8d, r8d
mov rdx, rsi
mov rdi, rax
call qword [rbx + 0x90]
cmp rsi, rdi
je 0x140003a56
mov ecx, dword [0x1401777d0]
mov rdx, r14
call fcn.140042ab0
mov r8d, dword [0x1401777d0]
lea rcx, [rsp + 0x24]
call fcn.140042e00
mov ecx, dword [0x1401777d0]
lea rdx, [r14 + 2]
mov r14, rdx
call fcn.140042ab0
mov r8d, dword [0x1401777d0]
lea rcx, [rsp + 0x28]
call fcn.140042e00
cmp word [rsp + 0x24], 0xd
jne 0x140003a45
cmp word [rsp + 0x28], 0xa
jne 0x140003a45
mov edx, dword [0x1401777d4]
inc edx
mov dword [0x1401777d4], edx
jmp 0x140003a4b
mov edx, dword [0x1401777d4]
cmp edx, 0x10
jl 0x1400038e0
jmp 0x140003a5c
mov edx, dword [0x1401777d4]
mov r14, qword [rsp + 0x268]
test edx, edx
je 0x140003c42
mov eax, edx
and eax, 0x80000001
jge 0x140003a7c
dec eax
or eax, 0xfffffffe
inc eax
cmp eax, 1
je 0x140003c52
mov eax, edx
cdq
sub eax, edx
sar eax, 1
mov dword [0x1401777d4], eax
cmp eax, 8
jl 0x140003aa1
mov dword [0x1401777d4], 8
mov ecx, dword [0x1401777d0]
xor edx, edx
call fcn.140042ab0
mov ebx, ebp
lea rsi, [0x1401777d0]
cmp dword [0x1401777d4], ebx
jle 0x140003af4
nop
mov ecx, dword [0x1401777d0]
lea r9, [rsi + 0x1008]
movsxd rax, ebx
lea r8, [rsi + 8]
shl rax, 9
lea rdx, str._s__s
add r9, rax
add r8, rax
call fcn.140042f80
inc ebx
cmp ebx, dword [0x1401777d4]
jl 0x140003ac0
mov ecx, dword [0x1401777d0]
mov edx, ebp
cmp dword [0x1401a702c], edx
setne dl
xor r8d, r8d
call fcn.140072cc0
cmp dword [0x1401777d4], ebp
jle 0x140003bc5
nop dword [rax]
lea rdx, [0x14012e6e4]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rdx, [rsp + 0x30]
mov ecx, 0xff
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
movsxd rbx, ebp
lea rdi, [rsi + 0x2008]
shl rbx, 9
lea rdx, str.Animal_
add rdi, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rdx, [rsi + 8]
mov rcx, rdi
add rdx, rbx
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rdx, str._Animal_
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rdx, [rsi + 8]
add rdx, rbx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140003bf6
lea rdx, str._Parts.png
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcatW]
inc ebp
cmp ebp, dword [0x1401777d4]
jl 0x140003b20
mov rsi, qword [rsp + 0x258]
mov rbx, qword [rsp + 0x250]
mov rdi, qword [rsp + 0x260]
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.140107200
add rsp, 0x240
pop rbp
ret
call fcn.14004c180
mov r8, qword [0x14017aba0]
lea rdx, [rsp + 0x30]
mov rcx, rax
mov r9d, pe_nt_image_headers64
call qword [sym.imp.USER32.dll_MessageBoxW]
mov dword [0x140176c74], 4
call fcn.140005690
int3
mov dword [0x140176c74], ebp
call fcn.140005690
int3
mov dword [0x140176c74], 1
call fcn.140005690
int3
mov dword [0x140176c74], 2
call fcn.140005690
int3
mov dword [0x140176c74], 3
call fcn.140005690
int3