Function at 0x404f38
Capabilities:
Create thread
Query or enumerate registry value
Set environment variable

Disassembly:
push 0x9c
mov eax, 0x408b85
call fcn.00408afe
mov eax, dword [ebp + 8]
xor ebx, ebx
and dword [ebp - 0x88], 0
and dword [ebp - 0x84], ebx
mov dword [ebp - 0x94], eax
call fcn.004034f7
test eax, eax
je 0x404f9c
and dword [ebp - 4], ebx
call fcn.00406eaf
mov esi, eax
test esi, esi
je 0x404f98
call dword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_IsDebuggerPresent]
test eax, eax
jne 0x404f8d
push 0x1f4
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
jmp 0x404f6b
cmp esi, 2
jne 0x404f98
call dword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_DebugBreak]
or dword [ebp - 4], 0xffffffff
xor edx, edx
mov dword [0x40a598], 1
mov esi, 0x40a580
mov dword [0x40a590], edx
mov dword [0x40a580], edx
mov edi, 0x40a5a8
mov dword [0x40a59c], edx
mov dword [0x40a5a8], 0x401c14
mov dword [section..data], esi
mov ecx, dword [edi]
lea eax, [esi + 8]
push eax
push edx
push edx
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa4], ecx
push eax
push 1
push ecx
push esi
mov dword [ebp - 0xa0], edx
lea edi, [edi + 4]
push 0x402880
mov dword [esi + 0x20], ecx
call dword [sym.imp.api_ms_win_eventing_classicprovider_l1_1_0.dll_RegisterTraceGuidsW]
mov esi, dword [esi]
push 0
pop edx
test esi, esi
jne 0x404fd4
mov eax, dword [section..data]
cmp eax, section..data
je 0x405033
test byte [eax + 0x1c], 1
je 0x405033
cmp byte [eax + 0x19], 5
jb 0x405033
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x26
pop ecx
call fcn.004025d3
push 0
push 0
push 1
push 0
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapSetInformation]
call fcn.00407b4a
test al, al
je 0x40505c
push fcn.00403e40
push fcn.00403920
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_ImmWorker]
mov ebx, eax
mov ecx, 0x401b10
call fcn.004035a2
mov ecx, 0x401b38
mov dword [ebp - 0x7c], eax
call fcn.004035a2
mov ecx, 0x401b60
mov dword [ebp - 0x80], eax
call fcn.004035a2
mov edi, eax
mov dword [ebp - 0x90], edi
test edi, edi
je 0x4050dc
movzx eax, word [edi]
mov ecx, edi
mov edx, edi
test ax, ax
je 0x4050dc
push 0x2c
mov esi, eax
pop edi
mov eax, ecx
cmp si, di
jne 0x4050b3
add ecx, 2
cmp word [ecx], di
je 0x4050b3
mov ecx, eax
xor eax, eax
mov word [ecx], ax
cmp ecx, edx
je 0x4050bd
mov ax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
movzx eax, word [ecx]
mov esi, eax
test ax, ax
jne 0x40509d
mov edi, dword [ebp - 0x90]
cmp edx, ecx
je 0x4050dc
xor eax, eax
mov word [edx], ax
push 0
push 0x401b10
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetEnvironmentVariableW]
push 0
push 0x401b38
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetEnvironmentVariableW]
push 0
push 0x401b60
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetEnvironmentVariableW]
call fcn.0040535f
mov esi, eax
call fcn.00407b4a
test al, al
je 0x405119
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_SetupHotKeyForKeyboardLayout]
call fcn.00407b4a
test al, al
je 0x405131
push edi
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_ProcessTermSrvIniFiles]
cmp eax, 1
jne 0x405131
xor esi, esi
inc esi
call fcn.00407b4a
test al, al
je 0x405140
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_CreateExplorerSessionKey]
test esi, esi
je 0x405178
push 0x40187c
push 0x401880
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetEnvironmentVariableW]
mov edx, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x7c]
push 1
push esi
call fcn.0040454c
mov edx, esi
mov ecx, edi
call fcn.00404c0b
call fcn.00404d2a
mov dword [ebp - 0x84], eax
jmp 0x4051d1
mov eax, dword [section..data]
cmp eax, section..data
je 0x40519e
test byte [eax + 0x1c], 1
je 0x40519e
cmp byte [eax + 0x19], 5
jb 0x40519e
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x27
pop ecx
call fcn.004025d3
call fcn.00404d2a
push 0x40187c
push 0x401880
mov dword [ebp - 0x84], eax
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetEnvironmentVariableW]
mov edx, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x7c]
push 1
push 0
call fcn.0040454c
xor edx, edx
mov ecx, edi
call fcn.00404c0b
push dword [ebp - 0x7c]
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
push dword [ebp - 0x80]
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
push edi
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
push 0xfffffffffffffffe
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentThread]
push eax
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_SetThreadPriority]
call fcn.00407b4a
test al, al
je 0x405217
call fcn.0040358b
movzx eax, al
push eax
push dword [ebp - 0x94]
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_LoadRemoteFontsAndInitMiscWorker]
lea eax, [ebp - 0xa8]
xor edi, edi
push eax
push edi
lea eax, [ebp - 0x84]
push eax
push 0x404cc0
push edi
push edi
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_CreateThread]
mov esi, eax
test esi, esi
je 0x40527b
push 0x493e0
push esi
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x405274
mov eax, dword [section..data]
cmp eax, section..data
je 0x405274
test byte [eax + 0x1c], 1
je 0x405274
cmp byte [eax + 0x19], 4
jb 0x405274
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x28
pop ecx
call fcn.004025d3
push esi
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
lea eax, [ebp - 0x88]
push eax
push 0x20019
push edi
push 0x4017d8
push 0x80000001
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x405313
push 4
pop esi
lea eax, [ebp - 0x98]
mov dword [ebp - 0x8c], edi
push eax
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x98], esi
push eax
lea eax, [ebp - 0x9c]
push eax
push edi
push 0x401b90
push dword [ebp - 0x88]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x405307
cmp dword [ebp - 0x9c], esi
jne 0x405307
cmp dword [ebp - 0x8c], edi
je 0x405307
push ecx
push 0x401bb8
push ecx
push 0x32
pop edx
lea ecx, [ebp - 0x78]
call fcn.00402583
push edi
push 1
push edi
push edi
push edi
lea eax, [ebp - 0x78]
push eax
call fcn.00403920
push dword [ebp - 0x88]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test ebx, ebx
je 0x40531e
push ebx
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_FreeLibrary]
mov esi, dword [section..data]
mov ebx, section..data
cmp esi, ebx
je 0x405355
jmp 0x40534b
mov eax, dword [esi + 8]
or eax, dword [esi + 0xc]
je 0x405349
push dword [esi + 0xc]
push dword [esi + 8]
call dword [sym.imp.api_ms_win_eventing_classicprovider_l1_1_0.dll_UnregisterTraceGuids]
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov esi, dword [esi]
test esi, esi
jne 0x40532f
mov dword [section..data], ebx
xor eax, eax
call fcn.00408ab9
ret 0x10