Function at 0x40669a
Capabilities:
Create process on windows
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x350
mov eax, dword [0x459178]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x2e8], eax
mov eax, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x310], eax
xor eax, eax
push 0x208
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push ebx
push eax
mov dword [ebp - 0x308], edi
call fcn.004374e0
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x40670c
xor eax, eax
mov word [ebp - 0x14], ax
jmp 0x406715
xor eax, eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x2f8]
mov dword [ebp - 0x2f8], ebx
push eax
push 0x3b
pop edx
mov ecx, esi
mov dword [ebp - 0x2f4], ebx
mov dword [ebp - 0x2f0], ebx
call fcn.00410ae0
mov esi, dword [ebp - 0x2f8]
mov eax, dword [ebp - 0x2f4]
mov dword [ebp - 0x2e4], esi
pop ecx
cmp esi, eax
je 0x406d69
sub eax, esi
push 0x18
cdq
pop ecx
idiv ecx
mov ebx, eax
test ebx, ebx
jmp 0x406d46
push esi
lea ecx, [ebp - 0x294]
call fcn.004025a9
mov edx, str.__r_t_n
lea ecx, [ebp - 0x294]
call fcn.0040cc10
cmp dword [ebp - 0x284], 0
jne 0x40679d
push 0
push 1
lea ecx, [ebp - 0x294]
call fcn.00401df6
jmp 0x406d3a
xor eax, eax
mov dword [ebp - 0x298], 7
mov word [ebp - 0x2ac], ax
xor ecx, ecx
lea eax, [ebp - 0x304]
mov dword [ebp - 0x29c], ecx
push eax
lea eax, [ebp - 0x294]
mov dword [ebp - 0x304], ecx
push eax
mov dword [ebp - 0x300], ecx
mov bh, cl
mov dword [ebp - 0x2fc], ecx
call fcn.0040742e
test al, al
jne 0x406868
cmp dword [edi + 0x14], 8
jb 0x4067f1
mov eax, dword [edi]
jmp 0x4067f3
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea edx, [ebp - 0x294]
lea ecx, [ebp - 0x27c]
call fcn.004038b0
push eax
lea ecx, [ebp - 0x294]
call fcn.004025d1
push 0
push 1
lea ecx, [ebp - 0x27c]
call fcn.00401df6
push edi
lea eax, [ebp - 0x294]
push eax
call fcn.00406616
mov bh, al
test bh, bh
jne 0x406d0b
lea ecx, [ebp - 0x27c]
call fcn.00411840
push eax
lea ecx, [ebp - 0x2ac]
call fcn.004025d1
push 0
push 1
lea ecx, [ebp - 0x27c]
call fcn.00401df6
jmp 0x406c22
mov esi, dword [ebp - 0x304]
lea ecx, [ebp - 0x264]
push esi
call fcn.004025a9
push 0x5c
push 0x2f
pop edx
lea ecx, [ebp - 0x264]
call fcn.0040cb50
add esp, 4
mov edx, ecx
lea ecx, [ebp - 0x2c4]
call fcn.004038b0
push eax
lea ecx, [ebp - 0x264]
call fcn.004025d1
push 0
push 1
lea ecx, [ebp - 0x2c4]
call fcn.00401df6
xor eax, eax
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
xor edi, edi
mov eax, dword [ebp - 0x300]
sub eax, esi
mov dword [ebp - 0x224], edi
push 0x18
cdq
pop ecx
idiv ecx
cmp eax, 1
jbe 0x40698a
add esi, ecx
mov dword [ebp - 0x30c], 0x20
dec eax
mov dword [ebp - 0x2ec], eax
push 1
push 0
lea eax, [ebp - 0x30c]
mov ecx, esi
push eax
call fcn.00401d53
cmp eax, 0xffffffff
je 0x406950
mov edi, 0x44c818
push edi
call fcn.004370ab
pop ecx
push eax
push edi
lea ecx, [ebp - 0x234]
call fcn.0040294a
push 0xffffffffffffffff
push 0
push esi
lea ecx, [ebp - 0x234]
call fcn.004028a8
push edi
call fcn.004370ab
pop ecx
push eax
push edi
lea ecx, [ebp - 0x234]
call fcn.0040294a
jmp 0x406972
test edi, edi
je 0x406962
push 0x20
push ecx
lea ecx, [ebp - 0x234]
call fcn.004036d8
push 0xffffffffffffffff
push 0
push esi
lea ecx, [ebp - 0x234]
call fcn.004028a8
push 0x18
pop eax
add esi, eax
dec dword [ebp - 0x2ec]
je 0x40698a
mov edi, dword [ebp - 0x224]
jmp 0x4068fa
lea ecx, [ebp - 0x264]
call fcn.0040d7c0
mov edi, dword [ebp - 0x308]
lea ecx, [ebp - 0x24c]
push edi
mov bl, al
call fcn.004025a9
test bl, bl
jne 0x406a09
lea eax, [ebp - 0x264]
mov edx, edi
push eax
lea ecx, [ebp - 0x2dc]
call fcn.0040d470
pop ecx
lea ecx, [ebp - 0x2dc]
call fcn.0040dab0
xor esi, esi
test al, al
je 0x4069f9
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0x2dc]
push eax
lea ecx, [ebp - 0x264]
call fcn.00402073
lea edx, [ebp - 0x24c]
lea ecx, [ebp - 0x264]
call fcn.0040f220
push esi
push 1
lea ecx, [ebp - 0x2dc]
call fcn.00401df6
jmp 0x406a0b
xor esi, esi
lea edx, [ebp - 0x264]
lea ecx, [ebp - 0x27c]
call fcn.0040e780
cmp byte [ebp + 0x18], 0
je 0x406b5b
cmp dword [ebp - 0x268], 8
lea ecx, [ebp - 0x27c]
mov edx, 0x44cafc
cmovae ecx, dword [ebp - 0x27c]
call fcn.0040ca20
push 0x3c
mov bl, al
lea eax, [ebp - 0x34c]
push esi
push eax
call fcn.004374e0
mov eax, dword [ebp - 0x2e8]
xor ecx, ecx
mov dword [ebp - 0x344], eax
add esp, 0xc
test bl, bl
mov dword [ebp - 0x34c], 0x3c
mov eax, str.install
mov dword [ebp - 0x348], 0x540
cmove eax, ecx
cmp dword [ebp - 0x250], 8
mov dword [ebp - 0x340], eax
lea eax, [ebp - 0x264]
cmovae eax, dword [ebp - 0x264]
cmp dword [ebp - 0x238], 8
mov dword [ebp - 0x33c], eax
lea eax, [ebp - 0x24c]
cmovae eax, dword [ebp - 0x24c]
mov dword [ebp - 0x334], eax
cmp dword [ebp - 0x224], ecx
jne 0x406ace
mov dword [ebp - 0x338], esi
jmp 0x406ae8
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
mov dword [ebp - 0x338], eax
lea eax, [ebp - 0x34c]
mov dword [ebp - 0x330], 1
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x406b2d
lea ecx, [ebp - 0x2c4]
call fcn.00411840
push eax
lea ecx, [ebp - 0x2ac]
call fcn.004025d1
push 0
push 1
lea ecx, [ebp - 0x2c4]
call fcn.00401df6
xor bh, bh
xor esi, esi
cmp dword [ebp - 0x314], 0
je 0x406be4
push 0xffffffffffffffff
push dword [ebp - 0x314]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x314]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bh, 1
jmp 0x406be4
cmp dword [ebp - 0x224], 0
jne 0x406b68
mov edx, esi
jmp 0x406b7c
cmp dword [ebp - 0x220], 8
lea edx, [ebp - 0x234]
cmovae edx, dword [ebp - 0x234]
cmp dword [ebp - 0x238], 8
lea ecx, [ebp - 0x24c]
push 1
cmovae ecx, dword [ebp - 0x24c]
lea eax, [ebp - 0x264]
cmp dword [ebp - 0x250], 8
push ecx
cmovae eax, dword [ebp - 0x264]
push edx
push eax
push 0x44c7c4
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
seta bh
test bh, bh
jne 0x406be4
lea ecx, [ebp - 0x2c4]
call fcn.00411840
push eax
lea ecx, [ebp - 0x2ac]
call fcn.004025d1
push esi
push 1
lea ecx, [ebp - 0x2c4]
call fcn.00401df6
push esi
push 1
lea ecx, [ebp - 0x27c]
call fcn.00401df6
push esi
push 1
lea ecx, [ebp - 0x24c]
call fcn.00401df6
push esi
push 1
lea ecx, [ebp - 0x234]
call fcn.00401df6
push esi
push 1
lea ecx, [ebp - 0x264]
call fcn.00401df6
mov esi, dword [ebp - 0x2e4]
test bh, bh
jne 0x406d0b
cmp dword [ebp - 0x280], 8
lea eax, [ebp - 0x294]
cmovae eax, dword [ebp - 0x294]
push eax
lea eax, [ebp - 0x24c]
push 0x27eb
push eax
call fcn.00403811
add esp, 0xc
lea eax, [ebp - 0x27c]
push 0x27e9
push eax
call fcn.004039a9
mov ecx, eax
call fcn.00416136
cmp dword [ebp - 0x29c], 0
je 0x406ca3
mov ebx, 0x44c840
push ebx
call fcn.004370ab
pop ecx
push eax
push ebx
lea ecx, [ebp - 0x24c]
call fcn.0040294a
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x2ac]
push eax
lea ecx, [ebp - 0x24c]
call fcn.004028a8
mov ecx, dword [ebp - 0x310]
lea eax, [ebp - 0x24c]
push eax
call fcn.00404f2d
cmp dword [ebp - 0x268], 8
lea ecx, [ebp - 0x27c]
push 0
cmovae ecx, dword [ebp - 0x27c]
lea eax, [ebp - 0x24c]
cmp dword [ebp - 0x238], 8
push ecx
cmovae eax, dword [ebp - 0x24c]
push eax
push dword [ebp - 0x2e8]
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0
push 1
lea ecx, [ebp - 0x27c]
call fcn.00401df6
push 0
push 1
lea ecx, [ebp - 0x24c]
call fcn.00401df6
lea ecx, [ebp - 0x304]
call fcn.00401e85
push 0
push 1
lea ecx, [ebp - 0x2ac]
call fcn.00401df6
push 0
push 1
lea ecx, [ebp - 0x294]
call fcn.00401df6
mov ebx, dword [ebp - 0x2e0]
push 0x18
pop eax
add esi, eax
dec ebx
mov dword [ebp - 0x2e4], esi
mov dword [ebp - 0x2e0], ebx
jne 0x406764
cmp word [ebp - 0x21c], 0
je 0x406d69
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [ebp - 0x2f8]
call fcn.00401e85
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00436362
mov esp, ebp
pop ebp
ret 0x14