Function at 0x1001cf60
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x638]
sub esp, 0x638
push 0xffffffffffffffff
push 0x100374e8
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x1004f100]
xor eax, ebp
mov dword [ebp + 0x634], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x640]
xor ebx, ebx
mov esi, ecx
push str.RdpInitRdpApplication...
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x34], ebx
call fcn.1001af90
mov ecx, eax
call fcn.1001b3f0
add esp, 4
mov dword [ebp - 4], ebx
xor ecx, ecx
mov eax, esi
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
mov word [ebp + 4], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x1001cfe4
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebp]
call fcn.10001a60
push 0x206
lea eax, [ebp + 0x1e]
mov byte [ebp - 4], 1
xor edx, edx
push ebx
push eax
mov dword [ebp - 0x14], ebx
mov word [ebp + 0x1c], dx
call fcn.100285e0
mov eax, dword [ebp + 4]
add esp, 0xc
cmp dword [ebp + 0x18], 8
jae 0x1001d028
lea eax, [ebp + 4]
push 0x104
lea ecx, [ebp + 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
call fcn.1001af90
lea edx, [ebp + 0x1c]
push edx
push str.RdpInitRdpApplication_item:_s
mov ecx, eax
call fcn.1001b3f0
lea eax, [ebp + 0x1c]
add esp, 8
push eax
lea ecx, [ebp - 0x14]
call fcn.10020100
add esp, 4
cmp eax, ebx
je 0x1001d2d1
cmp dword [ebp - 0x14], ebx
je 0x1001d2d1
push 0x206
lea edx, [ebp + 0x42e]
xor ecx, ecx
push ebx
push edx
mov word [ebp + 0x42c], cx
call fcn.100285e0
push 0x206
lea ecx, [ebp + 0x226]
xor eax, eax
push ebx
push ecx
mov word [ebp + 0x224], ax
call fcn.100285e0
add esp, 0x18
mov edi, 0x7ffffffe
lea edx, [ebp + 0x1c]
mov esi, 0x104
lea eax, [ebp + 0x42c]
lea esp, [esp]
test esi, esi
je 0x1001d0de
test edi, edi
je 0x1001d0e1
movzx ecx, word [edx]
test cx, cx
je 0x1001d0e1
mov word [eax], cx
add eax, 2
add edx, 2
dec esi
dec edi
inc ebx
jmp 0x1001d0c0
sub eax, 2
mov ecx, dword [ebp - 0x28]
xor edx, edx
mov word [eax], dx
mov edi, 0x7ffffffe
mov esi, 0x104
lea eax, [ebp + 0x224]
xor ebx, ebx
jmp 0x1001d100
test esi, esi
je 0x1001d11e
test edi, edi
je 0x1001d121
movzx edx, word [ecx]
test dx, dx
je 0x1001d121
mov word [eax], dx
add eax, 2
add ecx, 2
dec esi
dec edi
inc ebx
jmp 0x1001d100
sub eax, 2
xor ecx, ecx
lea edx, [ebp - 0x1c]
push edx
push ecx
mov word [eax], cx
lea eax, [ebp - 0x24]
push eax
push ecx
push ecx
push 4
push 1
lea ecx, [ebp + 0x42c]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x1001d177
call fcn.1001af90
lea edx, [ebp + 0x42c]
push edx
push esi
push str.wpsInit._GetNamedSecurityInfoW_error:_08x_path:_s
mov ecx, eax
call fcn.1001b4f0
add esp, 0xc
push 0x10049464
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x40], esi
call fcn.10028c35
push 3
push 1
push 0x10000000
lea ecx, [ebp + 0x224]
push ecx
lea edx, [ebp - 0x68]
push edx
call dword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameW]
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x5c]
push ecx
push edx
mov dword [ebp - 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_GetEffectiveRightsFromAclW]
mov esi, eax
call fcn.1001af90
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 0x20]
push esi
push eax
lea ecx, [ebp + 0x42c]
push ecx
lea edx, [ebp + 0x224]
push edx
push str.RdpInitRdpApplication_checked_GetEffectiveRightsFromAclW_User:_s_Path:_s_CheckAccessMask:_08x_Info:_08x_LastInfo:_08x
mov ecx, edi
call fcn.1001b3f0
mov al, byte [ebp - 0x20]
add esp, 0x18
test al, 0x20
je 0x1001d216
test al, 1
je 0x1001d216
call fcn.1001af90
lea ecx, [ebp + 0x42c]
push ecx
lea edx, [ebp + 0x224]
push edx
push str.RdpInitRdpApplication_checked_User:_s_has_Path:_s_access_right
mov ecx, eax
call fcn.1001b3f0
add esp, 0xc
push 0x10049464
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 0x30], ebx
call fcn.10028c35
mov edx, dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
push ecx
push edx
lea eax, [ebp - 0x68]
push eax
push 1
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
mov esi, eax
cmp esi, ebx
je 0x1001d25d
call fcn.1001af90
lea ecx, [ebp + 0x224]
push ecx
push esi
push str.wpsInit._Failed_to_set_ACL_entries_for_trustee_error:_08x_with_user:_s
mov ecx, eax
call fcn.1001b4f0
add esp, 0xc
push 0x10049464
lea edx, [ebp - 0x44]
push edx
mov dword [ebp - 0x44], esi
call fcn.10028c35
mov eax, dword [ebp - 0x18]
push ebx
push eax
push ebx
push ebx
push 4
push 1
lea ecx, [ebp + 0x42c]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov edi, eax
cmp edi, ebx
je 0x1001d2a8
call fcn.1001af90
lea edx, [ebp + 0x224]
push edx
push edi
push str.wpsInit._Failed_to_set_security_information_with_error:_08x_with_user:_s
mov ecx, eax
call fcn.1001b4f0
add esp, 0xc
push 0x10049464
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x2c], edi
call fcn.10028c35
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
push ecx
call esi
mov edx, dword [ebp - 0x1c]
push edx
mov dword [ebp - 0x18], ebx
call esi
lea ecx, [ebp]
mov dword [ebp - 0x1c], ebx
call fcn.100019f0
mov dword [ebp - 4], 0xffffffff
jmp 0x1001d318
push 0x10049464
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 2
call fcn.10028c35
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], 0xffffffff
mov eax, 0x1001d30d
ret
mov eax, dword [ebp - 0x34]
cmp eax, ebx
je 0x1001d322
push eax
call esi
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x1001d32f
push eax
call esi
mov dword [ebp - 0x18], ebx
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x1001d33c
push eax
call esi
mov dword [ebp - 0x1c], ebx
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x28]
push edx
push eax
push edi
push str.RdpInitRdpApplication_Rlt:_08x_User:_s_Path:_s
call fcn.1001af90
mov ecx, eax
call fcn.1001b3f0
add esp, 0x10
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x634]
xor ecx, ebp
call fcn.100269c5
add ebp, 0x638
mov esp, ebp
pop ebp
ret