Function at 0x102d45b
Capabilities:
Set environment variable
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1024
call fcn.0103e847
mov eax, dword [0x107342c]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x9c]
xor ebx, ebx
cmp esi, ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0x101c], edi
mov dword [ebp - 0x1014], ebx
mov dword [ebp - 0x1018], ebx
jne 0x102d49e
xor eax, eax
inc eax
jmp 0x102d799
push edi
call fcn.0102d3af
test eax, eax
je 0x102d799
lea eax, [ebp - 0x1024]
push eax
lea eax, [ebp - 0x1014]
push eax
push ebx
push 0x20006
push 1
push ebx
push ebx
push 0x10136a4
push dword [edi + 0x68]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x102d779
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
jmp 0x102d4e4
inc esi
inc esi
cmp word [esi], 0x20
je 0x102d4e2
cmp word [esi], bx
mov dword [ebp - 0x1010], esi
je 0x102d773
cmp word [esi], 0x3d
je 0x102d506
inc esi
inc esi
cmp word [esi], bx
jne 0x102d4f9
cmp word [esi], bx
je 0x102d773
push dword [ebp - 0x1010]
mov word [esi], bx
call edi
inc eax
cmp eax, 0x400
jg 0x102d773
push dword [ebp - 0x1010]
lea eax, [ebp - 0x100c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov word [esi], 0x3d
lea eax, [ebp - 0x100c]
inc esi
push eax
inc esi
call edi
lea eax, [ebp + eax*2 - 0x100e]
jmp 0x102d55a
cmp cx, 0x20
jne 0x102d562
dec eax
dec eax
mov cx, word [eax]
cmp cx, bx
jne 0x102d552
mov word [eax + 2], bx
jmp 0x102d56a
inc esi
inc esi
cmp word [esi], 0x20
je 0x102d568
mov dword [ebp - 0x1010], esi
jmp 0x102d57a
inc esi
inc esi
cmp word [esi], bx
jne 0x102d578
push dword [ebp - 0x1010]
call edi
inc eax
cmp eax, 0x400
jg 0x102d773
push dword [ebp - 0x1010]
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x808]
push eax
call edi
lea eax, [ebp + eax*2 - 0x80a]
jmp 0x102d5c0
cmp cx, 0x20
jne 0x102d5c8
dec eax
dec eax
mov cx, word [eax]
cmp cx, bx
jne 0x102d5b8
mov word [eax + 2], bx
lea eax, [ebp - 0x808]
push eax
mov dword [ebp - 0x1020], ebx
call edi
mov dword [ebp - 0x1010], eax
xor eax, eax
cmp dword [ebp - 0x1010], ebx
jbe 0x102d605
cmp word [ebp + eax*2 - 0x808], 0x25
jne 0x102d5fc
inc dword [ebp - 0x1020]
inc eax
cmp eax, dword [ebp - 0x1010]
jb 0x102d5eb
push 0x1013688
lea eax, [ebp - 0x100c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x102d625
cmp word [ebp - 0x808], 0x5c
je 0x102d657
mov eax, dword [ebp - 0x1010]
cmp dword [ebp - 0x1020], 2
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x808]
push eax
sbb eax, eax
inc eax
inc eax
push eax
push ebx
lea eax, [ebp - 0x100c]
push eax
push dword [ebp - 0x1014]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
inc esi
inc esi
cmp word [esi], bx
jne 0x102d4e4
cmp dword [0x1074a14], ebx
je 0x102d6e3
lea eax, [ebp - 0x808]
push eax
push dword [0x1074a1c]
mov word [ebp - 0x808], bx
push ebx
call sub.WINSTA.dll_WinStationNameFromLogonIdW
test al, al
jne 0x102d6b1
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov ecx, dword [0x7ffe02d8]
cmp ecx, dword [eax + 0x1d4]
jne 0x102d6b1
push 0x1013678
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp word [ebp - 0x808], bx
je 0x102d6e3
lea eax, [ebp - 0x808]
push eax
call edi
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x808]
push eax
push 1
push ebx
push 0x1013660
push dword [ebp - 0x1014]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0x1013648
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
mov dword [ebp - 0x1018], eax
je 0x102d769
push 0x1013634
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x102d75d
lea ecx, [ebp - 0x808]
push ecx
mov ecx, dword [ebp - 0x101c]
push ebx
push dword [ecx + 0x24]
push 0x401a
push ebx
call eax
test eax, eax
jl 0x102d75d
lea eax, [ebp - 0x808]
push eax
call edi
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x808]
push eax
push 1
push ebx
mov esi, 0x1013624
push esi
push dword [ebp - 0x1014]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 0x808]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp - 0x1018]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x1018], 1
mov edi, dword [ebp - 0x101c]
cmp dword [ebp - 0x1014], ebx
je 0x102d78d
push dword [ebp - 0x1014]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call fcn.0102d428
mov eax, dword [ebp - 0x1018]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0103e4d8
leave
ret 4