Function at 0x413910
Capabilities:
Check if file exists
Get common file path
Get program files directory

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 0x5c7864
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x2b0
mov eax, dword [0x6540c0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebx + 8]
lea eax, [ebp - 0x2b0]
push eax
mov dword [ebp - 0x2c0], esi
mov dword [ebp - 0x2b8], 0
call fcn.00414420
mov edx, eax
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x268]
call fcn.004056c0
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x29c]
cmp ecx, 7
jbe 0x4139c8
mov edx, dword [ebp - 0x2b0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4139be
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142ab
push ecx
push edx
call fcn.004392c8
add esp, 8
xor eax, eax
mov dword [ebp - 0x2a0], 0
mov word [ebp - 0x2b0], ax
lea eax, [ebp - 0x250]
push eax
mov dword [ebp - 0x29c], 7
call fcn.004146b0
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x298]
call fcn.004056c0
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x23c]
cmp ecx, 7
jbe 0x413a46
mov edx, dword [ebp - 0x250]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x413a3c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142b0
push ecx
push edx
call fcn.004392c8
add esp, 8
lea edx, [ebp - 0x268]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x250]
call fcn.00405290
cmp dword [ebp - 0x240], 0
mov edx, 0x5c
mov dword [ebp - 0x2b8], 0x20
jbe 0x413aa0
cmp dword [ebp - 0x254], 7
lea ecx, [ebp - 0x268]
mov eax, dword [ebp - 0x258]
cmova ecx, dword [ebp - 0x268]
cmp dx, word [ecx + eax*2 - 2]
je 0x413aa0
push edx
lea ecx, [ebp - 0x250]
call fcn.00409b90
push 6
push str.3A.exe
lea ecx, [ebp - 0x250]
call fcn.00409e30
mov dword [ebp - 0x270], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x280], xmm0
mov dword [ebp - 0x26c], 0
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x280], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x270], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x23c]
cmp ecx, 7
jbe 0x413b3e
mov edx, dword [ebp - 0x250]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x413b34
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142b5
push ecx
push edx
call fcn.004392c8
add esp, 8
mov edx, dword [ebp - 0x258]
lea ecx, [ebp - 0x298]
xor eax, eax
mov dword [ebp - 0x240], 0
cmp dword [ebp - 0x284], 7
lea edi, [ebp - 0x268]
mov dword [ebp - 0x23c], 7
cmova ecx, dword [ebp - 0x298]
cmp dword [ebp - 0x254], 7
mov word [ebp - 0x250], ax
cmova edi, dword [ebp - 0x268]
cmp edx, dword [ebp - 0x288]
jne 0x413d90
test edx, edx
je 0x413bb5
sub edi, ecx
nop dword [eax + eax]
mov ax, word [edi + ecx]
cmp ax, word [ecx]
jne 0x413d90
add ecx, 2
sub edx, 1
jne 0x413ba0
push 0
xorps xmm0, xmm0
mov dword [ebp - 0x228], 0
push 0x646054
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x224], 0
movups xmmword [ebp - 0x238], xmm0
call fcn.004027e0
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x2b0]
push 6
xorps xmm0, xmm0
mov dword [ebp - 0x2a0], 0
push str.3A.exe
movups xmmword [ebp - 0x2b0], xmm0
mov dword [ebp - 0x29c], 0
call fcn.004027e0
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x250]
push 0xc
xorps xmm0, xmm0
mov dword [ebp - 0x2b8], 0x42
push str.AAAJiaSu_is1
movups xmmword [ebp - 0x250], xmm0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
call fcn.004027e0
lea eax, [ebp - 0x238]
mov dword [ebp - 4], 0xb
push eax
lea edx, [ebp - 0x2b0]
mov dword [ebp - 0x2b8], 0x46
lea ecx, [ebp - 0x250]
call fcn.00406690
add esp, 4
test al, al
je 0x413c97
cmp dword [ebp - 0x228], 0
mov byte [ebp - 0x2b1], 1
jne 0x413c9e
mov byte [ebp - 0x2b1], 0
mov dword [ebp - 4], 0xa
mov ecx, dword [ebp - 0x23c]
cmp ecx, 7
jbe 0x413ce5
mov edx, dword [ebp - 0x250]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x413cdb
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142a6
push ecx
push edx
call fcn.004392c8
add esp, 8
mov dword [ebp - 4], 9
mov ecx, dword [ebp - 0x29c]
mov dword [ebp - 0x2b8], 0x40
cmp ecx, 7
jbe 0x413d36
mov edx, dword [ebp - 0x2b0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x413d2c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142a6
push ecx
push edx
call fcn.004392c8
add esp, 8
cmp byte [ebp - 0x2b1], 0
je 0x413f7d
xorps xmm0, xmm0
xor eax, eax
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
movups xmm0, xmmword [ebp - 0x238]
mov dword [esi + 0x14], 0
mov word [ebp - 0x238], ax
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x228]
movq qword [esi + 0x10], xmm0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 7
jmp 0x413e61
cmp dword [ebp - 0x26c], 7
lea eax, [ebp - 0x280]
cmova eax, dword [ebp - 0x280]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x413bb5
cmp dword [ebp - 0x254], 7
lea eax, [ebp - 0x268]
mov edi, dword [ebp - 0x258]
xorps xmm0, xmm0
cmova eax, dword [ebp - 0x268]
mov dword [ebp - 0x2c0], eax
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
cmp edi, 0x7ffffffe
ja 0x4142ba
cmp edi, 7
ja 0x413e0a
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], 7
movups xmm0, xmmword [eax]
movups xmmword [esi], xmm0
jmp 0x413e61
mov eax, edi
or eax, 7
cmp eax, 0x7ffffffe
jbe 0x413e1d
mov eax, bind
jmp 0x413e27
mov ecx, 0xa
cmp eax, ecx
cmovb eax, ecx
mov dword [ebp - 0x2bc], eax
lea eax, [ebp - 0x2bc]
push eax
push esi
call fcn.004029e0
mov ecx, eax
mov dword [esi + 0x10], edi
mov eax, dword [ebp - 0x2bc]
mov dword [esi + 0x14], eax
lea eax, [edi*2 + 2]
push eax
push dword [ebp - 0x2c0]
mov dword [esi], ecx
push ecx
call fcn.0048f690
add esp, 0x14
mov ecx, dword [ebp - 0x26c]
cmp ecx, 7
jbe 0x413ea1
mov edx, dword [ebp - 0x280]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x413e97
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142a6
push ecx
push edx
call fcn.004392c8
add esp, 8
mov ecx, dword [ebp - 0x284]
xor eax, eax
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 7
mov word [ebp - 0x280], ax
cmp ecx, 7
jbe 0x413efe
mov edx, dword [ebp - 0x298]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x413ef4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142a6
push ecx
push edx
call fcn.004392c8
add esp, 8
mov ecx, dword [ebp - 0x254]
xor eax, eax
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 7
mov word [ebp - 0x298], ax
cmp ecx, 7
jbe 0x413f5b
mov edx, dword [ebp - 0x268]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x413f51
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142a6
push ecx
push edx
call fcn.004392c8
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043928a
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4
push 0x208
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.0048fce0
mov edi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x220]
add esp, 0xc
push 0
push 0x2a
push eax
push 0
call edi
test eax, eax
jne 0x413fe9
push eax
push 0x26
lea eax, [ebp - 0x220]
push eax
push 0
call edi
test eax, eax
jne 0x413fe9
cmp dword [ebp - 0x254], 7
lea eax, [ebp - 0x268]
push dword [ebp - 0x258]
cmova eax, dword [ebp - 0x268]
lea ecx, [ebp - 0x238]
push eax
call fcn.00403f90
jmp 0x414090
xorps xmm0, xmm0
mov dword [ebp - 0x2a0], 0
lea ecx, [ebp - 0x220]
mov dword [ebp - 0x29c], 0
movups xmmword [ebp - 0x2b0], xmm0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x414010
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2b0]
call fcn.004027e0
mov ecx, dword [ebp - 0x224]
cmp ecx, 7
jbe 0x414072
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x414068
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142a6
push ecx
push edx
call fcn.004392c8
add esp, 8
movups xmm0, xmmword [ebp - 0x2b0]
movups xmmword [ebp - 0x238], xmm0
movq xmm0, qword [ebp - 0x2a0]
movq qword [ebp - 0x228], xmm0
push 0xc
push str.AAAPlatform
lea ecx, [ebp - 0x238]
call fcn.00409e30
cmp dword [ebp - 0x224], 7
lea eax, [ebp - 0x238]
cmova eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x41416a
lea edx, [ebp - 0x238]
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x250]
call fcn.00405290
cmp dword [ebp - 0x240], 0
mov dword [ebp - 0x2b8], 0xc0
jbe 0x41411f
cmp dword [ebp - 0x224], 7
lea ecx, [ebp - 0x238]
mov eax, dword [ebp - 0x228]
mov edx, 0x5c
cmova ecx, dword [ebp - 0x238]
cmp dx, word [ecx + eax*2 - 2]
je 0x41411f
push edx
lea ecx, [ebp - 0x250]
call fcn.00409b90
lea ecx, [ebp - 0x250]
call fcn.00405020
mov ecx, dword [ebp - 0x23c]
cmp ecx, 7
jbe 0x41416a
mov edx, dword [ebp - 0x250]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x414160
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142bf
push ecx
push edx
call fcn.004392c8
add esp, 8
mov ecx, dword [ebp - 0x26c]
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
xor eax, eax
mov dword [esi + 0x14], 0
movups xmm0, xmmword [ebp - 0x238]
mov word [ebp - 0x238], ax
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x228]
movq qword [esi + 0x10], xmm0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 7
cmp ecx, 7
jbe 0x4141f2
mov edx, dword [ebp - 0x280]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4141e8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142a6
push ecx
push edx
call fcn.004392c8
add esp, 8
mov ecx, dword [ebp - 0x284]
xor eax, eax
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 7
mov word [ebp - 0x280], ax
cmp ecx, 7
jbe 0x41424b
mov edx, dword [ebp - 0x298]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x414241
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4142a6
push ecx
push edx
call fcn.004392c8
add esp, 8
mov ecx, dword [ebp - 0x254]
xor eax, eax
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 7
mov word [ebp - 0x298], ax
cmp ecx, 7
jbe 0x413f5b
mov edx, dword [ebp - 0x268]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x413f51
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x413f51
call fcn.0049452a
call fcn.0049452a
call fcn.0049452a
call fcn.0049452a
call fcn.004012e0
call fcn.0049452a
int3