Function at 0x401610
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
lea edi, [ebp - 0x390]
push ebx
movzx ebx, ax
xor eax, eax
sub esp, 0x3fc
mov dword [ebp - 0x3bc], 0
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x3b0]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x3bc]
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 - 0x3b0]
sub esp, 0x18
test eax, eax
je 0x4016cd
lea edx, [ebp - 0x3ac]
jmp 0x401699
mov eax, dword [edx]
add edx, 4
test eax, eax
je 0x4016cd
cmp bx, ax
jne 0x401690
test eax, 0x40000
mov eax, 1
mov dword [esp + 4], 0x104
cmovne ebx, eax
lea eax, [ebp - 0x220]
mov dword [esp], eax
mov dword [esp + 8], ebx
call dword [sym.imp.kernelbase.dll_GetSystemWow64Directory2W]
sub esp, 0xc
test eax, eax
jne 0x4016d8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x220]
mov dword [esp + 4], str._regsvr32.exe
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_wcscat]
mov dword [ebp - 0x3d4], eax
call eax
lea eax, [ebp - 0x34c]
mov dword [ebp - 0x3d0], eax
test byte [section..data], 8
jne 0x4018d8
call dword [sym.imp.kernelbase.dll_GetCommandLineW]
mov ebx, eax
movzx eax, word [eax]
test ax, 0xffdf
je 0x401778
cmp ax, 9
je 0x401778
xor edx, edx
xor edi, edi
mov dword [ebp - 0x3cc], edx
cmp ax, 0x5c
je 0x4018b0
cmp ax, 0x22
je 0x4018c0
mov dword [ebp - 0x3cc], 0
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x401778
cmp ax, 9
sete cl
cmp ax, 0x20
mov esi, ecx
sete cl
mov edx, esi
or dl, cl
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 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 - 0x220]
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 - 0x3d4]
mov dword [esp], esi
call eax
lea eax, [ebp - 0x3b8]
mov dword [ebp - 0x390], 0x44
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_Wow64DisableWow64FsRedirection]
mov eax, dword [ebp - 0x3d0]
sub esp, 4
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x390]
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x220]
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 0x401b3e
test byte [section..data], 8
jne 0x401a18
mov eax, dword [ebp - 0x3b8]
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
add dword [ebp - 0x3cc], 1
jmp 0x40174e
and dword [ebp - 0x3cc], 1
jne 0x401744
xor edi, 1
jmp 0x40174e
lea eax, [ebp - 0x220]
shr eax, 0x10
je 0x401ae9
lea eax, [ebp - 0x220]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, str._invalid_
sub esp, 8
test eax, eax
jne 0x4019e5
cmp word [ebp - 0x220], 0
je 0x401b1d
lea esi, [esi]
mov edx, eax
lea eax, [eax + 1]
cmp word [ebp + edx*2 - 0x21e], 0
jne 0x401920
mov ecx, 0x224c
lea esi, [ebp - 0x220]
lea edi, [ebp - 0x22a]
mov word [ebp - 0x34c], cx
lea ecx, [ebp - 0x34a]
jmp 0x40197d
cmp ax, 9
je 0x401ad8
cmp ax, 0xa
jne 0x401a66
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea eax, [edx - 1]
test edx, edx
jle 0x4019b1
cmp ecx, edi
ja 0x4019b1
mov edx, eax
movzx eax, word [esi]
add esi, 2
cmp ax, 0xd
je 0x401a48
jbe 0x401950
cmp ax, 0x22
je 0x401ac0
cmp ax, 0x5c
jne 0x401a59
mov eax, 0x5c5c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x401970
mov byte [ecx], 0x22
test eax, eax
jle 0x401b36
mov edi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], di
mov byte [eax], 0
lea eax, [ebp - 0x34c]
mov dword [esp], eax
mov dword [ebp - 0x3d0], eax
call sym.___wine_dbg_strdup
mov edx, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.restarting_as__s_n
mov dword [esp + 8], 0x404140
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40170f
mov eax, dword [edi + 0x34]
mov dword [esp + 0xc], str.failed_to_restart__err_ld_n
mov dword [esp + 8], 0x404140
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40186a
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x401970
lea ebx, [eax - 0x20]
cmp bx, 0x5e
jbe 0x401b13
mov ebx, eax
mov byte [ecx], 0x5c
add ecx, 5
shr bx, 0xc
movzx ebx, bx
movzx ebx, byte [ebx + str.0123456789abcdefreexec_self]
mov byte [ecx - 4], bl
mov ebx, eax
shr bx, 8
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefreexec_self]
mov byte [ecx - 3], bl
mov ebx, eax
and eax, 0xf
shr bx, 4
movzx eax, byte [eax + str.0123456789abcdefreexec_self]
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefreexec_self]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x401970
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x401970
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x401970
lea eax, [ebp - 0x220]
mov dword [esp], str._04x
mov dword [ebp - 0x3cc], eax
movzx eax, word [ebp - 0x3cc]
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov edx, eax
jmp 0x4019e5
mov byte [ecx], al
add ecx, 1
jmp 0x401970
mov eax, 0x224c
mov byte [ebp - 0x34a], 0x22
lea ecx, [ebp - 0x34a]
mov word [ebp - 0x34c], ax
lea eax, [ecx + 1]
jmp 0x4019cc
mov eax, dword [ebp - 0x34c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_WaitForSingleObject]
lea eax, [ebp - 0x3b4]
push ebx
push ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34c]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_GetExitCodeProcess]
mov eax, dword [ebp - 0x3b4]
push esi
push esi
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_ExitProcess]