Function at 0x40c520
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43b6a3
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2c2c
call fcn.00433ef0
mov eax, dword [0x447034]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
xor ebx, ebx
push 0x286
lea ecx, [ebp - 0x4aa]
push ebx
push ecx
mov dword [ebp - 0x2c30], eax
mov dword [ebp - 0x2c34], ebx
mov word [ebp - 0x4ac], bx
call fcn.0042a8d0
add esp, 0xc
push 0x286
lea edx, [ebp - 0x2bc2]
push ebx
push edx
mov word [ebp - 0x2bc4], bx
call fcn.0042a8d0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x2bc4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.drivers
lea ecx, [ebp - 0x2bc4]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov ecx, 6
mov esi, str.kwatch32.sys
lea edi, [ebp - 0x293c]
rep movsd dword es:[edi], dword [esi]
push 0x1ee
lea edx, [ebp - 0x2922]
push ebx
push edx
movsw word es:[edi], word [esi]
call fcn.0042a8d0
mov ecx, 6
mov esi, str.kwatch64.sys
lea edi, [ebp - 0x2734]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
push 0x1ee
lea eax, [ebp - 0x271a]
push ebx
push eax
movsw word es:[edi], word [esi]
call fcn.0042a8d0
mov ecx, dword [str.kavapim.sys]
mov edx, dword [0x44063c]
mov eax, dword [0x440640]
add esp, 0xc
mov dword [ebp - 0x252c], ecx
mov ecx, dword [0x440644]
push 0x1f0
mov dword [ebp - 0x2520], ecx
mov dword [ebp - 0x2528], edx
mov edx, dword [0x440648]
mov dword [ebp - 0x2524], eax
mov eax, dword [0x44064c]
lea ecx, [ebp - 0x2514]
push ebx
push ecx
mov dword [ebp - 0x251c], edx
mov dword [ebp - 0x2518], eax
call fcn.0042a8d0
mov ecx, dword [0x440658]
mov edx, dword [str.kavpm.sys]
mov eax, dword [0x440654]
add esp, 0xc
push 0x1f4
mov dword [ebp - 0x231c], ecx
mov dword [ebp - 0x2324], edx
mov edx, dword [0x44065c]
mov dword [ebp - 0x2320], eax
mov eax, dword [0x440660]
lea ecx, [ebp - 0x2310]
push ebx
push ecx
mov dword [ebp - 0x2318], edx
mov dword [ebp - 0x2314], eax
call fcn.0042a8d0
mov edx, dword [str.kavuty.sys]
mov ecx, dword [0x44066c]
mov eax, dword [0x440668]
add esp, 0xc
mov dword [ebp - 0x211c], edx
mov edx, dword [0x440670]
mov dword [ebp - 0x2114], ecx
movzx ecx, word [0x440678]
push 0x1f2
mov dword [ebp - 0x2110], edx
mov dword [ebp - 0x2118], eax
mov eax, dword [0x440674]
lea edx, [ebp - 0x2106]
push ebx
push edx
mov dword [ebp - 0x210c], eax
mov word [ebp - 0x2108], cx
call fcn.0042a8d0
mov edx, dword [0x440684]
mov eax, dword [str.kavfm.sys]
mov ecx, dword [0x440680]
add esp, 0xc
push 0x1f4
mov dword [ebp - 0x1f0c], edx
mov dword [ebp - 0x1f14], eax
mov eax, dword [0x440688]
mov dword [ebp - 0x1f10], ecx
mov ecx, dword [0x44068c]
lea edx, [ebp - 0x1f00]
push ebx
push edx
mov dword [ebp - 0x1f08], eax
mov dword [ebp - 0x1f04], ecx
call fcn.0042a8d0
mov edx, dword [0x440698]
mov eax, dword [str.ksdef.sys]
mov ecx, dword [0x440694]
add esp, 0xc
push 0x1f4
mov dword [ebp - 0x1d04], edx
mov dword [ebp - 0x1d0c], eax
mov eax, dword [0x44069c]
mov dword [ebp - 0x1d08], ecx
mov ecx, dword [0x4406a0]
lea edx, [ebp - 0x1cf8]
push ebx
push edx
mov dword [ebp - 0x1d00], eax
mov dword [ebp - 0x1cfc], ecx
call fcn.0042a8d0
add esp, 0xc
push 0x1ec
lea eax, [ebp - 0x1ae8]
push ebx
mov ecx, 7
mov esi, str.kdekernel.sys
lea edi, [ebp - 0x1b04]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.0042a8d0
mov ecx, dword [str.bc.sys]
mov edx, dword [0x4406c4]
mov eax, dword [0x4406c8]
add esp, 0xc
mov dword [ebp - 0x18fc], ecx
movzx ecx, word [0x4406cc]
push 0x1fa
mov dword [ebp - 0x18f8], edx
lea edx, [ebp - 0x18ee]
push ebx
push edx
mov dword [ebp - 0x18f4], eax
mov word [ebp - 0x18f0], cx
call fcn.0042a8d0
mov ecx, 6
mov esi, str.bootsafe.sys
lea edi, [ebp - 0x16f4]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
movsw word es:[edi], word [esi]
push 0x1ee
lea eax, [ebp - 0x16da]
push ebx
push eax
call fcn.0042a8d0
mov ecx, 6
mov esi, str.kavbootc.sys
lea edi, [ebp - 0x14ec]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
push 0x1ee
lea ecx, [ebp - 0x14d2]
push ebx
push ecx
movsw word es:[edi], word [esi]
call fcn.0042a8d0
mov ecx, 7
mov esi, str.kavbootc64.sys
lea edi, [ebp - 0x12e4]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
push 0x1ea
lea edx, [ebp - 0x12c6]
push ebx
push edx
movsw word es:[edi], word [esi]
call fcn.0042a8d0
mov eax, dword [str.kavsafe.sys]
mov ecx, dword [0x44072c]
mov edx, dword [0x440730]
add esp, 0xc
mov dword [ebp - 0x10dc], eax
mov eax, dword [0x440734]
push 0x1f0
mov dword [ebp - 0x10d0], eax
mov dword [ebp - 0x10d8], ecx
mov ecx, dword [0x440738]
mov dword [ebp - 0x10d4], edx
mov edx, dword [0x44073c]
lea eax, [ebp - 0x10c4]
push ebx
push eax
mov dword [ebp - 0x10cc], ecx
mov dword [ebp - 0x10c8], edx
call fcn.0042a8d0
mov ecx, 6
mov esi, str.kdhacker.sys
lea edi, [ebp - 0xed4]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
push 0x1ee
lea ecx, [ebp - 0xeba]
push ebx
push ecx
movsw word es:[edi], word [esi]
call fcn.0042a8d0
mov ecx, 7
mov esi, str.kdhacker64.sys
lea edi, [ebp - 0xccc]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
push 0x1ea
lea edx, [ebp - 0xcae]
push ebx
push edx
movsw word es:[edi], word [esi]
call fcn.0042a8d0
mov eax, dword [str.kisknl.sys]
mov ecx, dword [0x440780]
mov edx, dword [0x440784]
add esp, 0xc
mov dword [ebp - 0xac4], eax
mov eax, dword [0x440788]
mov dword [ebp - 0xac0], ecx
mov ecx, dword [0x44078c]
mov dword [ebp - 0xabc], edx
mov dx, word [0x440790]
push 0x1f2
mov dword [ebp - 0xab8], eax
mov dword [ebp - 0xab4], ecx
mov word [ebp - 0xab0], dx
push ebx
lea eax, [ebp - 0xaae]
push eax
call fcn.0042a8d0
mov ecx, 6
mov esi, str.kisknl64.sys
lea edi, [ebp - 0x8bc]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
push 0x1ee
lea ecx, [ebp - 0x8a2]
push ebx
push ecx
movsw word es:[edi], word [esi]
call fcn.0042a8d0
mov ecx, dword [0x4407b8]
mov edx, dword [str.ksapi.sys]
mov eax, dword [0x4407b4]
add esp, 0xc
push 0x1f4
mov dword [ebp - 0x6ac], ecx
mov dword [ebp - 0x6b4], edx
mov edx, dword [0x4407bc]
mov dword [ebp - 0x6b0], eax
mov eax, dword [0x4407c0]
lea ecx, [ebp - 0x6a0]
push ebx
push ecx
mov dword [ebp - 0x6a8], edx
mov dword [ebp - 0x6a4], eax
call fcn.0042a8d0
add esp, 0xc
xor esi, esi
cmp esi, 0x12
mov dword [ebp - 0x2c20], esi
jae 0x40cc98
push 0x104
lea edx, [ebp - 0x2bc4]
push edx
lea eax, [ebp - 0x4ac]
push eax
call fcn.00428918
imul esi, esi, 0x208
add esp, 0xc
lea ecx, [ebp + esi - 0x293c]
push ecx
lea edx, [ebp - 0x4ac]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x4ac]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40cc8a
test al, 0x10
jne 0x40cc8a
lea ecx, [ebp - 0x2c24]
push ecx
lea edx, [ebp - 0x2c28]
push edx
lea eax, [ebp - 0x2c38]
push eax
lea ecx, [ebp - 0x4ac]
push ecx
lea edi, [ebp - 0x2c2c]
mov dword [ebp - 0x2c2c], ebx
mov dword [ebp - 0x2c38], ebx
mov dword [ebp - 0x2c28], ebx
mov dword [ebp - 0x2c24], ebx
call fcn.004037d0
add esp, 0x10
cmp eax, 1
jne 0x40cc8a
mov dword [ebp - 4], ebx
mov eax, 7
mov dword [ebp - 0x2c04], eax
mov dword [ebp - 0x2c08], ebx
mov word [ebp - 0x2c18], bx
mov dword [ebp - 0x2be8], eax
mov dword [ebp - 0x2bec], ebx
mov word [ebp - 0x2bfc], bx
mov dword [ebp - 0x2bcc], eax
mov dword [ebp - 0x2bd0], ebx
mov word [ebp - 0x2be0], bx
push 0x206
lea edx, [ebp - 0x222]
push ebx
mov byte [ebp - 4], 3
push edx
mov word [ebp - 0x224], bx
call fcn.0042a8d0
mov eax, dword [ebp - 0x2c38]
movzx ecx, ax
add esp, 0xc
push ecx
shr eax, 0x10
push eax
mov eax, dword [ebp - 0x2c2c]
movzx edx, ax
push edx
shr eax, 0x10
push eax
push str._d._d._d._d
lea eax, [ebp - 0x224]
push 0x104
push eax
call fcn.004294e2
lea eax, [ebp - 0x224]
add esp, 0x1c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40cb73
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp - 0x224]
push ecx
lea esi, [ebp - 0x2c00]
call fcn.00407ac0
mov eax, dword [ebp - 0x2c24]
movzx edx, ax
push edx
shr eax, 0x10
push eax
mov eax, dword [ebp - 0x2c28]
movzx ecx, ax
push ecx
shr eax, 0x10
push eax
push str._d._d._d._d
lea edx, [ebp - 0x224]
push 0x104
push edx
call fcn.004294e2
lea eax, [ebp - 0x224]
add esp, 0x1c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40cbd3
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x224]
push eax
lea esi, [ebp - 0x2be4]
call fcn.00407ac0
lea eax, [ebp - 0x4ac]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40cc00
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp - 0x4ac]
push ecx
lea esi, [ebp - 0x2c1c]
call fcn.00407ac0
mov edx, dword [ebp - 0x2c30]
mov edi, dword [edx + 4]
mov ecx, dword [edi + 4]
mov eax, esi
push eax
push ecx
push edi
call fcn.0040efe0
mov ecx, dword [ebp - 0x2c30]
mov esi, eax
call fcn.0040f080
mov dword [edi + 4], esi
mov eax, dword [esi + 4]
lea edx, [ebp - 0x2c1c]
push edx
mov dword [eax], esi
mov dword [ebp - 0x2c34], 1
mov byte [ebp - 4], bl
call fcn.0040ed20
mov esi, dword [ebp - 0x2c20]
mov dword [ebp - 4], 0xffffffff
add esi, 1
jmp 0x40ca26
mov esi, dword [ebp - 0x2c20]
add esi, 1
jmp 0x40ca26
mov eax, dword [ebp - 0x2c34]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.004282a0
mov esp, ebp
pop ebp
ret