Function at 0x4701d0
Capabilities:
Check if file exists
Get user security identifier

Disassembly:
sub esp, 0x5c
mov eax, dword [0x4b39fc]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
xor eax, eax
push ebp
mov ebp, dword [esp + 0x68]
push esi
mov esi, dword [esp + 0x70]
push edi
xor edi, edi
xor ebx, ebx
test byte [0x4b99c0], 1
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], esi
mov dword [esp + 0x10], edi
mov byte [esp + 0x44], 0
mov dword [esp + 0x45], eax
mov dword [esp + 0x49], eax
mov dword [esp + 0x4d], eax
mov dword [esp + 0x51], eax
mov dword [esp + 0x55], eax
mov dword [esp + 0x59], eax
mov dword [esp + 0x5d], eax
mov dword [esp + 0x61], eax
mov word [esp + 0x65], ax
mov byte [esp + 0x67], al
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ebx
jne 0x470262
or dword [0x4b99c0], 1
push 0x493ff0
push 0x494008
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4b99bc], eax
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x47028c
lea eax, [esp + 0x10]
push eax
push 0x1f6
push esi
push edi
call sub.NETAPI32.dll_NetShareGetInfo
test eax, eax
jne 0x4702a1
mov ecx, dword [esp + 0x10]
push ecx
call sub.NETAPI32.dll_NetApiBufferFree
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.004771de
add esp, 0x5c
ret
push 0x10000000
push 0x494024
push ebp
call fcn.0046fde0
add esp, 0xc
test eax, eax
je 0x47028c
mov ebp, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x18]
push eax
push edi
lea ecx, [esp + 0x24]
push ecx
push edi
push 0x494038
push edi
call ebp
mov eax, dword [esp + 0x18]
cmp eax, edi
jbe 0x47028c
cmp dword [esp + 0x14], edi
jbe 0x47028c
push eax
call fcn.00476c60
mov ebx, eax
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00476c60
mov esi, eax
mov eax, dword [esp + 0x20]
push eax
push 0
push ebx
mov dword [esp + 0x34], esi
call fcn.00477820
mov ecx, dword [esp + 0x28]
lea edx, [ecx + ecx]
push edx
push 0
push esi
call fcn.00477820
add esp, 0x20
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x18]
push ecx
push esi
lea edx, [esp + 0x24]
push edx
push ebx
push 0x49404c
push 0
call ebp
test eax, eax
je 0x4704b4
push 1
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x4704b4
mov esi, 0x2c
lea edi, [esp + 0x44]
lea ebp, [esi - 0x29]
push edi
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
add edi, 0xc
sub ebp, 1
lea esi, [esi + eax - 4]
jne 0x470370
add esi, 3
and esi, 0xfffffffc
push esi
call fcn.00476c60
push esi
mov edi, eax
push ebp
push edi
call fcn.00477820
add esp, 0x10
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x4704b0
mov eax, dword [0x4b99bc]
push ebx
test eax, eax
je 0x4703c6
mov ecx, dword [esp + 0x7c]
push ecx
push 3
push 2
push edi
call eax
jmp 0x4703d4
mov edx, dword [esp + 0x7c]
push edx
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x4704b0
push 0
push edi
push 1
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x4704b0
push 0x28
call fcn.004776e1
mov dword [esp + 0x14], eax
xor ecx, ecx
mov dword [eax], ecx
mov edx, dword [esp + 0x14]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x14]
mov dword [eax + 8], ecx
mov edx, dword [esp + 0x14]
mov dword [edx + 0xc], ecx
mov eax, dword [esp + 0x14]
mov dword [eax + 0x10], ecx
mov edx, dword [esp + 0x14]
mov dword [edx + 0x14], ecx
mov eax, dword [esp + 0x14]
mov dword [eax + 0x18], ecx
mov edx, dword [esp + 0x14]
mov dword [edx + 0x1c], ecx
mov eax, dword [esp + 0x14]
mov dword [eax + 0x20], ecx
mov edx, dword [esp + 0x14]
mov dword [edx + 0x24], ecx
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x30]
mov dword [eax], edx
mov eax, dword [esp + 0x14]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x84]
mov dword [edx + 8], eax
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x80]
mov dword [edx + 0x10], eax
mov edx, dword [esp + 0x14]
mov dword [edx + 0xc], 0x7f
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
mov dword [eax + 0x18], edx
mov edx, dword [esp + 0x14]
add esp, 4
lea eax, [esp + 0x30]
push ecx
mov dword [edx + 0x24], eax
mov eax, dword [esp + 0x14]
push eax
push 0x1f6
push ecx
call sub.NETAPI32.dll_NetShareAdd
test eax, eax
jne 0x4704b0
mov dword [esp + 0x1c], 1
mov esi, dword [esp + 0x20]
test ebx, ebx
je 0x4704c1
push ebx
call fcn.00478198
add esp, 4
test esi, esi
je 0x4704ce
push esi
call fcn.00478198
add esp, 4
test edi, edi
je 0x4704db
push edi
call fcn.00478198
add esp, 4
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004771de
add esp, 0x5c
ret