Function at 0x404220
Capabilities:
Create process on windows
Create process suspended
Delete registry value
Get process heap flags
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, ecx
push ebx
mov ebx, eax
sub esp, 0x20c
cmp ecx, 1
lea ecx, [ebp - 0x1b8]
mov dword [ebp - 0x1b0], 0
sbb eax, eax
mov dword [esp + 0x20], ecx
lea ecx, [ebp - 0x1bc]
and eax, 0xfff2ffda
mov dword [esp + 0x1c], ecx
add eax, 0xf003f
mov dword [esp + 0x18], 0
mov dword [ebp - 0x1ac], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_RegCreateKeyExW]
sub esp, 0x24
test eax, eax
jne 0x4043aa
cmp dword [ebp - 0x1b8], 1
je 0x40433e
lea eax, [ebp - 0x1b0]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x1ac]
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x1b4]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x1bc]
mov dword [esp + 0x28], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
sub esp, 0x30
test eax, eax
jne 0x40433e
cmp dword [ebp - 0x1b4], 0
jne 0x4043d8
test byte [0x40a39c], 8
jne 0x40481b
mov dword [ebp - 0x1cc], 0
xor ebx, ebx
mov dword [esp + 8], ebx
mov ebx, dword [sym.imp.kernelbase.dll_HeapFree]
mov dword [esp + 4], 0
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x1cc]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x1bc]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
push eax
test byte [0x40a39c], 8
jne 0x4043b2
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], str.Done._n
mov dword [esp + 8], global___func__.1
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x4043aa
mov eax, dword [ebp - 0x1b0]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov ebx, dword [sym.imp.kernelbase.dll_HeapAlloc]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov dword [ebp - 0x1cc], eax
sub esp, 0xc
test eax, eax
je 0x404bee
mov eax, dword [ebp - 0x1ac]
mov dword [esp + 4], 0
add eax, 1
mov dword [ebp - 0x1ac], eax
add eax, eax
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x404bb8
mov eax, dword [ebp - 0x1b4]
test eax, eax
je 0x40434a
mov edi, dword [ebp - 0x1cc]
mov dword [ebp - 0x1d0], esi
shr edi, 0x10
mov dword [ebp - 0x1d4], edi
jmp 0x4044a8
mov edi, dword [ebp - 0x1d0]
test edi, edi
jne 0x404567
mov edx, dword [ebp - 0x1a0]
cmp edx, 1
je 0x40459e
mov eax, dword [ebp - 0x1b4]
test byte [0x40a39c], 2
jne 0x4046b9
test eax, eax
je 0x40434a
mov edx, dword [ebp - 0x1ac]
lea edi, [ebp - 0x1a4]
sub eax, 1
lea esi, [ebp - 0x1a0]
mov dword [esp + 0x1c], edi
mov edi, dword [ebp - 0x1cc]
mov dword [ebp - 0x1a8], edx
mov edx, dword [ebp - 0x1b0]
mov dword [ebp - 0x1b4], eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1bc]
mov dword [esp + 0x18], edi
lea edi, [ebp - 0x1a8]
mov dword [ebp - 0x1a4], edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
mov edx, eax
test eax, eax
je 0x404470
mov eax, dword [ebp - 0x1b4]
test byte [0x40a39c], 2
je 0x4044a0
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Couldnt_read_value__lu___ld_._n
mov dword [esp + 8], global___func__.1
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
mov eax, dword [ebp - 0x1b4]
jmp 0x4044a0
mov eax, dword [ebp - 0x1bc]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteValueW]
push esi
push esi
test eax, eax
je 0x40447e
test byte [0x40a39c], 2
jne 0x404986
cmp dword [ebp - 0x1a0], 1
jne 0x4046ae
lea edx, [ebp - 0x184]
xor eax, eax
mov ecx, 0x10
mov dword [ebp - 0x19c], 0
mov edi, edx
lea edx, [ebp - 0x198]
lea esi, [ebp - 0x188]
mov dword [ebp - 0x188], 0x44
rep stosd dword es:[edi], eax
mov edi, edx
mov ecx, 4
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x1cc]
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.kernelbase.dll_CreateProcessW]
sub esp, 0x28
test eax, eax
je 0x4046ce
test byte [0x40a39c], 8
jne 0x404768
cmp dword [ebp + 8], 0
jne 0x40472f
mov eax, dword [ebp - 0x194]
mov esi, dword [sym.imp.kernelbase.dll_CloseHandle]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x198]
push edx
mov dword [esp], eax
call esi
cmp dword [ebp - 0x19c], 0xffffffff
movzx edx, byte [global___dbch]
push ecx
je 0x4046de
and dl, 8
mov eax, dword [ebp - 0x1b4]
je 0x4044a0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Done_processing_cmd__lu._n
mov dword [esp + 8], global___func__.1
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
mov eax, dword [ebp - 0x1b4]
jmp 0x4044a0
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Incorrect_type_of_value__lu___lu_._n
jmp 0x404540
movzx edx, byte [global___dbch]
test dl, 4
jne 0x404892
test dl, 2
je 0x404677
mov eax, dword fs:[0x18]
mov esi, dword [eax + 0x34]
mov eax, dword [ebp - 0x1cc]
call sym._wine_dbgstr_wn.constprop.0_1
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Error_running_cmd__s___lu_._n
mov dword [esp + 8], global___func__.1
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
movzx edx, byte [global___dbch]
jmp 0x404677
mov eax, dword [ebp - 0x198]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_WaitForSingleObject]
lea eax, [ebp - 0x19c]
push esi
push esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x198]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_GetExitCodeProcess]
push edi
push edi
jmp 0x404649
mov eax, dword [ebp - 0x198]
cmp dword [ebp - 0x1d4], 0
mov dword [ebp - 0x1d8], eax
je 0x404844
mov eax, dword [ebp - 0x1cc]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push edx
push edx
test eax, eax
jne 0x404a89
mov edx, dword [ebp - 0x1cc]
jmp 0x4047ad
add eax, 1
cmp word [edx + eax*2], 0
jne 0x4047aa
mov word [ebp - 0x144], 0x224c
mov ecx, dword [ebp - 0x1cc]
lea edx, [ebp - 0x142]
mov dword [ebp - 0x1dc], ebx
lea esi, [eax - 1]
test eax, eax
jle 0x404a4a
lea eax, [ebp - 0x22]
cmp edx, eax
ja 0x404a4a
movzx eax, word [ecx]
add ecx, 2
cmp ax, 0xd
je 0x404a2c
ja 0x404944
cmp ax, 9
je 0x404a3b
cmp ax, 0xa
jne 0x4049ca
mov word [edx], 0x6e5c
mov eax, esi
add edx, 2
jmp 0x4047cf
mov dword [esp + 0xc], str.No_commands_to_execute._n
mov dword [esp + 8], global___func__.1
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x40433e
movzx eax, word [ebp - 0x1cc]
mov dword [esp], 0x40b24c
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov esi, dword [ebp - 0x1d8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Successfully_ran_command__s___Created_process_handle__p_n
mov dword [esp + 0x14], esi
mov dword [esp + 8], str.runCmd
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x40463f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
cmp dword [ebp - 0x1d4], 0
mov dword [ebp - 0x1d8], eax
je 0x404b8c
mov eax, dword [ebp - 0x1cc]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push ecx
push ecx
test eax, eax
jne 0x404bb1
mov edx, dword [ebp - 0x1cc]
jmp 0x4048da
add eax, 1
cmp word [edx + eax*2], 0
jne 0x4048d7
mov word [ebp - 0x144], 0x224c
mov ecx, dword [ebp - 0x1cc]
lea edx, [ebp - 0x142]
mov dword [ebp - 0x1dc], ebx
lea ebx, [ebp - 0x22]
lea edi, [eax - 1]
cmp edx, ebx
ja 0x404b20
test eax, eax
jle 0x404b20
movzx eax, word [ecx]
add ecx, 2
cmp ax, 0xd
je 0x404a93
ja 0x404963
cmp ax, 9
je 0x404aa2
cmp ax, 0xa
jne 0x404abe
mov word [edx], 0x6e5c
mov eax, edi
add edx, 2
jmp 0x4048fc
cmp ax, 0x22
je 0x404a1d
cmp ax, 0x5c
jne 0x4049bd
mov word [edx], 0x5c5c
mov eax, esi
add edx, 2
jmp 0x4047cf
cmp ax, 0x22
je 0x404b11
cmp ax, 0x5c
jne 0x404ab1
mov word [edx], 0x5c5c
mov eax, edi
add edx, 2
jmp 0x4048fc
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x1b4]
mov dword [esp + 0xc], str.Couldnt_delete_value__lu___ld_._Running_command_anyways._n
mov dword [esp + 0x10], eax
mov dword [esp + 8], global___func__.1
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x40447e
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x404a7d
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefrootwinewinebus]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefrootwinewinebus]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefrootwinewinebus]
and edi, 0xf
mov byte [edx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefrootwinewinebus]
mov byte [edx - 1], al
mov eax, esi
mov byte [edx - 2], bl
jmp 0x4047cf
mov word [edx], 0x225c
mov eax, esi
add edx, 2
jmp 0x4047cf
mov word [edx], 0x725c
mov eax, esi
add edx, 2
jmp 0x4047cf
mov word [edx], 0x745c
mov eax, esi
add edx, 2
jmp 0x4047cf
mov byte [edx], 0x22
mov ebx, dword [ebp - 0x1dc]
lea eax, [edx + 1]
test esi, esi
jle 0x404a67
mov word [edx + 1], 0x2e2e
lea eax, [edx + 4]
mov byte [edx + 3], 0x2e
mov byte [eax], 0
lea eax, [ebp - 0x144]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
jmp 0x40485b
mov byte [edx], al
add edx, 1
mov eax, esi
jmp 0x4047cf
mov eax, str._invalid_
jmp 0x40485b
mov word [edx], 0x725c
mov eax, edi
add edx, 2
jmp 0x4048fc
mov word [edx], 0x745c
mov eax, edi
add edx, 2
jmp 0x4048fc
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x404ba5
mov esi, eax
mov byte [edx], 0x5c
add edx, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdefrootwinewinebus]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [edx - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefrootwinewinebus]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + str.0123456789abcdefrootwinewinebus]
and esi, 0xf
mov byte [edx - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefrootwinewinebus]
mov byte [edx - 1], al
mov eax, edi
mov byte [edx - 2], bl
jmp 0x4048fc
mov word [edx], 0x225c
mov eax, edi
add edx, 2
jmp 0x4048fc
mov byte [edx], 0x22
mov ebx, dword [ebp - 0x1dc]
lea eax, [edx + 1]
test edi, edi
jle 0x404b3d
mov word [edx + 1], 0x2e2e
lea eax, [edx + 4]
mov byte [edx + 3], 0x2e
mov byte [eax], 0
lea eax, [ebp - 0x144]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
mov esi, dword [ebp - 0x1d8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Failed_to_run_command__s___ld__n
mov dword [esp + 0x14], esi
mov dword [esp + 8], str.runCmd
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
movzx edx, byte [global___dbch]
jmp 0x4046de
movzx eax, word [ebp - 0x1cc]
mov dword [esp], 0x40b24c
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x404b4e
mov byte [edx], al
add edx, 1
mov eax, edi
jmp 0x4048fc
mov eax, str._invalid_
jmp 0x404b4e
test byte [0x40a39c], 2
je 0x40434a
mov dword [esp + 0xc], str.Couldnt_allocate_memory_for_the_value_names._n
mov dword [esp + 8], global___func__.1
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x40434a
test byte [0x40a39c], 2
je 0x40433e
mov dword [esp + 0xc], str.Couldnt_allocate_memory_for_the_commands_to_be_executed._n
xor ebx, ebx
mov dword [esp + 8], global___func__.1
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x40434a