Function at 0x40a6d0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431dfe
mov eax, dword fs:[0]
push eax
mov eax, 0x102c
call fcn.0042aab0
mov eax, dword [0x43e0b0]
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 ebx, ecx
xor edi, edi
push 0xffe
lea ecx, [ebp - 0x100e]
xor eax, eax
push edi
mov dword [ebp - 0x1034], edi
push ecx
mov dword [ebp - 0x1020], ebx
mov word [ebp - 0x1010], ax
call fcn.00420a30
add esp, 0xc
mov dword [ebp - 0x1030], edi
mov dword [ebp - 0x102c], edi
mov dword [ebp - 0x1028], edi
mov esi, 1
mov dword [ebp - 4], esi
mov edx, dword [0x43e060]
mov eax, dword [edx + 0xc]
mov ecx, 0x43e060
mov dword [ebp - 0x101c], 0x800
call eax
add eax, 0x10
mov dword [ebx], eax
lea ecx, [ebp - 0x1018]
push ecx
mov ecx, str.SpesmarlIlnclzs
mov dword [ebp - 0x1034], esi
call fcn.0040dcd0
mov eax, dword [eax]
add esp, 4
lea edx, [ebp - 0x1024]
push edx
push 0x20019
push edi
push eax
push 0x80000002
mov dword [ebp - 0x1024], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
jne 0x40a7be
mov ecx, dword [ebp - 0x1024]
xor eax, eax
mov dword [ebp - 0x1030], ecx
mov dword [ebp - 0x102c], edi
cmp eax, edi
mov eax, dword [ebp - 0x1018]
sete byte [ebp - 0x1011]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a7e7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0x1011], 0
je 0x40a8a0
lea ecx, [ebp - 0x1018]
push ecx
mov ecx, str.UMsa
call fcn.0040dcd0
mov eax, dword [eax]
add esp, 4
push eax
lea edx, [ebp - 0x1030]
push edx
lea edi, [ebp - 0x101c]
lea esi, [ebp - 0x1010]
call fcn.00405b10
test eax, eax
mov eax, dword [ebp - 0x1018]
sete byte [ebp - 0x1011]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a84e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0x1011], 0
je 0x40a89e
lea ecx, [ebp - 0x1010]
push ecx
lea edx, [ebp - 0x101c]
push edx
call fcn.0040d780
add esp, 8
mov edi, ebx
mov byte [ebp - 4], 2
call fcn.004048a0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x101c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a89e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor edi, edi
mov eax, dword [ebx]
cmp dword [eax - 0xc], edi
je 0x40a8b6
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40a941
lea ecx, [ebp - 0x1018]
push ecx
call fcn.0040ca10
add esp, 4
push eax
lea edx, [ebp - 0x101c]
push edx
mov ebx, 0x438cc0
mov byte [ebp - 4], 3
call fcn.0040cc90
add esp, 8
mov byte [ebp - 4], 4
mov edi, dword [ebp - 0x1020]
call fcn.004048a0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x101c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a913
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 - 0x1018]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a939
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x1020]
xor edi, edi
mov eax, dword [ebp - 0x1030]
cmp eax, edi
je 0x40a952
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
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.0041e965
mov esp, ebp
pop ebp
ret