Function at 0x402460
Capabilities:
Accept command line arguments
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
lea edi, [ebp - 0x384]
push ebx
movzx ebx, ax
xor eax, eax
sub esp, 0x3d8
mov dword [ebp - 0x3b0], 0
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x3a4]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x3b0]
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]
movzx eax, word [ebp - 0x3a4]
sub esp, 0x18
test ax, ax
je 0x40251d
xor edx, edx
jmp 0x4024e6
inc edx
movzx eax, word [ebp + edx*4 - 0x3a4]
test ax, ax
je 0x40251d
cmp bx, ax
jne 0x4024d8
test byte [ebp + edx*4 - 0x3a2], 4
mov eax, 1
mov dword [esp + 4], 0x104
cmovne ebx, eax
lea eax, [ebp - 0x214]
mov dword [esp], eax
mov dword [esp + 8], ebx
call dword [sym.imp.kernelbase.dll_GetSystemWow64Directory2W]
sub esp, 0xc
test eax, eax
jne 0x402528
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x214]
mov dword [esp + 4], str._regsvr32.exe
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_wcscat]
mov dword [ebp - 0x3bc], eax
call eax
lea eax, [ebp - 0x340]
mov dword [ebp - 0x3b8], eax
test byte [0x403024], 8
jne 0x402728
call dword [sym.imp.kernelbase.dll_GetCommandLineW]
mov ebx, eax
movzx eax, word [eax]
test ax, 0xffdf
je 0x4025c8
cmp ax, 9
je 0x4025c8
xor edx, edx
xor edi, edi
mov dword [ebp - 0x3b4], edx
cmp ax, 0x5c
je 0x402700
cmp ax, 0x22
je 0x402710
mov dword [ebp - 0x3b4], 0
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x4025c8
cmp ax, 9
sete cl
cmp ax, 0x20
mov esi, ecx
sete cl
mov edx, esi
or dl, cl
je 0x402580
test edi, 1
jne 0x402580
lea eax, [ebp - 0x214]
mov edi, dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [esp], eax
call edi
mov dword [esp], ebx
mov esi, eax
call edi
mov dword [esp + 4], 0
lea eax, [esi + eax + 1]
add eax, eax
mov dword [esp + 8], eax
mov edi, dword fs:[0x18]
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_HeapAlloc]
sub esp, 0xc
mov esi, eax
lea eax, [ebp - 0x214]
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcscpy]
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x3bc]
mov dword [esp], esi
call eax
lea eax, [ebp - 0x3ac]
mov dword [ebp - 0x384], 0x44
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_Wow64DisableWow64FsRedirection]
mov eax, dword [ebp - 0x3b8]
sub esp, 4
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x384]
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x214]
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], esi
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_CreateProcessW]
sub esp, 0x28
test eax, eax
jne 0x40297a
test byte [0x403024], 8
jne 0x402860
mov eax, dword [ebp - 0x3ac]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_Wow64RevertWow64FsRedirection]
sub esp, 4
mov dword [esp + 8], esi
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
inc dword [ebp - 0x3b4]
jmp 0x40259e
and dword [ebp - 0x3b4], 1
jne 0x402594
xor edi, 1
jmp 0x40259e
lea eax, [ebp - 0x214]
shr eax, 0x10
je 0x402929
lea eax, [ebp - 0x214]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x402833
movzx eax, word [ebp - 0x214]
test ax, ax
je 0x402959
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebp + edx*2 - 0x212], 0
jne 0x402770
mov ecx, 0x224c
lea esi, [ebp - 0x214]
lea edi, [ebp - 0x21e]
mov word [ebp - 0x340], cx
lea ecx, [ebp - 0x33e]
jmp 0x4027d0
cmp ax, 9
je 0x402918
cmp ax, 0xa
jne 0x4028ae
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea ebx, [edx - 1]
test edx, edx
jle 0x402801
cmp ecx, edi
ja 0x402801
movzx eax, word [esi]
mov edx, ebx
add esi, 2
cmp ax, 0xd
je 0x402890
jbe 0x4027a0
cmp ax, 0x22
je 0x402900
cmp ax, 0x5c
jne 0x4028a1
mov eax, 0x5c5c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4027c0
mov byte [ecx], 0x22
test ebx, ebx
jle 0x402972
mov edi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], di
mov byte [eax], 0
lea eax, [ebp - 0x340]
mov dword [esp], eax
mov dword [ebp - 0x3b8], eax
call sym.___wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.restarting_as__s_n
mov dword [esp + 8], str.reexec_self
mov dword [esp + 4], 0x403024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40255f
mov eax, dword [edi + 0x34]
mov dword [esp + 0xc], str.failed_to_restart__err_ld_n
mov dword [esp + 8], str.reexec_self
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4026ba
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4027c0
lea ebx, [eax - 0x20]
cmp bx, 0x5e
jbe 0x402951
mov ebx, eax
mov byte [ecx], 0x5c
add ecx, 5
shr bx, 0xc
movzx ebx, bx
movzx ebx, byte [ebx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [ecx - 4], bl
mov ebx, eax
shr bx, 8
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [ecx - 3], bl
mov ebx, eax
and eax, 0xf
shr bx, 4
movzx eax, byte [eax + str.0123456789abcdefGCC:__GNU__10.3.0]
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x4027c0
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4027c0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4027c0
lea eax, [ebp - 0x214]
mov dword [esp], str._04x
mov dword [ebp - 0x3b4], eax
movzx eax, word [ebp - 0x3b4]
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x402833
mov byte [ecx], al
inc ecx
jmp 0x4027c0
mov eax, 0x224c
mov byte [ebp - 0x33e], 0x22
lea ecx, [ebp - 0x33e]
mov word [ebp - 0x340], ax
lea eax, [ecx + 1]
jmp 0x40281c
mov eax, dword [ebp - 0x340]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_WaitForSingleObject]
lea eax, [ebp - 0x3a8]
push ebx
push ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x340]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_GetExitCodeProcess]
mov eax, dword [ebp - 0x3a8]
push esi
push esi
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_ExitProcess]