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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1024
call fcn.0103d5b9
mov eax, dword [0x10723e4]
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 0x102ce1b
xor eax, eax
inc eax
jmp 0x102d116
push edi
call fcn.0102cd2c
test eax, eax
je 0x102d116
lea eax, [ebp - 0x1024]
push eax
lea eax, [ebp - 0x1014]
push eax
push ebx
push 0x20006
push 1
push ebx
push ebx
push 0x10133bc
push dword [edi + 0x68]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x102d0f6
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
jmp 0x102ce61
inc esi
inc esi
cmp word [esi], 0x20
je 0x102ce5f
cmp word [esi], bx
mov dword [ebp - 0x1010], esi
je 0x102d0f0
cmp word [esi], 0x3d
je 0x102ce83
inc esi
inc esi
cmp word [esi], bx
jne 0x102ce76
cmp word [esi], bx
je 0x102d0f0
push dword [ebp - 0x1010]
mov word [esi], bx
call edi
inc eax
cmp eax, 0x400
jg 0x102d0f0
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 0x102ced7
cmp cx, 0x20
jne 0x102cedf
dec eax
dec eax
mov cx, word [eax]
cmp cx, bx
jne 0x102cecf
mov word [eax + 2], bx
jmp 0x102cee7
inc esi
inc esi
cmp word [esi], 0x20
je 0x102cee5
mov dword [ebp - 0x1010], esi
jmp 0x102cef7
inc esi
inc esi
cmp word [esi], bx
jne 0x102cef5
push dword [ebp - 0x1010]
call edi
inc eax
cmp eax, 0x400
jg 0x102d0f0
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 0x102cf3d
cmp cx, 0x20
jne 0x102cf45
dec eax
dec eax
mov cx, word [eax]
cmp cx, bx
jne 0x102cf35
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 0x102cf82
cmp word [ebp + eax*2 - 0x808], 0x25
jne 0x102cf79
inc dword [ebp - 0x1020]
inc eax
cmp eax, dword [ebp - 0x1010]
jb 0x102cf68
push 0x10133a0
lea eax, [ebp - 0x100c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x102cfa2
cmp word [ebp - 0x808], 0x5c
je 0x102cfd4
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 0x102ce61
cmp dword [0x1073934], ebx
je 0x102d060
lea eax, [ebp - 0x808]
push eax
push dword [0x107393c]
mov word [ebp - 0x808], bx
push ebx
call sub.WINSTA.dll_WinStationNameFromLogonIdW
test al, al
jne 0x102d02e
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov ecx, dword [0x7ffe02d8]
cmp ecx, dword [eax + 0x1d4]
jne 0x102d02e
push 0x1013390
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp word [ebp - 0x808], bx
je 0x102d060
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 0x1013378
push dword [ebp - 0x1014]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0x1013360
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
mov dword [ebp - 0x1018], eax
je 0x102d0e6
push 0x101334c
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x102d0da
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 0x102d0da
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, 0x101333c
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 0x102d10a
push dword [ebp - 0x1014]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call fcn.0102cda5
mov eax, dword [ebp - 0x1018]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0103d24a
leave
ret 4