Function at 0x406240
Capabilities:
Get common file path

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x425c57
mov eax, dword fs:[0]
push eax
push ecx
push ebx
sub esp, 0x500
mov eax, dword [0x433180]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x228]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x40678a
push 0x12
xorps xmm0, xmm0
mov dword [ebp - 0x4e8], eax
push str.ArcControlServices
lea ecx, [ebp - 0x4f8]
mov dword [ebp - 0x4e4], eax
movups xmmword [ebp - 0x4f8], xmm0
call fcn.004059e0
lea esi, [ebp - 0x228]
mov dword [ebp - 4], 0
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4062e0
sub ecx, edx
mov dword [ebp - 0x4d0], 0
sar ecx, 1
xorps xmm0, xmm0
push ecx
push esi
lea ecx, [ebp - 0x4e0]
mov dword [ebp - 0x4cc], 0
movups xmmword [ebp - 0x4e0], xmm0
call fcn.004059e0
lea eax, [ebp - 0x4f8]
mov byte [ebp - 4], 1
push eax
lea edx, [ebp - 0x4e0]
lea ecx, [ebp - 0x488]
call fcn.00402ad0
add esp, 4
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x4cc]
cmp ecx, 7
jbe 0x40637d
mov edx, dword [ebp - 0x4e0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406373
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406907
push ecx
push edx
call fcn.0040f21f
add esp, 8
xor eax, eax
mov dword [ebp - 0x4d0], 0
mov dword [ebp - 0x4cc], 7
mov word [ebp - 0x4e0], ax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x4e4]
cmp ecx, 7
jbe 0x4063de
mov edx, dword [ebp - 0x4f8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4063d4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406907
push ecx
push edx
call fcn.0040f21f
add esp, 8
xor eax, eax
mov byte [ebp - 4], 5
lea edx, [ebp - 0x43c]
mov dword [ebp - 0x4e8], 0
lea ecx, [ebp - 0x488]
mov dword [ebp - 0x4e4], 7
mov word [ebp - 0x4f8], ax
mov dword [ebp - 0x43c], eax
mov dword [ebp - 0x438], 0x433c30
call fcn.004036f0
cmp dword [ebp - 0x43c], 0
jne 0x40690c
push 0x104
lea eax, [ebp - 0x430]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40674a
lea esi, [ebp - 0x430]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406454
sub ecx, edx
mov dword [ebp - 0x460], 0
sar ecx, 1
xorps xmm0, xmm0
push ecx
push esi
lea ecx, [ebp - 0x470]
mov dword [ebp - 0x45c], 0
movups xmmword [ebp - 0x470], xmm0
call fcn.004059e0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x510]
push 0x16
xorps xmm0, xmm0
mov dword [ebp - 0x500], 0
push str.ArcControlServices.exe
movups xmmword [ebp - 0x510], xmm0
mov dword [ebp - 0x4fc], 0
call fcn.004059e0
lea eax, [ebp - 0x510]
mov byte [ebp - 4], 7
push eax
lea edx, [ebp - 0x488]
lea ecx, [ebp - 0x458]
call fcn.00402ad0
add esp, 4
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x4fc]
cmp ecx, 7
jbe 0x406525
mov edx, dword [ebp - 0x510]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40651b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406923
push ecx
push edx
call fcn.0040f21f
add esp, 8
xor eax, eax
mov dword [ebp - 0x500], 0
cmp dword [ebp - 0x444], 7
lea ecx, [ebp - 0x4a8]
push 0xffffffffffffffff
mov word [ebp - 0x510], ax
lea eax, [ebp - 0x458]
cmova eax, dword [ebp - 0x458]
push 3
push ecx
push eax
mov dword [ebp - 0x4fc], 7
call fcn.0040e63e
mov esi, eax
test esi, esi
jne 0x4065c0
mov ecx, dword [ebp - 0x498]
mov eax, 0x1ff
test cl, 1
mov edx, 0x16d
cmovne eax, edx
mov dword [ebp - 0x43c], eax
mov eax, ecx
shr eax, 0xa
test al, 1
je 0x4065b2
mov eax, dword [ebp - 0x494]
cmp eax, 0xa000000c
jne 0x4065a4
lea eax, [esi + 4]
jmp 0x4065d6
cmp eax, 0xa0000003
jne 0x4065b2
mov eax, 0xa
jmp 0x4065d6
shr ecx, 4
movzx eax, cl
and eax, 1
or eax, 2
jmp 0x4065d6
push esi
mov dword [ebp - 0x43c], 0xffff
call fcn.004025f0
add esp, 4
movzx eax, al
mov dword [ebp - 0x43c], esi
mov dword [ebp - 0x438], 0x433c30
test eax, eax
je 0x4067a8
cmp eax, 1
setne al
test al, al
je 0x4067b0
cmp dword [ebp - 0x45c], 7
lea ecx, [ebp - 0x4a8]
push 0xffffffffffffffff
push 0x21
lea eax, [ebp - 0x470]
cmova eax, dword [ebp - 0x470]
push ecx
push eax
call fcn.0040e63e
test eax, eax
jne 0x406936
cmp dword [ebp - 0x444], 7
lea ecx, [ebp - 0x4c8]
mov esi, dword [ebp - 0x4a4]
lea eax, [ebp - 0x458]
cmova eax, dword [ebp - 0x458]
push 0xffffffffffffffff
push 0x21
push ecx
push eax
call fcn.0040e63e
test eax, eax
jne 0x406928
mov ecx, dword [ebp - 0x4c8]
mov eax, dword [ebp - 0x4c4]
cmp dword [ebp - 0x4a8], ecx
jne 0x406674
cmp esi, eax
je 0x406690
cmp esi, eax
jg 0x406686
jl 0x406682
cmp dword [ebp - 0x4a8], ecx
jae 0x406686
or al, 0xff
jmp 0x406688
mov al, 1
test al, al
jg 0x4067b0
mov ecx, dword [ebp - 0x444]
cmp ecx, 7
jbe 0x4066d0
mov edx, dword [ebp - 0x458]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4066c6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40696e
push ecx
push edx
call fcn.0040f21f
add esp, 8
mov ecx, dword [ebp - 0x45c]
xor eax, eax
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x444], 7
mov word [ebp - 0x458], ax
cmp ecx, 7
jbe 0x40672d
mov edx, dword [ebp - 0x470]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406723
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40696e
push ecx
push edx
call fcn.0040f21f
add esp, 8
xor eax, eax
mov dword [ebp - 0x460], 0
mov dword [ebp - 0x45c], 7
mov word [ebp - 0x470], ax
mov ecx, dword [ebp - 0x474]
cmp ecx, 7
jbe 0x40678a
mov edx, dword [ebp - 0x488]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406780
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40696e
push ecx
push edx
call fcn.0040f21f
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0040ed91
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
test esi, esi
jne 0x406944
cmp dword [ebp - 0x444], 7
lea ecx, [ebp - 0x458]
push 2
cmova ecx, dword [ebp - 0x458]
lea eax, [ebp - 0x470]
cmp dword [ebp - 0x45c], 7
push ecx
cmova eax, dword [ebp - 0x470]
push eax
call fcn.0040e445
test edx, edx
jne 0x40695b
mov ecx, dword [ebp - 0x444]
cmp ecx, 7
jbe 0x406829
mov edx, dword [ebp - 0x458]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40681f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40696e
push ecx
push edx
call fcn.0040f21f
add esp, 8
mov ecx, dword [ebp - 0x45c]
xor eax, eax
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x444], 7
mov word [ebp - 0x458], ax
cmp ecx, 7
jbe 0x4068c4
mov edx, dword [ebp - 0x470]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40687c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40696e
push ecx
push edx
call fcn.0040f21f
add esp, 8
jmp 0x4068c4
mov ecx, dword [ebp - 0x474]
cmp ecx, 7
jbe 0x40678a
mov edx, dword [ebp - 0x488]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406780
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x406780
call fcn.00413dbf
call fcn.00413dbf
lea eax, [ebp - 0x488]
mov ecx, str.create_directories
push eax
lea edx, [ebp - 0x43c]
call fcn.00403670
call fcn.00413dbf
lea ecx, [ebp - 0x458]
mov edx, eax
push ecx
call fcn.00403550
lea ecx, [ebp - 0x470]
mov edx, eax
push ecx
call fcn.00403550
lea eax, [ebp - 0x458]
mov ecx, str.exists
push eax
lea edx, [ebp - 0x43c]
call fcn.00403670
lea eax, [ebp - 0x458]
push eax
lea eax, [ebp - 0x470]
push eax
call fcn.004035e0
call fcn.00413dbf
int3