Function at 0x401600
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
xor edx, edx
mov ebp, esp
push edi
push esi
push ebx
movzx ebx, ax
xor eax, eax
sub esp, 0x3fc
mov dword [ebp - 0x3bc], eax
xor eax, eax
mov dword [ebp + eax - 0x390], edx
mov dword [ebp + eax - 0x38c], edx
add eax, 8
cmp eax, 0x40
jb 0x40161b
mov dword [esp], 0xb5
xor edi, edi
mov dword [ebp + eax - 0x390], edi
xor eax, eax
mov dword [esp + 0x14], eax
mov eax, 0x20
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x3b0]
mov dword [esp + 0xc], eax
mov eax, 4
mov dword [esp + 8], eax
lea eax, [ebp - 0x3bc]
mov dword [esp + 4], eax
call dword [sym.imp.ntdll.dll_NtQuerySystemInformationEx]
mov eax, dword [ebp - 0x3b0]
sub esp, 0x18
test eax, eax
je 0x401880
lea edx, [ebp - 0x3ac]
jmp 0x40169d
mov eax, dword [edx]
add edx, 4
test eax, eax
je 0x401880
movzx ecx, ax
cmp ecx, ebx
jne 0x401690
test eax, 0x40000
mov eax, 1
cmovne ebx, eax
mov dword [esp + 8], ebx
lea eax, [ebp - 0x220]
mov ebx, 0x104
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_GetSystemWow64Directory2W]
sub esp, 0xc
test eax, eax
je 0x401880
lea eax, [ebp - 0x220]
mov esi, str._regsvr32.exe
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_wcscat]
mov dword [esp + 4], esi
mov dword [ebp - 0x3d0], eax
call eax
lea eax, [ebp - 0x34c]
test byte [section..data], 8
mov dword [ebp - 0x3cc], eax
jne 0x4018b0
call dword [sym.imp.kernelbase.dll_GetCommandLineW]
mov ebx, eax
movzx eax, word [eax]
test eax, 0xffdf
je 0x401767
cmp eax, 9
je 0x401767
xor esi, esi
xor edi, edi
nop
lea esi, [esi]
cmp eax, 0x5c
je 0x4018a8
cmp eax, 0x22
je 0x401890
xor esi, esi
movzx eax, word [ebx + 2]
add ebx, 2
test eax, eax
je 0x401767
cmp eax, 9
sete cl
cmp eax, 0x20
sete dl
or cl, dl
je 0x401730
test edi, 1
jne 0x401730
lea eax, [ebp - 0x220]
mov edi, dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [esp], eax
call edi
mov dword [esp], ebx
mov esi, eax
call edi
mov edi, dword fs:[0x18]
lea eax, [esi + eax + 1]
add eax, eax
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
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
mov dword [esp], esi
lea eax, [ebp - 0x220]
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_wcscpy]
mov eax, dword [ebp - 0x3d0]
mov dword [esp + 4], ebx
xor ebx, ebx
mov dword [esp], esi
call eax
lea eax, [ebp - 0x3b8]
mov edx, 0x44
mov dword [esp], eax
mov dword [ebp - 0x390], edx
call dword [sym.imp.kernelbase.dll_Wow64DisableWow64FsRedirection]
mov eax, dword [ebp - 0x3cc]
xor ecx, ecx
sub esp, 4
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x390]
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
lea eax, [ebp - 0x220]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_CreateProcessW]
sub esp, 0x28
test eax, eax
jne 0x401b0b
test byte [section..data], 8
jne 0x4019a0
mov eax, dword [ebp - 0x3b8]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_Wow64RevertWow64FsRedirection]
mov eax, dword fs:[0x18]
sub esp, 4
mov dword [esp + 8], esi
xor esi, esi
mov dword [esp + 4], esi
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
and esi, 1
jne 0x401742
xor edi, 1
jmp 0x401744
inc esi
jmp 0x401744
lea eax, [ebp - 0x220]
shr eax, 0x10
je 0x401abd
lea eax, [ebp - 0x220]
mov ebx, 0xffffffff
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x4019d3
cmp word [ebp - 0x220], 0
je 0x401aed
mov edx, eax
cmp word [ebp + edx*2 - 0x21e], 0
lea eax, [eax + 1]
jne 0x4018f0
lea ebx, [ebp - 0x220]
mov ecx, 0x224c
mov word [ebp - 0x34c], cx
lea edi, [ebp - 0x22a]
mov dword [ebp - 0x3cc], ebx
lea ecx, [ebp - 0x34a]
jmp 0x401965
cmp eax, 9
je 0x401a18
cmp eax, 0xa
jne 0x401a32
mov word [ecx], 0x6e5c
add ecx, 2
lea esi, [esi]
lea eax, [edx - 1]
test edx, edx
jle 0x401a8d
cmp ecx, edi
ja 0x401a8d
mov edx, eax
add dword [ebp - 0x3cc], 2
mov eax, dword [ebp - 0x3cc]
movzx eax, word [eax - 2]
cmp eax, 0xd
je 0x401a08
jbe 0x401930
cmp eax, 0x22
je 0x401a80
cmp eax, 0x5c
lea esi, [esi]
jne 0x401a25
mov word [ecx], 0x5c5c
add ecx, 2
jmp 0x401950
mov eax, dword [edi + 0x34]
mov edi, str.failed_to_restart__err_ld_n
mov dword [esp + 0xc], edi
mov dword [esp], 3
mov dword [esp + 0x10], eax
mov eax, 0x404140
mov dword [esp + 8], eax
mov eax, section..data
mov dword [esp + 4], eax
call sym._wine_dbg_log.constprop.0
jmp 0x40184c
mov eax, str._invalid_
mov dword [esp + 0x10], eax
mov edx, 0x404140
mov ecx, section..data
mov dword [esp + 8], edx
mov eax, str.restarting_as__s_n
mov dword [esp + 0xc], eax
mov dword [esp + 4], ecx
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x401710
mov word [ecx], 0x725c
add ecx, 2
jmp 0x401950
mov word [ecx], 0x745c
add ecx, 2
jmp 0x401950
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x401ae5
mov byte [ecx], 0x5c
mov esi, eax
add ecx, 5
shr esi, 0xc
movzx ebx, byte [esi + str.0123456789abcdefreexec_self]
mov esi, eax
shr esi, 8
and esi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefreexec_self]
mov esi, eax
shr esi, 4
and eax, 0xf
and esi, 0xf
movzx eax, byte [eax + str.0123456789abcdefreexec_self]
mov byte [ecx - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefreexec_self]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x401950
mov word [ecx], 0x225c
add ecx, 2
jmp 0x401950
mov byte [ecx], 0x22
test eax, eax
jle 0x401b06
mov word [ecx + 1], 0x2e2e
lea eax, [ecx + 4]
mov byte [ecx + 3], 0x2e
mov byte [eax], 0
lea eax, [ebp - 0x34c]
mov dword [esp], eax
mov dword [ebp - 0x3cc], eax
call sym.___wine_dbg_strdup
jmp 0x4019d8
mov dword [esp], str._04x
lea eax, [ebp - 0x220]
mov dword [ebp - 0x3d4], eax
movzx eax, word [ebp - 0x3d4]
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x4019d8
mov byte [ecx], al
inc ecx
jmp 0x401950
mov byte [ebp - 0x34a], 0x22
lea ecx, [ebp - 0x34a]
mov eax, 0x224c
mov word [ebp - 0x34c], ax
lea eax, [ecx + 1]
jmp 0x401aa1
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x34c]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_WaitForSingleObject]
push eax
push eax
lea eax, [ebp - 0x3b4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34c]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_GetExitCodeProcess]
push eax
push eax
mov eax, dword [ebp - 0x3b4]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_ExitProcess]