Function at 0x1002808
Capabilities:
Print debug messages
Query environment variable
Query or enumerate registry value
Set current directory
Shutdown system

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa48
mov eax, dword [0x1006084]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
push edi
lea eax, [ebp - 0xa38]
push eax
push 0x20019
xor ebx, ebx
push ebx
push 0x10028c8
mov edi, 0x80000002
push edi
mov dword [ebp - 0xa34], ebx
call esi
test eax, eax
je 0x1003c1c
call fcn.01002455
test eax, eax
je 0x1003cde
call fcn.010024cf
test eax, eax
jne 0x1003ce4
cmp dword [ebp - 0xa34], ebx
jne 0x1003d0f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov ecx, dword [0x7ffe02d8]
cmp ecx, dword [eax + 0x1d4]
jne 0x1003d2f
xor edi, edi
inc edi
push edi
push ebx
push ebx
push ebx
push ebx
mov esi, 0x1002430
push esi
call fcn.0100292f
test eax, eax
jne 0x10028b7
push edi
push ebx
push ebx
push edi
push 0x1002100
push esi
call fcn.0100292f
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01001841
leave
ret
lea eax, [ebp - 0xa40]
push eax
lea eax, [ebp - 0xa34]
push eax
lea eax, [ebp - 0xa48]
push eax
push ebx
push 0x100427c
push dword [ebp - 0xa38]
mov dword [ebp - 0xa40], 4
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
push dword [ebp - 0xa38]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
cmp dword [ebp - 0xa34], ebx
je 0x1002850
lea eax, [ebp - 0xa38]
push eax
push 0x20019
push ebx
push 0x1004228
push edi
call esi
test eax, eax
jne 0x1003cd3
lea eax, [ebp - 0xa40]
push eax
lea eax, [ebp - 0xa20]
push eax
lea eax, [ebp - 0xa48]
push eax
push ebx
push 0x1004204
push dword [ebp - 0xa38]
mov dword [ebp - 0xa40], 0x208
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x1003cbc
cmp word [ebp - 0xa20], bx
jne 0x1003cc2
mov dword [ebp - 0xa34], ebx
push dword [ebp - 0xa38]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
jmp 0x1002850
mov dword [ebp - 0xa34], ebx
jmp 0x1002850
inc eax
jmp 0x10028b9
xor edi, edi
inc edi
push edi
push edi
push edi
push ebx
push ebx
mov esi, 0x10041f0
push esi
call fcn.0100292f
test eax, eax
jne 0x100286a
push edi
push edi
push edi
push edi
push ebx
push esi
call fcn.0100292f
jmp 0x100286a
push 3
push ebx
push ebx
push ebx
lea eax, [ebp - 0xa20]
push eax
call fcn.01001195
test eax, eax
je 0x1002891
xor eax, eax
jmp 0x10028b9
lea eax, [ebp - 0xa23]
push eax
lea eax, [ebp - 0xa24]
push eax
lea eax, [ebp - 0xa28]
push eax
lea eax, [ebp - 0xa2c]
push eax
push 0xffffffffffffffff
mov byte [ebp - 0xa21], 1
mov byte [ebp - 0xa22], bl
mov dword [ebp - 0xa3c], ebx
mov dword [ebp - 0xa30], ebx
mov dword [ebp - 0xa2c], ebx
mov dword [ebp - 0xa28], ebx
mov byte [ebp - 0xa24], bl
mov byte [ebp - 0xa23], bl
call sub.WINSTA.dll_WinStationGetInitialApplication
cmp al, bl
jne 0x1003da6
mov eax, dword [ebp - 0xa2c]
cmp eax, ebx
jne 0x1003dcd
push 0x10041a0
call sub.ntdll.dll_DbgPrint
pop ecx
push ebx
push ebx
call dword [sym.imp.USER32.dll_ExitWindowsEx]
jmp 0x1003d28
cmp dword [ebp - 0xa2c], ebx
je 0x100406f
cmp byte [ebp - 0xa24], bl
jne 0x1003dd8
push 5
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov byte [ebp - 0xa21], bl
jmp 0x1003f0f
mov byte [ebp - 0xa21], bl
jmp 0x1003f15
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp dword [ebp - 0xa28], ebx
je 0x1003e3e
mov esi, 0x101
push esi
lea eax, [ebp - 0x208]
push eax
push dword [ebp - 0xa28]
call edi
test eax, eax
jne 0x1003e2b
push dword [ebp - 0xa28]
lea eax, [ebp - 0x208]
push esi
push eax
call fcn.01002170
cmp eax, ebx
jge 0x1003e2b
movzx eax, ax
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov byte [ebp - 0xa21], bl
jmp 0x1003f1b
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov byte [ebp - 0xa21], al
lea eax, [ebp - 0x208]
mov dword [ebp - 0xa30], eax
cmp byte [ebp - 0xa21], bl
jne 0x1003e80
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0x1d4]
push dword [ebp - 0xa28]
push 0x1004160
call sub.ntdll.dll_DbgPrint
add esp, 0xc
mov byte [ebp - 0xa22], 1
jmp 0x1003f1b
push 0x208
lea eax, [ebp - 0x610]
push eax
call fcn.0100489c
test al, al
je 0x1003eeb
mov esi, 0x104
push esi
lea eax, [ebp - 0x818]
push eax
lea eax, [ebp - 0x610]
push eax
call edi
test eax, eax
jne 0x1003ecb
lea eax, [ebp - 0x610]
push eax
push esi
lea eax, [ebp - 0x818]
push eax
call fcn.01002170
cmp eax, ebx
jl 0x1003e16
push 1
push ebx
push ebx
push ebx
lea eax, [ebp - 0x818]
push eax
call fcn.01001195
test al, al
jne 0x1003eeb
push 0x100411c
call sub.ntdll.dll_DbgPrint
pop ecx
xor eax, eax
cmp byte [ebp - 0xa23], bl
sete al
lea eax, [eax + eax + 3]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0xa2c]
call fcn.01001195
mov byte [ebp - 0xa21], al
mov eax, dword [ebp - 0xa2c]
mov dword [ebp - 0xa30], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xa44], eax
call fcn.01004971
test eax, eax
jne 0x1003f35
call fcn.010049c8
cmp byte [ebp - 0xa21], bl
jne 0x1004048
push ebx
push 1
lea eax, [ebp - 0xa3c]
push eax
push ebx
push dword [ebp - 0xa44]
xor esi, esi
push ebx
push 0x11ff
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
xor eax, eax
push 0x100
lea ecx, [ebp - 0x408]
push ecx
cmp dword [ebp - 0xa3c], ebx
je 0x1003fd5
cmp byte [ebp - 0xa22], 1
setne al
add eax, 0x643
push eax
push ebx
call dword [sym.imp.USER32.dll_LoadStringW]
mov edi, eax
cmp edi, ebx
je 0x1003fc7
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
je 0x1003fc7
push dword [ebp - 0xa30]
lea eax, [ebp - 0x408]
push dword [ebp - 0xa3c]
push eax
push 0x200
push esi
call fcn.01002ff9
add esp, 0x14
push dword [ebp - 0xa3c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1004026
cmp byte [ebp - 0xa22], 1
setne al
add eax, 0x645
push eax
push ebx
call dword [sym.imp.USER32.dll_LoadStringW]
mov edi, eax
cmp edi, ebx
je 0x1004048
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
je 0x1004026
push dword [ebp - 0xa30]
lea eax, [ebp - 0x408]
push dword [ebp - 0xa44]
push eax
push 0x200
push esi
call fcn.01002ff9
add esp, 0x14
cmp edi, ebx
je 0x1004048
cmp esi, ebx
je 0x1004048
push 0x1004090
push 0x4010
push ebx
push esi
push ebx
push ebx
call fcn.01004abd
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0xa2c]
call sub.WINSTA.dll_WinStationFreeMemory
cmp dword [ebp - 0xa28], ebx
je 0x1003d28
push dword [ebp - 0xa28]
call sub.WINSTA.dll_WinStationFreeMemory
jmp 0x1003d28
cmp dword [ebp - 0xa28], ebx
je 0x1002891
push dword [ebp - 0xa28]
call sub.WINSTA.dll_WinStationFreeMemory
jmp 0x1002891