Function at 0x40c840
Capabilities:
Check if file exists
Create directory
Create process on windows
Delete file
Get common file path
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x210
lea eax, [esp + 0x10c]
push ebx
push ebp
push esi
push edi
push 0x104
push eax
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, str._system36otray.exe
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x11c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and ecx, 3
lea eax, [esp + 0x11c]
rep movsb byte es:[edi], byte [esi]
push eax
call ebp
cmp eax, 0xffffffff
je 0x40caa6
test al, 0x10
jne 0x40caa6
mov ecx, dword [esp + 0x224]
mov eax, 1
cmp ecx, ebx
je 0x40caa8
lea ecx, [esp + 0x11c]
mov dword [esp + 0x10], ebx
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40c909
lea edx, [esp + 0x11c]
push edx
call fcn.00407fc0
add esp, 4
test eax, eax
jne 0x40c909
lea eax, [esp + 0x11c]
push eax
call fcn.00406390
add esp, 4
mov dword [esp + 0x10], 1
jmp 0x40c928
lea ecx, [esp + 0x11c]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea edx, [esp + 0x11c]
push 1
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [0x41c348]
lea edi, [esp + 0x14]
mov cl, al
mov dword [esp + 0x14], eax
add cl, bl
xor eax, eax
mov byte [esp + 0x14], cl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x18]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.autorun.inf
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x18]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
cmp eax, 0xffffffff
je 0x40c9c0
test al, 0x10
jne 0x40c9c0
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40c9c0
lea edx, [esp + 0x18]
push edx
call fcn.00406390
add esp, 4
mov dword [esp + 0x10], 1
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ntldr.exe
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x18]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
cmp eax, 0xffffffff
je 0x40ca38
test al, 0x10
jne 0x40ca38
lea ecx, [esp + 0x18]
push ecx
call fcn.00406390
add esp, 4
mov dword [esp + 0x10], 1
inc ebx
cmp ebx, 0x18
jb 0x40c928
call fcn.0040c3c0
lea edx, [esp + 0x11c]
push edx
call fcn.0040cac0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionImage_File_Execution_Options
call fcn.0040c780
add esp, 8
push 0x44
push 0x41a0e0
push 0x41c990
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x40ca97
push 5
push 0
push 0
push str.http:__kaba.360safe.com_download.html_a6047
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret