Function at 0x4c0450
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push dword [esi + 0xfc]
call fcn.004c2ad0
add esp, 4
test eax, eax
je 0x4c0652
push eax
call fcn.004f0b20
push dword [esi + 0x100]
mov edi, eax
mov dword [ebp - 4], edi
call fcn.004f0b20
add esp, 8
mov dword [ebp + 8], eax
test edi, edi
je 0x4c0628
test eax, eax
je 0x4c0628
cmp dword [0x5a2ec0], 0
mov ebx, eax
jne 0x4c04cc
push str.CreateHardLinkW
mov dword [0x5a2ec0], 1
call fcn.004c0e80
mov ecx, eax
add esp, 4
mov dword [0x5a2ebc], ecx
mov eax, ebx
jmp 0x4c04d2
mov ecx, dword [0x5a2ebc]
test ecx, ecx
jne 0x4c04e6
call fcn.0050f6ae
mov dword [eax], 0x81
jmp 0x4c059e
push 0
push edi
push eax
call ecx
movzx eax, al
test eax, eax
jne 0x4c05bc
push 4
push 0x54f51c
push ebx
call fcn.00517ddf
add esp, 0xc
test eax, eax
jne 0x4c0542
movzx eax, word [ebx + 8]
add ebx, 8
cmp eax, 0x55
je 0x4c051c
cmp eax, 0x75
jne 0x4c0542
movzx eax, word [ebx + 2]
cmp eax, 0x4e
je 0x4c052a
cmp eax, 0x6e
jne 0x4c0542
movzx eax, word [ebx + 4]
cmp eax, 0x43
je 0x4c0538
cmp eax, 0x63
jne 0x4c0542
cmp word [ebx + 6], 0x5c
jne 0x4c0542
add ebx, 8
push 4
push 0x54f51c
push edi
call fcn.00517ddf
add esp, 0xc
test eax, eax
jne 0x4c058d
movzx eax, word [edi + 8]
add edi, 8
cmp eax, 0x55
je 0x4c0567
cmp eax, 0x75
jne 0x4c058d
movzx eax, word [edi + 2]
cmp eax, 0x4e
je 0x4c0575
cmp eax, 0x6e
jne 0x4c058d
movzx eax, word [edi + 4]
cmp eax, 0x43
je 0x4c0583
cmp eax, 0x63
jne 0x4c058d
cmp word [edi + 6], 0x5c
jne 0x4c058d
add edi, 8
push 0
push edi
push ebx
call dword [0x5a2ebc]
movzx eax, al
test eax, eax
jne 0x4c05bc
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
push eax
call fcn.004f0500
add esp, 4
call fcn.0050f6ae
mov edi, dword [eax]
test edi, edi
jne 0x4c0636
jmp 0x4c05c4
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
cmp dword [esi + 0x13c], 0
jg 0x4c05ee
jl 0x4c05d8
cmp dword [esi + 0x138], 0
ja 0x4c05ee
mov dword [esi + 0x110], 0
mov dword [esi + 0x114], 0
jmp 0x4c0636
push 0
push 0x80
push 5
push 0
push 0
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x11c], eax
cmp eax, 0xffffffff
jne 0x4c0636
call ebx
push eax
call fcn.004f0500
add esp, 4
call fcn.0050f6ae
mov edi, dword [eax]
jmp 0x4c0636
call fcn.0050f6ae
or edi, 0xffffffff
mov dword [eax], 0x16
push dword [ebp - 4]
call fcn.0050bae2
push dword [ebp + 8]
call fcn.0050bae2
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [esi + 0xfc]
call fcn.004c3210
mov edi, eax
add esp, 4
test edi, edi
je 0x4c0804
call fcn.0050f6ae
mov dword [eax], 0
push dword [esi + 0xfc]
call fcn.004c3200
mov ecx, dword [esi + 0x100]
add esp, 4
cmp dword [0x5a2ec8], 0
mov dword [ebp - 4], eax
mov dword [ebp - 8], ecx
mov dword [ebp + 8], 0
jne 0x4c06bd
push str.CreateSymbolicLinkW
mov dword [0x5a2ec8], 1
call fcn.004c0e80
add esp, 4
mov dword [0x5a2ec4], eax
jmp 0x4c06c2
mov eax, dword [0x5a2ec4]
test eax, eax
je 0x4c07dd
mov esi, edi
lea ecx, [esi + 2]
nop
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4c06d0
sub esi, ecx
sar esi, 1
jne 0x4c06f1
call fcn.0050f6ae
mov dword [eax], 0x16
jmp 0x4c07dd
lea eax, [esi*2 + 2]
push eax
call fcn.0050bafd
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4c07dd
movzx eax, word [edi]
mov ecx, ebx
test ax, ax
je 0x4c073d
mov edx, eax
sub edi, ebx
nop dword [eax]
mov eax, 0x5c
cmp dx, 0x2f
je 0x4c072e
movzx eax, dx
mov word [ecx], ax
add ecx, 2
movzx edx, word [edi + ecx]
test dx, dx
jne 0x4c0720
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 4]
cmp eax, 1
je 0x4c0786
cmp eax, 2
je 0x4c077c
movzx eax, word [ecx - 2]
cmp eax, 0x5c
je 0x4c077c
cmp eax, 0x2e
jne 0x4c0786
cmp esi, 1
je 0x4c077c
movzx eax, word [ecx - 4]
cmp eax, 0x5c
je 0x4c077c
cmp eax, 0x2e
jne 0x4c0786
cmp esi, 2
je 0x4c077c
cmp word [ecx - 6], 0x5c
jne 0x4c0786
mov esi, 1
mov dword [ebp + 8], esi
jmp 0x4c0788
xor esi, esi
mov edi, dword [ebp - 8]
or esi, 2
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4c07ae
push edi
test al, 0x10
je 0x4c07a6
call fcn.004c0a90
jmp 0x4c07ab
call fcn.004c0ae0
add esp, 4
push esi
push ebx
push edi
call dword [0x5a2ec4]
movzx esi, al
test al, al
jne 0x4c07cc
push dword [ebp + 8]
push ebx
push edi
call dword [0x5a2ec4]
movzx esi, al
push ebx
call fcn.0050bae2
add esp, 4
test esi, esi
jne 0x4c0a0f
call fcn.0050f6ae
cmp dword [eax], 0
jne 0x4c07f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004f0500
add esp, 4
call fcn.0050f6ae
pop edi
pop esi
pop ebx
mov eax, dword [eax]
mov esp, ebp
pop ebp
ret
movzx ecx, word [esi + 0x144]
mov ax, word [esi + 0x68]
mov edx, ecx
and edx, 0xfff
not ax
and ax, dx
mov dword [ebp - 4], edx
mov edx, 0x1ff
and ecx, 0xf000
and ax, dx
movzx ebx, ax
cmp ecx, 0x4000
ja 0x4c0907
je 0x4c0856
cmp ecx, 0x1000
je 0x4c0a18
cmp ecx, 0x2000
jmp 0x4c090d
mov edi, dword [esi + 0x100]
and ebx, 0x3d
push 0
push edi
or ebx, 0x1c0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4c08ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7b
jne 0x4c089f
mov eax, dword [esi + 0x100]
cmp edi, eax
jne 0x4c089f
push eax
call fcn.004f0b20
add esp, 4
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4c08ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004f0500
add esp, 4
mov dword [ebp + 8], 0xffffffff
jmp 0x4c09e4
mov ecx, dword [esi + 0x110]
mov edx, ecx
and edx, 4
mov dword [ebp + 8], 0
or edx, dword [esi + 0x114]
mov dword [esi + 0x114], edx
cmp bx, word [ebp - 4]
jne 0x4c08e7
test byte [esi + 0x118], 2
je 0x4c08f6
mov eax, ecx
and eax, 0x34000000
or eax, edx
mov dword [esi + 0x114], eax
and ecx, 0xcbfffffb
mov dword [esi + 0x110], ecx
jmp 0x4c09e4
cmp ecx, 0x6000
je 0x4c0a18
mov edi, dword [esi + 0x100]
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x11c], eax
cmp eax, 0xffffffff
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x4c0982
call eax
cmp eax, 0x7b
jne 0x4c097d
mov eax, dword [esi + 0x100]
cmp edi, eax
jne 0x4c097d
push eax
call fcn.004f0b20
add esp, 4
mov edi, eax
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x11c], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi + 0x11c], 0xffffffff
jne 0x4c09dd
call eax
cmp eax, 5
jne 0x4c09c4
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x4c09c4
call fcn.0050f6ae
test byte [ebp + 8], 0x10
mov ecx, 0
mov dword [ebp + 8], 1
setne cl
lea ecx, [ecx*8 + 0xd]
mov dword [eax], ecx
jmp 0x4c09e4
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push eax
call fcn.004f0500
add esp, 4
mov dword [ebp + 8], 1
jmp 0x4c09e4
mov dword [ebp + 8], 0
cmp edi, dword [esi + 0x100]
je 0x4c09f5
push edi
call fcn.0050bae2
add esp, 4
cmp dword [ebp + 8], 0
jne 0x4c07f6
cmp bx, word [ebp - 4]
jne 0x4c0a0f
and dword [esi + 0x110], 0xcbffffff
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x16
pop ebx
mov esp, ebp
pop ebp
ret