Function at 0x40177f
Capabilities:
Persist via winlogon helper dll registry key
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
xor edi, edi
neg eax
sbb eax, eax
and eax, 6
inc eax
movzx eax, ax
push 0x208
push 0x40
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 4], 0x208
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x10], 0x103
mov dword [ebp - 0x18], edi
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalAlloc]
mov ebx, eax
mov dword [ebp - 0x14], ebx
test ebx, ebx
je 0x4025c0
cmp dword [ebp + 0xc], edi
je 0x4017ef
mov edx, dword [ebp + 0xc]
mov eax, 0x104
mov esi, ebx
call fcn.004020e3
mov esi, eax
test esi, esi
js 0x4026b1
push 0x401410
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40182d
cmp dword [ebp + 0x10], edi
je 0x40182d
lea eax, [ebp - 0x24]
push eax
push 0x20019
push edi
push 0x401950
push 0x80000002
mov dword [ebp - 0x28], edi
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
je 0x4025c7
lea eax, [ebp + 0x18]
push eax
xor eax, eax
cmp dword [ebp + 0x10], eax
push 0x20019
setne al
push edi
push 0x401420
mov dword [ebp - 4], 0x208
add eax, 0x80000001
push eax
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x40187d
lea eax, [ebp - 4]
push eax
push ebx
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp + 8]
push dword [ebp + 0x18]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
push dword [ebp + 0x18]
mov dword [ebp - 0x10], eax
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
cmp dword [ebp - 0x10], edi
jne 0x4018a5
cmp dword [ebp - 0xc], 1
jne 0x401a4d
mov eax, dword [ebp - 4]
cmp eax, 2
jbe 0x401a4d
shr eax, 1
cmp word [ebx + eax*2 - 2], di
jne 0x401a4d
cmp dword [ebp - 0x1c], edi
jne 0x4018d1
cmp dword [ebp + 0x10], edi
jne 0x4018d1
lea eax, [ebp + 0x18]
push eax
push 0x20019
push edi
push 0x401098
push 0x80000001
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
je 0x40265a
cmp word [ebx], di
je 0x401a3d
mov esi, ebx
cmp dword [ebp + 0x1c], edi
je 0x402720
push 0x401410
push dword [ebp + 8]
mov dword [ebp + 0xc], edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x401927
push 0x4013fc
push ebx
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x401920
push 0x401bf0
push ebx
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x401927
mov dword [ebp + 0xc], 1
cmp word [ebx], di
je 0x401a31
push 0x2c
pop ecx
push 0x20
pop edx
mov eax, ebx
cmp word [esi], di
je 0x4019fc
cmp word [esi], cx
je 0x4026e4
add esi, 2
jmp 0x401938
cmp word [esi], cx
je 0x4026e4
cmp word [eax], dx
je 0x401a5b
push edi
push dword [ebp - 0x20]
push edi
push dword [ebp + 0x14]
push edi
push eax
call fcn.00401a65
test eax, eax
je 0x401a20
inc dword [ebp - 8]
push 0x2c
pop ecx
push 0x20
mov eax, esi
pop edx
cmp word [esi], di
jne 0x401941
cmp dword [ebp + 0xc], edi
je 0x4026f1
mov edi, dword [ebp - 8]
push ebx
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalFree]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0x18
cmp dword [ebp + 0xc], edi
jne 0x40263c
jmp 0x402650
add eax, 2
jmp 0x401a05
xor eax, eax
jmp 0x401a46
push dword [ebp - 4]
mov dword [ebp - 0x28], 1
push 0x40
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x4026c7
lea eax, [ebp - 4]
push eax
push esi
push ebx
lea eax, [ebp - 0xc]
push eax
lea ebx, [ebp - 0x18]
call fcn.00403803
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x40261f
cmp dword [ebp - 0x18], edi
je 0x40261f
lea eax, [ebp - 4]
push eax
push ebx
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0xc]
mov dword [ebp - 4], 0x208
call fcn.00403991
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x28], edi
je 0x402630
push dword [ebp - 0x24]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov dword [ebp - 0x28], edi
push esi
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalFree]
jmp 0x40187d
mov edx, dword [ebp + 0xc]
mov eax, 0x104
mov esi, ebx
call fcn.004020e3
jmp 0x4018a5
xor eax, eax
mov word [ebx], ax
jmp 0x4018a5
lea eax, [ebp - 4]
push eax
push ebx
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp + 8]
mov dword [ebp - 4], 0x208
push dword [ebp + 0x18]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
push dword [ebp + 0x18]
mov esi, eax
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test esi, esi
jne 0x4018d1
cmp dword [ebp - 0xc], 1
jne 0x4026a5
mov eax, dword [ebp - 4]
cmp eax, 2
jbe 0x4026a5
shr eax, 1
cmp word [ebx + eax*2 - 2], di
je 0x4018d1
mov dword [ebp - 0x1c], 1
jmp 0x4017d1
push ebx
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalFree]
movzx eax, si
push eax
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError]
jmp 0x4025c0
cmp dword [ebp - 0x28], edi
je 0x4026d8
push dword [ebp - 0x24]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov dword [ebp - 0x28], edi
push ebx
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalFree]
jmp 0x4025c0
xor ecx, ecx
mov word [esi], cx
add esi, 2
jmp 0x401a05
call fcn.00401c97
test al, al
je 0x402708
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_IsSubDesktopSession]
test eax, eax
jne 0x401a3a
call fcn.00401c97
test al, al
je 0x401a3a
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_SetShellDesktopSwitchEvent]
jmp 0x401a3a
push 0x402758
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x402737
inc eax
jmp 0x402739
mov eax, edi
push edi
push dword [ebp - 0x20]
push eax
push dword [ebp + 0x14]
push edi
push ebx
call fcn.00401a65
test eax, eax
je 0x401a3d
xor edi, edi
inc edi
jmp 0x401a3d