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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1824c
call fcn.00427b00
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x18248], eax
push ebx
push esi
push edi
mov edi, edx
mov dword [esp + 0xc], ecx
push edi
mov dword [esp + 0x18], edi
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x407acb
and eax, 0x10
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmovne eax, dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x802c]
push eax
push str.SeCreateSymbolicLinkPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x40781b
lea eax, [esp + 0x1c]
mov dword [esp + 0x8028], 1
push eax
push 0x20
mov dword [esp + 0x803c], 2
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x407acb
push ebx
push ebx
push ebx
lea eax, [esp + 0x8034]
push eax
push ebx
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x407807
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x407807
lea esi, [ebx + 1]
jmp 0x407809
xor esi, esi
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x407acb
movzx eax, word [edi]
cmp eax, 0x5c
je 0x4078d0
push eax
call fcn.00416430
add esp, 4
test eax, eax
je 0x40783f
cmp word [edi + 2], 0x3a
je 0x4078d0
lea eax, [esp + 0x8038]
mov edx, edi
mov esi, eax
cmp word [edi], bx
je 0x4078c3
nop
cmp word [edx], 0x2e
jne 0x4078a7
movzx ecx, word [edx + 2]
mov ebx, ecx
cmp ecx, 0x2e
jne 0x40789d
cmp word [edx + 4], 0x5c
jne 0x40789d
cmp eax, esi
jbe 0x407886
sub eax, 2
cmp eax, esi
jbe 0x407898
cmp word [eax - 2], 0x5c
je 0x407898
add eax, 0xfffffffe
cmp eax, esi
ja 0x407873
add edx, 6
jmp 0x407850
mov ecx, dword [edx]
mov dword [eax], ecx
mov cx, word [edx + 4]
mov word [eax + 4], cx
add eax, 6
add esi, 6
add edx, 6
jmp 0x407850
cmp ebx, 0x5c
jne 0x4078a7
add edx, 4
jmp 0x407850
movzx ecx, word [edx]
test cx, cx
je 0x4078c3
mov word [eax], cx
add edx, 2
add eax, 2
cmp ecx, 0x5c
jne 0x4078a7
cmp word [edx], 0
jne 0x407850
xor ecx, ecx
mov word [eax], cx
lea ebx, [ecx + 1]
jmp 0x407951
cmp word [edi], 0x5c
movq xmm0, qword [0x42ea68]
mov ax, word [0x42ea70]
movq qword [esp + 0x8038], xmm0
mov word [esp + 0x8040], ax
jne 0x407933
cmp word [edi + 2], 0x5c
jne 0x407933
push 0
lea eax, [esp + 0x8048]
push eax
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x407acb
push 4
lea eax, [esp + 0x8044]
push str.UNC_
push eax
call fcn.0040e084
add esp, 0xc
jmp 0x407951
push 0
lea eax, [esp + 0x8044]
push eax
push 0x106
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x407acb
cmp dword [esp + 0x10], 0
push 0
je 0x407982
mov esi, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x407acb
push 0
push 0x2000000
push 3
push 0
push 3
push 0x40000000
push esi
jmp 0x407993
push 0
push 1
push 0
push 3
push 0x40000000
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x407acb
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [esp + 0x8250]
push 0x4000
push dword [esp + 0x18]
push eax
call esi
push 0x4000
lea eax, [esp + 0x803c]
push eax
lea eax, [esp + 0x10258]
push eax
call esi
xor eax, eax
mov dword [esp + 0x20], 0xa000000c
lea ecx, [esp + 0x8250]
mov word [esp + 0x26], ax
mov word [esp + 0x2c], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4079f2
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
mov word [esp + 0x2e], ax
movzx eax, ax
push eax
lea eax, [esp + 0x8254]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0040c980
mov edx, dword [esp + 0x3a]
lea ecx, [esp + 0x1025c]
add esp, 0xc
lea esi, [ecx + 2]
add edx, dword [esp + 0x2c]
mov word [esp + 0x28], dx
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407a40
sub ecx, esi
sar ecx, 1
lea eax, [ecx + ecx]
mov word [esp + 0x2a], ax
lea ecx, [esp + 0x34]
movzx eax, ax
push eax
lea eax, [esp + 0x10254]
push eax
movzx eax, dx
add eax, ecx
push eax
call fcn.0040c980
mov ecx, dword [esp + 0x36]
add esp, 0xc
mov eax, dword [esp + 0x28]
add ecx, 0xc
add eax, ecx
mov dword [esp + 0x30], ebx
lea ecx, [esp + 0x8024]
mov word [esp + 0x24], ax
push 0
push ecx
push 0
movzx eax, ax
push 0
add eax, 8
push eax
mov dword [esp + 0x8038], eax
lea eax, [esp + 0x34]
push eax
push 0x900a4
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push edi
test eax, eax
jne 0x407ae2
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0xc]
call dword [esp + 0x1c]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18248]
xor ecx, esp
call fcn.0040a851
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x18254]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040a851
mov esp, ebp
pop ebp
ret