Function at 0x40a860
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b68d
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x43800c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x250], edi
mov dword [ebp - 0x284], edi
mov dword [ebp - 0x288], edi
mov dword [ebp - 4], 0
push 8
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
call fcn.004165e0
add esp, 4
mov dword [eax + 4], 0
mov dword [edi], eax
mov dword [eax], edi
lea esi, [edi + 0x14]
mov byte [ebp - 4], 1
xor eax, eax
mov dword [esi], 0
push eax
push 0x4335d8
mov ecx, esi
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
call fcn.00409f20
xor eax, eax
mov byte [ebp - 4], 2
push eax
mov dword [ebp - 0x230], 0
lea ecx, [ebp - 0x230]
push 0x4335d8
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
call fcn.00409f20
push 0x208
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 3
push 0
push eax
call fcn.00417e70
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push str.Microsoft
push 0
push 0
push 0x801c
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
test eax, eax
jne 0x40b010
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x24c], eax
mov dword [ebp - 0x23c], eax
lea edx, [ecx + 2]
mov dword [ebp - 0x238], 7
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a9a6
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x24c]
call fcn.00409f20
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x40aa08
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40a9fe
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0b0
push edx
push ecx
call fcn.004165af
add esp, 8
movups xmm0, xmmword [ebp - 0x24c]
mov edx, dword [ebp - 0x23c]
movups xmmword [ebp - 0x230], xmm0
movq xmm0, qword [ebp - 0x23c]
movq qword [ebp - 0x220], xmm0
test edx, edx
je 0x40accd
cmp dword [ebp - 0x238], 8
lea eax, [ebp - 0x230]
lea ecx, [ebp - 0x230]
cmovae eax, dword [ebp - 0x24c]
cmovae ecx, dword [ebp - 0x24c]
lea eax, [eax + edx*2]
cmp eax, ecx
je 0x40af64
cmp word [eax - 2], 0x5c
je 0x40af64
push 1
xor eax, eax
mov dword [ebp - 0x268], 0
push 0x433214
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 7
mov word [ebp - 0x268], ax
call fcn.00409f20
mov byte [ebp - 4], 4
lea eax, [ebp - 0x230]
cmp dword [ebp - 0x21c], 8
push dword [ebp - 0x220]
cmovae eax, dword [ebp - 0x230]
push eax
push ecx
lea ecx, [ebp - 0x268]
call fcn.00409640
mov dword [ebp - 0x24c], 0
xor ecx, ecx
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x24c], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x23c], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
push str.Dispatcher
lea edx, [ebp - 0x24c]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x280]
call fcn.00408ab0
mov edi, eax
add esp, 4
lea eax, [ebp - 0x230]
cmp eax, edi
je 0x40abc5
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x40ab84
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ab7a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0a1
push edx
push ecx
call fcn.004165af
add esp, 8
mov dword [ebp - 0x220], 0
xor eax, eax
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
movups xmm0, xmmword [edi]
movups xmmword [ebp - 0x230], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x220], xmm0
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], 7
mov word [edi], ax
mov edx, dword [ebp - 0x26c]
cmp edx, 8
jb 0x40ac05
mov ecx, dword [ebp - 0x280]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40abfb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0a1
push edx
push ecx
call fcn.004165af
add esp, 8
xor eax, eax
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x238]
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 7
mov word [ebp - 0x280], ax
cmp edx, 8
jb 0x40ac66
mov ecx, dword [ebp - 0x24c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ac5c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0a1
push edx
push ecx
call fcn.004165af
add esp, 8
xor eax, eax
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x254]
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 7
mov word [ebp - 0x24c], ax
cmp edx, 8
jb 0x40acc7
mov ecx, dword [ebp - 0x268]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40acbd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0a1
push edx
push ecx
call fcn.004165af
add esp, 8
mov edi, dword [ebp - 0x250]
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
setne cl
mov byte [ebp - 0x231], cl
test eax, eax
jne 0x40ad1e
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
push 0
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40ad26
mov cl, byte [ebp - 0x231]
test cl, cl
je 0x40b010
push 1
xor eax, eax
mov dword [ebp - 0x268], 0
push 0x433214
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 7
mov word [ebp - 0x268], ax
call fcn.00409f20
mov byte [ebp - 4], 6
lea eax, [ebp - 0x230]
cmp dword [ebp - 0x21c], 8
push dword [ebp - 0x220]
cmovae eax, dword [ebp - 0x230]
push eax
push ecx
lea ecx, [ebp - 0x268]
call fcn.00409640
mov dword [ebp - 0x24c], 0
xor ecx, ecx
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x24c], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x23c], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea eax, [ebp + 8]
mov byte [ebp - 4], 7
push eax
lea edx, [ebp - 0x24c]
lea ecx, [ebp - 0x280]
call fcn.00408950
add esp, 4
mov dword [ebp - 0x250], eax
cmp esi, eax
je 0x40ae67
mov ecx, dword [esi + 0x14]
cmp ecx, 8
jb 0x40ae37
mov eax, dword [esi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x40ae27
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0a6
mov eax, edx
push ecx
push eax
call fcn.004165af
mov eax, dword [ebp - 0x250]
add esp, 8
mov dword [esi + 0x10], 0
xor ecx, ecx
mov dword [esi + 0x14], 7
mov word [esi], cx
movups xmm0, xmmword [eax]
movups xmmword [esi], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [esi + 0x10], xmm0
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], 7
mov word [eax], cx
mov edx, dword [ebp - 0x26c]
cmp edx, 8
jb 0x40aea7
mov ecx, dword [ebp - 0x280]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ae9d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0a6
push edx
push ecx
call fcn.004165af
add esp, 8
mov edx, dword [ebp - 0x238]
xor eax, eax
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 7
mov word [ebp - 0x280], ax
cmp edx, 8
jb 0x40af04
mov ecx, dword [ebp - 0x24c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40aefa
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0a6
push edx
push ecx
call fcn.004165af
add esp, 8
mov edx, dword [ebp - 0x254]
xor eax, eax
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 7
mov word [ebp - 0x24c], ax
cmp edx, 8
jb 0x40b010
mov ecx, dword [ebp - 0x268]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40b006
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0a6
jmp 0x40b006
mov eax, 0x7ffffffe
sub eax, edx
cmp eax, 0xa
jb 0x40b0ab
cmp dword [ebp - 0x238], 8
lea eax, [ebp - 0x230]
push 0xa
cmovae eax, dword [ebp - 0x24c]
push str.Dispatcher
push edx
push eax
push ecx
push dword [ebp - 0x288]
lea ecx, [ebp - 0x280]
call fcn.00409530
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x40afe3
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40afd9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0b0
push edx
push ecx
call fcn.004165af
add esp, 8
movups xmm0, xmmword [ebp - 0x280]
movups xmmword [ebp - 0x230], xmm0
movq xmm0, qword [ebp - 0x270]
movq qword [ebp - 0x220], xmm0
jmp 0x40accd
push edx
push ecx
call fcn.004165af
add esp, 8
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x40b04c
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40b042
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0b0
push edx
push ecx
call fcn.004165af
add esp, 8
mov edx, dword [ebp + 0x1c]
cmp edx, 8
jb 0x40b082
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40b078
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b0b5
push edx
push ecx
call fcn.004165af
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004165a1
mov esp, ebp
pop ebp
ret 0x18
call fcn.00419a7c
call fcn.00419a7c
call fcn.00409d80
call fcn.00419a7c
call fcn.00419a7c
int3