Function at 0x40e590
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c0ea1
mov eax, dword fs:[0]
push eax
sub esp, 0x238
mov eax, dword [0x4f4de0]
xor eax, esp
mov dword [esp + 0x230], eax
push ebx
push esi
push edi
mov eax, dword [0x4f4de0]
xor eax, esp
push eax
lea eax, [esp + 0x248]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x28], eax
cmp esi, ebx
je 0x40e75b
xor edi, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x250], ebx
mov edx, dword [0x4fc0d8]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fc0d8
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push esi
lea ecx, [esp + 0x18]
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_s
push ecx
mov byte [esp + 0x25c], 1
call fcn.004048a0
add esp, 0xc
mov dword [esp + 0x2c], reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x30], VariantClear
xor esi, esi
jmp 0x40e640
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + esi*4 + 0x2c]
lea edx, [esp + 0x18]
push edx
push 1
push ebx
push ecx
push eax
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x40e71f
xor eax, eax
cmp edi, ebx
je 0x40e671
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], ebx
cmp eax, ebx
jne 0x40e71f
push 0x206
lea eax, [esp + 0x3a]
xor edx, edx
push ebx
push eax
mov word [esp + 0x40], dx
call fcn.00497680
add esp, 0xc
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x38]
push edx
push ebx
lea ecx, [esp + 0x28]
mov dword [esp + 0x30], 0x104
call fcn.0040b840
test eax, eax
jne 0x40e71f
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x14]
call fcn.00404050
push ebx
push 0x4d65b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x258], 2
call fcn.00410220
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40e781
mov byte [esp + 0x250], 1
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e71f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc esi
cmp esi, 2
jb 0x40e640
mov byte [esp + 0x250], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e750
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, ebx
je 0x40e75b
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
mov ecx, dword [esp + 0x248]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.00497941
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x10]
mov eax, edx
lea esi, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40e790
mov ecx, dword [esp + 0x28]
sub eax, esi
sar eax, 1
push eax
push edx
call fcn.004054b0
mov byte [esp + 0x250], 1
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e7d2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x250], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e7f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40e808
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
jmp 0x40e75d