Function at 0x105d895
Capabilities:
Impersonate user
Persist via run registry key
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x658
mov eax, dword [0x1072c48]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
xor edi, edi
mov dword [ebp - 0x630], ecx
mov dword [ebp - 0x638], eax
mov dword [ebp - 0x634], esi
mov dword [ebp - 0x62c], edi
mov dword [ebp - 0x628], edi
cmp eax, edi
je 0x105dd4d
cmp ecx, edi
je 0x105dd4d
cmp esi, edi
je 0x105dd4d
push ebx
push ecx
push 0x100b880
mov ebx, 0x208
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.01035948
add esp, 0x10
lea eax, [ebp - 0x628]
push eax
push 0x101
push edi
lea eax, [ebp - 0x20c]
push eax
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
inc edi
test eax, eax
jne 0x105d9ab
lea eax, [ebp - 0x624]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x620]
push eax
push 0
push 0x100b860
push dword [ebp - 0x628]
mov dword [ebp - 0x620], edi
mov dword [ebp - 0x624], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x105d992
cmp dword [ebp - 0x620], edi
jne 0x105d992
lea eax, [ebp - 0x20c]
push eax
push 0x100b82c
push dword [ebp + 0x14]
push esi
call fcn.01035948
xor ecx, ecx
add esp, 0x10
test eax, eax
setge cl
mov dword [ebp - 0x62c], ecx
push dword [ebp - 0x628]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x62c], 0
jne 0x105dce0
or dword [ebp - 0x624], 0xffffffff
lea eax, [ebp - 0x624]
push eax
push 0x2e
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x105dce0
push 0x20
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov esi, eax
pop ecx
test esi, esi
je 0x105dcd4
push 2
mov dword [esi], edi
pop edi
lea eax, [esi + 4]
push eax
push 0x100b804
push 0
mov dword [esi + 0x10], edi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
lea eax, [esi + 0x14]
push eax
push 0x100b7e0
push 0
mov dword [esi + 0xc], edi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
xor eax, eax
push eax
push eax
push eax
push esi
push eax
mov dword [esi + 0x1c], edi
push dword [ebp - 0x624]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push dword [ebp - 0x638]
lea eax, [ebp - 0x61c]
push ebx
push eax
call fcn.0103584b
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x658]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x61c]
mov dword [ebp - 0x650], eax
lea eax, [ebp - 0x658]
push eax
push dword [ebp - 0x624]
mov dword [ebp - 0x658], 0x20
call dword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
je 0x105dcb1
push 0x104
lea eax, [ebp - 0x414]
push eax
push 0x100b7c8
push dword [ebp - 0x624]
call dword [sym.imp.USERENV.dll_ExpandEnvironmentStringsForUserW]
test eax, eax
je 0x105db12
mov edi, dword [sym.imp.msvcrt.dll_wcschr]
lea eax, [ebp - 0x61c]
push 0x5c
push eax
call edi
pop ecx
pop ecx
test eax, eax
jne 0x105dadb
lea eax, [ebp - 0x61c]
push 0x40
push eax
call edi
pop ecx
pop ecx
test eax, eax
jne 0x105dadb
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x105db12
jmp 0x105daf5
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x105db12
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x105db02
push 0x57
pop eax
push eax
push 0x100b798
push 4
call fcn.01055c69
add esp, 0xc
push dword [ebp - 0x630]
lea eax, [ebp - 0x20c]
push 0x100b720
push ebx
push eax
call fcn.01035948
xor edi, edi
add esp, 0x10
inc edi
test eax, eax
jl 0x105dbec
lea eax, [ebp - 0x628]
push eax
push edi
push 0
lea eax, [ebp - 0x20c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x105dbec
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x620]
push eax
push 0
push 0x100b6fc
push dword [ebp - 0x628]
mov dword [ebp - 0x620], edi
mov dword [ebp - 0x630], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x105dbd3
cmp dword [ebp - 0x620], 2
je 0x105dce9
cmp dword [ebp - 0x620], edi
jne 0x105dbd3
lea eax, [ebp - 0x20c]
push eax
push 0x100b688
push dword [ebp + 0x14]
push dword [ebp - 0x634]
call fcn.01035948
xor ecx, ecx
add esp, 0x10
test eax, eax
setge cl
mov dword [ebp - 0x62c], ecx
push dword [ebp - 0x628]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x62c], 0
jne 0x105dc96
lea eax, [ebp - 0x628]
push eax
push 0x101
push 0
push 0x100b600
push dword [ebp - 0x63c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x105dc96
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x620]
push eax
push 0
push 0x100b860
push dword [ebp - 0x628]
mov dword [ebp - 0x620], edi
mov dword [ebp - 0x630], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x105dc8a
cmp dword [ebp - 0x620], 2
je 0x105dd1b
cmp dword [ebp - 0x620], edi
jne 0x105dc8a
lea eax, [ebp - 0x20c]
push eax
push 0x100b82c
push dword [ebp + 0x14]
push dword [ebp - 0x634]
call fcn.01035948
xor ecx, ecx
add esp, 0x10
test eax, eax
setge cl
mov dword [ebp - 0x62c], ecx
push dword [ebp - 0x628]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x63c], 0xffffffff
je 0x105dcb1
push dword [ebp - 0x63c]
push dword [ebp - 0x624]
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x105dcbe
push 0x57
pop eax
push eax
push 0x100b5d8
push 4
call fcn.01055c69
push esi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
add esp, 0x10
push dword [ebp - 0x624]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x62c]
pop ebx
jmp 0x105dd4f
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x624]
call dword [sym.imp.USERENV.dll_ExpandEnvironmentStringsForUserW]
test eax, eax
je 0x105dbd3
lea eax, [ebp - 0x414]
jmp 0x105dbaf
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x624]
call dword [sym.imp.USERENV.dll_ExpandEnvironmentStringsForUserW]
test eax, eax
je 0x105dc8a
lea eax, [ebp - 0x414]
jmp 0x105dc66
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.01047464
leave
ret 0x10