Function at 0x1005a1f
Capabilities:
Query environment variable
Query or enumerate registry value
Set registry value
Shutdown system

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x968
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ebx, ebx
push edi
push 0x10025a8
push ebx
mov dword [ebp - 0x948], ebx
mov dword [ebp - 0x920], ebx
mov dword [ebp - 0x934], ebx
mov dword [ebp - 0x930], ebx
mov dword [ebp - 0x924], ebx
call dword [sym.imp.USER32.dll_FindWindowW]
mov edi, eax
mov dword [ebp - 0x918], edi
cmp edi, ebx
jne 0x1005a7b
push 1
push 0x1b46
call fcn.01008419
push ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov esi, eax
cmp esi, ebx
jge 0x1005abc
push esi
push 0x1002558
push 2
call fcn.010081e1
add esp, 0xc
push 5
push 0x1b45
call fcn.01008419
push esi
push 0x99
push 0x401
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x1006314
call fcn.01005545
mov esi, eax
cmp esi, ebx
jge 0x1005adb
push esi
push 0x10024e8
push 2
call fcn.010081e1
add esp, 0xc
push 6
jmp 0x1005a9b
lea eax, [ebp - 0x924]
push eax
call fcn.01009224
cmp eax, ebx
jl 0x1005b02
cmp dword [ebp - 0x924], ebx
je 0x1005b12
push 0x10024a0
push ebx
call fcn.010081e1
pop ecx
pop ecx
jmp 0x1005b12
push eax
push 0x1002440
push 2
call fcn.010081e1
add esp, 0xc
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x10023c0
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x1005b79
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, ebx
jle 0x1005b43
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
call edi
push eax
push 0x1002358
push 2
call fcn.010081e1
add esp, 0xc
push 7
push 0x1b45
call fcn.01008419
push esi
push 0x99
push 0x401
push dword [ebp - 0x918]
jmp 0x1005ab1
mov esi, 0x4f8
push esi
lea eax, [ebp - 0x914]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x914]
push eax
push ebx
push ebx
push ebx
push 0x100234c
lea eax, [ebp - 0x20c]
push eax
push 0x100b0f8
mov dword [ebp - 0x914], esi
call sub.pidgenx.dll_PidGenX
mov esi, eax
cmp esi, ebx
jge 0x1005be2
push esi
push 0x1002308
push 2
call fcn.010081e1
add esp, 0xc
push 8
push 0x1b45
call fcn.01008419
push esi
push 0x97
jmp 0x1005aab
lea eax, [ebp - 0x948]
push eax
lea eax, [ebp - 0x914]
push eax
call fcn.01007fe4
mov esi, eax
cmp esi, ebx
jl 0x100628f
push 1
push 0x14d4
call fcn.01008419
cmp dword [ebp - 0x948], ebx
jne 0x1005c47
push 0x1002260
push 2
call fcn.010081e1
pop ecx
pop ecx
push 0xa
push 0x1b45
call fcn.01008419
push ebx
push 0x9b
push 0x401
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
xor eax, eax
inc eax
jmp 0x100632f
lea eax, [ebp - 0x944]
push eax
call fcn.010084c7
push dword [ebp - 0x944]
push 0x7fb
call fcn.01008419
lea eax, [ebp - 0x7fc]
push eax
push 0x14d6
call fcn.0100843e
push 0x1002240
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
mov dword [ebp - 0x930], edi
cmp edi, ebx
jne 0x1005cd7
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, ebx
jle 0x1005ca1
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
call edi
push eax
push 0x10021f8
push 2
call fcn.010081e1
add esp, 0xc
push 0xb
push 0x1b45
call fcn.01008419
push esi
push 0x99
push 0x401
push dword [ebp - 0x918]
jmp 0x10062c2
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10021e4
push edi
call esi
mov dword [ebp - 0x934], eax
cmp eax, ebx
jne 0x1005d1d
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, ebx
jle 0x1005d05
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
call edi
push eax
push 0x1002198
push 2
call fcn.010081e1
add esp, 0xc
push 0xc
jmp 0x1005cb7
push 0x1002184
push edi
call esi
mov dword [ebp - 0x938], eax
cmp eax, ebx
je 0x1005cef
xor eax, eax
lea edi, [ebp - 0x958]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x210
stosd dword es:[edi], eax
lea eax, [ebp - 0x41c]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x100
lea eax, [ebp - 0x40c]
push eax
push 0x4f
push dword [0x100b0f4]
mov dword [ebp - 0x41c], 0x64
mov dword [ebp - 0x418], ebx
mov dword [ebp - 0x414], ebx
mov dword [ebp - 0x410], ebx
call dword [sym.imp.USER32.dll_LoadStringW]
cmp dword [ebp - 0x924], ebx
jne 0x1005de2
lea eax, [ebp - 0x958]
push eax
lea eax, [ebp - 0x41c]
push eax
call dword [ebp - 0x934]
cmp eax, ebx
jne 0x1005de2
mov esi, dword [ebp - 0x958]
cmp esi, ebx
jle 0x1005dbb
and esi, 0xffff
or esi, 0x80070000
push esi
push 0x1002118
push 2
call fcn.010081e1
add esp, 0xc
push 0xd
push 0x1b45
call fcn.01008419
push esi
push 0x9f
jmp 0x1005cc7
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x1002080
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x1005e2e
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, ebx
jle 0x1005e13
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
call edi
push eax
push 0x1002010
push 2
call fcn.010081e1
add esp, 0xc
push 7
jmp 0x1005cb7
lea eax, [ebp - 0x920]
push eax
lea eax, [ebp - 0x20c]
push eax
push ebx
push ebx
push ebx
call fcn.01008926
mov esi, eax
cmp esi, ebx
jge 0x1005e61
push esi
push 0x1001fb8
push 2
call fcn.010081e1
add esp, 0xc
push 0xe
jmp 0x1005cb7
lea eax, [ebp - 0x92c]
push eax
push dword [ebp - 0x920]
call fcn.0100887d
mov esi, eax
cmp esi, ebx
jge 0x1005ea5
push esi
push 0x1001f58
push 2
call fcn.010081e1
add esp, 0xc
push 0xf
push 0x1b45
call fcn.01008419
push dword [ebp - 0x920]
call fcn.0100879e
jmp 0x1005cc1
mov esi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
lea eax, [ebp - 0x7fc]
push eax
call esi
mov edi, eax
cmp edi, ebx
jne 0x1005eeb
mov eax, dword [ebp - 0x92c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp - 0x920]
call fcn.0100879e
push 0x1001f2c
push 2
mov esi, 0x8007000e
call fcn.010081e1
pop ecx
pop ecx
push 0x10
jmp 0x1005cb7
push 0x100b0f8
call esi
mov dword [ebp - 0x928], eax
cmp eax, ebx
jne 0x1005f05
push edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x1005eba
push dword [ebp - 0x928]
mov eax, dword [ebp - 0x92c]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x20]
push edi
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, eax
call edi
push dword [ebp - 0x928]
call edi
cmp esi, ebx
jl 0x10060c0
push 1
push 0x14db
call fcn.01008419
mov eax, dword [ebp - 0x92c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp - 0x920]
call fcn.0100879e
cmp dword [ebp - 0x924], ebx
jne 0x1005f82
lea eax, [ebp - 0x958]
push eax
lea eax, [ebp - 0x41c]
push eax
mov dword [ebp - 0x41c], 0x65
mov dword [ebp - 0x418], ebx
call dword [ebp - 0x934]
push dword [ebp - 0x918]
call fcn.01006bef
mov esi, eax
cmp esi, ebx
jge 0x1005fb1
push esi
push 0x1001ed0
push 2
call fcn.010081e1
add esp, 0xc
push 0x13
push 0x1b45
call fcn.01008419
xor esi, esi
cmp esi, 1
jne 0x1005fc3
push 0x1001da8
push ebx
call fcn.010081e1
pop ecx
pop ecx
cmp dword [ebp - 0x924], ebx
jne 0x1005fd1
call dword [ebp - 0x938]
push dword [ebp - 0x930]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push ebx
lea eax, [ebp - 0x91c]
push eax
push ebx
push 0x20006
push ebx
push ebx
push ebx
push 0x1001d28
push 0x80000002
mov dword [ebp - 0x930], ebx
call edi
test eax, eax
jne 0x1006035
push 4
lea eax, [ebp - 0x944]
push eax
push 4
push ebx
push 0x1001d14
push dword [ebp - 0x91c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x91c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1006043
push 0x1001cd0
push 2
call fcn.010081e1
pop ecx
pop ecx
push ebx
push ebx
push 0x403
push dword [ebp - 0x918]
call dword [sym.imp.USER32.dll_PostMessageW]
push ebx
lea eax, [ebp - 0x91c]
push eax
push ebx
push 0x20006
push ebx
push ebx
push ebx
push 0x1001c70
push 0x80000002
call edi
test eax, eax
jne 0x10060af
push 4
lea eax, [ebp - 0x94c]
push eax
push 4
push ebx
push 0x1001c50
push dword [ebp - 0x91c]
mov dword [ebp - 0x94c], 1
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x91c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1006197
push 0x1001bf8
push 2
call fcn.010081e1
jmp 0x1006195
push ebx
push 0x14db
call fcn.01008419
mov eax, dword [ebp - 0x92c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp - 0x920]
call fcn.0100879e
mov edi, 0x80070032
cmp esi, edi
jne 0x1006110
push 0x10019f8
push 2
call fcn.010081e1
pop ecx
pop ecx
push 0x11
push 0x1b45
call fcn.01008419
push edi
push 0x98
jmp 0x1005cc7
mov edi, 0x80070057
cmp esi, edi
jne 0x1006278
lea eax, [ebp - 0x91c]
push eax
push 0x20019
push ebx
push 0x1001d28
push 0x80000002
mov dword [ebp - 0x928], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100617b
lea eax, [ebp - 0x938]
push eax
lea eax, [ebp - 0x928]
push eax
push ebx
push ebx
push 0x1001d14
push dword [ebp - 0x91c]
mov dword [ebp - 0x938], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x91c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x928], ebx
je 0x10060eb
push 0x1001930
push 2
call fcn.010081e1
xor esi, esi
pop ecx
pop ecx
lea eax, [ebp - 0x940]
push eax
push 0x200e8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1006260
lea eax, [ebp - 0x93c]
push eax
push 0x1001904
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x100623c
mov eax, dword [ebp - 0x93c]
push 2
pop edi
push ebx
mov dword [ebp - 0x964], eax
mov eax, dword [ebp - 0x938]
push ebx
push ebx
mov dword [ebp - 0x960], eax
lea eax, [ebp - 0x968]
push eax
push ebx
push dword [ebp - 0x940]
mov dword [ebp - 0x968], 1
mov dword [ebp - 0x95c], edi
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x100622d
push 0x10018d8
push ebx
call fcn.010081e1
pop ecx
pop ecx
push ebx
push 0x12
call dword [sym.imp.USER32.dll_ExitWindowsEx]
jmp 0x1006252
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1001878
push edi
jmp 0x100624a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1001818
push 2
call fcn.010081e1
add esp, 0xc
push dword [ebp - 0x940]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10062c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10017c0
push 2
call fcn.010081e1
add esp, 0xc
jmp 0x10062c8
push esi
push 0x1001768
push 2
call fcn.010081e1
add esp, 0xc
push 0x12
jmp 0x1005cb7
push ebx
push 0x14d4
call fcn.01008419
push 9
push 0x1b45
call fcn.01008419
push esi
push 0x1001700
push 2
call fcn.010081e1
add esp, 0xc
push esi
push 0x97
push 0x401
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [ebp - 0x930], ebx
je 0x1006314
cmp dword [ebp - 0x934], ebx
je 0x1006308
cmp dword [ebp - 0x924], ebx
jne 0x1006308
lea eax, [ebp - 0x958]
push eax
lea eax, [ebp - 0x41c]
push eax
mov dword [ebp - 0x41c], 0x65
mov dword [ebp - 0x418], 0xd
call dword [ebp - 0x934]
push dword [ebp - 0x930]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push esi
push ebx
push 0x464
push dword [ebp - 0x918]
call dword [sym.imp.USER32.dll_PostMessageW]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01006fe1
leave
ret