Function at 0x41d870
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea edx, [ebp - 0x220]
push ebx
sub esp, 0x2ac
mov edi, dword [ebp + 8]
mov dword [esp], edx
mov dword [esp + 4], 0x104
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
lea edx, [ebp - 0x220]
sub esp, 8
cmp word [ebp - 0x220], 0
mov ecx, edx
je 0x41d8b9
lea esi, [esi]
nop
add ecx, 2
cmp word [ecx], 0
jne 0x41d8b0
xor eax, eax
mov ebx, 0x5c
jmp 0x41d8cf
movzx ebx, word [eax + str._start.exe]
mov word [ecx + eax], bx
add eax, 2
test bx, bx
jne 0x41d8c8
mov dword [esp], edx
mov esi, dword [sym.imp.ucrtbase.dll_wcslen]
call esi
mov dword [esp], edi
mov ebx, eax
call esi
lea eax, [ebx + eax + 8]
add eax, eax
mov dword [esp], eax
call sym._xalloc
lea edx, [ebp - 0x220]
mov esi, eax
xor eax, eax
lea esi, [esi]
movzx ecx, word [edx + eax]
mov word [esi + eax], cx
add eax, 2
test cx, cx
jne 0x41d908
cmp word [esi], 0
mov ecx, esi
je 0x41d929
add ecx, 2
cmp word [ecx], 0
jne 0x41d920
xor eax, eax
mov ebx, 0x20
jmp 0x41d93f
movzx ebx, word [eax + 0x43681a]
mov word [ecx + eax], bx
add eax, 2
test bx, bx
jne 0x41d938
cmp word [esi], 0
mov ebx, esi
je 0x41d961
lea esi, [esi]
nop
add ebx, 2
cmp word [ebx], 0
jne 0x41d958
mov dword [ebp - 0x27c], 0
lea eax, [ebp - 0x264]
mov dword [esp + 0x14], 0x43681e
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x27c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp], edi
mov dword [ebp - 0x264], 0
call sym._WCMD_parameter_with_delims
mov ecx, dword [ebp - 0x264]
lea edx, [ebp - 0x220]
mov dword [ebp - 0x280], eax
test ecx, ecx
je 0x41d9db
movzx eax, word [ecx]
cmp ax, 0x22
je 0x41db2c
cmp ecx, edi
je 0x41d9db
cmp word [ecx - 2], 0x2f
je 0x41db10
cmp word [esi], 0
mov ecx, esi
je 0x41d9f1
lea esi, [esi]
nop
add ecx, 2
cmp word [ecx], 0
jne 0x41d9e8
xor eax, eax
lea esi, [esi]
nop
movzx ebx, word [edi + eax]
mov word [ecx + eax], bx
add eax, 2
test bx, bx
jne 0x41d9f8
lea ebx, [ebp - 0x260]
xor eax, eax
mov ecx, 0x10
mov edi, ebx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x274]
mov dword [esp + 4], esi
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x264]
mov dword [ebp - 0x264], 0x44
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_CreateProcessW]
sub esp, 0x28
test eax, eax
je 0x41daf0
mov eax, dword [ebp - 0x274]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x274]
sub esp, 8
mov dword [esp + 4], 0x4231f0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetExitCodeProcess]
sub esp, 8
cmp dword [0x4231f0], 0x103
je 0x41db20
mov eax, dword [ebp - 0x274]
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x270]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
mov dword [ebp + 8], esi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp dword [sym.imp.ucrtbase.dll_free]
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 2
call sym._WCMD_print_error
mov dword [0x4231f0], 0x2331
jmp 0x41dadd
inc dword [ebp - 0x27c]
jmp 0x41d96b
mov dword [0x4231f0], 0
jmp 0x41dabb
mov word [ebp - 0x282], ax
test byte [0x423010], 8
jne 0x41dcb5
sub ecx, edi
mov dword [esp + 4], edi
mov dword [esp + 8], ecx
mov dword [esp], ebx
mov dword [ebp - 0x288], ecx
call sym._memcpy
mov ecx, dword [ebp - 0x288]
xor eax, eax
mov word [ebx + ecx], ax
cmp word [ebx], 0
mov ecx, ebx
je 0x41db79
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x41db70
mov edx, esi
xor eax, eax
movzx esi, word [ebp - 0x282]
jmp 0x41db97
movzx esi, word [eax + 0x436842]
mov word [ecx + eax], si
add eax, 2
test si, si
jne 0x41db90
cmp word [ebx], 0
mov esi, edx
mov ecx, ebx
je 0x41dbb9
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x41dbb0
mov edx, esi
mov esi, dword [ebp - 0x280]
mov dword [ebp - 0x280], ebx
xor eax, eax
lea esi, [esi]
movzx ebx, word [esi + eax]
mov word [ecx + eax], bx
add eax, 2
test bx, bx
jne 0x41dbd0
mov ebx, dword [ebp - 0x280]
mov esi, edx
cmp word [ebx], 0
mov ecx, ebx
je 0x41dbf9
add ecx, 2
cmp word [ecx], 0
jne 0x41dbf0
mov edx, 0x5c
mov dword [ebp - 0x280], esi
xor eax, eax
mov esi, edx
jmp 0x41dc17
movzx esi, word [eax + 0x43684a]
mov word [ecx + eax], si
add eax, 2
test si, si
jne 0x41dc10
lea eax, [ebp - 0x264]
mov dword [esp], edi
mov esi, dword [ebp - 0x280]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x27c]
mov dword [esp + 0x14], 0x43681e
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 4], eax
call sym._WCMD_parameter_with_delims
mov edi, dword [ebp - 0x264]
lea edx, [ebp - 0x220]
cmp word [eax], 0
mov ecx, eax
je 0x41dc93
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x41dc78
sub eax, ecx
add edi, eax
jmp 0x41dc93
add ebx, 2
cmp word [ebx], 0
jne 0x41dc90
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [edi + eax]
mov word [ebx + eax], cx
add eax, 2
test cx, cx
jne 0x41dca0
jmp 0x41da08
mov eax, dword [ebp - 0x280]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.detected_console_title:__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.WCMD_start
mov dword [esp + 4], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
mov ecx, dword [ebp - 0x264]
jmp 0x41db40