Function at 0x10009987
Capabilities:
Check if file exists
Connect network resource
Create process on windows
Delete file
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x11abc
call fcn.1000a4f0
push ebx
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x24], ebx
cmp dword [ebp + 8], ebx
je 0x10009d97
push dword [ebp + 8]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
xor eax, eax
mov word [esp + 0xa4], ax
lea eax, [esp + 0xa4]
push 0x100145b4
push eax
call esi
add esp, 0xc
push 7
xor eax, eax
pop ecx
mov dword [esp + 0x80], ebx
lea edi, [esp + 0x84]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xa0]
mov dword [esp + 0x94], eax
lea eax, [esp + 0x2a8]
push eax
mov dword [esp + 0x88], 1
call fcn.10008b70
lea eax, [esp + 0x2a8]
push eax
push dword [ebp + 8]
mov edi, str._ws_admin__ws
lea eax, [esp + 0x12d0]
push edi
push eax
call esi
add esp, 0x10
xor eax, eax
push eax
push dword [ebp + 0xc]
mov word [esp + 0xad0], ax
push dword [ebp + 0x10]
lea eax, [esp + 0x8c]
push eax
mov dword [esp + 0x1c], ebx
call dword [sym.imp.MPR.dll_WNetAddConnection2W]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x2a8]
push eax
push dword [ebp + 8]
lea eax, [esp + 0xad0]
push edi
push eax
call esi
add esp, 0x10
lea eax, [esp + 0xac8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
test eax, eax
je 0x10009aa2
xor ecx, ecx
mov word [eax], cx
lea eax, [esp + 0xac8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10009b17
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
mov ebx, dword [0x1001f11c]
push 1
push dword [0x1001f0fc]
lea eax, [esp + 0x12d0]
push eax
call fcn.10008946
xor ebx, ebx
cmp eax, ebx
jne 0x10009b24
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
cmp eax, 0x50
je 0x10009d7c
cmp eax, 0x35
je 0x10009d7c
cmp eax, 0x43
je 0x10009d7c
cmp dword [esp + 0x24], 0x4c3
jne 0x10009d7c
cmp dword [esp + 0xc], ebx
jne 0x10009d9f
inc ebx
push ebx
push 0
lea eax, [esp + 0xa8]
push eax
call dword [sym.imp.MPR.dll_WNetCancelConnection2W]
jmp 0x10009a2f
mov dword [esp + 0x10], 1
jmp 0x10009d7c
cmp dword [ebp + 0xc], ebx
je 0x10009b43
cmp dword [ebp + 0x10], ebx
je 0x10009b43
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.10006ce7
mov dword [0x10016010], 1
lea eax, [esp + 0x1c]
push eax
push 1
push 2
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
je 0x10009b7e
lea eax, [esp + 0x18]
push eax
push 1
push 2
push ebx
push 0x2000000
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov dword [esp + 0xc], ebx
cmp dword [esp + 0x10], ebx
jne 0x10009d58
xor eax, eax
mov word [esp + 0x1ac8], ax
mov word [esp + 0x4b0], ax
mov dword [esp + 0x28], ebx
lea edi, [esp + 0x2c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x40
stosd dword es:[edi], eax
lea eax, [esp + 0x40]
push ebx
push eax
call sub.msvcrt.dll_memset
xor edi, edi
inc edi
xor eax, eax
add esp, 0xc
mov dword [esp + 0x38], 0x44
mov dword [esp + 0x64], edi
mov word [esp + 0x68], ax
cmp dword [esp + 0xc], ebx
jne 0x10009bed
push dword [ebp + 8]
lea ecx, [esp + 0x4b4]
lea ebx, [esp + 0x1acc]
call fcn.100097a5
xor ebx, ebx
cmp dword [esp + 0xc], edi
jne 0x10009c26
cmp dword [ebp + 0xc], ebx
je 0x10009d4a
cmp dword [ebp + 0x10], ebx
je 0x10009d4a
push dword [ebp + 0x10]
lea ecx, [esp + 0x4b4]
push dword [ebp + 0xc]
lea esi, [esp + 0x1ad0]
push dword [ebp + 8]
call fcn.100098ab
xor edi, edi
inc edi
xor ebx, ebx
cmp word [esp + 0x1ac8], bx
je 0x10009d2b
cmp word [esp + 0x4b0], bx
je 0x10009d2b
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x3c]
push eax
push ebx
push ebx
push 0x8000000
push ebx
push ebx
lea eax, [esp + 0x1ae4]
push ebx
push eax
lea eax, [esp + 0x4d4]
push eax
cmp dword [esp + 0x40], ebx
je 0x10009c78
push dword [esp + 0x40]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
jmp 0x10009c7e
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
cmp eax, ebx
je 0x10009d2b
push 0xffffffffffffffff
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x2c]
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x78], ebx
je 0x10009cb7
push dword [esp + 0x78]
call esi
cmp dword [esp + 0x70], ebx
je 0x10009cc3
push dword [esp + 0x70]
call esi
cmp dword [esp + 0x74], ebx
je 0x10009ccf
push dword [esp + 0x74]
call esi
cmp dword [esp + 0x2c], ebx
je 0x10009cdb
push dword [esp + 0x2c]
call esi
cmp dword [esp + 0x28], ebx
je 0x10009ce7
push dword [esp + 0x28]
call esi
cmp dword [esp + 0xc], ebx
jne 0x10009d00
cmp dword [esp + 0x20], ebx
je 0x10009d17
test byte [esp + 0x20], 3
jne 0x10009d17
mov dword [esp + 0x10], edi
jmp 0x10009d35
cmp dword [esp + 0xc], edi
jne 0x10009d17
xor eax, eax
cmp dword [esp + 0x20], ebx
sete al
mov dword [esp + 0x10], eax
cmp eax, ebx
jne 0x10009d35
lea eax, [esp + 0xac8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov dword [esp + 0x10], eax
jmp 0x10009d35
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
inc dword [esp + 0xc]
cmp dword [esp + 0xc], 2
jl 0x10009b82
cmp dword [esp + 0x10], ebx
jne 0x10009d58
lea eax, [esp + 0x12c8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x18], ebx
je 0x10009d6c
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x1c], ebx
je 0x10009d7c
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x24], 0
jne 0x10009d9f
push 1
push 0
lea eax, [esp + 0xa8]
push eax
call dword [sym.imp.MPR.dll_WNetCancelConnection2W]
jmp 0x10009d9f
mov dword [esp + 0x14], 0x57
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x10009dac
mov ecx, dword [esp + 0x24]
mov dword [eax], ecx
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10