Function at 0x18000d360
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x200]
sub rsp, 0x300
mov qword [rbp - 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x330], rbx
mov rax, qword [0x180075010]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
mov rsi, rdx
mov rdi, rcx
mov rcx, rdx
call fcn.18000dc80
mov ebx, eax
test eax, eax
js 0x18000d607
lea ecx, [rbx + 1]
cmp word [rsi + rcx*2], 0
je 0x18000d607
lea rax, [rbx + rbx]
mov qword [rsp + 0x38], rax
lea rdx, [rax + rsi]
lea rcx, [rsp + 0x60]
call fcn.18000bb80
nop
mov rdx, rsi
lea rcx, [rsp + 0x28]
call fcn.18000bb80
nop
cmp ebx, dword [rsp + 0x30]
jae 0x18000d3fa
mov dword [rsp + 0x30], ebx
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x38]
xor edx, edx
mov word [rcx + rax], dx
mov eax, dword [rsp + 0x68]
cmp eax, 6
jbe 0x18000d422
mov ecx, eax
mov rax, qword [rsp + 0x60]
add rax, 0xfffffffffffffff4
lea rcx, [rax + rcx*2]
lea rdx, str.:_DATA
call fcn.18000c750
test al, al
jne 0x18000d433
lea rdx, str.:_DATA
lea rcx, [rsp + 0x60]
call fcn.18000bf90
mov rcx, qword [rsp + 0x28]
call fcn.18000e440
mov rdx, qword [rsp + 0x28]
test al, al
je 0x18000d48d
cmp ebx, 2
je 0x18000d457
cmp ebx, 3
jne 0x18000d48d
cmp word [rdx + 4], 0x5c
jne 0x18000d48d
xor esi, esi
mov qword [rdi], rsi
mov qword [rdi + 8], rsi
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], rsi
mov dword [rdi + 0x20], esi
mov word [rdi + 0x24], si
lea rcx, [rdi + 0x28]
mov dword [rcx + 8], esi
mov rax, qword [rcx]
mov word [rax], si
cmp ebx, 2
jne 0x18000d49f
lea rdx, [rsp + 0x28]
call fcn.18000bc50
jmp 0x18000d49f
mov rcx, rdi
call fcn.18000d360
test al, al
je 0x18000d5f2
xor esi, esi
and dword [rdi + 0x20], 0xfffffbef
mov qword [rdi], rsi
or rbx, 0xffffffffffffffff
mov qword [rsp + 0x70], rbx
lea rdx, [rsp + 0x28]
lea rcx, [rsp + 0x78]
call fcn.18000ba00
nop
lea rcx, [rsp + 0x48]
call fcn.18000bc10
nop
mov rcx, qword [rsp + 0x70]
cmp rcx, 0xffffffffffffffff
je 0x18000d50b
mov rax, qword [0x180076358]
test rax, rax
je 0x18000d542
lea rdx, [rbp - 0x70]
call rax
test eax, eax
je 0x18000d58b
mov rax, qword [rbp - 0x70]
mov qword [rsp + 0x58], rax
lea rdx, [rbp - 0x68]
lea rcx, [rsp + 0x48]
call fcn.18000bda0
jmp 0x18000d523
lea r8, [rsp + 0x48]
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x70]
call fcn.18000d980
test al, al
je 0x18000d58b
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x48]
call fcn.18000c690
test al, al
jne 0x18000d54f
mov rcx, qword [rsp + 0x48]
call fcn.18002be68
jmp 0x18000d4c2
mov ecx, 0x78
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x18000d58b
mov eax, dword [rsp + 0x50]
cmp eax, 7
jbe 0x18000d56c
lea ecx, [rax - 6]
cmp ecx, eax
jae 0x18000d56c
mov dword [rsp + 0x50], ecx
mov rax, qword [rsp + 0x48]
mov word [rax + rcx*2], si
lea rcx, [rdi + 0x28]
lea rdx, [rsp + 0x48]
call fcn.18000bf20
mov rax, qword [rsp + 0x58]
mov qword [rdi], rax
mov byte [rdi + 0x24], 1
mov dil, 1
jmp 0x18000d5a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
jne 0x18000d59f
lea ecx, [rax - 0x24]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor dil, dil
mov rcx, qword [rsp + 0x48]
call fcn.18002be68
nop
mov rcx, qword [rsp + 0x78]
call fcn.18002be68
mov rcx, qword [rsp + 0x70]
cmp rcx, 0xffffffffffffffff
je 0x18000d5d8
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, qword [rsp + 0x70]
test eax, eax
cmovne rcx, rbx
mov qword [rsp + 0x70], rcx
mov rcx, qword [rsp + 0x28]
call fcn.18002be68
nop
mov rcx, qword [rsp + 0x60]
call fcn.18002be68
jmp 0x18000d883
mov rcx, qword [rsp + 0x28]
call fcn.18002be68
nop
mov rcx, qword [rsp + 0x60]
call fcn.18002be68
or rbx, 0xffffffffffffffff
mov qword [rsp + 0x38], rbx
mov rcx, rsi
call fcn.18000e530
xor ecx, ecx
mov edx, 4
test al, al
cmovne ecx, edx
mov dword [rsp + 0x40], ecx
lea rax, [rsi + rcx*2]
mov qword [rsp + 0x28], rax
mov rcx, rax
call fcn.18000e470
test al, al
je 0x18000d6a4
mov eax, dword [rsp + 0x40]
add eax, 3
cmp word [rsi + rax*2], 0
jne 0x18000d6a4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x18000d85c
test al, 0x10
je 0x18000d85c
xor esi, esi
mov qword [rdi], rsi
mov qword [rdi + 8], rsi
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], rsi
mov word [rdi + 0x24], si
mov dword [rdi + 0x20], eax
add rdi, 0x28
mov rdx, qword [rsp + 0x28]
mov rcx, rdi
call fcn.18000bda0
cmp dword [rdi + 8], 2
jbe 0x18000d700
mov dword [rdi + 8], 2
mov rax, qword [rdi]
mov word [rax + 4], si
jmp 0x18000d700
movzx eax, word [rsi]
cmp ax, 0x5c
je 0x18000d6b7
cmp ax, 0x2f
jne 0x18000d85c
mov rcx, rsi
cmp word [rsi + 2], 0
jne 0x18000d708
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
cmp eax, 0xffffffff
je 0x18000d85c
test cl, 0x10
je 0x18000d85c
xor edx, edx
mov qword [rdi], rdx
mov qword [rdi + 8], rdx
mov qword [rdi + 0x10], rdx
mov qword [rdi + 0x18], rdx
mov dword [rdi + 0x20], edx
mov word [rdi + 0x24], dx
mov dword [rdi + 0x30], edx
mov rax, qword [rdi + 0x28]
mov word [rax], dx
mov dword [rdi + 0x20], ecx
mov dil, 1
jmp 0x18000d874
call fcn.18000e060
test eax, eax
je 0x18000d85c
mov eax, eax
lea rbx, [rsi + rax*2]
cmp word [rbx], 0
je 0x18000d85c
mov rcx, rbx
call fcn.18000dd00
test eax, eax
jns 0x18000d85c
mov rdx, rsi
lea rcx, [rsp + 0x28]
call fcn.18000bb80
nop
mov edx, dword [rsp + 0x30]
cmp dword [rsp + 0x34], edx
jne 0x18000d75b
lea rcx, [rsp + 0x28]
call fcn.18000c2b0
mov edx, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
mov eax, edx
mov r8d, 0x5c
mov word [rcx + rax*2], r8w
inc edx
xor r8d, r8d
mov word [rcx + rdx*2], r8w
mov dword [rsp + 0x30], edx
cmp dword [rsp + 0x34], edx
jne 0x18000d78f
lea rcx, [rsp + 0x28]
call fcn.18000c2b0
mov edx, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
mov eax, edx
mov r8d, 0x2a
mov word [rcx + rax*2], r8w
inc edx
xor r8d, r8d
mov word [rcx + rdx*2], r8w
mov dword [rsp + 0x30], edx
mov byte [rsp + 0x20], r8b
mov r8, rdi
mov rdx, qword [rsp + 0x28]
lea rcx, [rsp + 0x38]
call fcn.18000d8b0
test al, al
je 0x18000d7ef
lea rcx, [rdi + 0x28]
mov rdx, qword [rcx]
movzx eax, word [rdx]
cmp ax, word [0x18004a158]
jne 0x18000d7ea
movzx eax, word [rdx + 2]
cmp ax, word [0x18004a15a]
je 0x18000d844
mov byte [rsp + 0x20], 1
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, eax
cmp byte [rsp + 0x20], 0
jne 0x18000d81d
cmp ecx, 0xffffffff
je 0x18000d811
test cl, 0x10
jne 0x18000d81d
mov rcx, qword [rsp + 0x28]
call fcn.18002be68
jmp 0x18000d85c
xor eax, eax
mov qword [rdi], rax
mov qword [rdi + 8], rax
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], rax
mov word [rdi + 0x24], ax
mov eax, 0x10
cmp ecx, 0xffffffff
cmovne eax, ecx
mov dword [rdi + 0x20], eax
lea rcx, [rdi + 0x28]
mov rdx, rbx
call fcn.18000bda0
nop
mov rcx, qword [rsp + 0x28]
call fcn.18002be68
mov dil, 1
jmp 0x18000d86f
mov r8, rdi
mov rdx, rsi
lea rcx, [rsp + 0x38]
call fcn.18000d8b0
movzx edi, al
mov rbx, qword [rsp + 0x38]
cmp rbx, 0xffffffffffffffff
je 0x18000d883
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
movzx eax, dil
mov rcx, qword [rbp + 0x1f0]
xor rcx, rsp
call fcn.18002bf10
mov rbx, qword [rsp + 0x330]
add rsp, 0x300
pop rdi
pop rsi
pop rbp
ret