Function at 0x405140
Capabilities:
Create process on windows
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
xor eax, eax
push ebx
mov ebx, ecx
mov ecx, 0x10
sub esp, 0x3ec
mov dword [ebp - 0x3bc], edx
lea edx, [ebp - 0x3a8]
mov dword [ebp - 0x3ac], 0x44
mov edi, edx
rep stosd dword es:[edi], eax
movzx eax, bx
lea ebx, [ebp - 0x23c]
mov dword [esp + 4], 0x104
mov dword [ebp - 0x3c4], eax
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.kernelbase.dll_GetSystemWow64Directory2W]
sub esp, 0xc
test eax, eax
je 0x405440
cmp word [ebp - 0x23c], 0
mov edx, ebx
je 0x4051b9
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4051b0
xor eax, eax
mov ecx, 0x5c
jmp 0x4051cf
movzx ecx, word [eax + str._rundll32.exe]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4051c8
test byte [0x40a160], 8
jne 0x405348
cmp word [ebp - 0x23c], 0
je 0x405580
mov edx, ebx
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x405200
sub edx, ebx
sar edx, 1
lea ecx, [edx + 0x31]
cmp word [esi], 0
je 0x405590
mov eax, esi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x405220
sub eax, esi
sar eax, 1
lea edx, [ecx + eax]
mov dword [esp + 4], 0
lea ecx, [edx + edx]
mov dword [ebp - 0x3c0], edx
mov dword [esp + 8], ecx
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_HeapAlloc]
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x405440
mov edx, dword [ebp - 0x3c0]
mov eax, dword [ebp - 0x3bc]
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 8], str._s_setupapi_InstallHinfSection__s_128__s
mov dword [esp + 4], edx
mov dword [esp], edi
call sym._swprintf
lea eax, [ebp - 0x368]
mov dword [esp], ebx
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x3ac]
mov dword [esp + 0x20], eax
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
call dword [sym.imp.kernelbase.dll_CreateProcessW]
sub esp, 0x28
test eax, eax
jne 0x405330
mov dword [ebp - 0x368], 0
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]
mov eax, dword [ebp - 0x368]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x364]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_CloseHandle]
sub esp, 4
jmp 0x4052f5
mov eax, ebx
shr eax, 0x10
je 0x405450
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x405463
movzx eax, word [ebp - 0x23c]
test ax, ax
je 0x4055a8
lea esi, [esi]
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x405390
mov ecx, 0x224c
mov dword [ebp - 0x3c8], esi
mov esi, ebx
mov word [ebp - 0x368], cx
lea ecx, [ebp - 0x366]
mov dword [ebp - 0x3c0], edx
jmp 0x405408
cmp ax, 9
je 0x4054b8
cmp ax, 0xa
jne 0x4054d6
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
mov eax, dword [ebp - 0x3c0]
lea edi, [eax - 1]
test eax, eax
jle 0x405548
lea eax, [ebp - 0x246]
cmp ecx, eax
ja 0x405548
mov dword [ebp - 0x3c0], edi
movzx eax, word [esi]
add esi, 2
cmp ax, 0xd
je 0x4054a0
jbe 0x4053c0
cmp ax, 0x22
je 0x405530
cmp ax, 0x5c
jne 0x4054c9
mov eax, 0x5c5c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4053e0
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, bx
mov dword [esp], 0x40b21c
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x3c4]
mov dword [esp + 0xc], str.machine__x_starting__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.start_rundll32
mov dword [esp + 4], 0x40a160
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x4051e8
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4053e0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4053e0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x4055a0
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx edx, byte [edi + 0x4156a8]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], dl
movzx edx, byte [edi + 0x4156a8]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x4156a8]
and edi, 0xf
mov byte [ecx - 3], dl
movzx edx, byte [edi + 0x4156a8]
mov byte [ecx - 1], al
mov byte [ecx - 2], dl
jmp 0x4053e0
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4053e0
mov byte [ecx], 0x22
mov esi, dword [ebp - 0x3c8]
test edi, edi
jle 0x4055c1
mov edi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], di
mov byte [eax], 0
lea eax, [ebp - 0x368]
mov dword [esp], eax
call sym.___wine_dbg_strdup
jmp 0x405463
mov ecx, 0x31
jmp 0x405210
xor eax, eax
jmp 0x40522d
mov byte [ecx], al
inc ecx
jmp 0x4053e0
mov eax, 0x224c
mov byte [ebp - 0x366], 0x22
lea ecx, [ebp - 0x366]
mov word [ebp - 0x368], ax
lea eax, [ecx + 1]
jmp 0x405565