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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x110]
sub esp, 0x12c
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], 0x415144
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov esi, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x31f
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp + 8], 0x415144
mov dword [esp + 4], str.Failure_to_open_file__s_n
mov dword [esp], eax
call fcn.00401810
mov dword [esp + 0xc], ebx
mov dword [esp], esi
mov dword [esp + 0x10], 0
mov dword [esp + 8], 8
mov dword [esp + 4], 0x415144
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov dword [esp], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x64
call dword [sym.imp.kernel32.dll_SetFilePointer]
sub esp, 0x10
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetEndOfFile]
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
call fcn.00401020
lea eax, [ebp - 0x118]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [0x439004]
sub esp, 8
mov esi, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x39f
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], 0x415166
call fcn.00401810
mov eax, dword [ebp - 0x118]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 0x10
mov esi, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3a3
xor eax, eax
cmp esi, 0x80070057
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], 0x415180
call fcn.00401810
mov eax, dword [ebp - 0x118]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4151a2
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 0x10
mov esi, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3a7
xor eax, eax
cmp esi, 0x80070057
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], 0x415180
call fcn.00401810
mov eax, dword [ebp - 0x118]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.file
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 0x10
mov esi, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3ab
xor eax, eax
cmp esi, 0x8007007b
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.Expected_HRESULT_FROM_WIN32_ERROR_INVALID_NAME___got__08lx_n
call fcn.00401810
mov eax, dword [ebp - 0x118]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.file.bad
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 0x10
mov esi, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3b0
xor eax, eax
cmp esi, 0x8007007b
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.Expected_HRESULT_FROM_WIN32_ERROR_INVALID_NAME___got__08lx_n
call fcn.00401810
mov eax, dword [ebp - 0x118]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.file.dll
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 0x10
mov esi, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3b5
xor eax, eax
cmp esi, 0x80070002
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.Expected_HRESULT_FROM_WIN32_ERROR_FILE_NOT_FOUND___got__08lx_n
call fcn.00401810
mov eax, dword [ebp - 0x118]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.file.exe
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 0x10
mov esi, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3ba
xor eax, eax
cmp esi, 0x80070002
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.Expected_HRESULT_FROM_WIN32_ERROR_FILE_NOT_FOUND___got__08lx_n
call fcn.00401810
mov eax, dword [ebp - 0x118]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.test.dll
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 0x10
mov esi, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3bf
xor eax, eax
cmp esi, 0x80131018
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.Expected_COR_E_ASSEMBLYEXPECTED__got__08lx_n
call fcn.00401810
mov eax, dword [ebp - 0x118]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4152a0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 0x10
mov esi, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3c4
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp + 4], 0x415166
mov dword [esp], eax
call fcn.00401810
mov dword [esp], ebx
mov dword [esp + 4], 0x104
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryA]
sub esp, 8
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov edi, dword [sym.imp.kernel32.dll_GetFileAttributesA]
add eax, ebx
mov dword [eax], 0x7373615c
mov dword [eax + 4], 0x6c626d65
mov dword [eax + 8], 0x41475c79
mov dword [eax + 0xc], 0x534d5f43
mov dword [eax + 0x10], 0x775c4c49
mov dword [eax + 0x14], 0x5c656e69
mov dword [eax + 0x18], 0x302e315c
mov dword [eax + 0x1c], 0x302e302e
mov dword [eax + 0x20], 0x64325f5f
mov dword [eax + 0x24], 0x31363330
mov dword [eax + 0x28], 0x63316237
mov dword [eax + 0x2c], 0x32653133
mov dword [eax + 0x30], 0x775c3566
mov dword [eax + 0x34], 0x2e656e69
mov dword [eax + 0x38], 0x6c6c64
mov dword [esp], ebx
call edi
sub esp, 4
mov esi, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3ca
xor eax, eax
cmp esi, 0xffffffff
lea esi, [ebp - 0x114]
setne al
mov dword [esp + 4], str.Expected_assembly_to_exist_n
mov dword [esp], eax
call fcn.00401810
mov eax, dword [ebp - 0x118]
mov dword [ebp - 0x114], 0xf00dbad
mov edx, dword [eax]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4152ce
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x14
mov dword [ebp - 0x11c], eax
call fcn.004107b0
mov edx, dword [ebp - 0x11c]
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3cf
xor eax, eax
test edx, edx
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], 0x415166
call fcn.00401810
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3d0
mov eax, dword [ebp - 0x114]
mov dword [esp + 4], str.Expected_IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED__got__ld_n
cmp eax, 1
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401810
mov dword [esp], ebx
call edi
sub esp, 4
mov ebx, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3d4
xor eax, eax
cmp ebx, 0xffffffff
sete al
mov dword [esp + 4], str.Expected_assembly_not_to_exist_n
mov dword [esp], eax
call fcn.00401810
mov eax, dword [ebp - 0x118]
mov dword [ebp - 0x114], 0xf00dbad
mov edx, dword [eax]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4152ce
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x14
mov ebx, eax
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3d8
xor eax, eax
cmp ebx, 1
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], 0x41533c
call fcn.00401810
call fcn.004107b0
mov dword [eax], 0x415021
mov dword [eax + 4], 0x3d9
mov eax, dword [ebp - 0x114]
mov dword [esp + 4], str.Expected_IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED__got__ld_n
cmp eax, 3
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401810
mov ebx, dword [sym.imp.kernel32.dll_DeleteFileA]
mov dword [esp], 0x415144
call ebx
sub esp, 4
mov dword [esp], section..rdata
call ebx
mov eax, dword [ebp - 0x118]
sub esp, 4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret