Function at 0x40afc0
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Get file attributes
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
push ebx
push esi
push edi
mov byte [ebp - 0x84], 0
cmp dword [ebp + 8], 0
je 0x40b02e
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x88], eax
cmp dword [ebp - 0x88], 0xffffffff
je 0x40b02e
test byte [ebp - 0x88], 0x10
je 0x40b02e
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.0041a850
add esp, 8
push 0x4549dc
lea eax, [ebp - 0x84]
push eax
call fcn.0041a84c
add esp, 8
movsx eax, byte [ebp - 0x84]
test eax, eax
jne 0x40b060
push 0x64
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push str.drivers_
lea eax, [ebp - 0x84]
push eax
call fcn.0041a84c
add esp, 8
push 0x4549ec
lea eax, [ebp - 0x84]
push eax
call fcn.0041a84c
add esp, 8
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40b0fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40b0fa
push 0x64
push 0x422ee0
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str._system32drivers_
push 0x422ee0
call fcn.0041a84c
add esp, 8
push 0x454a10
push 0x422ee0
call fcn.0041a84c
add esp, 8
push str..sy_
push 0x422ee0
call fcn.0041a84c
add esp, 8
push 0x422ee0
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp + 0xc], 0
je 0x40b1bc
mov eax, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x24c]
push eax
call fcn.0041a850
add esp, 8
push 0x454a24
lea eax, [ebp - 0x24c]
push eax
call fcn.0041a84c
add esp, 8
push str.hardlock.sys
lea eax, [ebp - 0x24c]
push eax
call fcn.0041a84c
add esp, 8
lea eax, [ebp - 0x1c8]
push eax
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x1cc], eax
cmp dword [ebp - 0x1cc], 0xffffffff
je 0x40b1bc
push 0
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40b1a8
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x4000c
call fcn.004054a2
add esp, 4
mov eax, 0xffffffff
jmp 0x40b281
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x40b281
push 0
push pe_nt_image_headers32
push 2
push 0x423140
push 0
push 0xc0000000
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x422ed4], eax
cmp dword [0x422ed4], 0xffffffff
jne 0x40b207
push 0x40003
call fcn.004054a2
add esp, 4
mov eax, 0xffffffff
jmp 0x40b281
push 0
lea eax, [ebp - 0x250]
push eax
push 0x1b800
push 0x436f10
mov eax, dword [0x422ed4]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40b24a
push 0x40004
call fcn.004054a2
add esp, 4
mov eax, 0xffffffff
jmp 0x40b281
mov eax, dword [0x422ed4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40b27a
push 0x40005
call fcn.004054a2
add esp, 4
mov eax, 0xffffffff
jmp 0x40b281
xor eax, eax
jmp 0x40b281
pop edi
pop esi
pop ebx
leave
ret