Function at 0x401650
Capabilities:
Accept command line arguments
Access pe header
Access peb ldr_data
Create process on windows
Create process suspended
Get process heap flags
Get process heap force flags
Get system information on windows
Terminate process

Disassembly:
push ebp
mov ecx, 0x11
mov ebp, esp
push edi
push esi
movzx esi, ax
xor eax, eax
push ebx
lea ebx, [ebp - 0x264]
mov edi, ebx
sub esp, 0x2dc
mov dword [ebp - 0x2a0], 0
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x284]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x2a0]
mov dword [esp + 0x10], 0x20
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov dword [esp], 0xb5
call dword [sym.imp.ntdll.dll_NtQuerySystemInformationEx]
mov eax, dword [ebp - 0x284]
sub esp, 0x18
test eax, eax
je 0x40170d
lea edx, [ebp - 0x280]
jmp 0x4016d9
mov eax, dword [edx]
add edx, 4
test eax, eax
je 0x40170d
cmp si, ax
jne 0x4016d0
test eax, 0x40000
mov eax, 1
mov dword [esp + 4], 0x104
cmovne esi, eax
mov dword [esp + 8], esi
lea esi, [ebp - 0x220]
mov dword [esp], esi
call dword [sym.imp.kernelbase.dll_GetSystemWow64Directory2W]
sub esp, 0xc
test eax, eax
jne 0x401718
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [sym.imp.ucrtbase.dll_wcscat]
mov dword [esp + 4], str._regsvr32.exe
mov dword [esp], esi
mov dword [ebp - 0x2ac], eax
call eax
test byte [section..data], 8
jne 0x4018f8
call dword [sym.imp.kernelbase.dll_GetCommandLineW]
mov edx, eax
movzx eax, word [eax]
test ax, ax
je 0x40178f
xor ecx, ecx
xor edi, edi
jmp 0x401771
cmp ax, 0x5c
jne 0x4018d8
add ecx, 1
movzx eax, word [edx + 2]
add edx, 2
test ax, ax
je 0x40178f
cmp ax, 9
je 0x40177d
cmp ax, 0x20
jne 0x401758
test edi, edi
je 0x40178f
movzx eax, word [edx + 2]
add edx, 2
xor ecx, ecx
test ax, ax
jne 0x401771
mov ecx, dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [ebp - 0x2b4], edx
mov dword [esp], esi
mov dword [ebp - 0x2b0], ecx
call ecx
mov edx, dword [ebp - 0x2b4]
mov edi, eax
mov dword [esp], edx
mov ecx, dword [ebp - 0x2b0]
call ecx
mov dword [esp + 4], 0
lea eax, [edi + eax + 1]
add eax, eax
mov ecx, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0x2b0], ecx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_HeapAlloc]
sub esp, 0xc
mov edi, eax
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscpy]
mov edx, dword [ebp - 0x2b4]
mov dword [esp], edi
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x2ac]
call eax
lea eax, [ebp - 0x29c]
mov dword [ebp - 0x264], 0x44
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_Wow64DisableWow64FsRedirection]
lea eax, [ebp - 0x294]
sub esp, 4
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], ebx
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], edi
mov dword [esp], esi
call dword [sym.imp.kernelbase.dll_CreateProcessW]
mov ecx, dword [ebp - 0x2b0]
sub esp, 0x28
test eax, eax
jne 0x4019a5
test byte [section..data], 8
jne 0x401960
mov eax, dword [ebp - 0x29c]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_Wow64RevertWow64FsRedirection]
sub esp, 4
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_HeapFree]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ax, 0x22
jne 0x401781
and ecx, 1
jne 0x401781
xor edi, 1
jmp 0x401765
mov eax, esi
shr eax, 0x10
je 0x401990
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x401929
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.restarting_as__s_n
mov dword [esp + 8], global___func__.0
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40173d
mov eax, dword [ecx + 0x34]
mov dword [esp + 0xc], str.failed_to_restart__err_ld_n
mov dword [esp + 8], global___func__.0
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x401893
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x401929
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x294]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_WaitForSingleObject]
push eax
push eax
lea eax, [ebp - 0x298]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x294]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_GetExitCodeProcess]
push edx
push edx
mov eax, dword [ebp - 0x298]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_ExitProcess]