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

Disassembly:
sub esp, 0x3f4
push ebx
push ebp
mov ebp, dword [esp + 0x400]
push esi
test ebp, ebp
push edi
je 0x401440
mov eax, dword [esp + 0x40c]
test eax, eax
je 0x401440
mov ecx, 0x32
xor eax, eax
lea edi, [esp + 0x14]
push 0xc8
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0xe0]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x40127d
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x3f4
ret 8
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
mov bl, 0x5c
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x13], bl
je 0x4012c1
mov edi, 0x407044
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0xdc]
push 0xc8
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x4012ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x3f4
ret 8
lea edi, [esp + 0xdc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0xdb], bl
je 0x401339
mov edi, 0x407044
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xdc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x407038
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xdc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x2a8], 0x94
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x2a8]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x2b8], 1
jne 0x40144f
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1e0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x1e0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x407094
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1e4]
push 0x407084
push ecx
call fcn.00401700
lea edx, [esp + 0xe8]
push ebp
push edx
lea eax, [esp + 0x350]
push 0x407050
push eax
call fcn.00401700
add esp, 0x1c
lea ecx, [esp + 0x33c]
lea edx, [esp + 0x1e0]
push 1
push 0
push ecx
push edx
push 0x407048
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3f4
ret 8
mov ecx, dword [esp + 0x40c]
lea eax, [esp + 0x10]
push eax
push 1
push ebp
push ecx
push 0
call sub.newdev.dll_UpdateDriverForPlugAndPlayDevicesA
neg eax
sbb eax, eax
pop edi
neg eax
pop esi
pop ebp
dec eax
pop ebx
add esp, 0x3f4
ret 8