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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x524a94
mov eax, dword fs:[0]
push eax
sub esp, 0x6bc
mov eax, dword [0x570454]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x240], 0
call fcn.00415761
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a86b
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
mov dword [ebp - 4], 1
call fcn.00415761
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a89e
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x234], eax
mov byte [ebp - 4], 2
call fcn.00415761
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a8ce
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x22c], eax
mov byte [ebp - 4], 3
call fcn.00415761
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a8fe
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x224], eax
mov byte [ebp - 4], 4
call fcn.00415761
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a92e
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x228], eax
mov byte [ebp - 4], 5
call fcn.00415761
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a95e
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x230], eax
mov byte [ebp - 4], 6
call fcn.00415761
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a98e
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [ebp - 0x248], ebx
mov byte [ebp - 4], 7
call fcn.00415761
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a9be
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x244], esi
lea ecx, [ebp - 0x6c8]
push ecx
mov byte [ebp - 4], 8
call fcn.004066f0
lea edx, [ebp - 0x218]
push edx
push 0
push 0
push 0x801c
push 0
mov byte [ebp - 4], 9
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40aa05
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x224]
call fcn.00404140
push 0xc
push str.Exam_Shield
lea ecx, [ebp - 0x224]
call fcn.0040bfe0
mov edi, dword [ebp - 0x224]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40abe2
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40abe2
push eax
push eax
push str.Unable_to_create_directory
call fcn.00414bad
call fcn.00415761
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40aa86
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov ecx, dword [ebp - 0x23c]
add eax, 0x10
mov dword [ecx], eax
call fcn.004042d0
lea ecx, [ebp - 0x6c8]
push ecx
mov dword [ebp - 0x240], 1
mov byte [ebp - 4], 8
call fcn.004068f0
lea eax, [esi - 0x10]
mov byte [ebp - 4], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40aad9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aaf9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x230]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab1f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x228]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab45
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab65
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x22c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab8b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x234]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40abb1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40abd7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x23c]
jmp 0x40b198
push 0x12c
call fcn.0041a156
test eax, eax
je 0x40ac01
push 0x12c
push eax
lea ecx, [ebp - 0x234]
call fcn.004063e0
push str.ExamShieldVersion.txt
lea ecx, [ebp - 0x234]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.0040c0a0
add esp, 0xc
mov byte [ebp - 4], 0xb
mov ecx, dword [eax]
mov esi, dword [ebp - 0x22c]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x40ac7d
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40ac6d
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40ac6d
push eax
call fcn.004041f0
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40ac62
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [ebp - 0x22c], ebx
jmp 0x40ac7d
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x22c]
call fcn.00404140
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aca3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.ExamShieldVersion.dat
lea ecx, [ebp - 0x224]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.0040c0a0
add esp, 0xc
mov byte [ebp - 4], 0xc
mov ecx, dword [eax]
mov esi, dword [ebp - 0x228]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x40ad1f
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40ad0f
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40ad0f
push eax
call fcn.004041f0
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40ad04
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [ebp - 0x228], ebx
jmp 0x40ad1f
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x228]
call fcn.00404140
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ad45
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0xc8
call fcn.0041a156
test eax, eax
je 0x40ad64
push 0xc8
push eax
lea ecx, [ebp - 0x220]
call fcn.004063e0
mov ecx, dword [ebp - 0x220]
cmp dword [ecx - 0xc], 0
jle 0x40adc7
lea edx, [ebp - 0x220]
push edx
lea eax, [ebp - 0x21c]
push str._id
push eax
call fcn.00404060
add esp, 0xc
mov byte [ebp - 4], 0xd
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x22c]
call fcn.0040bfe0
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40adc7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x22c]
mov esi, dword [ebp - 0x608]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
mov dword [ebp - 0x238], eax
cmp eax, esi
je 0x40ae32
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40ae22
mov edx, eax
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x40ae22
mov ecx, edx
push ecx
call fcn.004041f0
add esp, 4
mov ebx, eax
or edx, 0xffffffff
lock xadd dword [edi], edx
dec edx
test edx, edx
jg 0x40ae17
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
add ebx, 0x10
mov dword [ebp - 0x608], ebx
jmp 0x40ae32
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x608]
call fcn.00404140
mov ebx, dword [ebp - 0x228]
mov esi, dword [ebp - 0x604]
add ebx, 0xfffffff0
add esi, 0xfffffff0
mov dword [ebp - 0x21c], ebx
cmp ebx, esi
je 0x40aea7
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40ae91
mov eax, dword [ebx]
cmp eax, dword [esi]
jne 0x40ae91
mov ecx, ebx
push ecx
call fcn.004041f0
add esp, 4
mov ebx, eax
or edx, 0xffffffff
lock xadd dword [edi], edx
dec edx
test edx, edx
jg 0x40ae80
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
add ebx, 0x10
mov dword [ebp - 0x604], ebx
mov ebx, dword [ebp - 0x21c]
jmp 0x40aea7
mov ecx, dword [ebp - 0x228]
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x604]
call fcn.00404140
xor edi, edi
push str.ExamShield_Version
lea ecx, [ebp - 0x3ec]
mov dword [ebp - 0x5dc], edi
mov dword [ebp - 0x5d8], edi
call fcn.0040bec0
mov eax, dword [ebp + 8]
cmp byte [eax + 0xb8], 0
je 0x40aee8
push str.ExamShield__Compatibility_Check__Version
lea ecx, [ebp - 0x3ec]
mov byte [ebp - 0x268], 1
call fcn.0040bec0
lea ecx, [ebp - 0x6c8]
call fcn.00414645
mov esi, 1
cmp eax, esi
je 0x40af6b
call fcn.0041d0e0
call fcn.00415761
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40af1b
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov edi, dword [ebp - 0x23c]
add eax, 0x10
mov dword [edi], eax
mov ecx, edi
call fcn.004042d0
lea ecx, [ebp - 0x6c8]
push ecx
mov dword [ebp - 0x240], esi
mov byte [ebp - 4], 8
call fcn.004068f0
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x244]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40b08c
lea ecx, [ebp - 0x260]
call fcn.0041cc06
push edi
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x228]
push 0x4000
push ecx
lea ecx, [ebp - 0x260]
call fcn.0041cade
test eax, eax
jne 0x40b01c
push edi
push edi
push str.Unable_to_open_file
call fcn.00414bad
call fcn.00415761
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40afc0
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov edi, dword [ebp - 0x23c]
add eax, 0x10
mov dword [edi], eax
mov ecx, edi
call fcn.004042d0
lea ecx, [ebp - 0x260]
mov dword [ebp - 0x240], esi
mov byte [ebp - 4], 9
call fcn.0041cee5
lea ecx, [ebp - 0x6c8]
push ecx
mov byte [ebp - 4], 8
call fcn.004068f0
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x244]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40b08c
lea ecx, [ebp - 0x230]
push ecx
lea ecx, [ebp - 0x260]
call fcn.0041d006
lea ecx, [ebp - 0x260]
call fcn.0041cea7
mov edi, dword [ebp - 0x23c]
lea edx, [ebp - 0x230]
push edx
mov ecx, edi
call fcn.00403fd0
lea ecx, [ebp - 0x260]
mov dword [ebp - 0x240], esi
mov byte [ebp - 4], 9
call fcn.0041cee5
lea eax, [ebp - 0x6c8]
push eax
mov byte [ebp - 4], 8
call fcn.004068f0
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x244]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b098
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x248]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b0be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x230]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b0e4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 4
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b101
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b127
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x238]
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b14a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x234]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b170
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b196
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00500836
mov esp, ebp
pop ebp
ret 8