Function at 0x109f82e
Capabilities:
Check for peb beingdebugged flag

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xb4
mov eax, dword [0x111127c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x20]
push edi
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp + 0x1c]
xor edi, edi
mov dword [ebp - 0xb4], ebx
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], edi
mov dword [ebp - 0xa8], edi
mov byte [ebp - 0x89], 0
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x109f8d4
test byte [eax + 0x1c], 4
je 0x109f8ab
cmp byte [eax + 0x19], 4
jb 0x109f8ab
push 0x100ab40
push 0x1cb
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189d0
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x109f8d4
test byte [eax + 0x1c], 4
je 0x109f8d4
cmp byte [eax + 0x19], 5
jb 0x109f8d4
push ebx
push 0x100ab40
push 0x1cc
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01019680
push 0
push 0x80
push 3
push 0
push 7
push 0xc0000000
push 0x100ad70
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x98], eax
cmp eax, 0xffffffff
jne 0x109f94f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov dword [ebp - 0x90], 0x10
mov ecx, dword [0x111124c]
cmp ecx, 0x111124c
je 0x109fb91
test byte [ecx + 0x1c], 4
je 0x109fb91
cmp byte [ecx + 0x19], 2
jb 0x109fb91
push eax
push 0x100ab40
push 0x1cd
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.010189f6
jmp 0x109fb91
push 0
push 0
lea eax, [ebp - 0xa0]
push eax
push ebx
call dword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
test al, al
jne 0x109f97a
mov dword [esi], 0x7b
mov dword [ebp - 0x90], 2
jmp 0x109fb91
movzx ebx, word [ebp - 0xa0]
add ebx, 0xc
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
jne 0x109f9c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x9c]
mov dword [esi], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push edi
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov dword [ebp - 0x90], 3
jmp 0x109fb91
cmp dword [ebp - 0x94], 0xffffffff
je 0x109f9f0
push dword [ebp - 0x94]
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x109f9e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
jmp 0x109fac0
mov byte [ebp - 0x89], 1
push ebx
push 0
push edi
call sub.msvcrt.dll_memset
mov ax, word [ebp - 0xa0]
mov word [edi], ax
mov al, byte [ebp + 0xc]
mov byte [edi + 2], al
mov eax, dword [ebp + 0x10]
mov dword [edi + 4], eax
movzx eax, word [edi]
push eax
push dword [ebp - 0x9c]
lea eax, [edi + 0xa]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
add esp, 0x18
push dword [ebp - 0x9c]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push 0
lea eax, [ebp - 0xa8]
push eax
push 0x84
lea eax, [ebp - 0x88]
push eax
push ebx
push edi
push 0x42c000
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp byte [ebp - 0x89], 0
mov ebx, eax
je 0x109facf
cmp dword [ebp - 0x94], 0xffffffff
jne 0x109fa8f
push 0x100ad44
push 0x26a6
push 0x100abf0
call fcn.0107b4be
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
test eax, eax
jne 0x109facf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
test eax, eax
jle 0x109fab1
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jge 0x109fac0
push 0
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov dword [ebp - 0x90], 0x13
jmp 0x109fb91
test ebx, ebx
jne 0x109faea
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov dword [ebp - 0x90], 0x11
jmp 0x109fb91
push 0x10040ec
lea eax, [ebp - 0xb0]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
movzx esi, word [ebp - 0xb0]
movzx eax, word [ebp - 0x88]
mov ecx, dword [ebp + 0x18]
mov ebx, dword [ebp - 0xa4]
add eax, esi
add ecx, ecx
cmp ecx, eax
jbe 0x109fb5d
push esi
push dword [ebp - 0xac]
push ebx
call sub.msvcrt.dll_memcpy
movzx eax, word [ebp - 0x88]
push eax
lea eax, [ebp - 0x84]
push eax
shr esi, 1
lea eax, [ebx + esi*2]
push eax
call sub.msvcrt.dll_memcpy
movzx ecx, word [ebp - 0x88]
movzx eax, word [ebp - 0xb0]
add eax, ecx
shr eax, 1
add esp, 0x18
xor ecx, ecx
mov word [ebx + eax*2], cx
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x109fb91
test byte [eax + 0x1c], 4
je 0x109fb91
cmp byte [eax + 0x19], 4
jb 0x109fb91
push dword [ebp - 0xb4]
push ebx
push 0x100ab40
push 0x1ce
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01019979
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x111124c]
pop edi
pop esi
pop ebx
cmp eax, 0x111124c
je 0x109fbd4
test byte [eax + 0x1c], 4
je 0x109fbd4
cmp byte [eax + 0x19], 4
jb 0x109fbd4
push 0x100ab40
push 0x1cf
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189d0
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x90]
xor ecx, ebp
call fcn.0106f5f8
leave
ret 0x1c