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

Disassembly:
push 0x9c
mov eax, 0x407e55
call fcn.00407dce
mov eax, dword [ebp + 8]
xor ebx, ebx
and dword [ebp - 0x88], 0
and dword [ebp - 0x84], ebx
mov dword [ebp - 0x94], eax
and dword [ebp - 4], ebx
call fcn.0040618f
mov esi, eax
test esi, esi
je 0x40429f
call dword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_IsDebuggerPresent]
test eax, eax
jne 0x404294
push 0x1f4
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
jmp 0x404272
cmp esi, 2
jne 0x40429f
call dword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_DebugBreak]
or dword [ebp - 4], 0xffffffff
xor edx, edx
mov dword [0x409578], 1
mov esi, 0x409560
mov dword [0x409570], edx
mov dword [0x409560], edx
mov edi, 0x409588
mov dword [0x40957c], edx
mov dword [0x409588], 0x401bac
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 0x4027d0
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 0x4042db
mov eax, dword [section..data]
cmp eax, section..data
je 0x40433a
test byte [eax + 0x1c], 1
je 0x40433a
cmp byte [eax + 0x19], 5
jb 0x40433a
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x26
pop ecx
call fcn.00402523
push 0
push 0
push 1
push 0
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapSetInformation]
call fcn.00406e1a
test al, al
je 0x404363
push fcn.00403140
push fcn.00402c20
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_ImmWorker]
mov ebx, eax
mov ecx, 0x401ab0
call fcn.0040289d
mov ecx, 0x401ad8
mov dword [ebp - 0x7c], eax
call fcn.0040289d
mov ecx, 0x401b00
mov dword [ebp - 0x80], eax
call fcn.0040289d
mov edi, eax
mov dword [ebp - 0x90], edi
test edi, edi
je 0x4043e3
movzx eax, word [edi]
mov ecx, edi
mov edx, edi
test ax, ax
je 0x4043e3
push 0x2c
mov esi, eax
pop edi
mov eax, ecx
cmp si, di
jne 0x4043ba
add ecx, 2
cmp word [ecx], di
je 0x4043ba
mov ecx, eax
xor eax, eax
mov word [ecx], ax
cmp ecx, edx
je 0x4043c4
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 0x4043a4
mov edi, dword [ebp - 0x90]
cmp edx, ecx
je 0x4043e3
xor eax, eax
mov word [edx], ax
push 0
push 0x401ab0
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetEnvironmentVariableW]
push 0
push 0x401ad8
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetEnvironmentVariableW]
push 0
push 0x401b00
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetEnvironmentVariableW]
call fcn.00404666
mov esi, eax
call fcn.00406e1a
test al, al
je 0x404420
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_SetupHotKeyForKeyboardLayout]
call fcn.00406e1a
test al, al
je 0x404438
push edi
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_ProcessTermSrvIniFiles]
cmp eax, 1
jne 0x404438
xor esi, esi
inc esi
call fcn.00406e1a
test al, al
je 0x404447
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_CreateExplorerSessionKey]
test esi, esi
je 0x40447f
push 0x40181c
push 0x401820
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.0040384c
mov edx, esi
mov ecx, edi
call fcn.00403f0b
call fcn.0040403a
mov dword [ebp - 0x84], eax
jmp 0x4044d8
mov eax, dword [section..data]
cmp eax, section..data
je 0x4044a5
test byte [eax + 0x1c], 1
je 0x4044a5
cmp byte [eax + 0x19], 5
jb 0x4044a5
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x27
pop ecx
call fcn.00402523
call fcn.0040403a
push 0x40181c
push 0x401820
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.0040384c
xor edx, edx
mov ecx, edi
call fcn.00403f0b
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.00406e1a
test al, al
je 0x40451e
call fcn.00402886
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 0x403fd0
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 0x404582
push 0x493e0
push esi
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x40457b
mov eax, dword [section..data]
cmp eax, section..data
je 0x40457b
test byte [eax + 0x1c], 1
je 0x40457b
cmp byte [eax + 0x19], 4
jb 0x40457b
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x28
pop ecx
call fcn.00402523
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 0x401778
push 0x80000001
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x40461a
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 0x401b30
push dword [ebp - 0x88]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x40460e
cmp dword [ebp - 0x9c], esi
jne 0x40460e
cmp dword [ebp - 0x8c], edi
je 0x40460e
push ecx
push 0x401b58
push ecx
push 0x32
pop edx
lea ecx, [ebp - 0x78]
call fcn.004024d3
push edi
push 1
push edi
push edi
push edi
lea eax, [ebp - 0x78]
push eax
call fcn.00402c20
push dword [ebp - 0x88]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test ebx, ebx
je 0x404625
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 0x40465c
jmp 0x404652
mov eax, dword [esi + 8]
or eax, dword [esi + 0xc]
je 0x404650
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 0x404636
mov dword [section..data], ebx
xor eax, eax
call fcn.00407d89
ret 0x10